cc34787216edc32a31820119ed12d54a4a01c14dfa85c9e1f5301f2897d3f5e3.json 21 KB

1
  1. {"ast":null,"code":"import { PanoramaToCubeMapTools } from \"../../Misc/HighDynamicRange/panoramaToCubemap.js\";\nimport { BaseTexture } from \"./baseTexture.js\";\nimport { Texture } from \"./texture.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { LoadImage } from \"../../Misc/fileTools.js\";\nimport { IsDocumentAvailable } from \"../../Misc/domManagement.js\";\n/**\n * This represents a texture coming from an equirectangular image supported by the web browser canvas.\n */\nexport class EquiRectangularCubeTexture extends BaseTexture {\n /**\n * Instantiates an EquiRectangularCubeTexture from the following parameters.\n * @param url The location of the image\n * @param scene The scene the texture will be used in\n * @param size The cubemap desired size (the more it increases the longer the generation will be)\n * @param noMipmap Forces to not generate the mipmap if true\n * @param gammaSpace Specifies if the texture will be used in gamma or linear space\n * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)\n * @param onLoad — defines a callback called when texture is loaded\n * @param onError — defines a callback called if there is an error\n * @param supersample — defines if texture must be supersampled (default: false)\n */\n constructor(url, scene, size, noMipmap = false, gammaSpace = true, onLoad = null, onError = null, supersample = false) {\n super(scene);\n this._onLoad = null;\n this._onError = null;\n if (!url) {\n throw new Error(\"Image url is not set\");\n }\n this._coordinatesMode = Texture.CUBIC_MODE;\n this.name = url;\n this.url = url;\n this._size = size;\n this._supersample = supersample;\n this._noMipmap = noMipmap;\n this.gammaSpace = gammaSpace;\n this._onLoad = onLoad;\n this._onError = onError;\n this.hasAlpha = false;\n this.isCube = true;\n this._texture = this._getFromCache(url, this._noMipmap, undefined, undefined, undefined, this.isCube);\n if (!this._texture) {\n if (!scene.useDelayedTextureLoading) {\n this._loadImage(() => this._loadTexture(), this._onError);\n } else {\n this.delayLoadState = 4;\n }\n } else if (onLoad) {\n if (this._texture.isReady) {\n Tools.SetImmediate(() => onLoad());\n } else {\n this._texture.onLoadedObservable.add(onLoad);\n }\n }\n }\n /**\n * Load the image data, by putting the image on a canvas and extracting its buffer.\n * @param loadTextureCallback\n * @param onError\n */\n _loadImage(loadTextureCallback, onError) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n // Create texture before loading\n const texture = scene.getEngine().createRawCubeTexture(null, this._size, 4, scene.getEngine().getCaps().textureFloat ? 1 : 7, !this._noMipmap, false, 3);\n texture.generateMipMaps = !this._noMipmap;\n scene.addPendingData(texture);\n texture.url = this.url;\n texture.isReady = false;\n scene.getEngine()._internalTexturesCache.push(texture);\n this._texture = texture;\n LoadImage(this.url, image => {\n this._width = image.width;\n this._height = image.height;\n let canvas;\n if (IsDocumentAvailable()) {\n canvas = document.createElement(\"canvas\");\n canvas.width = this._width;\n canvas.height = this._height;\n } else {\n // Canvas is not available in the current environment\n canvas = new OffscreenCanvas(this._width, this._height);\n }\n const ctx = canvas.getContext(\"2d\");\n ctx.drawImage(image, 0, 0);\n const imageData = ctx.getImageData(0, 0, image.width, image.height);\n this._buffer = imageData.data.buffer;\n if (canvas.remove) {\n canvas.remove();\n }\n loadTextureCallback();\n }, (_, e) => {\n scene.removePendingData(texture);\n if (onError) {\n onError(`${this.getClassName()} could not be loaded`, e);\n }\n }, scene ? scene.offlineProvider : null);\n }\n /**\n * Convert the image buffer into a cubemap and create a CubeTexture.\n */\n _loadTexture() {\n const scene = this.getScene();\n const callback = () => {\n const imageData = this._getFloat32ArrayFromArrayBuffer(this._buffer);\n // Extract the raw linear data.\n const data = PanoramaToCubeMapTools.ConvertPanoramaToCubemap(imageData, this._width, this._height, this._size, this._supersample);\n const results = [];\n // Push each faces.\n for (let i = 0; i < 6; i++) {\n const dataFace = data[EquiRectangularCubeTexture._FacesMapping[i]];\n results.push(dataFace);\n }\n return results;\n };\n if (!scene) {\n return;\n }\n const faceDataArrays = callback();\n const texture = this._texture;\n scene.getEngine().updateRawCubeTexture(texture, faceDataArrays, texture.format, texture.type, texture.invertY);\n texture.isReady = true;\n scene.removePendingData(texture);\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (this._onLoad) {\n this._onLoad();\n }\n }\n /**\n * Convert the ArrayBuffer into a Float32Array and drop the transparency channel.\n * @param buffer The ArrayBuffer that should be converted.\n * @returns The buffer as Float32Array.\n */\n _getFloat32ArrayFromArrayBuffer(buffer) {\n const dataView = new DataView(buffer);\n const floatImageData = new Float32Array(buffer.byteLength * 3 / 4);\n let k = 0;\n for (let i = 0; i < buffer.byteLength; i++) {\n // We drop the transparency channel, because we do not need/want it\n if ((i + 1) % 4 !== 0) {\n floatImageData[k++] = dataView.getUint8(i) / 255;\n }\n }\n return floatImageData;\n }\n /**\n * Get the current class name of the texture useful for serialization or dynamic coding.\n * @returns \"EquiRectangularCubeTexture\"\n */\n getClassName() {\n return \"EquiRectangularCubeTexture\";\n }\n /**\n * Create a clone of the current EquiRectangularCubeTexture and return it.\n * @returns A clone of the current EquiRectangularCubeTexture.\n */\n clone() {\n const scene = this.getScene();\n if (!scene) {\n return this;\n }\n const newTexture = new EquiRectangularCubeTexture(this.url, scene, this._size, this._noMipmap, this.gammaSpace);\n // Base texture\n newTexture.level = this.level;\n newTexture.wrapU = this.wrapU;\n newTexture.wrapV = this.wrapV;\n newTexture.coordinatesIndex = this.coordinatesIndex;\n newTexture.coordinatesMode = this.coordinatesMode;\n return newTexture;\n }\n}\n/** The six faces of the cube. */\nEquiRectangularCubeTexture._FacesMapping = [\"right\", \"left\", \"up\", \"down\", \"front\", \"back\"];","map":{"version":3,"names":["PanoramaToCubeMapTools","BaseTexture","Texture","Tools","LoadImage","IsDocumentAvailable","EquiRectangularCubeTexture","constructor","url","scene","size","noMipmap","gammaSpace","onLoad","onError","supersample","_onLoad","_onError","Error","_coordinatesMode","CUBIC_MODE","name","_size","_supersample","_noMipmap","hasAlpha","isCube","_texture","_getFromCache","undefined","useDelayedTextureLoading","_loadImage","_loadTexture","delayLoadState","isReady","SetImmediate","onLoadedObservable","add","loadTextureCallback","getScene","texture","getEngine","createRawCubeTexture","getCaps","textureFloat","generateMipMaps","addPendingData","_internalTexturesCache","push","image","_width","width","_height","height","canvas","document","createElement","OffscreenCanvas","ctx","getContext","drawImage","imageData","getImageData","_buffer","data","buffer","remove","_","e","removePendingData","getClassName","offlineProvider","callback","_getFloat32ArrayFromArrayBuffer","ConvertPanoramaToCubemap","results","i","dataFace","_FacesMapping","faceDataArrays","updateRawCubeTexture","format","type","invertY","notifyObservers","clear","dataView","DataView","floatImageData","Float32Array","byteLength","k","getUint8","clone","newTexture","level","wrapU","wrapV","coordinatesIndex","coordinatesMode"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Textures/equiRectangularCubeTexture.js"],"sourcesContent":["import { PanoramaToCubeMapTools } from \"../../Misc/HighDynamicRange/panoramaToCubemap.js\";\nimport { BaseTexture } from \"./baseTexture.js\";\nimport { Texture } from \"./texture.js\";\nimport { Tools } from \"../../Misc/tools.js\";\n\nimport { LoadImage } from \"../../Misc/fileTools.js\";\nimport { IsDocumentAvailable } from \"../../Misc/domManagement.js\";\n/**\n * This represents a texture coming from an equirectangular image supported by the web browser canvas.\n */\nexport class EquiRectangularCubeTexture extends BaseTexture {\n /**\n * Instantiates an EquiRectangularCubeTexture from the following parameters.\n * @param url The location of the image\n * @param scene The scene the texture will be used in\n * @param size The cubemap desired size (the more it increases the longer the generation will be)\n * @param noMipmap Forces to not generate the mipmap if true\n * @param gammaSpace Specifies if the texture will be used in gamma or linear space\n * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)\n * @param onLoad — defines a callback called when texture is loaded\n * @param onError — defines a callback called if there is an error\n * @param supersample — defines if texture must be supersampled (default: false)\n */\n constructor(url, scene, size, noMipmap = false, gammaSpace = true, onLoad = null, onError = null, supersample = false) {\n super(scene);\n this._onLoad = null;\n this._onError = null;\n if (!url) {\n throw new Error(\"Image url is not set\");\n }\n this._coordinatesMode = Texture.CUBIC_MODE;\n this.name = url;\n this.url = url;\n this._size = size;\n this._supersample = supersample;\n this._noMipmap = noMipmap;\n this.gammaSpace = gammaSpace;\n this._onLoad = onLoad;\n this._onError = onError;\n this.hasAlpha = false;\n this.isCube = true;\n this._texture = this._getFromCache(url, this._noMipmap, undefined, undefined, undefined, this.isCube);\n if (!this._texture) {\n if (!scene.useDelayedTextureLoading) {\n this._loadImage(() => this._loadTexture(), this._onError);\n }\n else {\n this.delayLoadState = 4;\n }\n }\n else if (onLoad) {\n if (this._texture.isReady) {\n Tools.SetImmediate(() => onLoad());\n }\n else {\n this._texture.onLoadedObservable.add(onLoad);\n }\n }\n }\n /**\n * Load the image data, by putting the image on a canvas and extracting its buffer.\n * @param loadTextureCallback\n * @param onError\n */\n _loadImage(loadTextureCallback, onError) {\n const scene = this.getScene();\n if (!scene) {\n return;\n }\n // Create texture before loading\n const texture = scene\n .getEngine()\n .createRawCubeTexture(null, this._size, 4, scene.getEngine().getCaps().textureFloat ? 1 : 7, !this._noMipmap, false, 3);\n texture.generateMipMaps = !this._noMipmap;\n scene.addPendingData(texture);\n texture.url = this.url;\n texture.isReady = false;\n scene.getEngine()._internalTexturesCache.push(texture);\n this._texture = texture;\n LoadImage(this.url, (image) => {\n this._width = image.width;\n this._height = image.height;\n let canvas;\n if (IsDocumentAvailable()) {\n canvas = document.createElement(\"canvas\");\n canvas.width = this._width;\n canvas.height = this._height;\n }\n else {\n // Canvas is not available in the current environment\n canvas = new OffscreenCanvas(this._width, this._height);\n }\n const ctx = canvas.getContext(\"2d\");\n ctx.drawImage(image, 0, 0);\n const imageData = ctx.getImageData(0, 0, image.width, image.height);\n this._buffer = imageData.data.buffer;\n if (canvas.remove) {\n canvas.remove();\n }\n loadTextureCallback();\n }, (_, e) => {\n scene.removePendingData(texture);\n if (onError) {\n onError(`${this.getClassName()} could not be loaded`, e);\n }\n }, scene ? scene.offlineProvider : null);\n }\n /**\n * Convert the image buffer into a cubemap and create a CubeTexture.\n */\n _loadTexture() {\n const scene = this.getScene();\n const callback = () => {\n const imageData = this._getFloat32ArrayFromArrayBuffer(this._buffer);\n // Extract the raw linear data.\n const data = PanoramaToCubeMapTools.ConvertPanoramaToCubemap(imageData, this._width, this._height, this._size, this._supersample);\n const results = [];\n // Push each faces.\n for (let i = 0; i < 6; i++) {\n const dataFace = data[EquiRectangularCubeTexture._FacesMapping[i]];\n results.push(dataFace);\n }\n return results;\n };\n if (!scene) {\n return;\n }\n const faceDataArrays = callback();\n const texture = this._texture;\n scene.getEngine().updateRawCubeTexture(texture, faceDataArrays, texture.format, texture.type, texture.invertY);\n texture.isReady = true;\n scene.removePendingData(texture);\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (this._onLoad) {\n this._onLoad();\n }\n }\n /**\n * Convert the ArrayBuffer into a Float32Array and drop the transparency channel.\n * @param buffer The ArrayBuffer that should be converted.\n * @returns The buffer as Float32Array.\n */\n _getFloat32ArrayFromArrayBuffer(buffer) {\n const dataView = new DataView(buffer);\n const floatImageData = new Float32Array((buffer.byteLength * 3) / 4);\n let k = 0;\n for (let i = 0; i < buffer.byteLength; i++) {\n // We drop the transparency channel, because we do not need/want it\n if ((i + 1) % 4 !== 0) {\n floatImageData[k++] = dataView.getUint8(i) / 255;\n }\n }\n return floatImageData;\n }\n /**\n * Get the current class name of the texture useful for serialization or dynamic coding.\n * @returns \"EquiRectangularCubeTexture\"\n */\n getClassName() {\n return \"EquiRectangularCubeTexture\";\n }\n /**\n * Create a clone of the current EquiRectangularCubeTexture and return it.\n * @returns A clone of the current EquiRectangularCubeTexture.\n */\n clone() {\n const scene = this.getScene();\n if (!scene) {\n return this;\n }\n const newTexture = new EquiRectangularCubeTexture(this.url, scene, this._size, this._noMipmap, this.gammaSpace);\n // Base texture\n newTexture.level = this.level;\n newTexture.wrapU = this.wrapU;\n newTexture.wrapV = this.wrapV;\n newTexture.coordinatesIndex = this.coordinatesIndex;\n newTexture.coordinatesMode = this.coordinatesMode;\n return newTexture;\n }\n}\n/** The six faces of the cube. */\nEquiRectangularCubeTexture._FacesMapping = [\"right\", \"left\", \"up\", \"down\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