From 2499d94be9e0132eef739d08ee91ef63d1f91ff4 Mon Sep 17 00:00:00 2001 From: liteng <930372551@qq.com> Date: Fri, 14 Sep 2018 21:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=B9=E7=90=86=E7=AE=A1=E7=90=86=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/TextureController.cs | 4 ++-- ShadowEditor.Web/src/editor/Physics.js | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) 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;