Browse Source

3.3.0-alpha.14

David Catuhe 7 years ago
parent
commit
5d033e74f1

File diff suppressed because it is too large
+ 6296 - 6292
Playground/babylon.d.txt


+ 1 - 1
Tools/Publisher/package.json

@@ -1,5 +1,5 @@
 {
 {
-    "name": "banylonjs-publisher",
+    "name": "babylonjs-publisher",
     "version": "1.0.0",
     "version": "1.0.0",
     "description": "Publishing babylon's packages automatically",
     "description": "Publishing babylon's packages automatically",
     "main": "index.js",
     "main": "index.js",

File diff suppressed because it is too large
+ 5190 - 5186
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.js


File diff suppressed because it is too large
+ 13 - 8
dist/preview release/babylon.max.js


File diff suppressed because it is too large
+ 13 - 8
dist/preview release/babylon.no-module.max.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.worker.js


File diff suppressed because it is too large
+ 13 - 8
dist/preview release/es6.js


+ 1 - 1
dist/preview release/glTF2Interface/package.json

@@ -1,7 +1,7 @@
 {
 {
     "name": "babylonjs-gltf2interface",
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-gui",
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


+ 1 - 1
dist/preview release/inspector/babylon.inspector.d.ts

@@ -284,7 +284,7 @@ declare module INSPECTOR {
 }
 }
 declare module INSPECTOR {
 declare module INSPECTOR {
     export class GUIAdapter extends Adapter implements IToolVisible {
     export class GUIAdapter extends Adapter implements IToolVisible {
-        constructor(obj: import("babylonjs-gui").Control);
+        constructor(obj: any);
         /** Returns the name displayed in the tree */
         /** Returns the name displayed in the tree */
         id(): string;
         id(): string;
         /** Returns the type of this object - displayed in the tree */
         /** Returns the type of this object - displayed in the tree */

+ 3 - 3
dist/preview release/inspector/babylon.inspector.module.d.ts

@@ -101,7 +101,7 @@ declare module 'babylonjs-inspector/treetools' {
 
 
 declare module 'babylonjs-inspector/Inspector' {
 declare module 'babylonjs-inspector/Inspector' {
     import { AbstractMesh, Nullable, Scene, Observable } from "babylonjs";
     import { AbstractMesh, Nullable, Scene, Observable } from "babylonjs";
-    import "../sass/main.scss";
+    
     export class Inspector {
     export class Inspector {
             /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
             /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
             static DOCUMENT: HTMLDocument;
             static DOCUMENT: HTMLDocument;
@@ -381,7 +381,7 @@ declare module 'babylonjs-inspector/adapters/GUIAdapter' {
     import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
     import { IToolVisible } from "babylonjs-inspector/treetools/Checkbox";
     import { Adapter } from "babylonjs-inspector/adapters/Adapter";
     import { Adapter } from "babylonjs-inspector/adapters/Adapter";
     export class GUIAdapter extends Adapter implements IToolVisible {
     export class GUIAdapter extends Adapter implements IToolVisible {
-        constructor(obj: import("babylonjs-gui").Control);
+        constructor(obj: any);
         /** Returns the name displayed in the tree */
         /** Returns the name displayed in the tree */
         id(): string;
         id(): string;
         /** Returns the type of this object - displayed in the tree */
         /** Returns the type of this object - displayed in the tree */
@@ -1615,7 +1615,7 @@ declare module INSPECTOR {
 }
 }
 declare module INSPECTOR {
 declare module INSPECTOR {
     export class GUIAdapter extends Adapter implements IToolVisible {
     export class GUIAdapter extends Adapter implements IToolVisible {
-        constructor(obj: import("babylonjs-gui").Control);
+        constructor(obj: any);
         /** Returns the name displayed in the tree */
         /** Returns the name displayed in the tree */
         id(): string;
         id(): string;
         /** Returns the type of this object - displayed in the tree */
         /** Returns the type of this object - displayed in the tree */

+ 1 - 1
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-inspector",
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
     "description": "The Babylon.js inspector.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-loaders",
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     ],
     "license": "Apache-2.0",
     "license": "Apache-2.0",
     "dependencies": {
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-alpha.13"
+        "babylonjs-gltf2interface": "3.3.0-alpha.14"
     },
     },
     "peerDependencies": {
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"
         "babylonjs": ">=3.2.0-alpha"

+ 1 - 1
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-materials",
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-post-process",
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-procedural-textures",
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-serializers",
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     ],
     "license": "Apache-2.0",
     "license": "Apache-2.0",
     "dependencies": {
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-alpha.13"
+        "babylonjs-gltf2interface": "3.3.0-alpha.14"
     },
     },
     "peerDependencies": {
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"
         "babylonjs": ">=3.2.0-alpha"

+ 0 - 7
dist/preview release/viewer/babylon.viewer.d.ts

@@ -911,13 +911,6 @@ declare module BabylonViewer {
     }
     }
 }
 }
 declare module BabylonViewer {
 declare module BabylonViewer {
-    /**
-      *
-      * @param name the name of the custom optimizer configuration
-      * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
-      */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
-    export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 }
 declare module BabylonViewer {
 declare module BabylonViewer {
     /**
     /**

File diff suppressed because it is too large
+ 2 - 2
dist/preview release/viewer/babylon.viewer.js


File diff suppressed because it is too large
+ 2 - 2
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -977,14 +977,7 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 }
 
 
 declare module 'babylonjs-viewer/optimizer/custom' {
 declare module 'babylonjs-viewer/optimizer/custom' {
-    import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
-    /**
-      *
-      * @param name the name of the custom optimizer configuration
-      * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
-      */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
-    export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
+    
 }
 }
 
 
 declare module 'babylonjs-viewer/initializer' {
 declare module 'babylonjs-viewer/initializer' {

+ 1 - 1
package.json

@@ -9,7 +9,7 @@
     ],
     ],
     "name": "babylonjs",
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "3.3.0-alpha.13",
+    "version": "3.3.0-alpha.14",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 10 - 5
src/Cameras/babylon.targetCamera.ts

@@ -31,7 +31,6 @@
 
 
         /** @hidden */
         /** @hidden */
         public _referencePoint = new Vector3(0, 0, 1);
         public _referencePoint = new Vector3(0, 0, 1);
-        private _currentUpVector = new Vector3(0, 1, 0);
         /** @hidden */
         /** @hidden */
         public _transformedReferencePoint = Vector3.Zero();
         public _transformedReferencePoint = Vector3.Zero();
 
 
@@ -170,7 +169,7 @@
                 this.position.z += Epsilon;
                 this.position.z += Epsilon;
             }
             }
 
 
-            Matrix.LookAtLHToRef(this.position, target, this.upVector, this._camMatrix);
+            Matrix.LookAtLHToRef(this.position, target, Vector3.Up(), this._camMatrix);
             this._camMatrix.invert();
             this._camMatrix.invert();
 
 
             this.rotation.x = Math.atan(this._camMatrix.m[6] / this._camMatrix.m[10]);
             this.rotation.x = Math.atan(this._camMatrix.m[6] / this._camMatrix.m[10]);
@@ -297,9 +296,15 @@
             } else {
             } else {
                 Matrix.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this._cameraRotationMatrix);
                 Matrix.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this._cameraRotationMatrix);
             }
             }
+        }
 
 
-            //update the up vector!
-            Vector3.TransformNormalToRef(this.upVector, this._cameraRotationMatrix, this._currentUpVector);
+        /**
+         * Update the up vector to apply the rotation of the camera (So if you changed the camera rotation.z this will let you update the up vector as well)
+         * @returns the current camera
+         */
+        public rotateUpVectorWithCameraRotationMatrix(): TargetCamera {
+            Vector3.TransformNormalToRef(this.upVector, this._cameraRotationMatrix, this.upVector);
+            return this;
         }
         }
 
 
         /** @hidden */
         /** @hidden */
@@ -316,7 +321,7 @@
             // Computing target and final matrix
             // Computing target and final matrix
             this.position.addToRef(this._transformedReferencePoint, this._currentTarget);
             this.position.addToRef(this._transformedReferencePoint, this._currentTarget);
 
 
-            this._computeViewMatrix(this.position, this._currentTarget, this._currentUpVector);
+            this._computeViewMatrix(this.position, this._currentTarget, this.upVector);
             return this._viewMatrix;
             return this._viewMatrix;
         }
         }
 
 

+ 1 - 1
src/Engine/babylon.engine.ts

@@ -435,7 +435,7 @@
          * Returns the current version of the framework
          * Returns the current version of the framework
          */
          */
         public static get Version(): string {
         public static get Version(): string {
-            return "3.3.0-alpha.13";
+            return "3.3.0-alpha.14";
         }
         }
 
 
         // Updatable statics so stick with vars here
         // Updatable statics so stick with vars here