David Catuhe %!s(int64=7) %!d(string=hai) anos
pai
achega
8d8492119b

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1315 - 1311
Playground/babylon.d.txt


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1315 - 1311
dist/preview release/babylon.d.ts


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 3 - 3
dist/preview release/babylon.js


+ 61 - 22
dist/preview release/babylon.max.js

@@ -102397,29 +102397,48 @@ var BABYLON;
          */
          */
         function VideoDome(name, urlsOrVideo, options, scene) {
         function VideoDome(name, urlsOrVideo, options, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
+            _this._useDirectMapping = false;
             // set defaults and manage values
             // set defaults and manage values
             name = name || "videoDome";
             name = name || "videoDome";
-            options.resolution = (Math.abs(options.resolution) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution) | 0) || 32;
             options.clickToPlay = Boolean(options.clickToPlay);
             options.clickToPlay = Boolean(options.clickToPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
+            if (options.useDirectMapping === undefined) {
+                _this._useDirectMapping = true;
+            }
+            else {
+                _this._useDirectMapping = options.useDirectMapping;
+            }
             // create
             // create
             var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, false, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
-            _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false,
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, _this._useDirectMapping, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
+            if (_this._useDirectMapping) {
+                _this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            }
+            else {
+                _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false,
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
+                }, scene);
+            }
             // configure material
             // configure material
-            texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = _this._videoTexture;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
+            if (_this._useDirectMapping) {
+                texture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                material.diffuseTexture = texture;
+            }
+            else {
+                texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                material.reflectionTexture = texture;
+            }
             // configure mesh
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.material = material;
             _this._mesh.parent = _this;
             _this._mesh.parent = _this;
@@ -102493,22 +102512,35 @@ var BABYLON;
          */
          */
         function PhotoDome(name, urlOfPhoto, options, scene) {
         function PhotoDome(name, urlOfPhoto, options, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
+            _this._useDirectMapping = false;
             // set defaults and manage values
             // set defaults and manage values
             name = name || "photoDome";
             name = name || "photoDome";
-            options.resolution = (Math.abs(options.resolution) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution) | 0) || 32;
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
+            if (options.useDirectMapping === undefined) {
+                _this._useDirectMapping = true;
+            }
+            else {
+                _this._useDirectMapping = options.useDirectMapping;
+            }
             // create
             // create
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false,
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            if (_this._useDirectMapping) {
+                _this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            }
+            else {
+                _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false,
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
+                }, scene);
+            }
             // configure material
             // configure material
+            material.opacityFresnel = false;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
-            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
+            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene, false, !_this._useDirectMapping);
             // configure mesh
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.material = material;
             _this._mesh.parent = _this;
             _this._mesh.parent = _this;
@@ -102526,9 +102558,16 @@ var BABYLON;
                     return;
                     return;
                 }
                 }
                 this._photoTexture = value;
                 this._photoTexture = value;
-                this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-                this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
-                this._material.reflectionTexture = this._photoTexture;
+                if (this._useDirectMapping) {
+                    this._photoTexture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._material.diffuseTexture = this._photoTexture;
+                }
+                else {
+                    this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                    this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._material.reflectionTexture = this._photoTexture;
+                }
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

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

@@ -102364,29 +102364,48 @@ var BABYLON;
          */
          */
         function VideoDome(name, urlsOrVideo, options, scene) {
         function VideoDome(name, urlsOrVideo, options, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
+            _this._useDirectMapping = false;
             // set defaults and manage values
             // set defaults and manage values
             name = name || "videoDome";
             name = name || "videoDome";
-            options.resolution = (Math.abs(options.resolution) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution) | 0) || 32;
             options.clickToPlay = Boolean(options.clickToPlay);
             options.clickToPlay = Boolean(options.clickToPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
+            if (options.useDirectMapping === undefined) {
+                _this._useDirectMapping = true;
+            }
+            else {
+                _this._useDirectMapping = options.useDirectMapping;
+            }
             // create
             // create
             var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, false, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
-            _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false,
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, _this._useDirectMapping, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
+            if (_this._useDirectMapping) {
+                _this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            }
+            else {
+                _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false,
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
+                }, scene);
+            }
             // configure material
             // configure material
