David Catuhe 6 лет назад
Родитель
Сommit
f6ba69b475

+ 2 - 2
Playground/babylon.d.txt

@@ -24460,8 +24460,8 @@ declare module BABYLON {
         private _isParentEnabled;
         private _isReady;
         /** @hidden */
currentRenderId: number;
-        private _parentRenderId;
-        protected _childRenderId: number;
+        private _parentUpdateId;
+        protected _childUpdateId: number;
         /** @hidden */
waitingParentId: Nullable<string>;
         /** @hidden */
scene: Scene;
         /** @hidden */
cache: any;

+ 2 - 2
dist/preview release/babylon.d.ts

@@ -24867,8 +24867,8 @@ declare module BABYLON {
         private _isReady;
         /** @hidden */
         _currentRenderId: number;
-        private _parentRenderId;
-        protected _childRenderId: number;
+        private _parentUpdateId;
+        protected _childUpdateId: number;
         /** @hidden */
         _waitingParentId: Nullable<string>;
         /** @hidden */

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/babylon.js


Разница между файлами не показана из-за своего большого размера
+ 65 - 52
dist/preview release/babylon.max.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 4 - 4
dist/preview release/babylon.module.d.ts

@@ -25513,8 +25513,8 @@ declare module "babylonjs/node" {
         private _isReady;
         /** @hidden */
         _currentRenderId: number;
-        private _parentRenderId;
-        protected _childRenderId: number;
+        private _parentUpdateId;
+        protected _childUpdateId: number;
         /** @hidden */
         _waitingParentId: Nullable<string>;
         /** @hidden */
@@ -83818,8 +83818,8 @@ declare module BABYLON {
         private _isReady;
         /** @hidden */
         _currentRenderId: number;
-        private _parentRenderId;
-        protected _childRenderId: number;
+        private _parentUpdateId;
+        protected _childUpdateId: number;
         /** @hidden */
         _waitingParentId: Nullable<string>;
         /** @hidden */

+ 1 - 1
dist/preview release/packagesSizeBaseLine.json

@@ -1 +1 @@
-{"engineOnly":309116,"sceneOnly":551531,"minGridMaterial":674533,"minStandardMaterial":773388}
+{"engineOnly":309267,"sceneOnly":551634,"minGridMaterial":674636,"minStandardMaterial":773491}

+ 4 - 4
dist/preview release/viewer/babylon.module.d.ts

@@ -25513,8 +25513,8 @@ declare module "babylonjs/node" {
         private _isReady;
         /** @hidden */
         _currentRenderId: number;
-        private _parentRenderId;
-        protected _childRenderId: number;
+        private _parentUpdateId;
+        protected _childUpdateId: number;
         /** @hidden */
         _waitingParentId: Nullable<string>;
         /** @hidden */
@@ -83818,8 +83818,8 @@ declare module BABYLON {
         private _isReady;
         /** @hidden */
         _currentRenderId: number;
-        private _parentRenderId;
-        protected _childRenderId: number;
+        private _parentUpdateId;
+        protected _childUpdateId: number;
         /** @hidden */
         _waitingParentId: Nullable<string>;
         /** @hidden */

+ 4 - 4
dist/preview release/viewer/babylon.viewer.d.ts

@@ -197,11 +197,11 @@ declare module BabylonViewer {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
+            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<Template> | Promise<string>;
+            hideOverlayScreen(): Promise<string> | Promise<Template>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -218,11 +218,11 @@ declare module BabylonViewer {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<Template> | Promise<string>;
+            showLoadingScreen(): Promise<string> | Promise<Template>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<Template> | Promise<string>;
+            hideLoadingScreen(): Promise<string> | Promise<Template>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }

Разница между файлами не показана из-за своего большого размера
+ 11 - 11
dist/preview release/viewer/babylon.viewer.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 4 - 4
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -230,11 +230,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
+            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<Template> | Promise<string>;
+            hideOverlayScreen(): Promise<string> | Promise<Template>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -251,11 +251,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<Template> | Promise<string>;
+            showLoadingScreen(): Promise<string> | Promise<Template>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<Template> | Promise<string>;
+            hideLoadingScreen(): Promise<string> | Promise<Template>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }

+ 1 - 1
src/Bones/bone.ts

@@ -365,7 +365,7 @@ export class Bone extends Node {
      */
     public markAsDirty(): void {
         this._currentRenderId++;
-        this._childRenderId++;
+        this._childUpdateId++;
         this._skeleton._markAsDirty();
     }
 

+ 4 - 4
src/Cameras/camera.ts

@@ -258,10 +258,10 @@ export class Camera extends Node {
      */
     public _resizeOrCreateMultiviewTexture(width: number, height: number) {
         if (!this._multiviewTexture) {
-            this._multiviewTexture = new MultiviewRenderTarget(this.getScene(), {width: width, height: height});
-        }else if (this._multiviewTexture.getRenderWidth() != width || this._multiviewTexture.getRenderHeight() != height) {
+            this._multiviewTexture = new MultiviewRenderTarget(this.getScene(), { width: width, height: height });
+        } else if (this._multiviewTexture.getRenderWidth() != width || this._multiviewTexture.getRenderHeight() != height) {
             this._multiviewTexture.dispose();
-            this._multiviewTexture = new MultiviewRenderTarget(this.getScene(), {width: width, height: height});
+            this._multiviewTexture = new MultiviewRenderTarget(this.getScene(), { width: width, height: height });
         }
     }
 
@@ -670,7 +670,7 @@ export class Camera extends Node {
         this.updateCache();
         this._computedViewMatrix = this._getViewMatrix();
         this._currentRenderId = this.getScene().getRenderId();
-        this._childRenderId = this._currentRenderId;
+        this._childUpdateId++;
 
         this._refreshFrustumPlanes = true;
 

+ 1 - 1
src/Meshes/transformNode.ts

@@ -872,7 +872,7 @@ export class TransformNode extends Node {
         this._cache.billboardMode = this.billboardMode;
         this._cache.infiniteDistance = this.infiniteDistance;
         this._currentRenderId = this.getScene().getRenderId();
-        this._childRenderId = this.getScene().getRenderId();
+        this._childUpdateId++;
         this._isDirty = false;
 
         // Scaling

+ 4 - 4
src/node.ts

@@ -124,8 +124,8 @@ export class Node implements IBehaviorAware<Node> {
     private _isReady = true;
     /** @hidden */
     public _currentRenderId = -1;
-    private _parentRenderId = -1;
-    protected _childRenderId = -1;
+    private _parentUpdateId = -1;
+    protected _childUpdateId = -1;
 
     /** @hidden */
     public _waitingParentId: Nullable<string>;
@@ -435,7 +435,7 @@ export class Node implements IBehaviorAware<Node> {
     /** @hidden */
     public _markSyncedWithParent() {
         if (this._parentNode) {
-            this._parentRenderId = this._parentNode._childRenderId;
+            this._parentUpdateId = this._parentNode._childUpdateId;
         }
     }
 
@@ -445,7 +445,7 @@ export class Node implements IBehaviorAware<Node> {
             return true;
         }
 
-        if (this._parentRenderId !== this._parentNode._childRenderId) {
+        if (this._parentUpdateId !== this._parentNode._childUpdateId) {
             return false;
         }