@babylonjs/loaders 7.22.5 → 7.23.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -67,6 +67,7 @@ export class KHR_materials_volume {
67
67
  if (extension.thicknessTexture) {
68
68
  extension.thicknessTexture.nonColorData = true;
69
69
  return this._loader.loadTextureInfoAsync(`${context}/thicknessTexture`, extension.thicknessTexture).then((texture) => {
70
+ texture.name = `${babylonMaterial.name} (thickness)`;
70
71
  babylonMaterial.subSurface.thicknessTexture = texture;
71
72
  babylonMaterial.subSurface.useGltfStyleTextures = true;
72
73
  });
@@ -1 +1 @@
1
- {"version":3,"file":"KHR_materials_volume.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_materials_volume.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qDAAuC;AAK7D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,IAAI,GAAG,sBAAsB,CAAC;AAapC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,OAAO,oBAAoB;IAkB7B;;OAEG;IACH,YAAY,MAAkB;QApB9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAO5B;;WAEG;QACI,UAAK,GAAG,GAAG,CAAC;QAQf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,qHAAqH;YACrH,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;SACxC;IACL,CAAC;IAED,gBAAgB;IACT,OAAO;QACV,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;SACxC;QACA,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,2BAA2B,CAAC,OAAe,EAAE,QAAmB,EAAE,eAAyB;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ript-eslint/naming-convention */\r\nimport type { Nullable } from \"core/types\";\r\nimport { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { IMaterial, ITextureInfo } from \"../glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader } from \"../glTFLoader\";\r\nimport type { IKHRMaterialsVolume } from \"babylonjs-gltf2interface\";\r\n\r\nconst NAME = \"KHR_materials_volume\";\r\n\r\ndeclare module \"../../glTFFileLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc\r\n export interface GLTFLoaderExtensionOptions {\r\n /**\r\n * Defines options for the KHR_materials_volume extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"KHR_materials_volume\"]: {};\r\n }\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)\r\n * @since 5.0.0\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class KHR_materials_volume implements IGLTFLoaderExtension {\r\n /**\r\n * The name of this extension.\r\n */\r\n public readonly name = NAME;\r\n\r\n /**\r\n * Defines whether this extension is enabled.\r\n */\r\n public enabled: boolean;\r\n\r\n /**\r\n * Defines a number that determines the order the extensions are applied.\r\n */\r\n public order = 173;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = this._loader.isExtensionUsed(NAME);\r\n if (this.enabled) {\r\n // We need to disable instance usage because the attenuation factor depends on the node scale of each individual mesh\r\n this._loader._disableInstancedMesh++;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n if (this.enabled) {\r\n this._loader._disableInstancedMesh--;\r\n }\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {\r\n return GLTFLoader.LoadExtensionAsync<IKHRMaterialsVolume>(context, material, this.name, (extensionContext, extension) => {\r\n const promises = new Array<Promise<any>>();\r\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\r\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\r\n promises.push(this._loadVolumePropertiesAsync(extensionContext, material, babylonMaterial, extension));\r\n return Promise.all(promises).then(() => {});\r\n });\r\n }\r\n\r\n private _loadVolumePropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material, extension: IKHRMaterialsVolume): Promise<void> {\r\n if (!(babylonMaterial instanceof PBRMaterial)) {\r\n throw new Error(`${context}: Material type not supported`);\r\n }\r\n\r\n // If transparency isn't enabled already, this extension shouldn't do anything.\r\n // i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.\r\n if ((!babylonMaterial.subSurface.isRefractionEnabled && !babylonMaterial.subSurface.isTranslucencyEnabled) || !extension.thicknessFactor) {\r\n return Promise.resolve();\r\n }\r\n\r\n // IOR in this extension only affects interior.\r\n babylonMaterial.subSurface.volumeIndexOfRefraction = babylonMaterial.indexOfRefraction;\r\n const attenuationDistance = extension.attenuationDistance !== undefined ? extension.attenuationDistance : Number.MAX_VALUE;\r\n babylonMaterial.subSurface.tintColorAtDistance = attenuationDistance;\r\n if (extension.attenuationColor !== undefined && extension.attenuationColor.length == 3) {\r\n babylonMaterial.subSurface.tintColor.copyFromFloats(extension.attenuationColor[0], extension.attenuationColor[1], extension.attenuationColor[2]);\r\n }\r\n\r\n babylonMaterial.subSurface.minimumThickness = 0.0;\r\n babylonMaterial.subSurface.maximumThickness = extension.thicknessFactor;\r\n babylonMaterial.subSurface.useThicknessAsDepth = true;\r\n if (extension.thicknessTexture) {\r\n (extension.thicknessTexture as ITextureInfo).nonColorData = true;\r\n return this._loader.loadTextureInfoAsync(`${context}/thicknessTexture`, extension.thicknessTexture).then((texture: BaseTexture) => {\r\n babylonMaterial.subSurface.thicknessTexture = texture;\r\n babylonMaterial.subSurface.useGltfStyleTextures = true;\r\n });\r\n } else {\r\n return Promise.resolve();\r\n }\r\n }\r\n}\r\n\r\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_volume(loader));\r\n"]}
1
+ {"version":3,"file":"KHR_materials_volume.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_materials_volume.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qDAAuC;AAK7D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,IAAI,GAAG,sBAAsB,CAAC;AAapC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,OAAO,oBAAoB;IAkB7B;;OAEG;IACH,YAAY,MAAkB;QApB9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAO5B;;WAEG;QACI,UAAK,GAAG,GAAG,CAAC;QAQf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,qHAAqH;YACrH,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;SACxC;IACL,CAAC;IAED,gBAAgB;IACT,OAAO;QACV,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;SACxC;QACA,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,2BAA2B,CAAC,OAAe,EAAE,QAAmB,EAAE,eAAyB;QAC9F,OAAO,UAAU,CAAC,kBAAkB,CAAsB,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,gB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\"core/types\";\r\nimport { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { IMaterial, ITextureInfo } from \"../glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader } from \"../glTFLoader\";\r\nimport type { IKHRMaterialsVolume } from \"babylonjs-gltf2interface\";\r\n\r\nconst NAME = \"KHR_materials_volume\";\r\n\r\ndeclare module \"../../glTFFileLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc\r\n export interface GLTFLoaderExtensionOptions {\r\n /**\r\n * Defines options for the KHR_materials_volume extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"KHR_materials_volume\"]: {};\r\n }\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)\r\n * @since 5.0.0\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class KHR_materials_volume implements IGLTFLoaderExtension {\r\n /**\r\n * The name of this extension.\r\n */\r\n public readonly name = NAME;\r\n\r\n /**\r\n * Defines whether this extension is enabled.\r\n */\r\n public enabled: boolean;\r\n\r\n /**\r\n * Defines a number that determines the order the extensions are applied.\r\n */\r\n public order = 173;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = this._loader.isExtensionUsed(NAME);\r\n if (this.enabled) {\r\n // We need to disable instance usage because the attenuation factor depends on the node scale of each individual mesh\r\n this._loader._disableInstancedMesh++;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n if (this.enabled) {\r\n this._loader._disableInstancedMesh--;\r\n }\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {\r\n return GLTFLoader.LoadExtensionAsync<IKHRMaterialsVolume>(context, material, this.name, (extensionContext, extension) => {\r\n const promises = new Array<Promise<any>>();\r\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\r\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\r\n promises.push(this._loadVolumePropertiesAsync(extensionContext, material, babylonMaterial, extension));\r\n return Promise.all(promises).then(() => {});\r\n });\r\n }\r\n\r\n private _loadVolumePropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material, extension: IKHRMaterialsVolume): Promise<void> {\r\n if (!(babylonMaterial instanceof PBRMaterial)) {\r\n throw new Error(`${context}: Material type not supported`);\r\n }\r\n\r\n // If transparency isn't enabled already, this extension shouldn't do anything.\r\n // i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.\r\n if ((!babylonMaterial.subSurface.isRefractionEnabled && !babylonMaterial.subSurface.isTranslucencyEnabled) || !extension.thicknessFactor) {\r\n return Promise.resolve();\r\n }\r\n\r\n // IOR in this extension only affects interior.\r\n babylonMaterial.subSurface.volumeIndexOfRefraction = babylonMaterial.indexOfRefraction;\r\n const attenuationDistance = extension.attenuationDistance !== undefined ? extension.attenuationDistance : Number.MAX_VALUE;\r\n babylonMaterial.subSurface.tintColorAtDistance = attenuationDistance;\r\n if (extension.attenuationColor !== undefined && extension.attenuationColor.length == 3) {\r\n babylonMaterial.subSurface.tintColor.copyFromFloats(extension.attenuationColor[0], extension.attenuationColor[1], extension.attenuationColor[2]);\r\n }\r\n\r\n babylonMaterial.subSurface.minimumThickness = 0.0;\r\n babylonMaterial.subSurface.maximumThickness = extension.thicknessFactor;\r\n babylonMaterial.subSurface.useThicknessAsDepth = true;\r\n if (extension.thicknessTexture) {\r\n (extension.thicknessTexture as ITextureInfo).nonColorData = true;\r\n return this._loader.loadTextureInfoAsync(`${context}/thicknessTexture`, extension.thicknessTexture).then((texture: BaseTexture) => {\r\n texture.name = `${babylonMaterial.name} (thickness)`;\r\n babylonMaterial.subSurface.thicknessTexture = texture;\r\n babylonMaterial.subSurface.useGltfStyleTextures = true;\r\n });\r\n } else {\r\n return Promise.resolve();\r\n }\r\n }\r\n}\r\n\r\nGLTFLoader.RegisterExtension(NAME, (loader) => new KHR_materials_volume(loader));\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/loaders",
3
- "version": "7.22.5",
3
+ "version": "7.23.0",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,10 +18,10 @@
18
18
  "postcompile": "build-tools -c add-js-to-es6"
19
19
  },
20
20
  "devDependencies": {
21
- "@babylonjs/core": "^7.22.5",
21
+ "@babylonjs/core": "^7.23.0",
22
22
  "@dev/build-tools": "^1.0.0",
23
23
  "@lts/loaders": "^1.0.0",
24
- "babylonjs-gltf2interface": "^7.22.5"
24
+ "babylonjs-gltf2interface": "^7.23.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@babylonjs/core": "^7.0.0",