-            texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = _this._videoTexture;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
+            if (_this._useDirectMapping) {
+                texture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                material.diffuseTexture = texture;
+            }
+            else {
+                texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                material.reflectionTexture = texture;
+            }
             // configure mesh
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.material = material;
             _this._mesh.parent = _this;
             _this._mesh.parent = _this;
@@ -102460,22 +102479,35 @@ var BABYLON;
          */
          */
         function PhotoDome(name, urlOfPhoto, options, scene) {
         function PhotoDome(name, urlOfPhoto, options, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
+            _this._useDirectMapping = false;
             // set defaults and manage values
             // set defaults and manage values
             name = name || "photoDome";
             name = name || "photoDome";
-            options.resolution = (Math.abs(options.resolution) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution) | 0) || 32;
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
+            if (options.useDirectMapping === undefined) {
+                _this._useDirectMapping = true;
+            }
+            else {
+                _this._useDirectMapping = options.useDirectMapping;
+            }
             // create
             // create
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false,
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            if (_this._useDirectMapping) {
+                _this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            }
+            else {
+                _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false,
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
+                }, scene);
+            }
             // configure material
             // configure material
+            material.opacityFresnel = false;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
-            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
+            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene, false, !_this._useDirectMapping);
             // configure mesh
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.material = material;
             _this._mesh.parent = _this;
             _this._mesh.parent = _this;
@@ -102493,9 +102525,16 @@ var BABYLON;
                     return;
                     return;
                 }
                 }
                 this._photoTexture = value;
                 this._photoTexture = value;
-                this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-                this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
-                this._material.reflectionTexture = this._photoTexture;
+                if (this._useDirectMapping) {
+                    this._photoTexture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._material.diffuseTexture = this._photoTexture;
+                }
+                else {
+                    this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                    this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._material.reflectionTexture = this._photoTexture;
+                }
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 3 - 3
dist/preview release/babylon.worker.js


+ 61 - 22
dist/preview release/es6.js

@@ -102364,29 +102364,48 @@ var BABYLON;
          */
          */
         function VideoDome(name, urlsOrVideo, options, scene) {
         function VideoDome(name, urlsOrVideo, options, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
+            _this._useDirectMapping = false;
             // set defaults and manage values
             // set defaults and manage values
             name = name || "videoDome";
             name = name || "videoDome";
-            options.resolution = (Math.abs(options.resolution) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution) | 0) || 32;
             options.clickToPlay = Boolean(options.clickToPlay);
             options.clickToPlay = Boolean(options.clickToPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
+            if (options.useDirectMapping === undefined) {
+                _this._useDirectMapping = true;
+            }
+            else {
+                _this._useDirectMapping = options.useDirectMapping;
+            }
             // create
             // create
             var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, false, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
-            _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false,
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, _this._useDirectMapping, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
+            if (_this._useDirectMapping) {
+                _this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            }
+            else {
+                _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false,
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
+                }, scene);
+            }
             // configure material
             // configure material
-            texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = _this._videoTexture;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
+            if (_this._useDirectMapping) {
+                texture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                material.diffuseTexture = texture;
+            }
+            else {
+                texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                material.reflectionTexture = texture;
+            }
             // configure mesh
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.material = material;
             _this._mesh.parent = _this;
             _this._mesh.parent = _this;
