浏览代码

4.0.0-alpha.7

David Catuhe 6 年之前
父节点
当前提交
0b0e0a97d2

文件差异内容过多而无法显示
+ 4932 - 4925
Playground/babylon.d.txt


文件差异内容过多而无法显示
+ 4505 - 4498
dist/preview release/babylon.d.ts


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/babylon.js


+ 33 - 17
dist/preview release/babylon.max.js

@@ -12918,7 +12918,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.6";
+                return "4.0.0-alpha.7";
             },
             enumerable: true,
             configurable: true
@@ -28766,6 +28766,14 @@ var BABYLON;
             }
             return null;
         };
+        Scene.prototype._getGeometryByUniqueID = function (id) {
+            for (var index = 0; index < this.geometries.length; index++) {
+                if (this.geometries[index].uniqueId === id) {
+                    return this.geometries[index];
+                }
+            }
+            return null;
+        };
         /**
          * Add a new geometry to this scene
          * @param geometry defines the geometry to be added to the scene.
@@ -28773,7 +28781,7 @@ var BABYLON;
          * @return a boolean defining if the geometry was added or not
          */
         Scene.prototype.pushGeometry = function (geometry, force) {
-            if (!force && this.getGeometryByID(geometry.id)) {
+            if (!force && this._getGeometryByUniqueID(geometry.uniqueId)) {
                 return false;
             }
             this.addGeometry(geometry);
@@ -31349,9 +31357,9 @@ var BABYLON;
                     return;
                 case InternalTexture.DATASOURCE_URL:
                     proxy = this._engine.createTexture(this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode, function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     }, null, this._buffer, undefined, this.format);
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_RAW:
                     proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
@@ -31402,9 +31410,9 @@ var BABYLON;
                     return;
                 case InternalTexture.DATASOURCE_CUBE:
                     proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     }, null, this.format, this._extension);
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_CUBERAW:
                     proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
