diff --git a/ShadowEditor.Server/Controllers/TextureController.cs b/ShadowEditor.Server/Controllers/TextureController.cs index 41eca813..c101b684 100644 --- a/ShadowEditor.Server/Controllers/TextureController.cs +++ b/ShadowEditor.Server/Controllers/TextureController.cs @@ -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(); - foreach (var i in scenes) + foreach (var i in docs) { var info = new TextureModel { diff --git a/ShadowEditor.Web/src/editor/Physics.js b/ShadowEditor.Web/src/editor/Physics.js index 5e8d72c5..2983892c 100644 --- a/ShadowEditor.Web/src/editor/Physics.js +++ b/ShadowEditor.Web/src/editor/Physics.js @@ -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;