@@ -102460,22 +102479,35 @@ var BABYLON;
          */
          */
         function PhotoDome(name, urlOfPhoto, options, scene) {
         function PhotoDome(name, urlOfPhoto, options, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
+            _this._useDirectMapping = false;
             // set defaults and manage values
             // set defaults and manage values
             name = name || "photoDome";
             name = name || "photoDome";
-            options.resolution = (Math.abs(options.resolution) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution) | 0) || 32;
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
+            if (options.useDirectMapping === undefined) {
+                _this._useDirectMapping = true;
+            }
+            else {
+                _this._useDirectMapping = options.useDirectMapping;
+            }
             // create
             // create
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false,
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            if (_this._useDirectMapping) {
+                _this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            }
+            else {
+                _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false,
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
+                }, scene);
+            }
             // configure material
             // configure material
+            material.opacityFresnel = false;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
-            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
+            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene, false, !_this._useDirectMapping);
             // configure mesh
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.material = material;
             _this._mesh.parent = _this;
             _this._mesh.parent = _this;
@@ -102493,9 +102525,16 @@ var BABYLON;
                     return;
                     return;
                 }
                 }
                 this._photoTexture = value;
                 this._photoTexture = value;
-                this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-                this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
-                this._material.reflectionTexture = this._photoTexture;
+                if (this._useDirectMapping) {
+                    this._photoTexture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._material.diffuseTexture = this._photoTexture;
+                }
+                else {
+                    this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                    this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._material.reflectionTexture = this._photoTexture;
+                }
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 3 - 3
dist/preview release/viewer/babylon.viewer.js


+ 61 - 22
dist/preview release/viewer/babylon.viewer.max.js

@@ -102485,29 +102485,48 @@ var BABYLON;
          */
          */
         function VideoDome(name, urlsOrVideo, options, scene) {
         function VideoDome(name, urlsOrVideo, options, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
+            _this._useDirectMapping = false;
             // set defaults and manage values
             // set defaults and manage values
             name = name || "videoDome";
             name = name || "videoDome";
-            options.resolution = (Math.abs(options.resolution) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution) | 0) || 32;
             options.clickToPlay = Boolean(options.clickToPlay);
             options.clickToPlay = Boolean(options.clickToPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
+            if (options.useDirectMapping === undefined) {
+                _this._useDirectMapping = true;
+            }
+            else {
+                _this._useDirectMapping = options.useDirectMapping;
+            }
             // create
             // create
             var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, false, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
-            _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false,
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, _this._useDirectMapping, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
+            if (_this._useDirectMapping) {
+                _this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            }
+            else {
+                _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false,
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
+                }, scene);
+            }
             // configure material
             // configure material
-            texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = _this._videoTexture;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
+            if (_this._useDirectMapping) {
+                texture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                material.diffuseTexture = texture;
+            }
+            else {
+                texture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                texture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                material.reflectionTexture = texture;
+            }
             // configure mesh
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.material = material;
             _this._mesh.parent = _this;
             _this._mesh.parent = _this;
@@ -102581,22 +102600,35 @@ var BABYLON;
          */
          */
         function PhotoDome(name, urlOfPhoto, options, scene) {
         function PhotoDome(name, urlOfPhoto, options, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
+            _this._useDirectMapping = false;
             // set defaults and manage values
             // set defaults and manage values
             name = name || "photoDome";
             name = name || "photoDome";
-            options.resolution = (Math.abs(options.resolution) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution) | 0) || 32;
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
+            if (options.useDirectMapping === undefined) {
+                _this._useDirectMapping = true;
+            }
+            else {
+                _this._useDirectMapping = options.useDirectMapping;
+            }
             // create
             // create
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
             var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
-            _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false,
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            if (_this._useDirectMapping) {
+                _this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            }
+            else {
+                _this._mesh = BABYLON.MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false,
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: BABYLON.Mesh.BACKSIDE // needs to be inside out
+                }, scene);
+            }
             // configure material
             // configure material
+            material.opacityFresnel = false;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
-            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene);
+            _this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene, false, !_this._useDirectMapping);
             // configure mesh
             // configure mesh
             _this._mesh.material = material;
             _this._mesh.material = material;
             _this._mesh.parent = _this;
             _this._mesh.parent = _this;
