@onerjs/loaders 8.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OBJ/index.d.ts +4 -0
- package/OBJ/index.js +5 -0
- package/OBJ/index.js.map +1 -0
- package/OBJ/mtlFileLoader.d.ts +41 -0
- package/OBJ/mtlFileLoader.js +231 -0
- package/OBJ/mtlFileLoader.js.map +1 -0
- package/OBJ/objFileLoader.d.ts +136 -0
- package/OBJ/objFileLoader.js +318 -0
- package/OBJ/objFileLoader.js.map +1 -0
- package/OBJ/objFileLoader.metadata.d.ts +4 -0
- package/OBJ/objFileLoader.metadata.js +5 -0
- package/OBJ/objFileLoader.metadata.js.map +1 -0
- package/OBJ/objLoadingOptions.d.ts +47 -0
- package/OBJ/objLoadingOptions.js +2 -0
- package/OBJ/objLoadingOptions.js.map +1 -0
- package/OBJ/solidParser.d.ts +174 -0
- package/OBJ/solidParser.js +862 -0
- package/OBJ/solidParser.js.map +1 -0
- package/SPLAT/index.d.ts +2 -0
- package/SPLAT/index.js +4 -0
- package/SPLAT/index.js.map +1 -0
- package/SPLAT/splatFileLoader.d.ts +88 -0
- package/SPLAT/splatFileLoader.js +562 -0
- package/SPLAT/splatFileLoader.js.map +1 -0
- package/SPLAT/splatFileLoader.metadata.d.ts +14 -0
- package/SPLAT/splatFileLoader.metadata.js +12 -0
- package/SPLAT/splatFileLoader.metadata.js.map +1 -0
- package/SPLAT/splatLoadingOptions.d.ts +13 -0
- package/SPLAT/splatLoadingOptions.js +2 -0
- package/SPLAT/splatLoadingOptions.js.map +1 -0
- package/STL/index.d.ts +1 -0
- package/STL/index.js +2 -0
- package/STL/index.js.map +1 -0
- package/STL/stlFileLoader.d.ts +78 -0
- package/STL/stlFileLoader.js +239 -0
- package/STL/stlFileLoader.js.map +1 -0
- package/STL/stlFileLoader.metadata.d.ts +8 -0
- package/STL/stlFileLoader.metadata.js +8 -0
- package/STL/stlFileLoader.metadata.js.map +1 -0
- package/bvh/bvhFileLoader.d.ts +69 -0
- package/bvh/bvhFileLoader.js +133 -0
- package/bvh/bvhFileLoader.js.map +1 -0
- package/bvh/bvhFileLoader.metadata.d.ts +8 -0
- package/bvh/bvhFileLoader.metadata.js +8 -0
- package/bvh/bvhFileLoader.metadata.js.map +1 -0
- package/bvh/bvhLoader.d.ts +14 -0
- package/bvh/bvhLoader.js +329 -0
- package/bvh/bvhLoader.js.map +1 -0
- package/bvh/bvhLoadingOptions.d.ts +9 -0
- package/bvh/bvhLoadingOptions.js +2 -0
- package/bvh/bvhLoadingOptions.js.map +1 -0
- package/bvh/index.d.ts +2 -0
- package/bvh/index.js +4 -0
- package/bvh/index.js.map +1 -0
- package/bvh/license.md +21 -0
- package/dynamic.d.ts +5 -0
- package/dynamic.js +57 -0
- package/dynamic.js.map +1 -0
- package/glTF/1.0/glTFBinaryExtension.d.ts +16 -0
- package/glTF/1.0/glTFBinaryExtension.js +65 -0
- package/glTF/1.0/glTFBinaryExtension.js.map +1 -0
- package/glTF/1.0/glTFLoader.d.ts +144 -0
- package/glTF/1.0/glTFLoader.js +1841 -0
- package/glTF/1.0/glTFLoader.js.map +1 -0
- package/glTF/1.0/glTFLoaderInterfaces.d.ts +412 -0
- package/glTF/1.0/glTFLoaderInterfaces.js +96 -0
- package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -0
- package/glTF/1.0/glTFLoaderUtils.d.ts +71 -0
- package/glTF/1.0/glTFLoaderUtils.js +255 -0
- package/glTF/1.0/glTFLoaderUtils.js.map +1 -0
- package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +13 -0
- package/glTF/1.0/glTFMaterialsCommonExtension.js +131 -0
- package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -0
- package/glTF/1.0/index.d.ts +5 -0
- package/glTF/1.0/index.js +6 -0
- package/glTF/1.0/index.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.d.ts +41 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.js +84 -0
- package/glTF/2.0/Extensions/EXT_lights_ies.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +48 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +116 -0
- package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.d.ts +43 -0
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.js +69 -0
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +39 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +82 -0
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +39 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +51 -0
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.d.ts +34 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.js +39 -0
- package/glTF/2.0/Extensions/EXT_texture_avif.js.map +1 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +33 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.js +38 -0
- package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +48 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +63 -0
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.d.ts +47 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.d.ts +1 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.js +239 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.js +78 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +47 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +93 -0
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.d.ts +352 -0
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js +1700 -0
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.d.ts +33 -0
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.js +20 -0
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/index.d.ts +3 -0
- package/glTF/2.0/Extensions/KHR_interactivity/index.js +4 -0
- package/glTF/2.0/Extensions/KHR_interactivity/index.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.d.ts +70 -0
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js +450 -0
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity.d.ts +38 -0
- package/glTF/2.0/Extensions/KHR_interactivity.js +151 -0
- package/glTF/2.0/Extensions/KHR_interactivity.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +41 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +92 -0
- package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.js +61 -0
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +43 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +94 -0
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.d.ts +43 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js +95 -0
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.d.ts +43 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.js +60 -0
- package/glTF/2.0/Extensions/KHR_materials_dispersion.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +52 -0
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +46 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.js +62 -0
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js +71 -0
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +81 -0
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +43 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +85 -0
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.js +85 -0
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +306 -0
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +42 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +73 -0
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +112 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.js +263 -0
- package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +43 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.js +86 -0
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +29 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js +23 -0
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.d.ts +31 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.js +190 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.d.ts +30 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.js +124 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.d.ts +30 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.js +69 -0
- package/glTF/2.0/Extensions/KHR_node_visibility.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +33 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.js +38 -0
- package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +37 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.js +59 -0
- package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +39 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +48 -0
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +56 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +227 -0
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_lod.d.ts +104 -0
- package/glTF/2.0/Extensions/MSFT_lod.js +338 -0
- package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +27 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +41 -0
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +27 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +42 -0
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -0
- package/glTF/2.0/Extensions/dynamic.d.ts +4 -0
- package/glTF/2.0/Extensions/dynamic.js +156 -0
- package/glTF/2.0/Extensions/dynamic.js.map +1 -0
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.d.ts +45 -0
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.js +101 -0
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.js.map +1 -0
- package/glTF/2.0/Extensions/index.d.ts +39 -0
- package/glTF/2.0/Extensions/index.js +41 -0
- package/glTF/2.0/Extensions/index.js.map +1 -0
- package/glTF/2.0/Extensions/objectModelMapping.d.ts +289 -0
- package/glTF/2.0/Extensions/objectModelMapping.js +828 -0
- package/glTF/2.0/Extensions/objectModelMapping.js.map +1 -0
- package/glTF/2.0/glTFLoader.d.ts +429 -0
- package/glTF/2.0/glTFLoader.js +2408 -0
- package/glTF/2.0/glTFLoader.js.map +1 -0
- package/glTF/2.0/glTFLoaderAnimation.d.ts +42 -0
- package/glTF/2.0/glTFLoaderAnimation.js +80 -0
- package/glTF/2.0/glTFLoaderAnimation.js.map +1 -0
- package/glTF/2.0/glTFLoaderExtension.d.ts +165 -0
- package/glTF/2.0/glTFLoaderExtension.js +2 -0
- package/glTF/2.0/glTFLoaderExtension.js.map +1 -0
- package/glTF/2.0/glTFLoaderExtensionRegistry.d.ts +25 -0
- package/glTF/2.0/glTFLoaderExtensionRegistry.js +33 -0
- package/glTF/2.0/glTFLoaderExtensionRegistry.js.map +1 -0
- package/glTF/2.0/glTFLoaderInterfaces.d.ts +257 -0
- package/glTF/2.0/glTFLoaderInterfaces.js +2 -0
- package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -0
- package/glTF/2.0/index.d.ts +6 -0
- package/glTF/2.0/index.js +8 -0
- package/glTF/2.0/index.js.map +1 -0
- package/glTF/glTFFileLoader.d.ts +516 -0
- package/glTF/glTFFileLoader.js +968 -0
- package/glTF/glTFFileLoader.js.map +1 -0
- package/glTF/glTFFileLoader.metadata.d.ts +15 -0
- package/glTF/glTFFileLoader.metadata.js +18 -0
- package/glTF/glTFFileLoader.metadata.js.map +1 -0
- package/glTF/glTFValidation.d.ts +29 -0
- package/glTF/glTFValidation.js +126 -0
- package/glTF/glTFValidation.js.map +1 -0
- package/glTF/index.d.ts +5 -0
- package/glTF/index.js +7 -0
- package/glTF/index.js.map +1 -0
- package/index.d.ts +5 -0
- package/index.js +7 -0
- package/index.js.map +1 -0
- package/legacy/legacy-bvhFileLoader.d.ts +1 -0
- package/legacy/legacy-bvhFileLoader.js +16 -0
- package/legacy/legacy-bvhFileLoader.js.map +1 -0
- package/legacy/legacy-glTF.d.ts +2 -0
- package/legacy/legacy-glTF.js +19 -0
- package/legacy/legacy-glTF.js.map +1 -0
- package/legacy/legacy-glTF1.d.ts +2 -0
- package/legacy/legacy-glTF1.js +16 -0
- package/legacy/legacy-glTF1.js.map +1 -0
- package/legacy/legacy-glTF1FileLoader.d.ts +2 -0
- package/legacy/legacy-glTF1FileLoader.js +4 -0
- package/legacy/legacy-glTF1FileLoader.js.map +1 -0
- package/legacy/legacy-glTF2.d.ts +2 -0
- package/legacy/legacy-glTF2.js +35 -0
- package/legacy/legacy-glTF2.js.map +1 -0
- package/legacy/legacy-glTF2FileLoader.d.ts +2 -0
- package/legacy/legacy-glTF2FileLoader.js +4 -0
- package/legacy/legacy-glTF2FileLoader.js.map +1 -0
- package/legacy/legacy-glTFFileLoader.d.ts +3 -0
- package/legacy/legacy-glTFFileLoader.js +5 -0
- package/legacy/legacy-glTFFileLoader.js.map +1 -0
- package/legacy/legacy-objFileLoader.d.ts +1 -0
- package/legacy/legacy-objFileLoader.js +16 -0
- package/legacy/legacy-objFileLoader.js.map +1 -0
- package/legacy/legacy-stlFileLoader.d.ts +1 -0
- package/legacy/legacy-stlFileLoader.js +16 -0
- package/legacy/legacy-stlFileLoader.js.map +1 -0
- package/legacy/legacy.d.ts +7 -0
- package/legacy/legacy.js +10 -0
- package/legacy/legacy.js.map +1 -0
- package/license.md +71 -0
- package/package.json +49 -0
- package/readme.md +23 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { GLTFLoader, ArrayItem } from "../glTFLoader.js";
|
|
2
|
+
import { registerGLTFExtension, unregisterGLTFExtension } from "../glTFLoaderExtensionRegistry.js";
|
|
3
|
+
const NAME = "EXT_texture_avif";
|
|
4
|
+
/**
|
|
5
|
+
* [glTF PR](https://github.com/KhronosGroup/glTF/pull/2235)
|
|
6
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_avif/README.md)
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
+
export class EXT_texture_avif {
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
constructor(loader) {
|
|
14
|
+
/** The name of this extension. */
|
|
15
|
+
this.name = NAME;
|
|
16
|
+
this._loader = loader;
|
|
17
|
+
this.enabled = loader.isExtensionUsed(NAME);
|
|
18
|
+
}
|
|
19
|
+
/** @internal */
|
|
20
|
+
dispose() {
|
|
21
|
+
this._loader = null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
27
|
+
_loadTextureAsync(context, texture, assign) {
|
|
28
|
+
return GLTFLoader.LoadExtensionAsync(context, texture, this.name, async (extensionContext, extension) => {
|
|
29
|
+
const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);
|
|
30
|
+
const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);
|
|
31
|
+
return await this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {
|
|
32
|
+
assign(babylonTexture);
|
|
33
|
+
}, undefined, !texture._textureInfo.nonColorData);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
unregisterGLTFExtension(NAME);
|
|
38
|
+
registerGLTFExtension(NAME, true, (loader) => new EXT_texture_avif(loader));
|
|
39
|
+
//# sourceMappingURL=EXT_texture_avif.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EXT_texture_avif.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/EXT_texture_avif.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAKtD,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAahC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,OAAO,gBAAgB;IASzB;;OAEG;IACH,YAAY,MAAkB;QAX9B,kCAAkC;QAClB,SAAI,GAAG,IAAI,CAAC;QAWxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,gBAAgB;IACT,OAAO;QACT,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,gDAAgD;IACzC,iBAAiB,CAAC,OAAe,EAAE,OAAiB,EAAE,MAA6C;QACtG,OAAO,UAAU,CAAC,kBAAkB,CAA+B,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE;YAClI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5J,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,gBAAgB,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YACtG,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CACzC,OAAO,EACP,OAAO,EACP,KAAK,EACL,CAAC,cAAc,EAAE,EAAE;gBACf,MAAM,CAAC,cAAc,CAAC,CAAC;YAC3B,CAAC,EACD,SAAS,EACT,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CACrC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC","sourcesContent":["import type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\r\nimport type { ITexture } from \"../glTFLoaderInterfaces\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { IEXTTextureAVIF } from \"babylonjs-gltf2interface\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"EXT_texture_avif\";\r\n\r\ndeclare module \"../../glTFFileLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/naming-convention\r\n export interface GLTFLoaderExtensionOptions {\r\n /**\r\n * Defines options for the EXT_texture_avif extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"EXT_texture_avif\"]: {};\r\n }\r\n}\r\n\r\n/**\r\n * [glTF PR](https://github.com/KhronosGroup/glTF/pull/2235)\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_avif/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class EXT_texture_avif implements IGLTFLoaderExtension {\r\n /** The name of this extension. */\r\n public readonly name = NAME;\r\n\r\n /** Defines whether this extension is enabled. */\r\n public enabled: boolean;\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 = loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public _loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {\r\n return GLTFLoader.LoadExtensionAsync<IEXTTextureAVIF, BaseTexture>(context, texture, this.name, async (extensionContext, extension) => {\r\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\r\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\r\n return await this._loader._createTextureAsync(\r\n context,\r\n sampler,\r\n image,\r\n (babylonTexture) => {\r\n assign(babylonTexture);\r\n },\r\n undefined,\r\n !texture._textureInfo.nonColorData\r\n );\r\n });\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, true, (loader) => new EXT_texture_avif(loader));\r\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
|
2
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
|
3
|
+
import type { ITexture } from "../glTFLoaderInterfaces.js";
|
|
4
|
+
import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
|
5
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
|
7
|
+
interface GLTFLoaderExtensionOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Defines options for the EXT_texture_webp extension.
|
|
10
|
+
*/
|
|
11
|
+
["EXT_texture_webp"]: {};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_webp/README.md)
|
|
16
|
+
*/
|
|
17
|
+
export declare class EXT_texture_webp implements IGLTFLoaderExtension {
|
|
18
|
+
/** The name of this extension. */
|
|
19
|
+
readonly name = "EXT_texture_webp";
|
|
20
|
+
/** Defines whether this extension is enabled. */
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
private _loader;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
constructor(loader: GLTFLoader);
|
|
27
|
+
/** @internal */
|
|
28
|
+
dispose(): void;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
_loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { GLTFLoader, ArrayItem } from "../glTFLoader.js";
|
|
2
|
+
import { registerGLTFExtension, unregisterGLTFExtension } from "../glTFLoaderExtensionRegistry.js";
|
|
3
|
+
const NAME = "EXT_texture_webp";
|
|
4
|
+
/**
|
|
5
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_webp/README.md)
|
|
6
|
+
*/
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8
|
+
export class EXT_texture_webp {
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
constructor(loader) {
|
|
13
|
+
/** The name of this extension. */
|
|
14
|
+
this.name = NAME;
|
|
15
|
+
this._loader = loader;
|
|
16
|
+
this.enabled = loader.isExtensionUsed(NAME);
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
dispose() {
|
|
20
|
+
this._loader = null;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
26
|
+
_loadTextureAsync(context, texture, assign) {
|
|
27
|
+
return GLTFLoader.LoadExtensionAsync(context, texture, this.name, async (extensionContext, extension) => {
|
|
28
|
+
const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);
|
|
29
|
+
const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);
|
|
30
|
+
return await this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {
|
|
31
|
+
assign(babylonTexture);
|
|
32
|
+
}, undefined, !texture._textureInfo.nonColorData);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
unregisterGLTFExtension(NAME);
|
|
37
|
+
registerGLTFExtension(NAME, true, (loader) => new EXT_texture_webp(loader));
|
|
38
|
+
//# sourceMappingURL=EXT_texture_webp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EXT_texture_webp.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/EXT_texture_webp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAKtD,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAahC;;GAEG;AACH,gEAAgE;AAChE,MAAM,OAAO,gBAAgB;IASzB;;OAEG;IACH,YAAY,MAAkB;QAX9B,kCAAkC;QAClB,SAAI,GAAG,IAAI,CAAC;QAWxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,gBAAgB;IACT,OAAO;QACT,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,gDAAgD;IACzC,iBAAiB,CAAC,OAAe,EAAE,OAAiB,EAAE,MAA6C;QACtG,OAAO,UAAU,CAAC,kBAAkB,CAA+B,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE;YAClI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5J,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,gBAAgB,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YACtG,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CACzC,OAAO,EACP,OAAO,EACP,KAAK,EACL,CAAC,cAAc,EAAE,EAAE;gBACf,MAAM,CAAC,cAAc,CAAC,CAAC;YAC3B,CAAC,EACD,SAAS,EACT,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CACrC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC","sourcesContent":["import type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\r\nimport type { ITexture } from \"../glTFLoaderInterfaces\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { IEXTTextureWebP } from \"babylonjs-gltf2interface\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"EXT_texture_webp\";\r\n\r\ndeclare module \"../../glTFFileLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/naming-convention\r\n export interface GLTFLoaderExtensionOptions {\r\n /**\r\n * Defines options for the EXT_texture_webp extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"EXT_texture_webp\"]: {};\r\n }\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_webp/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class EXT_texture_webp implements IGLTFLoaderExtension {\r\n /** The name of this extension. */\r\n public readonly name = NAME;\r\n\r\n /** Defines whether this extension is enabled. */\r\n public enabled: boolean;\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 = loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public _loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {\r\n return GLTFLoader.LoadExtensionAsync<IEXTTextureWebP, BaseTexture>(context, texture, this.name, async (extensionContext, extension) => {\r\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\r\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\r\n return await this._loader._createTextureAsync(\r\n context,\r\n sampler,\r\n image,\r\n (babylonTexture) => {\r\n assign(babylonTexture);\r\n },\r\n undefined,\r\n !texture._textureInfo.nonColorData\r\n );\r\n });\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, true, (loader) => new EXT_texture_webp(loader));\r\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
2
|
+
import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
|
3
|
+
import type { Camera } from "@babylonjs/core/Cameras/camera.js";
|
|
4
|
+
import type { INode, ICamera, IMaterial } from "../glTFLoaderInterfaces.js";
|
|
5
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
|
6
|
+
import type { GLTFLoader } from "../glTFLoader.js";
|
|
7
|
+
import type { Material } from "@babylonjs/core/Materials/material.js";
|
|
8
|
+
declare module "../../glTFFileLoader.js" {
|
|
9
|
+
interface GLTFLoaderExtensionOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Defines options for the ExtrasAsMetadata extension.
|
|
12
|
+
*/
|
|
13
|
+
["ExtrasAsMetadata"]: {};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Store glTF extras (if present) in BJS objects' metadata
|
|
18
|
+
*/
|
|
19
|
+
export declare class ExtrasAsMetadata implements IGLTFLoaderExtension {
|
|
20
|
+
/**
|
|
21
|
+
* The name of this extension.
|
|
22
|
+
*/
|
|
23
|
+
readonly name = "ExtrasAsMetadata";
|
|
24
|
+
/**
|
|
25
|
+
* Defines whether this extension is enabled.
|
|
26
|
+
*/
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
private _loader;
|
|
29
|
+
private _assignExtras;
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
constructor(loader: GLTFLoader);
|
|
34
|
+
/** @internal */
|
|
35
|
+
dispose(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
loadCameraAsync(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
createMaterial(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { registerGLTFExtension, unregisterGLTFExtension } from "../glTFLoaderExtensionRegistry.js";
|
|
2
|
+
const NAME = "ExtrasAsMetadata";
|
|
3
|
+
/**
|
|
4
|
+
* Store glTF extras (if present) in BJS objects' metadata
|
|
5
|
+
*/
|
|
6
|
+
export class ExtrasAsMetadata {
|
|
7
|
+
_assignExtras(babylonObject, gltfProp) {
|
|
8
|
+
if (gltfProp.extras && Object.keys(gltfProp.extras).length > 0) {
|
|
9
|
+
const metadata = (babylonObject.metadata = babylonObject.metadata || {});
|
|
10
|
+
const gltf = (metadata.gltf = metadata.gltf || {});
|
|
11
|
+
gltf.extras = gltfProp.extras;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
constructor(loader) {
|
|
18
|
+
/**
|
|
19
|
+
* The name of this extension.
|
|
20
|
+
*/
|
|
21
|
+
this.name = NAME;
|
|
22
|
+
/**
|
|
23
|
+
* Defines whether this extension is enabled.
|
|
24
|
+
*/
|
|
25
|
+
this.enabled = true;
|
|
26
|
+
this._loader = loader;
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
dispose() {
|
|
30
|
+
this._loader = null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
36
|
+
loadNodeAsync(context, node, assign) {
|
|
37
|
+
return this._loader.loadNodeAsync(context, node, (babylonTransformNode) => {
|
|
38
|
+
this._assignExtras(babylonTransformNode, node);
|
|
39
|
+
assign(babylonTransformNode);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
46
|
+
loadCameraAsync(context, camera, assign) {
|
|
47
|
+
return this._loader.loadCameraAsync(context, camera, (babylonCamera) => {
|
|
48
|
+
this._assignExtras(babylonCamera, camera);
|
|
49
|
+
assign(babylonCamera);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
createMaterial(context, material, babylonDrawMode) {
|
|
56
|
+
const babylonMaterial = this._loader.createMaterial(context, material, babylonDrawMode);
|
|
57
|
+
this._assignExtras(babylonMaterial, material);
|
|
58
|
+
return babylonMaterial;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
unregisterGLTFExtension(NAME);
|
|
62
|
+
registerGLTFExtension(NAME, false, (loader) => new ExtrasAsMetadata(loader));
|
|
63
|
+
//# sourceMappingURL=ExtrasAsMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtrasAsMetadata.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/ExtrasAsMetadata.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAiBhC;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAajB,aAAa,CAAC,aAAkC,EAAE,QAAmB;QACzE,IAAI,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7D,MAAM,QAAQ,GAAG,CAAC,aAAa,CAAC,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;YACzE,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAClC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,YAAmB,MAAkB;QAvBrC;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAE5B;;WAEG;QACI,YAAO,GAAG,IAAI,CAAC;QAgBlB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,gBAAgB;IACT,OAAO;QACT,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,gDAAgD;IACzC,aAAa,CAAC,OAAe,EAAE,IAAW,EAAE,MAAqD;QACpG,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,oBAAoB,EAAQ,EAAE;YAC5E,IAAI,CAAC,aAAa,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;YAC/C,MAAM,CAAC,oBAAoB,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,gDAAgD;IACzC,eAAe,CAAC,OAAe,EAAE,MAAe,EAAE,MAAuC;QAC5F,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,aAAa,EAAQ,EAAE;YACzE,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAC1C,MAAM,CAAC,aAAa,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACI,cAAc,CAAC,OAAe,EAAE,QAAmB,EAAE,eAAuB;QAC/E,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;QACxF,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,eAAe,CAAC;IAC3B,CAAC;CACJ;AAED,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { Camera } from \"core/Cameras/camera\";\r\n\r\nimport type { IProperty } from \"babylonjs-gltf2interface\";\r\nimport type { INode, ICamera, IMaterial } from \"../glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport type { GLTFLoader } from \"../glTFLoader\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"ExtrasAsMetadata\";\r\n\r\ndeclare module \"../../glTFFileLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/naming-convention\r\n export interface GLTFLoaderExtensionOptions {\r\n /**\r\n * Defines options for the ExtrasAsMetadata extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"ExtrasAsMetadata\"]: {};\r\n }\r\n}\r\n\r\ninterface IObjectWithMetadata {\r\n metadata: any;\r\n}\r\n\r\n/**\r\n * Store glTF extras (if present) in BJS objects' metadata\r\n */\r\nexport class ExtrasAsMetadata 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 = true;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n private _assignExtras(babylonObject: IObjectWithMetadata, gltfProp: IProperty): void {\r\n if (gltfProp.extras && Object.keys(gltfProp.extras).length > 0) {\r\n const metadata = (babylonObject.metadata = babylonObject.metadata || {});\r\n const gltf = (metadata.gltf = metadata.gltf || {});\r\n gltf.extras = gltfProp.extras;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n }\r\n\r\n /** @internal */\r\n public dispose(): void {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>> {\r\n return this._loader.loadNodeAsync(context, node, (babylonTransformNode): void => {\r\n this._assignExtras(babylonTransformNode, node);\r\n assign(babylonTransformNode);\r\n });\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public loadCameraAsync(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>> {\r\n return this._loader.loadCameraAsync(context, camera, (babylonCamera): void => {\r\n this._assignExtras(babylonCamera, camera);\r\n assign(babylonCamera);\r\n });\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public createMaterial(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material> {\r\n const babylonMaterial = this._loader.createMaterial(context, material, babylonDrawMode);\r\n this._assignExtras(babylonMaterial, material);\r\n return babylonMaterial;\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, false, (loader) => new ExtrasAsMetadata(loader));\r\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
|
2
|
+
import type { GLTFLoader } from "../glTFLoader.js";
|
|
3
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
4
|
+
import type { Animation } from "@babylonjs/core/Animations/animation.js";
|
|
5
|
+
import type { IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
|
|
6
|
+
import type { IAnimation, IAnimationChannel } from "../glTFLoaderInterfaces.js";
|
|
7
|
+
import "./KHR_animation_pointer.data.js";
|
|
8
|
+
declare module "../../glTFFileLoader.js" {
|
|
9
|
+
interface GLTFLoaderExtensionOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Defines options for the KHR_animation_pointer extension.
|
|
12
|
+
*/
|
|
13
|
+
["KHR_animation_pointer"]: {};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* [Specification PR](https://github.com/KhronosGroup/glTF/pull/2147)
|
|
18
|
+
* !!! Experimental Extension Subject to Changes !!!
|
|
19
|
+
*/
|
|
20
|
+
export declare class KHR_animation_pointer implements IGLTFLoaderExtension {
|
|
21
|
+
/**
|
|
22
|
+
* The name of this extension.
|
|
23
|
+
*/
|
|
24
|
+
readonly name = "KHR_animation_pointer";
|
|
25
|
+
private _loader;
|
|
26
|
+
private _pathToObjectConverter?;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
constructor(loader: GLTFLoader);
|
|
31
|
+
/**
|
|
32
|
+
* Defines whether this extension is enabled.
|
|
33
|
+
*/
|
|
34
|
+
get enabled(): boolean;
|
|
35
|
+
/** @internal */
|
|
36
|
+
dispose(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Loads a glTF animation channel.
|
|
39
|
+
* @param context The context when loading the asset
|
|
40
|
+
* @param animationContext The context of the animation when loading the asset
|
|
41
|
+
* @param animation The glTF animation property
|
|
42
|
+
* @param channel The glTF animation channel property
|
|
43
|
+
* @param onLoad Called for each animation loaded
|
|
44
|
+
* @returns A void promise that resolves when the load is complete or null if not handled
|
|
45
|
+
*/
|
|
46
|
+
_loadAnimationChannelAsync(context: string, animationContext: string, animation: IAnimation, channel: IAnimationChannel, onLoad: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): Nullable<Promise<void>>;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
import { Animation } from "@babylonjs/core/Animations/animation.js";
|
|
3
|
+
import { AnimationPropertyInfo } from "../glTFLoaderAnimation.js";
|
|
4
|
+
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
|
5
|
+
import { SetInterpolationForKey } from "./objectModelMapping.js";
|
|
6
|
+
function getColor3(_target, source, offset, scale) {
|
|
7
|
+
return Color3.FromArray(source, offset).scale(scale);
|
|
8
|
+
}
|
|
9
|
+
function getAlpha(_target, source, offset, scale) {
|
|
10
|
+
return source[offset + 3] * scale;
|
|
11
|
+
}
|
|
12
|
+
function getFloat(_target, source, offset, scale) {
|
|
13
|
+
return source[offset] * scale;
|
|
14
|
+
}
|
|
15
|
+
function getMinusFloat(_target, source, offset, scale) {
|
|
16
|
+
return -source[offset] * scale;
|
|
17
|
+
}
|
|
18
|
+
function getNextFloat(_target, source, offset, scale) {
|
|
19
|
+
return source[offset + 1] * scale;
|
|
20
|
+
}
|
|
21
|
+
function getFloatBy2(_target, source, offset, scale) {
|
|
22
|
+
return source[offset] * scale * 2;
|
|
23
|
+
}
|
|
24
|
+
function getTextureTransformTree(textureName) {
|
|
25
|
+
return {
|
|
26
|
+
scale: [
|
|
27
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.uScale`, getFloat, () => 2),
|
|
28
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.vScale`, getNextFloat, () => 2),
|
|
29
|
+
],
|
|
30
|
+
offset: [
|
|
31
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.uOffset`, getFloat, () => 2),
|
|
32
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.vOffset`, getNextFloat, () => 2),
|
|
33
|
+
],
|
|
34
|
+
rotation: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.wAng`, getMinusFloat, () => 1)],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
class CameraAnimationPropertyInfo extends AnimationPropertyInfo {
|
|
38
|
+
/** @internal */
|
|
39
|
+
buildAnimations(target, name, fps, keys) {
|
|
40
|
+
return [{ babylonAnimatable: target._babylonCamera, babylonAnimation: this._buildAnimation(name, fps, keys) }];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
class MaterialAnimationPropertyInfo extends AnimationPropertyInfo {
|
|
44
|
+
/** @internal */
|
|
45
|
+
buildAnimations(target, name, fps, keys) {
|
|
46
|
+
const babylonAnimations = [];
|
|
47
|
+
for (const fillMode in target._data) {
|
|
48
|
+
babylonAnimations.push({
|
|
49
|
+
babylonAnimatable: target._data[fillMode].babylonMaterial,
|
|
50
|
+
babylonAnimation: this._buildAnimation(name, fps, keys),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return babylonAnimations;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
class LightAnimationPropertyInfo extends AnimationPropertyInfo {
|
|
57
|
+
/** @internal */
|
|
58
|
+
buildAnimations(target, name, fps, keys) {
|
|
59
|
+
return [{ babylonAnimatable: target._babylonLight, babylonAnimation: this._buildAnimation(name, fps, keys) }];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
SetInterpolationForKey("/cameras/{}/orthographic/xmag", [
|
|
63
|
+
new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "orthoLeft", getMinusFloat, () => 1),
|
|
64
|
+
new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "orthoRight", getNextFloat, () => 1),
|
|
65
|
+
]);
|
|
66
|
+
SetInterpolationForKey("/cameras/{}/orthographic/ymag", [
|
|
67
|
+
new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "orthoBottom", getMinusFloat, () => 1),
|
|
68
|
+
new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "orthoTop", getNextFloat, () => 1),
|
|
69
|
+
]);
|
|
70
|
+
SetInterpolationForKey("/cameras/{}/orthographic/zfar", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "maxZ", getFloat, () => 1)]);
|
|
71
|
+
SetInterpolationForKey("/cameras/{}/orthographic/znear", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "minZ", getFloat, () => 1)]);
|
|
72
|
+
SetInterpolationForKey("/cameras/{}/perspective/yfov", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "fov", getFloat, () => 1)]);
|
|
73
|
+
SetInterpolationForKey("/cameras/{}/perspective/zfar", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "maxZ", getFloat, () => 1)]);
|
|
74
|
+
SetInterpolationForKey("/cameras/{}/perspective/znear", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "minZ", getFloat, () => 1)]);
|
|
75
|
+
// add interpolation to the materials mapping
|
|
76
|
+
SetInterpolationForKey("/materials/{}/pbrMetallicRoughness/baseColorFactor", [
|
|
77
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "albedoColor", getColor3, () => 4),
|
|
78
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "alpha", getAlpha, () => 4),
|
|
79
|
+
]);
|
|
80
|
+
SetInterpolationForKey("/materials/{}/pbrMetallicRoughness/metallicFactor", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "metallic", getFloat, () => 1)]);
|
|
81
|
+
SetInterpolationForKey("/materials/{}/pbrMetallicRoughness/metallicFactor", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "roughness", getFloat, () => 1)]);
|
|
82
|
+
const baseColorTextureInterpolation = getTextureTransformTree("albedoTexture");
|
|
83
|
+
SetInterpolationForKey("/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/scale", baseColorTextureInterpolation.scale);
|
|
84
|
+
SetInterpolationForKey("/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/offset", baseColorTextureInterpolation.offset);
|
|
85
|
+
SetInterpolationForKey("/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/rotation", baseColorTextureInterpolation.rotation);
|
|
86
|
+
const metallicRoughnessTextureInterpolation = getTextureTransformTree("metallicTexture");
|
|
87
|
+
SetInterpolationForKey("//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/scale", metallicRoughnessTextureInterpolation.scale);
|
|
88
|
+
SetInterpolationForKey("//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/offset", metallicRoughnessTextureInterpolation.offset);
|
|
89
|
+
SetInterpolationForKey("//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/rotation", metallicRoughnessTextureInterpolation.rotation);
|
|
90
|
+
SetInterpolationForKey("/materials/{}/emissiveFactor", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "emissiveColor", getColor3, () => 3)]);
|
|
91
|
+
const normalTextureInterpolation = getTextureTransformTree("bumpTexture");
|
|
92
|
+
SetInterpolationForKey("/materials/{}/normalTexture/scale", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "bumpTexture.level", getFloat, () => 1)]);
|
|
93
|
+
SetInterpolationForKey("/materials/{}/normalTexture/extensions/KHR_texture_transform/scale", normalTextureInterpolation.scale);
|
|
94
|
+
SetInterpolationForKey("/materials/{}/normalTexture/extensions/KHR_texture_transform/offset", normalTextureInterpolation.offset);
|
|
95
|
+
SetInterpolationForKey("/materials/{}/normalTexture/extensions/KHR_texture_transform/rotation", normalTextureInterpolation.rotation);
|
|
96
|
+
SetInterpolationForKey("/materials/{}/occlusionTexture/strength", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "ambientTextureStrength", getFloat, () => 1)]);
|
|
97
|
+
const occlusionTextureInterpolation = getTextureTransformTree("ambientTexture");
|
|
98
|
+
SetInterpolationForKey("/materials/{}/occlusionTexture/extensions/KHR_texture_transform/scale", occlusionTextureInterpolation.scale);
|
|
99
|
+
SetInterpolationForKey("/materials/{}/occlusionTexture/extensions/KHR_texture_transform/offset", occlusionTextureInterpolation.offset);
|
|
100
|
+
SetInterpolationForKey("/materials/{}/occlusionTexture/extensions/KHR_texture_transform/rotation", occlusionTextureInterpolation.rotation);
|
|
101
|
+
const emissiveTextureInterpolation = getTextureTransformTree("emissiveTexture");
|
|
102
|
+
SetInterpolationForKey("/materials/{}/emissiveTexture/extensions/KHR_texture_transform/scale", emissiveTextureInterpolation.scale);
|
|
103
|
+
SetInterpolationForKey("/materials/{}/emissiveTexture/extensions/KHR_texture_transform/offset", emissiveTextureInterpolation.offset);
|
|
104
|
+
SetInterpolationForKey("/materials/{}/emissiveTexture/extensions/KHR_texture_transform/rotation", emissiveTextureInterpolation.rotation);
|
|
105
|
+
// materials extensions
|
|
106
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_anisotropy/anisotropyStrength", [
|
|
107
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "anisotropy.intensity", getFloat, () => 1),
|
|
108
|
+
]);
|
|
109
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_anisotropy/anisotropyRotation", [
|
|
110
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "anisotropy.angle", getFloat, () => 1),
|
|
111
|
+
]);
|
|
112
|
+
const anisotropyTextureInterpolation = getTextureTransformTree("anisotropy.texture");
|
|
113
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/scale", anisotropyTextureInterpolation.scale);
|
|
114
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/offset", anisotropyTextureInterpolation.offset);
|
|
115
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/rotation", anisotropyTextureInterpolation.rotation);
|
|
116
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatFactor", [
|
|
117
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "clearCoat.intensity", getFloat, () => 1),
|
|
118
|
+
]);
|
|
119
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessFactor", [
|
|
120
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "clearCoat.roughness", getFloat, () => 1),
|
|
121
|
+
]);
|
|
122
|
+
const clearcoatTextureInterpolation = getTextureTransformTree("clearCoat.texture");
|
|
123
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/scale", clearcoatTextureInterpolation.scale);
|
|
124
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/offset", clearcoatTextureInterpolation.offset);
|
|
125
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/rotation", clearcoatTextureInterpolation.rotation);
|
|
126
|
+
const clearcoatNormalTextureInterpolation = getTextureTransformTree("clearCoat.bumpTexture");
|
|
127
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/scale", [
|
|
128
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "clearCoat.bumpTexture.level", getFloat, () => 1),
|
|
129
|
+
]);
|
|
130
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/scale", clearcoatNormalTextureInterpolation.scale);
|
|
131
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/offset", clearcoatNormalTextureInterpolation.offset);
|
|
132
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/rotation", clearcoatNormalTextureInterpolation.rotation);
|
|
133
|
+
const clearcoatRoughnessTextureInterpolation = getTextureTransformTree("clearCoat.textureRoughness");
|
|
134
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/scale", clearcoatRoughnessTextureInterpolation.scale);
|
|
135
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/offset", clearcoatRoughnessTextureInterpolation.offset);
|
|
136
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/rotation", clearcoatRoughnessTextureInterpolation.rotation);
|
|
137
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_dispersion/dispersionFactor", [
|
|
138
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "subSurface.dispersion", getFloat, () => 1),
|
|
139
|
+
]);
|
|
140
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_emissive_strength/emissiveStrength", [
|
|
141
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "emissiveIntensity", getFloat, () => 1),
|
|
142
|
+
]);
|
|
143
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_ior/ior", [
|
|
144
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "indexOfRefraction", getFloat, () => 1),
|
|
145
|
+
]);
|
|
146
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceFactor", [
|
|
147
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "iridescence.intensity", getFloat, () => 1),
|
|
148
|
+
]);
|
|
149
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceIor", [
|
|
150
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "iridescence.indexOfRefraction", getFloat, () => 1),
|
|
151
|
+
]);
|
|
152
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessMinimum", [
|
|
153
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "iridescence.minimumThickness", getFloat, () => 1),
|
|
154
|
+
]);
|
|
155
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessMaximum", [
|
|
156
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "iridescence.maximumThickness", getFloat, () => 1),
|
|
157
|
+
]);
|
|
158
|
+
const iridescenceTextureInterpolation = getTextureTransformTree("iridescence.texture");
|
|
159
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/scale", iridescenceTextureInterpolation.scale);
|
|
160
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/offset", iridescenceTextureInterpolation.offset);
|
|
161
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/rotation", iridescenceTextureInterpolation.rotation);
|
|
162
|
+
const iridescenceThicknessTextureInterpolation = getTextureTransformTree("iridescence.thicknessTexture");
|
|
163
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/scale", iridescenceThicknessTextureInterpolation.scale);
|
|
164
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/offset", iridescenceThicknessTextureInterpolation.offset);
|
|
165
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/rotation", iridescenceThicknessTextureInterpolation.rotation);
|
|
166
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_sheen/sheenColorFactor", [
|
|
167
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "sheen.color", getColor3, () => 3),
|
|
168
|
+
]);
|
|
169
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessFactor", [
|
|
170
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "sheen.roughness", getFloat, () => 1),
|
|
171
|
+
]);
|
|
172
|
+
const sheenTextureInterpolation = getTextureTransformTree("sheen.texture");
|
|
173
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/scale", sheenTextureInterpolation.scale);
|
|
174
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/offset", sheenTextureInterpolation.offset);
|
|
175
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/rotation", sheenTextureInterpolation.rotation);
|
|
176
|
+
const sheenRoughnessTextureInterpolation = getTextureTransformTree("sheen.textureRoughness");
|
|
177
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/scale", sheenRoughnessTextureInterpolation.scale);
|
|
178
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/offset", sheenRoughnessTextureInterpolation.offset);
|
|
179
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/rotation", sheenRoughnessTextureInterpolation.rotation);
|
|
180
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_specular/specularFactor", [
|
|
181
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "metallicF0Factor", getFloat, () => 1),
|
|
182
|
+
]);
|
|
183
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_specular/specularColorFactor", [
|
|
184
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "metallicReflectanceColor", getColor3, () => 3),
|
|
185
|
+
]);
|
|
186
|
+
const specularTextureInterpolation = getTextureTransformTree("metallicReflectanceTexture");
|
|
187
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/scale", specularTextureInterpolation.scale);
|
|
188
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/offset", specularTextureInterpolation.offset);
|
|
189
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/rotation", specularTextureInterpolation.rotation);
|
|
190
|
+
const specularColorTextureInterpolation = getTextureTransformTree("reflectanceTexture");
|
|
191
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/scale", specularColorTextureInterpolation.scale);
|
|
192
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/offset", specularColorTextureInterpolation.offset);
|
|
193
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/rotation", specularColorTextureInterpolation.rotation);
|
|
194
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_transmission/transmissionFactor", [
|
|
195
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "subSurface.refractionIntensity", getFloat, () => 1),
|
|
196
|
+
]);
|
|
197
|
+
const transmissionTextureInterpolation = getTextureTransformTree("subSurface.refractionIntensityTexture");
|
|
198
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/scale", transmissionTextureInterpolation.scale);
|
|
199
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/offset", transmissionTextureInterpolation.offset);
|
|
200
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/rotation", transmissionTextureInterpolation.rotation);
|
|
201
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_volume/attenuationColor", [
|
|
202
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "subSurface.tintColor", getColor3, () => 3),
|
|
203
|
+
]);
|
|
204
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_volume/attenuationDistance", [
|
|
205
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "subSurface.tintColorAtDistance", getFloat, () => 1),
|
|
206
|
+
]);
|
|
207
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_volume/thicknessFactor", [
|
|
208
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "subSurface.maximumThickness", getFloat, () => 1),
|
|
209
|
+
]);
|
|
210
|
+
const thicknessTextureInterpolation = getTextureTransformTree("subSurface.thicknessTexture");
|
|
211
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/scale", thicknessTextureInterpolation.scale);
|
|
212
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/offset", thicknessTextureInterpolation.offset);
|
|
213
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/rotation", thicknessTextureInterpolation.rotation);
|
|
214
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionFactor", [
|
|
215
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "subSurface.translucencyIntensity", getFloat, () => 1),
|
|
216
|
+
]);
|
|
217
|
+
const diffuseTransmissionTextureInterpolation = getTextureTransformTree("subSurface.translucencyIntensityTexture");
|
|
218
|
+
SetInterpolationForKey("materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/scale", diffuseTransmissionTextureInterpolation.scale);
|
|
219
|
+
SetInterpolationForKey("materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/offset", diffuseTransmissionTextureInterpolation.offset);
|
|
220
|
+
SetInterpolationForKey("materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/rotation", diffuseTransmissionTextureInterpolation.rotation);
|
|
221
|
+
SetInterpolationForKey("/materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorFactor", [
|
|
222
|
+
new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "subSurface.translucencyColor", getColor3, () => 3),
|
|
223
|
+
]);
|
|
224
|
+
const diffuseTransmissionColorTextureInterpolation = getTextureTransformTree("subSurface.translucencyColorTexture");
|
|
225
|
+
SetInterpolationForKey("materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/scale", diffuseTransmissionColorTextureInterpolation.scale);
|
|
226
|
+
SetInterpolationForKey("materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/offset", diffuseTransmissionColorTextureInterpolation.offset);
|
|
227
|
+
SetInterpolationForKey("materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/rotation", diffuseTransmissionColorTextureInterpolation.rotation);
|
|
228
|
+
SetInterpolationForKey("/extensions/KHR_lights_punctual/lights/{}/color", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "diffuse", getColor3, () => 3)]);
|
|
229
|
+
SetInterpolationForKey("/extensions/KHR_lights_punctual/lights/{}/intensity", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "intensity", getFloat, () => 1)]);
|
|
230
|
+
SetInterpolationForKey("/extensions/KHR_lights_punctual/lights/{}/range", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "range", getFloat, () => 1)]);
|
|
231
|
+
SetInterpolationForKey("/extensions/KHR_lights_punctual/lights/{}/spot/innerConeAngle", [
|
|
232
|
+
new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "innerAngle", getFloatBy2, () => 1),
|
|
233
|
+
]);
|
|
234
|
+
SetInterpolationForKey("/extensions/KHR_lights_punctual/lights/{}/spot/outerConeAngle", [
|
|
235
|
+
new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "angle", getFloatBy2, () => 1),
|
|
236
|
+
]);
|
|
237
|
+
SetInterpolationForKey("/nodes/{}/extensions/EXT_lights_ies/color", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "diffuse", getColor3, () => 3)]);
|
|
238
|
+
SetInterpolationForKey("/nodes/{}/extensions/EXT_lights_ies/multiplier", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "intensity", getFloat, () => 1)]);
|
|
239
|
+
//# sourceMappingURL=KHR_animation_pointer.data.js.map
|