Forráskód Böngészése

Added setStepId() to allow recalculating previous steps.

Gianni 8 éve
szülő
commit
2dcec852ed

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 3439 - 3438
dist/preview release/babylon.d.ts


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 3 - 3
dist/preview release/babylon.js


+ 4 - 0
dist/preview release/babylon.max.js

@@ -16361,6 +16361,10 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Scene.prototype.setStepId = function (newStepId) {
+            this._currentStepId = newStepId;
+        };
+        ;
         Scene.prototype.getStepId = function () {
             return this._currentStepId;
         };

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 3439 - 3438
dist/preview release/babylon.module.d.ts


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 3 - 3
dist/preview release/babylon.worker.js


+ 6 - 2
src/babylon.scene.ts

@@ -500,6 +500,10 @@
             return this._useRightHandedSystem;
         }
 
+        public setStepId(newStepId: number): void {
+            this._currentStepId = newStepId;
+        };
+
         public getStepId(): number {
             return this._currentStepId;
         };
@@ -2965,7 +2969,7 @@
               var internalSteps = Math.floor(this._timeAccumulator / defaultTimeStep);
               internalSteps = Math.min(internalSteps, maxSubSteps);
 
-              for(this._currentInternalStep=0; this._currentInternalStep<internalSteps; this._currentInternalStep++){
+              for(this._currentInternalStep = 0; this._currentInternalStep < internalSteps; this._currentInternalStep++){
 
                 this.onBeforeStepObservable.notifyObservers(this);
 
@@ -2984,7 +2988,7 @@
                 this.onAfterStepObservable.notifyObservers(this);
                 this._currentStepId++;
 
-                if((internalSteps>1) && (this._currentInternalStep != internalSteps-1)) {
+                if((internalSteps > 1) && (this._currentInternalStep != internalSteps - 1)) {
                     // Q: can this be optimized by putting some code in the afterStep callback?
                     // I had to put this code here, otherwise mesh attached to bones of another mesh skeleton,
                     // would return incorrect positions for internal stepIds (non-rendered steps)