@@ -102614,9 +102646,16 @@ var BABYLON;
                     return;
                     return;
                 }
                 }
                 this._photoTexture = value;
                 this._photoTexture = value;
-                this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-                this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
-                this._material.reflectionTexture = this._photoTexture;
+                if (this._useDirectMapping) {
+                    this._photoTexture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._material.diffuseTexture = this._photoTexture;
+                }
+                else {
+                    this._photoTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                    this._photoTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
+                    this._material.reflectionTexture = this._photoTexture;
+                }
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

+ 31 - 12
src/Helpers/babylon.photoDome.ts

@@ -6,6 +6,7 @@ module BABYLON {
      * Potential additions to this helper include zoom and and non-infinite distance rendering effects.
      * Potential additions to this helper include zoom and and non-infinite distance rendering effects.
      */
      */
     export class PhotoDome extends Node {
     export class PhotoDome extends Node {
+        private _useDirectMapping = false;
 
 
         /**
         /**
          * The texture being displayed on the sphere
          * The texture being displayed on the sphere
@@ -24,9 +25,15 @@ module BABYLON {
                 return;
                 return;
             }
             }
             this._photoTexture = value;
             this._photoTexture = value;
-            this._photoTexture.coordinatesMode = Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            this._photoTexture.wrapV = Texture.CLAMP_ADDRESSMODE; // always clamp the up/down            
-            this._material.reflectionTexture = this._photoTexture;
+            if (this._useDirectMapping) {
+                this._photoTexture.wrapU = Texture.CLAMP_ADDRESSMODE;     
+                this._photoTexture.wrapV = Texture.CLAMP_ADDRESSMODE;
+                this._material.diffuseTexture = this._photoTexture;
+            } else {
+                this._photoTexture.coordinatesMode = Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                this._photoTexture.wrapV = Texture.CLAMP_ADDRESSMODE;
+                this._material.reflectionTexture = this._photoTexture;
+            }
         }        
         }        
 
 
 
 
@@ -59,29 +66,41 @@ module BABYLON {
          */
          */
         constructor(name: string, urlOfPhoto: string, options: {
         constructor(name: string, urlOfPhoto: string, options: {
             resolution?: number,
             resolution?: number,
-            size?: number
+            size?: number,
+            useDirectMapping?: boolean
         }, scene: Scene) {
         }, scene: Scene) {
             super(name, scene);
             super(name, scene);
 
 
             // set defaults and manage values
             // set defaults and manage values
             name = name || "photoDome";
             name = name || "photoDome";
-            options.resolution = (Math.abs(options.resolution as any) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution as any) | 0) || 32;
             options.size = Math.abs(options.size as any) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size as any) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
 
 
+            if (options.useDirectMapping === undefined) {
+                this._useDirectMapping = true;    
+            } else {
+                this._useDirectMapping = options.useDirectMapping;            
+            }
+
             // create
             // create
             let material = this._material = new BackgroundMaterial(name + "_material", scene);
             let material = this._material = new BackgroundMaterial(name + "_material", scene);
-            this._mesh = MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false, // saves on vertex data
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            if (this._useDirectMapping) {
+                this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            } else {
+                this._mesh = MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false, // saves on vertex data
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: Mesh.BACKSIDE // needs to be inside out
+                }, scene);    
+            }
 
 
             // configure material
             // configure material
+            material.opacityFresnel = false;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
 
 
-            this.photoTexture = new Texture(urlOfPhoto, scene);
+            this.photoTexture = new Texture(urlOfPhoto, scene, false, !this._useDirectMapping);
            
            
             // configure mesh
             // configure mesh
             this._mesh.material = material;
             this._mesh.material = material;

+ 31 - 12
src/Helpers/babylon.videoDome.ts

@@ -6,6 +6,7 @@ module BABYLON {
      * Potential additions to this helper include zoom and and non-infinite distance rendering effects.
      * Potential additions to this helper include zoom and and non-infinite distance rendering effects.
      */
      */
     export class VideoDome extends Node {
     export class VideoDome extends Node {
+        private _useDirectMapping = false;
 
 
         /**
         /**
          * The video texture being displayed on the sphere
          * The video texture being displayed on the sphere
@@ -52,36 +53,54 @@ module BABYLON {
             autoPlay?: boolean,
             autoPlay?: boolean,
             loop?: boolean,
             loop?: boolean,
             size?: number,
             size?: number,
-            poster?: string
+            poster?: string,            
+            useDirectMapping?: boolean
         }, scene: Scene) {
         }, scene: Scene) {
             super(name, scene);
             super(name, scene);
 
 
             // set defaults and manage values
             // set defaults and manage values
             name = name || "videoDome";
             name = name || "videoDome";
-            options.resolution = (Math.abs(options.resolution as any) | 0) || 12;
+            options.resolution = (Math.abs(options.resolution as any) | 0) || 32;
             options.clickToPlay = Boolean(options.clickToPlay);
             options.clickToPlay = Boolean(options.clickToPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.autoPlay = options.autoPlay === undefined ? true : Boolean(options.autoPlay);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.loop = options.loop === undefined ? true : Boolean(options.loop);
             options.size = Math.abs(options.size as any) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
             options.size = Math.abs(options.size as any) || (scene.activeCamera ? scene.activeCamera.maxZ * 0.48 : 1000);
 
 
+            if (options.useDirectMapping === undefined) {
+                this._useDirectMapping = true;    
+            } else {
+                this._useDirectMapping = options.useDirectMapping;            
+            }
+
             // create
             // create
             let tempOptions: VideoTextureSettings = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             let tempOptions: VideoTextureSettings = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
             let material = this._material = new BackgroundMaterial(name + "_material", scene);
             let material = this._material = new BackgroundMaterial(name + "_material", scene);
-            let texture = this._videoTexture = new VideoTexture(name + "_texture", urlsOrVideo, scene, false, false, Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
-            this._mesh = MeshBuilder.CreateIcoSphere(name + "_mesh", {
-                flat: false, // saves on vertex data
-                radius: options.size,
-                subdivisions: options.resolution,
-                sideOrientation: Mesh.BACKSIDE // needs to be inside out
-            }, scene);
+            let texture = this._videoTexture = new VideoTexture(name + "_texture", urlsOrVideo, scene, false, this._useDirectMapping, Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
+            if (this._useDirectMapping) {
+                this._mesh = BABYLON.Mesh.CreateSphere("sphere1", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
+            } else {
+                this._mesh = MeshBuilder.CreateIcoSphere(name + "_mesh", {
+                    flat: false, // saves on vertex data
+                    radius: options.size,
+                    subdivisions: options.resolution,
+                    sideOrientation: Mesh.BACKSIDE // needs to be inside out
+                }, scene);    
+            }
 
 
             // configure material
             // configure material
-            texture.coordinatesMode = Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
-            texture.wrapV = Texture.CLAMP_ADDRESSMODE; // always clamp the up/down
-            material.reflectionTexture = this._videoTexture;
             material.useEquirectangularFOV = true;
             material.useEquirectangularFOV = true;
             material.fovMultiplier = 1.0;
             material.fovMultiplier = 1.0;
 
 
+            if (this._useDirectMapping) {
+                texture.wrapU = Texture.CLAMP_ADDRESSMODE;     
+                texture.wrapV = Texture.CLAMP_ADDRESSMODE;
+                material.diffuseTexture = texture;
+            } else {
+                texture.coordinatesMode = Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE; // matches orientation
+                texture.wrapV = Texture.CLAMP_ADDRESSMODE;
+                material.reflectionTexture =texture;
+            }            
+
             // configure mesh
             // configure mesh
             this._mesh.material = material;
             this._mesh.material = material;
             this._mesh.parent = this;
             this._mesh.parent = this;