Parcourir la source

generate mipMaps and default behavior

Raanan Weber il y a 4 ans
Parent
commit
ebea702cad
3 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 1 1
      src/Helpers/photoDome.ts
  2. 1 1
      src/Helpers/textureDome.ts
  3. 1 1
      src/Helpers/videoDome.ts

+ 1 - 1
src/Helpers/photoDome.ts

@@ -55,7 +55,7 @@ export class PhotoDome extends TextureDome<Texture> {
     }
     }
 
 
     protected _initTexture(urlsOrElement: string, scene: Scene, options: any): Texture {
     protected _initTexture(urlsOrElement: string, scene: Scene, options: any): Texture {
-        return new Texture(urlsOrElement, scene, options.noMipMap, !this._useDirectMapping, undefined, undefined, (message, exception) => {
+        return new Texture(urlsOrElement, scene, !options.generateMipMaps, !this._useDirectMapping, undefined, undefined, (message, exception) => {
             this.onLoadErrorObservable.notifyObservers(message || "Unknown error occured");
             this.onLoadErrorObservable.notifyObservers(message || "Unknown error occured");
 
 
             if (this.onError) {
             if (this.onError) {

+ 1 - 1
src/Helpers/textureDome.ts

@@ -166,7 +166,7 @@ export abstract class TextureDome<T extends Texture> extends TransformNode {
             faceForward?: boolean;
             faceForward?: boolean;
             useDirectMapping?: boolean;
             useDirectMapping?: boolean;
             halfDomeMode?: boolean;
             halfDomeMode?: boolean;
-            noMipMap?: boolean;
+            generateMipMaps?: boolean;
         },
         },
         scene: Scene,
         scene: Scene,
         protected onError: Nullable<(message?: string, exception?: any) => void> = null
         protected onError: Nullable<(message?: string, exception?: any) => void> = null

+ 1 - 1
src/Helpers/videoDome.ts

@@ -47,7 +47,7 @@ export class VideoDome extends TextureDome<VideoTexture> {
 
 
     protected _initTexture(urlsOrElement: string | string[] | HTMLVideoElement, scene: Scene, options: any): VideoTexture {
     protected _initTexture(urlsOrElement: string | string[] | HTMLVideoElement, scene: Scene, options: any): VideoTexture {
         const tempOptions: VideoTextureSettings = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
         const tempOptions: VideoTextureSettings = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
-        const texture = new VideoTexture((this.name || "videoDome") + "_texture", urlsOrElement, scene, false, this._useDirectMapping, Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
+        const texture = new VideoTexture((this.name || "videoDome") + "_texture", urlsOrElement, scene, options.generateMipMaps, this._useDirectMapping, Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
         // optional configuration
         // optional configuration
         if (options.clickToPlay) {
         if (options.clickToPlay) {
             scene.onPointerUp = () => {
             scene.onPointerUp = () => {