@@ -31414,9 +31422,9 @@ var BABYLON;
                 case InternalTexture.DATASOURCE_CUBERAW_RGBD:
                     proxy = this._engine.createRawCubeTexture(null, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
                     BABYLON.RawCubeTexture._UpdateRGBDAsync(proxy, this._bufferViewArrayArray, this._sphericalPolynomial, this._lodGenerationScale, this._lodGenerationOffset).then(function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     });
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_CUBEPREFILTERED:
                     proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, function (proxy) {
@@ -40984,6 +40992,7 @@ var BABYLON;
             this._isDisposed = false;
             this._indexBufferIsUpdatable = false;
             this.id = id;
+            this.uniqueId = scene.getUniqueId();
             this._engine = scene.getEngine();
             this._meshes = [];
             this._scene = scene;
@@ -75424,12 +75433,12 @@ var BABYLON;
             var _this = _super.call(this, null, scene, !generateMipMaps, invertY) || this;
             _this._onUserActionRequestedObservable = null;
             _this._stillImageCaptured = false;
-            _this._poster = false;
+            _this._displayingPosterTexture = false;
             _this._createInternalTexture = function () {
                 if (_this._texture != null) {
-                    if (_this._poster) {
+                    if (_this._displayingPosterTexture) {
                         _this._texture.dispose();
-                        _this._poster = false;
+                        _this._displayingPosterTexture = false;
                     }
                     else {
                         return;
@@ -75446,7 +75455,7 @@ var BABYLON;
                     _this._generateMipMaps = false;
                 }
                 _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
-                if (!_this.video.autoplay) {
+                if (!_this.video.autoplay && !_this._settings.poster) {
                     var oldHandler_1 = _this.video.onplaying;
                     var error_1 = false;
                     _this.video.onplaying = function () {
@@ -75494,7 +75503,7 @@ var BABYLON;
                 if (_this._texture == null) {
                     return;
                 }
-                if (!_this._poster) {
+                if (!_this._displayingPosterTexture) {
                     _this._texture.dispose();
                     _this._texture = null;
                 }
@@ -75506,6 +75515,9 @@ var BABYLON;
                 if (_this.video.readyState < _this.video.HAVE_CURRENT_DATA) {
                     return;
                 }
+                if (_this._displayingPosterTexture) {
+                    return;
+                }
                 _this._engine.updateVideoTexture(_this._texture, _this.video, _this._invertY);
             };
             _this._engine = _this.getScene().getEngine();
@@ -75514,6 +75526,7 @@ var BABYLON;
             _this.autoUpdateTexture = settings.autoUpdateTexture;
             _this.name = name || _this._getName(src);
             _this.video = _this._getVideo(src);
+            _this._settings = settings;
             if (settings.poster) {
                 _this.video.poster = settings.poster;
             }
@@ -75524,16 +75537,19 @@ var BABYLON;
                 _this.video.loop = settings.loop;
             }
             _this.video.setAttribute("playsinline", "");
-            _this.video.addEventListener("canplay", _this._createInternalTexture);
             _this.video.addEventListener("paused", _this._updateInternalTexture);
             _this.video.addEventListener("seeked", _this._updateInternalTexture);
             _this.video.addEventListener("emptied", _this.reset);
-            if (_this.video.readyState >= _this.video.HAVE_CURRENT_DATA) {
-                _this._createInternalTexture();
-            }
-            if (settings.poster) {
+            _this._createInternalTextureOnEvent = (settings.poster && !settings.autoPlay) ? "play" : "canplay";
+            _this.video.addEventListener(_this._createInternalTextureOnEvent, _this._createInternalTexture);
+            var videoHasEnoughData = (_this.video.readyState >= _this.video.HAVE_CURRENT_DATA);
+            if (settings.poster &&
+                (!settings.autoPlay || !videoHasEnoughData)) {
                 _this._texture = _this._engine.createTexture(settings.poster, false, true, scene);
-                _this._poster = true;
+                _this._displayingPosterTexture = true;
+            }
+            else if (videoHasEnoughData) {
+                _this._createInternalTexture();
             }
             return _this;
         }
@@ -75626,7 +75642,7 @@ var BABYLON;
                 this._onUserActionRequestedObservable.clear();
                 this._onUserActionRequestedObservable = null;
             }
-            this.video.removeEventListener("canplay", this._createInternalTexture);
+            this.video.removeEventListener(this._createInternalTextureOnEvent, this._createInternalTexture);
             this.video.removeEventListener("paused", this._updateInternalTexture);
             this.video.removeEventListener("seeked", this._updateInternalTexture);
             this.video.removeEventListener("emptied", this.reset);

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

@@ -12885,7 +12885,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.6";
+                return "4.0.0-alpha.7";
             },
             enumerable: true,
             configurable: true
@@ -28733,6 +28733,14 @@ var BABYLON;
             }
             return null;
         };
+        Scene.prototype._getGeometryByUniqueID = function (id) {
+            for (var index = 0; index < this.geometries.length; index++) {
+                if (this.geometries[index].uniqueId === id) {
+                    return this.geometries[index];
+                }
+            }
+            return null;
+        };
         /**
          * Add a new geometry to this scene
          * @param geometry defines the geometry to be added to the scene.
@@ -28740,7 +28748,7 @@ var BABYLON;
          * @return a boolean defining if the geometry was added or not
          */
         Scene.prototype.pushGeometry = function (geometry, force) {
-            if (!force && this.getGeometryByID(geometry.id)) {
+            if (!force && this._getGeometryByUniqueID(geometry.uniqueId)) {
                 return false;
             }
             this.addGeometry(geometry);
@@ -31316,9 +31324,9 @@ var BABYLON;
                     return;
                 case InternalTexture.DATASOURCE_URL:
                     proxy = this._engine.createTexture(this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode, function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     }, null, this._buffer, undefined, this.format);
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_RAW:
                     proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
@@ -31369,9 +31377,9 @@ var BABYLON;
                     return;
                 case InternalTexture.DATASOURCE_CUBE:
                     proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     }, null, this.format, this._extension);
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_CUBERAW:
                     proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
@@ -31381,9 +31389,9 @@ var BABYLON;
                 case InternalTexture.DATASOURCE_CUBERAW_RGBD:
                     proxy = this._engine.createRawCubeTexture(null, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
                     BABYLON.RawCubeTexture._UpdateRGBDAsync(proxy, this._bufferViewArrayArray, this._sphericalPolynomial, this._lodGenerationScale, this._lodGenerationOffset).then(function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     });
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_CUBEPREFILTERED:
                     proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, function (proxy) {
@@ -40951,6 +40959,7 @@ var BABYLON;
             this._isDisposed = false;
             this._indexBufferIsUpdatable = false;
             this.id = id;
+            this.uniqueId = scene.getUniqueId();
             this._engine = scene.getEngine();
             this._meshes = [];
             this._scene = scene;
@@ -75391,12 +75400,12 @@ var BABYLON;
             var _this = _super.call(this, null, scene, !generateMipMaps, invertY) || this;
             _this._onUserActionRequestedObservable = null;
             _this._stillImageCaptured = false;
-            _this._poster = false;
+            _this._displayingPosterTexture = false;
             _this._createInternalTexture = function () {
                 if (_this._texture != null) {
-                    if (_this._poster) {
+                    if (_this._displayingPosterTexture) {
                         _this._texture.dispose();
-                        _this._poster = false;
+                        _this._displayingPosterTexture = false;
                     }
                     else {
                         return;
@@ -75413,7 +75422,7 @@ var BABYLON;
                     _this._generateMipMaps = false;
                 }
                 _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
-                if (!_this.video.autoplay) {
+                if (!_this.video.autoplay && !_this._settings.poster) {
                     var oldHandler_1 = _this.video.onplaying;
                     var error_1 = false;
                     _this.video.onplaying = function () {
@@ -75461,7 +75470,7 @@ var BABYLON;
                 if (_this._texture == null) {
                     return;
                 }
-                if (!_this._poster) {
+                if (!_this._displayingPosterTexture) {
                     _this._texture.dispose();
                     _this._texture = null;
                 }
@@ -75473,6 +75482,9 @@ var BABYLON;
                 if (_this.video.readyState < _this.video.HAVE_CURRENT_DATA) {
                     return;
                 }
+                if (_this._displayingPosterTexture) {
+                    return;
+                }
                 _this._engine.updateVideoTexture(_this._texture, _this.video, _this._invertY);
             };
             _this._engine = _this.getScene().getEngine();
@@ -75481,6 +75493,7 @@ var BABYLON;
             _this.autoUpdateTexture = settings.autoUpdateTexture;
             _this.name = name || _this._getName(src);
             _this.video = _this._getVideo(src);
+            _this._settings = settings;
             if (settings.poster) {
                 _this.video.poster = settings.poster;
             }
@@ -75491,16 +75504,19 @@ var BABYLON;
                 _this.video.loop = settings.loop;
             }
             _this.video.setAttribute("playsinline", "");
-            _this.video.addEventListener("canplay", _this._createInternalTexture);
             _this.video.addEventListener("paused", _this._updateInternalTexture);
             _this.video.addEventListener("seeked", _this._updateInternalTexture);
             _this.video.addEventListener("emptied", _this.reset);
-            if (_this.video.readyState >= _this.video.HAVE_CURRENT_DATA) {
-                _this._createInternalTexture();
-            }
-            if (settings.poster) {
+            _this._createInternalTextureOnEvent = (settings.poster && !settings.autoPlay) ? "play" : "canplay";
+            _this.video.addEventListener(_this._createInternalTextureOnEvent, _this._createInternalTexture);
+            var videoHasEnoughData = (_this.video.readyState >= _this.video.HAVE_CURRENT_DATA);
+            if (settings.poster &&
+                (!settings.autoPlay || !videoHasEnoughData)) {
                 _this._texture = _this._engine.createTexture(settings.poster, false, true, scene);
-                _this._poster = true;
+                _this._displayingPosterTexture = true;
+            }
+            else if (videoHasEnoughData) {
+                _this._createInternalTexture();
             }
             return _this;
         }
@@ -75593,7 +75609,7 @@ var BABYLON;
                 this._onUserActionRequestedObservable.clear();
                 this._onUserActionRequestedObservable = null;
             }
-            this.video.removeEventListener("canplay", this._createInternalTexture);
+            this.video.removeEventListener(this._createInternalTextureOnEvent, this._createInternalTexture);
             this.video.removeEventListener("paused", this._updateInternalTexture);
             this.video.removeEventListener("seeked", this._updateInternalTexture);
             this.video.removeEventListener("emptied", this.reset);

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/babylon.worker.js


+ 33 - 17
dist/preview release/es6.js

@@ -12885,7 +12885,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.6";
+                return "4.0.0-alpha.7";
             },
             enumerable: true,
             configurable: true
@@ -28733,6 +28733,14 @@ var BABYLON;
             }
             return null;
         };
+        Scene.prototype._getGeometryByUniqueID = function (id) {
+            for (var index = 0; index < this.geometries.length; index++) {
+                if (this.geometries[index].uniqueId === id) {
+                    return this.geometries[index];
+                }
+            }
+            return null;
+        };
         /**
          * Add a new geometry to this scene
          * @param geometry defines the geometry to be added to the scene.
@@ -28740,7 +28748,7 @@ var BABYLON;
          * @return a boolean defining if the geometry was added or not
          */
         Scene.prototype.pushGeometry = function (geometry, force) {
-            if (!force && this.getGeometryByID(geometry.id)) {
+            if (!force && this._getGeometryByUniqueID(geometry.uniqueId)) {
                 return false;
             }
             this.addGeometry(geometry);
@@ -31316,9 +31324,9 @@ var BABYLON;
                     return;
                 case InternalTexture.DATASOURCE_URL:
                     proxy = this._engine.createTexture(this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode, function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     }, null, this._buffer, undefined, this.format);
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_RAW:
                     proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
@@ -31369,9 +31377,9 @@ var BABYLON;
                     return;
                 case InternalTexture.DATASOURCE_CUBE:
                     proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     }, null, this.format, this._extension);
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_CUBERAW:
                     proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
@@ -31381,9 +31389,9 @@ var BABYLON;
                 case InternalTexture.DATASOURCE_CUBERAW_RGBD:
                     proxy = this._engine.createRawCubeTexture(null, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);
                     BABYLON.RawCubeTexture._UpdateRGBDAsync(proxy, this._bufferViewArrayArray, this._sphericalPolynomial, this._lodGenerationScale, this._lodGenerationOffset).then(function () {
+                        proxy._swapAndDie(_this);
                         _this.isReady = true;
                     });
-                    proxy._swapAndDie(this);
                     return;
                 case InternalTexture.DATASOURCE_CUBEPREFILTERED:
                     proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, function (proxy) {
@@ -40951,6 +40959,7 @@ var BABYLON;
             this._isDisposed = false;
             this._indexBufferIsUpdatable = false;
             this.id = id;
+            this.uniqueId = scene.getUniqueId();
             this._engine = scene.getEngine();
             this._meshes = [];
             this._scene = scene;
@@ -75391,12 +75400,12 @@ var BABYLON;
             var _this = _super.call(this, null, scene, !generateMipMaps, invertY) || this;
             _this._onUserActionRequestedObservable = null;
             _this._stillImageCaptured = false;
-            _this._poster = false;
+            _this._displayingPosterTexture = false;
             _this._createInternalTexture = function () {
                 if (_this._texture != null) {
-                    if (_this._poster) {
+                    if (_this._displayingPosterTexture) {
                         _this._texture.dispose();
-                        _this._poster = false;
+                        _this._displayingPosterTexture = false;
                     }
                     else {
                         return;
@@ -75413,7 +75422,7 @@ var BABYLON;
                     _this._generateMipMaps = false;
                 }
                 _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
-                if (!_this.video.autoplay) {
+                if (!_this.video.autoplay && !_this._settings.poster) {
                     var oldHandler_1 = _this.video.onplaying;
                     var error_1 = false;
                     _this.video.onplaying = function () {
@@ -75461,7 +75470,7 @@ var BABYLON;
                 if (_this._texture == null) {
                     return;
                 }
-                if (!_this._poster) {
+                if (!_this._displayingPosterTexture) {
                     _this._texture.dispose();
                     _this._texture = null;
                 }
@@ -75473,6 +75482,9 @@ var BABYLON;
                 if (_this.video.readyState < _this.video.HAVE_CURRENT_DATA) {
                     return;
                 }
+                if (_this._displayingPosterTexture) {
+                    return;
+                }
                 _this._engine.updateVideoTexture(_this._texture, _this.video, _this._invertY);
             };
             _this._engine = _this.getScene().getEngine();
@@ -75481,6 +75493,7 @@ var BABYLON;
             _this.autoUpdateTexture = settings.autoUpdateTexture;
             _this.name = name || _this._getName(src);
             _this.video = _this._getVideo(src);
+            _this._settings = settings;
             if (settings.poster) {
                 _this.video.poster = settings.poster;
             }
@@ -75491,16 +75504,19 @@ var BABYLON;
                 _this.video.loop = settings.loop;
             }
             _this.video.setAttribute("playsinline", "");
-            _this.video.addEventListener("canplay", _this._createInternalTexture);
             _this.video.addEventListener("paused", _this._updateInternalTexture);
             _this.video.addEventListener("seeked", _this._updateInternalTexture);
             _this.video.addEventListener("emptied", _this.reset);
-            if (_this.video.readyState >= _this.video.HAVE_CURRENT_DATA) {
-                _this._createInternalTexture();
-            }
-            if (settings.poster) {
+            _this._createInternalTextureOnEvent = (settings.poster && !settings.autoPlay) ? "play" : "canplay";
+            _this.video.addEventListener(_this._createInternalTextureOnEvent, _this._createInternalTexture);
+            var videoHasEnoughData = (_this.video.readyState >= _this.video.HAVE_CURRENT_DATA);
+            if (settings.poster &&
+                (!settings.autoPlay || !videoHasEnoughData)) {
                 _this._texture = _this._engine.createTexture(settings.poster, false, true, scene);
-                _this._poster = true;
+                _this._displayingPosterTexture = true;
+            }
+            else if (videoHasEnoughData) {
+                _this._createInternalTexture();
             }
             return _this;
         }
@@ -75593,7 +75609,7 @@ var BABYLON;
                 this._onUserActionRequestedObservable.clear();
                 this._onUserActionRequestedObservable = null;
             }
-            this.video.removeEventListener("canplay", this._createInternalTexture);
+            this.video.removeEventListener(this._createInternalTextureOnEvent, this._createInternalTexture);
             this.video.removeEventListener("paused", this._updateInternalTexture);
             this.video.removeEventListener("seeked", this._updateInternalTexture);
             this.video.removeEventListener("emptied", this.reset);

+ 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": "4.0.0-alpha.6",
+    "version": "4.0.0-alpha.7",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 4 - 0
dist/preview release/gui/babylon.gui.d.ts

@@ -879,6 +879,10 @@ declare module BABYLON.GUI {
             protected _disabledColor: string;
             /** @hidden */
             _tag: any;
+            /**
+                * Gets or sets an object used to store user defined information for the node
+                */
+            metadata: any;
             /** Gets or sets a boolean indicating if the control can be hit with pointer events */
             isHitTestVisible: boolean;
             /** Gets or sets a boolean indicating if the control can block pointer events */

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/gui/babylon.gui.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


+ 8 - 0
dist/preview release/gui/babylon.gui.module.d.ts

@@ -986,6 +986,10 @@ declare module 'babylonjs-gui/2D/controls/control' {
             protected _disabledColor: string;
             /** @hidden */
             _tag: any;
+            /**
+                * Gets or sets an object used to store user defined information for the node
+                */
+            metadata: any;
             /** Gets or sets a boolean indicating if the control can be hit with pointer events */
             isHitTestVisible: boolean;
             /** Gets or sets a boolean indicating if the control can block pointer events */
@@ -3866,6 +3870,10 @@ declare module BABYLON.GUI {
             protected _disabledColor: string;
             /** @hidden */
             _tag: any;
+            /**
+                * Gets or sets an object used to store user defined information for the node
+                */
+            metadata: any;
             /** Gets or sets a boolean indicating if the control can be hit with pointer events */
             isHitTestVisible: boolean;
             /** Gets or sets a boolean indicating if the control can block pointer events */

+ 2 - 2
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": "4.0.0-alpha.6",
+    "version": "4.0.0-alpha.7",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.6"
+        "babylonjs": "4.0.0-alpha.7"
     },
     "engines": {
         "node": "*"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "4.0.0-alpha.6",
+    "version": "4.0.0-alpha.7",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,10 +28,10 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.6",
-        "babylonjs-gui": "4.0.0-alpha.6",
-        "babylonjs-loaders": "4.0.0-alpha.6",
-        "babylonjs-serializers": "4.0.0-alpha.6"
+        "babylonjs": "4.0.0-alpha.7",
+        "babylonjs-gui": "4.0.0-alpha.7",
+        "babylonjs-loaders": "4.0.0-alpha.7",
+        "babylonjs-serializers": "4.0.0-alpha.7"
     },
     "engines": {
         "node": "*"

+ 3 - 3
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": "4.0.0-alpha.6",
+    "version": "4.0.0-alpha.7",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,8 +27,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.0.0-alpha.6",
-        "babylonjs": "4.0.0-alpha.6"
+        "babylonjs-gltf2interface": "4.0.0-alpha.7",
+        "babylonjs": "4.0.0-alpha.7"
     },
     "engines": {
         "node": "*"

+ 2 - 2
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": "4.0.0-alpha.6",
+    "version": "4.0.0-alpha.7",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.6"
+        "babylonjs": "4.0.0-alpha.7"
     },
     "engines": {
         "node": "*"

+ 2 - 2
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": "4.0.0-alpha.6",
+    "version": "4.0.0-alpha.7",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.6"
+        "babylonjs": "4.0.0-alpha.7"
     },
     "engines": {
         "node": "*"

+ 2 - 2
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": "4.0.0-alpha.6",
+    "version": "4.0.0-alpha.7",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.6"
+        "babylonjs": "4.0.0-alpha.7"
     },
     "engines": {
         "node": "*"

+ 3 - 3
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": "4.0.0-alpha.6",
+    "version": "4.0.0-alpha.7",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,8 +27,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.6",
-        "babylonjs-gltf2interface": "4.0.0-alpha.6"
+        "babylonjs": "4.0.0-alpha.7",
+        "babylonjs-gltf2interface": "4.0.0-alpha.7"
     },
     "engines": {
         "node": "*"

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 5 - 0
gui/src/2D/controls/control.ts

@@ -86,6 +86,11 @@ export class Control {
     /** @hidden */
     public _tag: any;
 
+    /**
+     * Gets or sets an object used to store user defined information for the node
+     */
+    public metadata: any = null;
+
     /** Gets or sets a boolean indicating if the control can be hit with pointer events */
     public isHitTestVisible = true;
     /** Gets or sets a boolean indicating if the control can block pointer events */

+ 1 - 1
package.json

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

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

@@ -481,7 +481,7 @@ module BABYLON {
          * Returns the current version of the framework
          */
         public static get Version(): string {
-            return "4.0.0-alpha.6";
+            return "4.0.0-alpha.7";
         }
 
         /**