Browse Source

merge upstream

Christopher Yovanovitch 7 years ago
parent
commit
db41d50178

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


+ 0 - 1
Viewer/src/configuration/configuration.ts

@@ -157,7 +157,6 @@ export interface IDefaultRenderingPipelineConfiguration {
     bloomKernel?: number;
     hardwareScaleLevel?: number;
     bloomWeight?: number;
-    bllomThreshold?: number;
     hdr?: boolean;
     samples?: number;
     glowLayerEnabled?: boolean;

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


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


+ 1 - 1
dist/preview release/babylon.max.js

@@ -12077,7 +12077,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.0";
+                return "3.3.0-alpha.1";
             },
             enumerable: true,
             configurable: true

+ 1 - 1
dist/preview release/babylon.no-module.max.js

@@ -12044,7 +12044,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.0";
+                return "3.3.0-alpha.1";
             },
             enumerable: true,
             configurable: true

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


+ 1 - 1
dist/preview release/es6.js

@@ -12044,7 +12044,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.0";
+                return "3.3.0-alpha.1";
             },
             enumerable: true,
             configurable: true

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

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

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

@@ -4,7 +4,7 @@
     },
     "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.",
-    "version": "3.2.0",
+    "version": "3.3.0-alpha.1",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

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

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

@@ -4,7 +4,7 @@
     },
     "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.",
-    "version": "3.2.0",
+    "version": "3.3.0-alpha.1",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "3.2.0"
+        "babylonjs-gltf2interface": "3.3.0-alpha.1"
     },
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"

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

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

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

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

+ 2 - 14
dist/preview release/typedocValidationBaseline.json

@@ -1,7 +1,7 @@
 {
-  "errors": 4309,
+  "errors": 4307,
   "babylon.typedoc.json": {
-    "errors": 4309,
+    "errors": 4307,
     "Animatable": {
       "Class": {
         "Comments": {
@@ -90,18 +90,6 @@
         }
       },
       "Method": {
-        "_animate": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "delay": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
         "appendAnimations": {
           "Comments": {
             "MissingText": true

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

@@ -1078,7 +1078,6 @@ declare module BabylonViewer {
             bloomKernel?: number;
             hardwareScaleLevel?: number;
             bloomWeight?: number;
-            bllomThreshold?: number;
             hdr?: boolean;
             samples?: number;
             glowLayerEnabled?: boolean;

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


+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js

@@ -12165,7 +12165,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.0";
+                return "3.3.0-alpha.1";
             },
             enumerable: true,
             configurable: true

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

@@ -1078,7 +1078,6 @@ declare module 'babylonjs-viewer/configuration/configuration' {
             bloomKernel?: number;
             hardwareScaleLevel?: number;
             bloomWeight?: number;
-            bllomThreshold?: number;
             hdr?: boolean;
             samples?: number;
             glowLayerEnabled?: boolean;

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-viewer",
     "description": "A simple-to-use viewer based on BabylonJS to display 3D elements natively",
-    "version": "3.2.0",
+    "version": "3.3.0-alpha.1",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
package.json

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

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

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

+ 44 - 4
src/Mesh/Compression/babylon.dracoCompression.ts

@@ -29,12 +29,50 @@ module BABYLON {
 
     /**
      * Draco compression (https://google.github.io/draco/)
+     * 
+     * This class wraps the Draco module.
+     * 
+     * **Encoder**
+     * 
+     * The encoder is not currently implemented.
+     * 
+     * **Decoder**
+     * 
+     * By default, the configuration points to a copy of the Draco decoder files for glTF from https://preview.babylonjs.com.
+     * 
+     * To update the configuration, use the following code:
+     * ```javascript
+     *     BABYLON.DracoCompression.Configuration = {
+     *         decoder: {
+     *             wasmUrl: "<url to the WebAssembly library>",
+     *             wasmBinaryUrl: "<url to the WebAssembly binary>",
+     *             fallbackUrl: "<url to the fallback JavaScript library>",
+     *         }
+     *     };
+     * ```
+     * 
+     * Draco has two versions, one for WebAssembly and one for JavaScript. The decoder configuration can be set to only support Webssembly or only support the JavaScript version.
+     * Decoding will automatically fallback to the JavaScript version if WebAssembly version is not configured or if WebAssembly is not supported by the browser.
+     * Use `BABYLON.DracoCompression.DecoderAvailable` to determine if the decoder is available for the current session.
+     * 
+     * To decode Draco compressed data, create a DracoCompression object and call decodeMeshAsync:
+     * ```javascript
+     *     var dracoCompression = new BABYLON.DracoCompression();
+     *     var vertexData = await dracoCompression.decodeMeshAsync(data, {
+     *         [BABYLON.VertexBuffer.PositionKind]: 0
+     *     });
+     * ```
+     * 
+     * @see https://www.babylonjs-playground.com/#N3EK4B#0
      */
     export class DracoCompression implements IDisposable {
         private static _DecoderModulePromise: Promise<any>;
 
         /**
-         * The configuration.
+         * The configuration. Defaults to the following urls:
+         * - wasmUrl: "https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js"
+         * - wasmBinaryUrl: "https://preview.babylonjs.com/draco_decoder_gltf.wasm"
+         * - fallbackUrl: "https://preview.babylonjs.com/draco_decoder_gltf.js"
          */
         public static Configuration: IDracoCompressionConfiguration = {
             decoder: {
@@ -80,17 +118,19 @@ module BABYLON {
 
         /**
          * Decode Draco compressed mesh data to vertex data.
-         * @param data The array buffer view for the Draco compression data
+         * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data
          * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids
          * @returns A promise that resolves with the decoded vertex data
          */
-        public decodeMeshAsync(data: ArrayBufferView, attributes: { [kind: string]: number }): Promise<VertexData> {
+        public decodeMeshAsync(data: ArrayBuffer | ArrayBufferView, attributes: { [kind: string]: number }): Promise<VertexData> {
+            const dataView = data instanceof ArrayBuffer ? new Uint8Array(data) : data;
+
             return DracoCompression._GetDecoderModule().then(wrappedModule => {
                 const module = wrappedModule.module;
                 const vertexData = new VertexData();
 
                 const buffer = new module.DecoderBuffer();
-                buffer.Init(data, data.byteLength);
+                buffer.Init(dataView, dataView.byteLength);
 
                 const decoder = new module.Decoder();
                 let geometry: any;