Browse Source

Merge pull request #6303 from sebavan/master

Here we go !
sebavan 6 years ago
parent
commit
4487a11584

+ 2 - 2
Tools/Config/config.json

@@ -68,8 +68,8 @@
         "gui"
     ],
     "viewerModules": [
-        "viewer",
-        "viewer-assets"
+        "viewer-assets",
+        "viewer"
     ],
     "additionalNpmPackages": [
         {

+ 5 - 0
Tools/Publisher/tasks/prepareEs6DevPackages.js

@@ -13,6 +13,11 @@ const config = require("../../Config/config.js");
  */
 function prepareEs6DevPackages() {
     config.es6modules.forEach(moduleName => {
+        if (moduleName === "viewer") {
+            // Do not publish locally as an es6 npm linked module
+            return;
+        }
+
         const module = config[moduleName];
 
         colorConsole.log("Prepare " + "ES6Dev".magenta + " Package: " + moduleName.blue.bold);

+ 12 - 12
azure-pipelines.yml

@@ -67,10 +67,10 @@ jobs:
     inputs:
       workingDir: Tools/Gulp
       verbose: false
-  - script: 'gulp typescript-all'
+  - script: 'gulp typescript-all --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Typescript all'
-  - script: 'gulp tests-babylon-unit'
+  - script: 'gulp tests-babylon-unit --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Unit Tests'
   - task: PublishTestResults@2
@@ -90,14 +90,14 @@ jobs:
     inputs:
       workingDir: Tools/Gulp
       verbose: false
-  - script: 'gulp typescript-all'
+  - script: 'gulp typescript-all --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Typescript all'
   - script: |
       export DISPLAY=:99
       Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
       sleep 3 # give xvfb some time to start
-      gulp tests-validation-virtualscreenWebGL1
+      gulp tests-validation-virtualscreenWebGL1 --max-old-space-size=8192
     workingDirectory: Tools/Gulp
     displayName: 'Visual Tests'
   - task: PublishTestResults@2
@@ -117,14 +117,14 @@ jobs:
     inputs:
       workingDir: Tools/Gulp
       verbose: false
-  - script: 'gulp typescript-all'
+  - script: 'gulp typescript-all --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Typescript all'
   - script: |
       export DISPLAY=:99
       Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
       sleep 3 # give xvfb some time to start
-      gulp tests-validation-virtualscreen
+      gulp tests-validation-virtualscreen --max-old-space-size=8192
     workingDirectory: Tools/Gulp
     displayName: 'Visual Tests'
   - task: PublishTestResults@2
@@ -151,16 +151,16 @@ jobs:
     inputs:
       workingDir: Tools/Gulp
       verbose: false
-  - script: 'gulp typescript-all'
+  - script: 'gulp typescript-all --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Typescript all'
   - script: 'gulp tests-modules'
     workingDirectory: Tools/Gulp
     displayName: 'Tests modules'
-  - script: 'sudo gulp localdev-es6'
+  - script: 'sudo gulp localdev-es6 --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Npm link ES6'
-  - script: 'gulp tests-es6Modules'
+  - script: 'gulp tests-es6Modules --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Tests ES6'
   - task: PublishTestResults@2
@@ -185,10 +185,10 @@ jobs:
     inputs:
       workingDir: Tools/Gulp
       verbose: false
-  - script: 'gulp typescript-all'
+  - script: 'gulp typescript-all --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Typescript all'
-  - script: 'gulp tests-viewer-unit'
+  - script: 'gulp tests-viewer-unit --max-old-space-size=8192'
     workingDirectory: Tools/Gulp
     displayName: 'Unit Tests'
   - task: PublishTestResults@2
@@ -200,7 +200,7 @@ jobs:
       export DISPLAY=:99
       Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
       sleep 3 # give xvfb some time to start
-      gulp tests-viewer-validation-virtualscreen
+      gulp tests-viewer-validation-virtualscreen --max-old-space-size=8192
     workingDirectory: Tools/Gulp
     displayName: 'Visual Tests'
   - task: PublishTestResults@2

+ 4 - 0
src/Materials/Textures/renderTargetTexture.ts

@@ -979,6 +979,10 @@ export class RenderTargetTexture extends Texture {
             }
         }
 
+        if (this.depthStencilTexture) {
+            this.getScene()!.getEngine()._releaseTexture(this.depthStencilTexture);
+        }
+
         super.dispose();
     }
 

+ 1 - 0
src/Misc/environmentTextureTools.ts

@@ -563,6 +563,7 @@ export class EnvironmentTextureTools {
             // Release temp RTT.
             if (cubeRtt) {
                 engine._releaseFramebufferObjects(cubeRtt);
+                engine._releaseTexture(texture);
                 cubeRtt._swapAndDie(texture);
             }
             // Release temp Post Process.

+ 4 - 0
src/scene.ts

@@ -3864,6 +3864,10 @@ export class Scene extends AbstractScene implements IAnimatable {
         this.beforeRender = null;
         this.afterRender = null;
 
+        if (EngineStore._LastCreatedScene === this) {
+            EngineStore._LastCreatedScene = null;
+        }
+
         this.skeletons = [];
         this.morphTargetManagers = [];
         this._transientComponents = [];