Bläddra i källkod

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe 6 år sedan
förälder
incheckning
e40ec8a91d
2 ändrade filer med 5 tillägg och 5 borttagningar
  1. 3 3
      src/Physics/Plugins/cannonJSPlugin.ts
  2. 2 2
      src/Shaders/geometry.vertex.fx

+ 3 - 3
src/Physics/Plugins/cannonJSPlugin.ts

@@ -111,7 +111,7 @@ export class CannonJSPlugin implements IPhysicsEnginePlugin {
             //try to keep the body moving in the right direction by taking old properties.
             //Should be tested!
             if (oldBody) {
-                ['force', 'torque', 'velocity', 'angularVelocity'].forEach(function(param) {
+                ['force', 'torque', 'velocity', 'angularVelocity'].forEach(function (param) {
                     impostor.physicsBody[param].copy(oldBody[param]);
                 });
             }
@@ -214,7 +214,7 @@ export class CannonJSPlugin implements IPhysicsEnginePlugin {
         if (impostorJoint.joint.type !== PhysicsJoint.SpringJoint) {
             this.world.addConstraint(constraint);
         } else {
-            (<SpringJointData>impostorJoint.joint.jointData).forceApplicationCallback = (<SpringJointData>impostorJoint.joint.jointData).forceApplicationCallback || function() {
+            (<SpringJointData>impostorJoint.joint.jointData).forceApplicationCallback = (<SpringJointData>impostorJoint.joint.jointData).forceApplicationCallback || function () {
                 constraint.applyForce();
             };
             impostorJoint.mainImpostor.registerAfterPhysicsStep((<SpringJointData>impostorJoint.joint.jointData).forceApplicationCallback);
@@ -626,7 +626,7 @@ export class CannonJSPlugin implements IPhysicsEnginePlugin {
         //this will force cannon to execute at least one step when using interpolation
         let step_tmp1 = new this.BJSCANNON.Vec3();
         let Engine = this.BJSCANNON;
-        this.BJSCANNON.World.prototype.step = function(dt: number, timeSinceLastCalled: number, maxSubSteps: number) {
+        this.BJSCANNON.World.prototype.step = function (dt: number, timeSinceLastCalled: number, maxSubSteps: number) {
             maxSubSteps = maxSubSteps || 10;
             timeSinceLastCalled = timeSinceLastCalled || 0;
             if (timeSinceLastCalled === 0) {

+ 2 - 2
src/Shaders/geometry.vertex.fx

@@ -11,10 +11,10 @@ attribute vec3 normal;
 varying vec2 vUV;
 uniform mat4 diffuseMatrix;
 #ifdef UV1
-varying vec2 uv;
+attribute vec2 uv;
 #endif
 #ifdef UV2
-varying vec2 uv2;
+attribute vec2 uv2;
 #endif
 #endif