纹理管理测试。

This commit is contained in:
liteng 2018-09-14 21:31:35 +08:00
parent ccbddec72d
commit 2499d94be9
2 changed files with 10 additions and 8 deletions

View File

@ -29,11 +29,11 @@ namespace ShadowEditor.Server.Controllers
public JsonResult List()
{
var mongo = new MongoHelper();
var scenes = mongo.FindAll(Constant.TextureCollectionName);
var docs = mongo.FindAll(Constant.TextureCollectionName);
var list = new List<TextureModel>();
foreach (var i in scenes)
foreach (var i in docs)
{
var info = new TextureModel
{

View File

@ -16,11 +16,11 @@ function Physics(options) {
this.armMovement = 0;
// 物理环境配置
this.collisionConfiguration = new Ammo.btSoftBodyRigidBodyCollisionConfiguration();
this.dispatcher = new Ammo.btCollisionDispatcher(this.collisionConfiguration);
this.broadphase = new Ammo.btDbvtBroadphase();
this.solver = new Ammo.btSequentialImpulseConstraintSolver();
this.softBodySolver = new Ammo.btDefaultSoftBodySolver();
this.collisionConfiguration = new Ammo.btSoftBodyRigidBodyCollisionConfiguration(); // 软体刚体碰撞配置
this.dispatcher = new Ammo.btCollisionDispatcher(this.collisionConfiguration); // 碰撞调度器
this.broadphase = new Ammo.btDbvtBroadphase(); // dbvt粗测
this.solver = new Ammo.btSequentialImpulseConstraintSolver(); // 顺序脉冲约束求解器
this.softBodySolver = new Ammo.btDefaultSoftBodySolver(); // 默认软体求解器
this.world = new Ammo.btSoftRigidDynamicsWorld(this.dispatcher, this.broadphase, this.solver, this.collisionConfiguration, this.softBodySolver);
@ -111,7 +111,9 @@ Physics.prototype.onThrowBall = function (event) {
// Creates a ball and throws it
var ballMass = 35;
var ballRadius = 0.4;
var ballMaterial = new THREE.MeshPhongMaterial({ color: 0x202020 });
var ballMaterial = new THREE.MeshPhongMaterial({
color: 0x202020
});
var ball = new THREE.Mesh(new THREE.SphereBufferGeometry(ballRadius, 14, 10), ballMaterial);
ball.castShadow = true;