@onerjs/loaders 8.23.1 → 8.23.3
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/mtlFileLoader.d.ts +4 -4
- package/OBJ/mtlFileLoader.js +3 -3
- package/OBJ/mtlFileLoader.js.map +1 -1
- package/OBJ/objFileLoader.d.ts +5 -5
- package/OBJ/objFileLoader.js +5 -5
- package/OBJ/objFileLoader.js.map +1 -1
- package/OBJ/objLoadingOptions.d.ts +1 -1
- package/OBJ/solidParser.d.ts +4 -4
- package/OBJ/solidParser.js +8 -8
- package/OBJ/solidParser.js.map +1 -1
- package/SPLAT/splatFileLoader.d.ts +4 -4
- package/SPLAT/splatFileLoader.js +10 -10
- package/SPLAT/splatFileLoader.js.map +1 -1
- package/STL/stlFileLoader.d.ts +7 -7
- package/STL/stlFileLoader.js +6 -6
- package/STL/stlFileLoader.js.map +1 -1
- package/bvh/bvhFileLoader.d.ts +4 -4
- package/bvh/bvhFileLoader.js +3 -3
- package/bvh/bvhFileLoader.js.map +1 -1
- package/bvh/bvhLoader.d.ts +4 -4
- package/bvh/bvhLoader.js +5 -5
- package/bvh/bvhLoader.js.map +1 -1
- package/dynamic.js +1 -1
- package/dynamic.js.map +1 -1
- package/glTF/1.0/glTFBinaryExtension.d.ts +1 -1
- package/glTF/1.0/glTFLoader.d.ts +6 -6
- package/glTF/1.0/glTFLoader.js +25 -25
- package/glTF/1.0/glTFLoader.js.map +1 -1
- package/glTF/1.0/glTFLoaderInterfaces.d.ts +7 -7
- package/glTF/1.0/glTFLoaderUtils.d.ts +4 -4
- package/glTF/1.0/glTFLoaderUtils.js +5 -5
- package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.js +9 -9
- package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_ies.d.ts +2 -2
- package/glTF/2.0/Extensions/EXT_lights_ies.js +5 -5
- package/glTF/2.0/Extensions/EXT_lights_ies.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +2 -2
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +3 -3
- package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.d.ts +2 -2
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.js +2 -2
- package/glTF/2.0/Extensions/EXT_materials_diffuse_roughness.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +3 -3
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +2 -2
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_texture_avif.d.ts +2 -2
- package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +2 -2
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_animation_pointer.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.js +2 -2
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.js +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +2 -2
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js +2 -2
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.d.ts +5 -5
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.js +2 -2
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js +2 -2
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity.d.ts +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity.js +4 -4
- package/glTF/2.0/Extensions/KHR_interactivity.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +6 -6
- package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.js +1 -1
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js +2 -2
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_dispersion.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_dispersion.js +1 -1
- package/glTF/2.0/Extensions/KHR_materials_dispersion.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_ior.js +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_iridescence.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js +1 -1
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +2 -2
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +2 -2
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_specular.js +3 -3
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +5 -5
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +2 -2
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_materials_variants.js +1 -1
- package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_materials_volume.js +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +2 -2
- package/glTF/2.0/Extensions/KHR_texture_transform.js +1 -1
- package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +4 -4
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +6 -6
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_lod.d.ts +5 -5
- package/glTF/2.0/Extensions/MSFT_lod.js +2 -2
- package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +2 -2
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +2 -2
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.d.ts +2 -2
- package/glTF/2.0/Extensions/objectModelMapping.d.ts +12 -12
- package/glTF/2.0/Extensions/objectModelMapping.js +4 -4
- package/glTF/2.0/Extensions/objectModelMapping.js.map +1 -1
- package/glTF/2.0/glTFLoader.d.ts +19 -19
- package/glTF/2.0/glTFLoader.js +24 -24
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/2.0/glTFLoaderAnimation.d.ts +3 -3
- package/glTF/2.0/glTFLoaderAnimation.js +2 -2
- package/glTF/2.0/glTFLoaderAnimation.js.map +1 -1
- package/glTF/2.0/glTFLoaderExtension.d.ts +12 -12
- package/glTF/2.0/glTFLoaderExtensionRegistry.js +1 -1
- package/glTF/2.0/glTFLoaderExtensionRegistry.js.map +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.d.ts +9 -9
- package/glTF/glTFFileLoader.d.ts +15 -15
- package/glTF/glTFFileLoader.js +8 -8
- package/glTF/glTFFileLoader.js.map +1 -1
- package/glTF/glTFValidation.js +1 -1
- package/glTF/glTFValidation.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EXT_meshopt_compression.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/EXT_meshopt_compression.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"EXT_meshopt_compression.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/EXT_meshopt_compression.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,kBAAkB,EAAE,8DAAmD;AAChF,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,yBAAyB,CAAC;AAiBvC;;;;;GAKG;AACH,gEAAgE;AAChE,MAAM,OAAO,uBAAuB;IAahC;;OAEG;IACH,YAAY,MAAkB;QAf9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAaxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5C,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,mBAAmB,CAAC,OAAe,EAAE,UAAuB;QAC/D,OAAO,UAAU,CAAC,kBAAkB,CAA0C,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE;YAChJ,MAAM,iBAAiB,GAAG,UAAgC,CAAC;YAC3D,IAAI,iBAAiB,CAAC,YAAY,EAAE,CAAC;gBACjC,OAAO,MAAM,iBAAiB,CAAC,YAAY,CAAC;YAChD,CAAC;YAED,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YAC/F,iBAAiB,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO;iBACxC,eAAe,CAAC,YAAY,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,UAAU,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC;gBACrG,0CAA0C;iBACzC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;gBACnB,OAAO,MAAM,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,CAAC,MAAoB,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YACjK,CAAC,CAAC,CAAC;YAEP,OAAO,MAAM,iBAAiB,CAAC,YAAY,CAAC;QAChD,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,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { ArrayItem, GLTFLoader } from \"../glTFLoader\";\r\nimport type { IBufferView } from \"../glTFLoaderInterfaces\";\r\nimport type { IEXTMeshoptCompression } from \"babylonjs-gltf2interface\";\r\nimport { MeshoptCompression } from \"core/Meshes/Compression/meshoptCompression\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"EXT_meshopt_compression\";\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_meshopt_compression extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"EXT_meshopt_compression\"]: {};\r\n }\r\n}\r\n\r\ninterface IBufferViewMeshopt extends IBufferView {\r\n _meshOptData?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md)\r\n *\r\n * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js\r\n * @since 5.0.0\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class EXT_meshopt_compression 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 private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this.enabled = loader.isExtensionUsed(NAME);\r\n this._loader = loader;\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 loadBufferViewAsync(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>> {\r\n return GLTFLoader.LoadExtensionAsync<IEXTMeshoptCompression, ArrayBufferView>(context, bufferView, this.name, async (extensionContext, extension) => {\r\n const bufferViewMeshopt = bufferView as IBufferViewMeshopt;\r\n if (bufferViewMeshopt._meshOptData) {\r\n return await bufferViewMeshopt._meshOptData;\r\n }\r\n\r\n const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);\r\n bufferViewMeshopt._meshOptData = this._loader\r\n .loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength)\r\n // eslint-disable-next-line github/no-then\r\n .then(async (buffer) => {\r\n return await MeshoptCompression.Default.decodeGltfBufferAsync(buffer as Uint8Array, extension.count, extension.byteStride, extension.mode, extension.filter);\r\n });\r\n\r\n return await bufferViewMeshopt._meshOptData;\r\n });\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, true, (loader) => new EXT_meshopt_compression(loader));\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
|
2
2
|
import { GLTFLoader } from "../glTFLoader.js";
|
|
3
3
|
import type { ITexture } from "../glTFLoaderInterfaces.js";
|
|
4
|
-
import type { BaseTexture } from "@
|
|
5
|
-
import type { Nullable } from "@
|
|
4
|
+
import type { BaseTexture } from "@onerjs/core/Materials/Textures/baseTexture.js";
|
|
5
|
+
import type { Nullable } from "@onerjs/core/types.js";
|
|
6
6
|
declare module "../../glTFFileLoader.js" {
|
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
|
2
2
|
import { GLTFLoader } from "../glTFLoader.js";
|
|
3
3
|
import type { ITexture } from "../glTFLoaderInterfaces.js";
|
|
4
|
-
import type { BaseTexture } from "@
|
|
5
|
-
import type { Nullable } from "@
|
|
4
|
+
import type { BaseTexture } from "@onerjs/core/Materials/Textures/baseTexture.js";
|
|
5
|
+
import type { Nullable } from "@onerjs/core/types.js";
|
|
6
6
|
declare module "../../glTFFileLoader.js" {
|
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
|
8
8
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Nullable } from "@
|
|
2
|
-
import type { TransformNode } from "@
|
|
3
|
-
import type { Camera } from "@
|
|
1
|
+
import type { Nullable } from "@onerjs/core/types.js";
|
|
2
|
+
import type { TransformNode } from "@onerjs/core/Meshes/transformNode.js";
|
|
3
|
+
import type { Camera } from "@onerjs/core/Cameras/camera.js";
|
|
4
4
|
import type { INode, ICamera, IMaterial } from "../glTFLoaderInterfaces.js";
|
|
5
5
|
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
|
6
6
|
import type { GLTFLoader } from "../glTFLoader.js";
|
|
7
|
-
import type { Material } from "@
|
|
7
|
+
import type { Material } from "@onerjs/core/Materials/material.js";
|
|
8
8
|
declare module "../../glTFFileLoader.js" {
|
|
9
9
|
interface GLTFLoaderExtensionOptions {
|
|
10
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
|
2
2
|
import type { GLTFLoader } from "../glTFLoader.js";
|
|
3
|
-
import type { Nullable } from "@
|
|
4
|
-
import type { Animation } from "@
|
|
5
|
-
import type { IAnimatable } from "@
|
|
3
|
+
import type { Nullable } from "@onerjs/core/types.js";
|
|
4
|
+
import type { Animation } from "@onerjs/core/Animations/animation.js";
|
|
5
|
+
import type { IAnimatable } from "@onerjs/core/Animations/animatable.interface.js";
|
|
6
6
|
import type { IAnimation, IAnimationChannel } from "../glTFLoaderInterfaces.js";
|
|
7
7
|
import "./KHR_animation_pointer.data.js";
|
|
8
8
|
declare module "../../glTFFileLoader.js" {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
-
import { Animation } from "@
|
|
2
|
+
import { Animation } from "@onerjs/core/Animations/animation.js";
|
|
3
3
|
import { AnimationPropertyInfo } from "../glTFLoaderAnimation.js";
|
|
4
|
-
import { Color3 } from "@
|
|
4
|
+
import { Color3 } from "@onerjs/core/Maths/math.color.js";
|
|
5
5
|
import { SetInterpolationForKey } from "./objectModelMapping.js";
|
|
6
6
|
function getColor3(_target, source, offset, scale) {
|
|
7
7
|
return Color3.FromArray(source, offset).scale(scale);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_animation_pointer.data.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.data.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,SAAS,EAAE,gDAAkC;AAGtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,SAAS,SAAS,CAAC,OAAY,EAAE,MAAoB,EAAE,MAAc,EAAE,KAAa;IAChF,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,QAAQ,CAAC,OAAY,EAAE,MAAoB,EAAE,MAAc,EAAE,KAAa;IAC/E,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AACtC,CAAC;AAED,SAAS,QAAQ,CAAC,OAAY,EAAE,MAAoB,EAAE,MAAc,EAAE,KAAa;IAC/E,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAClC,CAAC;AAED,SAAS,aAAa,CAAC,OAAY,EAAE,MAAoB,EAAE,MAAc,EAAE,KAAa;IACpF,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AACnC,CAAC;AAED,SAAS,YAAY,CAAC,OAAY,EAAE,MAAoB,EAAE,MAAc,EAAE,KAAa;IACnF,OAAO,MA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C,CAAC,CAAC,CAAC,CAAC;AACvK,sBAAsB,CAAC,+DAA+D,EAAE;IACpF,IAAI,0BAA0B,CAAC,SAAS,CAAC,mBAAmB,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;CACpG,CAAC,CAAC;AACH,sBAAsB,CAAC,+DAA+D,EAAE;IACpF,IAAI,0BAA0B,CAAC,SAAS,CAAC,mBAAmB,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;CAC/F,CAAC,CAAC;AAEH,sBAAsB,CAAC,2CAA2C,EAAE,CAAC,IAAI,0BAA0B,CAAC,SAAS,CAAC,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrK,sBAAsB,CAAC,gDAAgD,EAAE,CAAC,IAAI,0BAA0B,CAAC,SAAS,CAAC,mBAAmB,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\nimport { Animation } from \"core/Animations/animation\";\r\nimport type { ICamera, IKHRLightsPunctual_Light, IMaterial } from \"../glTFLoaderInterfaces\";\r\nimport type { IAnimatable } from \"core/Animations/animatable.interface\";\r\nimport { AnimationPropertyInfo } from \"../glTFLoaderAnimation\";\r\nimport { Color3 } from \"core/Maths/math.color\";\r\nimport { SetInterpolationForKey } from \"./objectModelMapping\";\r\n\r\nfunction getColor3(_target: any, source: Float32Array, offset: number, scale: number): Color3 {\r\n return Color3.FromArray(source, offset).scale(scale);\r\n}\r\n\r\nfunction getAlpha(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return source[offset + 3] * scale;\r\n}\r\n\r\nfunction getFloat(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return source[offset] * scale;\r\n}\r\n\r\nfunction getMinusFloat(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return -source[offset] * scale;\r\n}\r\n\r\nfunction getNextFloat(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return source[offset + 1] * scale;\r\n}\r\n\r\nfunction getFloatBy2(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return source[offset] * scale * 2;\r\n}\r\n\r\nfunction getTextureTransformTree(textureName: string) {\r\n return {\r\n scale: [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.uScale`, getFloat, () => 2),\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.vScale`, getNextFloat, () => 2),\r\n ],\r\n offset: [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.uOffset`, getFloat, () => 2),\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.vOffset`, getNextFloat, () => 2),\r\n ],\r\n rotation: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.wAng`, getMinusFloat, () => 1)],\r\n };\r\n}\r\n\r\nclass CameraAnimationPropertyInfo extends AnimationPropertyInfo {\r\n /** @internal */\r\n public buildAnimations(target: ICamera, name: string, fps: number, keys: any[]) {\r\n return [{ babylonAnimatable: target._babylonCamera!, babylonAnimation: this._buildAnimation(name, fps, keys) }];\r\n }\r\n}\r\n\r\nclass MaterialAnimationPropertyInfo extends AnimationPropertyInfo {\r\n /** @internal */\r\n public buildAnimations(target: IMaterial, name: string, fps: number, keys: any[]) {\r\n const babylonAnimations: { babylonAnimatable: IAnimatable; babylonAnimation: Animation }[] = [];\r\n for (const fillMode in target._data!) {\r\n babylonAnimations.push({\r\n babylonAnimatable: target._data[fillMode].babylonMaterial,\r\n babylonAnimation: this._buildAnimation(name, fps, keys),\r\n });\r\n }\r\n return babylonAnimations;\r\n }\r\n}\r\n\r\nclass LightAnimationPropertyInfo extends AnimationPropertyInfo {\r\n /** @internal */\r\n public buildAnimations(target: IKHRLightsPunctual_Light, name: string, fps: number, keys: any[]) {\r\n return [{ babylonAnimatable: target._babylonLight!, babylonAnimation: this._buildAnimation(name, fps, keys) }];\r\n }\r\n}\r\n\r\nSetInterpolationForKey(\"/cameras/{}/orthographic/xmag\", [\r\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoLeft\", getMinusFloat, () => 1),\r\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoRight\", getNextFloat, () => 1),\r\n]);\r\n\r\nSetInterpolationForKey(\"/cameras/{}/orthographic/ymag\", [\r\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoBottom\", getMinusFloat, () => 1),\r\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoTop\", getNextFloat, () => 1),\r\n]);\r\n\r\nSetInterpolationForKey(\"/cameras/{}/orthographic/zfar\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"maxZ\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/cameras/{}/orthographic/znear\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"minZ\", getFloat, () => 1)]);\r\n\r\nSetInterpolationForKey(\"/cameras/{}/perspective/yfov\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"fov\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/cameras/{}/perspective/zfar\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"maxZ\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/cameras/{}/perspective/znear\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"minZ\", getFloat, () => 1)]);\r\n\r\n// add interpolation to the materials mapping\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/baseColorFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"albedoColor\", getColor3, () => 4),\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"alpha\", getAlpha, () => 4),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/metallicFactor\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"metallic\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/metallicFactor\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"roughness\", getFloat, () => 1)]);\r\nconst baseColorTextureInterpolation = getTextureTransformTree(\"albedoTexture\");\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/scale\", baseColorTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/offset\", baseColorTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/rotation\", baseColorTextureInterpolation.rotation);\r\n\r\nconst metallicRoughnessTextureInterpolation = getTextureTransformTree(\"metallicTexture\");\r\nSetInterpolationForKey(\"//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/scale\", metallicRoughnessTextureInterpolation.scale);\r\nSetInterpolationForKey(\"//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/offset\", metallicRoughnessTextureInterpolation.offset);\r\nSetInterpolationForKey(\"//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/rotation\", metallicRoughnessTextureInterpolation.rotation);\r\n\r\nSetInterpolationForKey(\"/materials/{}/emissiveFactor\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"emissiveColor\", getColor3, () => 3)]);\r\nconst normalTextureInterpolation = getTextureTransformTree(\"bumpTexture\");\r\nSetInterpolationForKey(\"/materials/{}/normalTexture/scale\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"bumpTexture.level\", getFloat, () => 1)]);\r\n\r\nSetInterpolationForKey(\"/materials/{}/normalTexture/extensions/KHR_texture_transform/scale\", normalTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/normalTexture/extensions/KHR_texture_transform/offset\", normalTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/normalTexture/extensions/KHR_texture_transform/rotation\", normalTextureInterpolation.rotation);\r\n\r\nSetInterpolationForKey(\"/materials/{}/occlusionTexture/strength\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"ambientTextureStrength\", getFloat, () => 1)]);\r\n\r\nconst occlusionTextureInterpolation = getTextureTransformTree(\"ambientTexture\");\r\nSetInterpolationForKey(\"/materials/{}/occlusionTexture/extensions/KHR_texture_transform/scale\", occlusionTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/occlusionTexture/extensions/KHR_texture_transform/offset\", occlusionTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/occlusionTexture/extensions/KHR_texture_transform/rotation\", occlusionTextureInterpolation.rotation);\r\nconst emissiveTextureInterpolation = getTextureTransformTree(\"emissiveTexture\");\r\nSetInterpolationForKey(\"/materials/{}/emissiveTexture/extensions/KHR_texture_transform/scale\", emissiveTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/emissiveTexture/extensions/KHR_texture_transform/offset\", emissiveTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/emissiveTexture/extensions/KHR_texture_transform/rotation\", emissiveTextureInterpolation.rotation);\r\n\r\n// materials extensions\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyStrength\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"anisotropy.intensity\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyRotation\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"anisotropy.angle\", getFloat, () => 1),\r\n]);\r\nconst anisotropyTextureInterpolation = getTextureTransformTree(\"anisotropy.texture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/scale\", anisotropyTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/offset\", anisotropyTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/rotation\", anisotropyTextureInterpolation.rotation);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.intensity\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.roughness\", getFloat, () => 1),\r\n]);\r\nconst clearcoatTextureInterpolation = getTextureTransformTree(\"clearCoat.texture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/scale\", clearcoatTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/offset\", clearcoatTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/rotation\", clearcoatTextureInterpolation.rotation);\r\nconst clearcoatNormalTextureInterpolation = getTextureTransformTree(\"clearCoat.bumpTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/scale\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.bumpTexture.level\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/scale\", clearcoatNormalTextureInterpolation.scale);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/offset\",\r\n clearcoatNormalTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/rotation\",\r\n clearcoatNormalTextureInterpolation.rotation\r\n);\r\nconst clearcoatRoughnessTextureInterpolation = getTextureTransformTree(\"clearCoat.textureRoughness\");\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/scale\",\r\n clearcoatRoughnessTextureInterpolation.scale\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/offset\",\r\n clearcoatRoughnessTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/rotation\",\r\n clearcoatRoughnessTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_dispersion/dispersionFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.dispersion\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_emissive_strength/emissiveStrength\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"emissiveIntensity\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_ior/ior\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"indexOfRefraction\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.intensity\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceIor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.indexOfRefraction\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessMinimum\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.minimumThickness\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessMaximum\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.maximumThickness\", getFloat, () => 1),\r\n]);\r\n\r\nconst iridescenceTextureInterpolation = getTextureTransformTree(\"iridescence.texture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/scale\", iridescenceTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/offset\", iridescenceTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/rotation\", iridescenceTextureInterpolation.rotation);\r\n\r\nconst iridescenceThicknessTextureInterpolation = getTextureTransformTree(\"iridescence.thicknessTexture\");\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/scale\",\r\n iridescenceThicknessTextureInterpolation.scale\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/offset\",\r\n iridescenceThicknessTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/rotation\",\r\n iridescenceThicknessTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenColorFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"sheen.color\", getColor3, () => 3),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"sheen.roughness\", getFloat, () => 1),\r\n]);\r\n\r\nconst sheenTextureInterpolation = getTextureTransformTree(\"sheen.texture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/scale\", sheenTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/offset\", sheenTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/rotation\", sheenTextureInterpolation.rotation);\r\n\r\nconst sheenRoughnessTextureInterpolation = getTextureTransformTree(\"sheen.textureRoughness\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/scale\", sheenRoughnessTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/offset\", sheenRoughnessTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/rotation\", sheenRoughnessTextureInterpolation.rotation);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"metallicF0Factor\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularColorFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"metallicReflectanceColor\", getColor3, () => 3),\r\n]);\r\n\r\nconst specularTextureInterpolation = getTextureTransformTree(\"metallicReflectanceTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/scale\", specularTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/offset\", specularTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/rotation\", specularTextureInterpolation.rotation);\r\nconst specularColorTextureInterpolation = getTextureTransformTree(\"reflectanceTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/scale\", specularColorTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/offset\", specularColorTextureInterpolation.offset);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/rotation\",\r\n specularColorTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_transmission/transmissionFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.refractionIntensity\", getFloat, () => 1),\r\n]);\r\nconst transmissionTextureInterpolation = getTextureTransformTree(\"subSurface.refractionIntensityTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/scale\", transmissionTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/offset\", transmissionTextureInterpolation.offset);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/rotation\",\r\n transmissionTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/attenuationColor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"subSurface.tintColor\", getColor3, () => 3),\r\n]);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/attenuationDistance\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.tintColorAtDistance\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/thicknessFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.maximumThickness\", getFloat, () => 1),\r\n]);\r\n\r\nconst thicknessTextureInterpolation = getTextureTransformTree(\"subSurface.thicknessTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/scale\", thicknessTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/offset\", thicknessTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/rotation\", thicknessTextureInterpolation.rotation);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.translucencyIntensity\", getFloat, () => 1),\r\n]);\r\n\r\nconst diffuseTransmissionTextureInterpolation = getTextureTransformTree(\"subSurface.translucencyIntensityTexture\");\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/scale\",\r\n diffuseTransmissionTextureInterpolation.scale\r\n);\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/offset\",\r\n diffuseTransmissionTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/rotation\",\r\n diffuseTransmissionTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"subSurface.translucencyColor\", getColor3, () => 3),\r\n]);\r\n\r\nconst diffuseTransmissionColorTextureInterpolation = getTextureTransformTree(\"subSurface.translucencyColorTexture\");\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/scale\",\r\n diffuseTransmissionColorTextureInterpolation.scale\r\n);\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/offset\",\r\n diffuseTransmissionColorTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/rotation\",\r\n diffuseTransmissionColorTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/color\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"diffuse\", getColor3, () => 3)]);\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/intensity\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"intensity\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/range\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"range\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/spot/innerConeAngle\", [\r\n new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"innerAngle\", getFloatBy2, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/spot/outerConeAngle\", [\r\n new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"angle\", getFloatBy2, () => 1),\r\n]);\r\n\r\nSetInterpolationForKey(\"/nodes/{}/extensions/EXT_lights_ies/color\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"diffuse\", getColor3, () => 3)]);\r\nSetInterpolationForKey(\"/nodes/{}/extensions/EXT_lights_ies/multiplier\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"intensity\", getFloat, () => 1)]);\r\n"]}
|
|
1
|
+
{"version":3,"file":"KHR_animation_pointer.data.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.data.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,SAAS,EAAE,6CAAkC;AAGtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,yCAA8B;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,SAAS,SAAS,CAAC,OAAY,EAAE,MA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WAAW,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\nimport { Animation } from \"core/Animations/animation\";\r\nimport type { ICamera, IKHRLightsPunctual_Light, IMaterial } from \"../glTFLoaderInterfaces\";\r\nimport type { IAnimatable } from \"core/Animations/animatable.interface\";\r\nimport { AnimationPropertyInfo } from \"../glTFLoaderAnimation\";\r\nimport { Color3 } from \"core/Maths/math.color\";\r\nimport { SetInterpolationForKey } from \"./objectModelMapping\";\r\n\r\nfunction getColor3(_target: any, source: Float32Array, offset: number, scale: number): Color3 {\r\n return Color3.FromArray(source, offset).scale(scale);\r\n}\r\n\r\nfunction getAlpha(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return source[offset + 3] * scale;\r\n}\r\n\r\nfunction getFloat(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return source[offset] * scale;\r\n}\r\n\r\nfunction getMinusFloat(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return -source[offset] * scale;\r\n}\r\n\r\nfunction getNextFloat(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return source[offset + 1] * scale;\r\n}\r\n\r\nfunction getFloatBy2(_target: any, source: Float32Array, offset: number, scale: number): number {\r\n return source[offset] * scale * 2;\r\n}\r\n\r\nfunction getTextureTransformTree(textureName: string) {\r\n return {\r\n scale: [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.uScale`, getFloat, () => 2),\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.vScale`, getNextFloat, () => 2),\r\n ],\r\n offset: [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.uOffset`, getFloat, () => 2),\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.vOffset`, getNextFloat, () => 2),\r\n ],\r\n rotation: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, `${textureName}.wAng`, getMinusFloat, () => 1)],\r\n };\r\n}\r\n\r\nclass CameraAnimationPropertyInfo extends AnimationPropertyInfo {\r\n /** @internal */\r\n public buildAnimations(target: ICamera, name: string, fps: number, keys: any[]) {\r\n return [{ babylonAnimatable: target._babylonCamera!, babylonAnimation: this._buildAnimation(name, fps, keys) }];\r\n }\r\n}\r\n\r\nclass MaterialAnimationPropertyInfo extends AnimationPropertyInfo {\r\n /** @internal */\r\n public buildAnimations(target: IMaterial, name: string, fps: number, keys: any[]) {\r\n const babylonAnimations: { babylonAnimatable: IAnimatable; babylonAnimation: Animation }[] = [];\r\n for (const fillMode in target._data!) {\r\n babylonAnimations.push({\r\n babylonAnimatable: target._data[fillMode].babylonMaterial,\r\n babylonAnimation: this._buildAnimation(name, fps, keys),\r\n });\r\n }\r\n return babylonAnimations;\r\n }\r\n}\r\n\r\nclass LightAnimationPropertyInfo extends AnimationPropertyInfo {\r\n /** @internal */\r\n public buildAnimations(target: IKHRLightsPunctual_Light, name: string, fps: number, keys: any[]) {\r\n return [{ babylonAnimatable: target._babylonLight!, babylonAnimation: this._buildAnimation(name, fps, keys) }];\r\n }\r\n}\r\n\r\nSetInterpolationForKey(\"/cameras/{}/orthographic/xmag\", [\r\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoLeft\", getMinusFloat, () => 1),\r\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoRight\", getNextFloat, () => 1),\r\n]);\r\n\r\nSetInterpolationForKey(\"/cameras/{}/orthographic/ymag\", [\r\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoBottom\", getMinusFloat, () => 1),\r\n new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"orthoTop\", getNextFloat, () => 1),\r\n]);\r\n\r\nSetInterpolationForKey(\"/cameras/{}/orthographic/zfar\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"maxZ\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/cameras/{}/orthographic/znear\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"minZ\", getFloat, () => 1)]);\r\n\r\nSetInterpolationForKey(\"/cameras/{}/perspective/yfov\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"fov\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/cameras/{}/perspective/zfar\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"maxZ\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/cameras/{}/perspective/znear\", [new CameraAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"minZ\", getFloat, () => 1)]);\r\n\r\n// add interpolation to the materials mapping\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/baseColorFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"albedoColor\", getColor3, () => 4),\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"alpha\", getAlpha, () => 4),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/metallicFactor\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"metallic\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/metallicFactor\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"roughness\", getFloat, () => 1)]);\r\nconst baseColorTextureInterpolation = getTextureTransformTree(\"albedoTexture\");\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/scale\", baseColorTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/offset\", baseColorTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/rotation\", baseColorTextureInterpolation.rotation);\r\n\r\nconst metallicRoughnessTextureInterpolation = getTextureTransformTree(\"metallicTexture\");\r\nSetInterpolationForKey(\"//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/scale\", metallicRoughnessTextureInterpolation.scale);\r\nSetInterpolationForKey(\"//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/offset\", metallicRoughnessTextureInterpolation.offset);\r\nSetInterpolationForKey(\"//materials/{}/pbrMetallicRoughness/metallicRoughnessTexture/rotation\", metallicRoughnessTextureInterpolation.rotation);\r\n\r\nSetInterpolationForKey(\"/materials/{}/emissiveFactor\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"emissiveColor\", getColor3, () => 3)]);\r\nconst normalTextureInterpolation = getTextureTransformTree(\"bumpTexture\");\r\nSetInterpolationForKey(\"/materials/{}/normalTexture/scale\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"bumpTexture.level\", getFloat, () => 1)]);\r\n\r\nSetInterpolationForKey(\"/materials/{}/normalTexture/extensions/KHR_texture_transform/scale\", normalTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/normalTexture/extensions/KHR_texture_transform/offset\", normalTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/normalTexture/extensions/KHR_texture_transform/rotation\", normalTextureInterpolation.rotation);\r\n\r\nSetInterpolationForKey(\"/materials/{}/occlusionTexture/strength\", [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"ambientTextureStrength\", getFloat, () => 1)]);\r\n\r\nconst occlusionTextureInterpolation = getTextureTransformTree(\"ambientTexture\");\r\nSetInterpolationForKey(\"/materials/{}/occlusionTexture/extensions/KHR_texture_transform/scale\", occlusionTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/occlusionTexture/extensions/KHR_texture_transform/offset\", occlusionTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/occlusionTexture/extensions/KHR_texture_transform/rotation\", occlusionTextureInterpolation.rotation);\r\nconst emissiveTextureInterpolation = getTextureTransformTree(\"emissiveTexture\");\r\nSetInterpolationForKey(\"/materials/{}/emissiveTexture/extensions/KHR_texture_transform/scale\", emissiveTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/emissiveTexture/extensions/KHR_texture_transform/offset\", emissiveTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/emissiveTexture/extensions/KHR_texture_transform/rotation\", emissiveTextureInterpolation.rotation);\r\n\r\n// materials extensions\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyStrength\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"anisotropy.intensity\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyRotation\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"anisotropy.angle\", getFloat, () => 1),\r\n]);\r\nconst anisotropyTextureInterpolation = getTextureTransformTree(\"anisotropy.texture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/scale\", anisotropyTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/offset\", anisotropyTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_anisotropy/anisotropyTexture/extensions/KHR_texture_transform/rotation\", anisotropyTextureInterpolation.rotation);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.intensity\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.roughness\", getFloat, () => 1),\r\n]);\r\nconst clearcoatTextureInterpolation = getTextureTransformTree(\"clearCoat.texture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/scale\", clearcoatTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/offset\", clearcoatTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatTexture/extensions/KHR_texture_transform/rotation\", clearcoatTextureInterpolation.rotation);\r\nconst clearcoatNormalTextureInterpolation = getTextureTransformTree(\"clearCoat.bumpTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/scale\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.bumpTexture.level\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/scale\", clearcoatNormalTextureInterpolation.scale);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/offset\",\r\n clearcoatNormalTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatNormalTexture/extensions/KHR_texture_transform/rotation\",\r\n clearcoatNormalTextureInterpolation.rotation\r\n);\r\nconst clearcoatRoughnessTextureInterpolation = getTextureTransformTree(\"clearCoat.textureRoughness\");\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/scale\",\r\n clearcoatRoughnessTextureInterpolation.scale\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/offset\",\r\n clearcoatRoughnessTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_clearcoat/clearcoatRoughnessTexture/extensions/KHR_texture_transform/rotation\",\r\n clearcoatRoughnessTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_dispersion/dispersionFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.dispersion\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_emissive_strength/emissiveStrength\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"emissiveIntensity\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_ior/ior\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"indexOfRefraction\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.intensity\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceIor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.indexOfRefraction\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessMinimum\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.minimumThickness\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessMaximum\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.maximumThickness\", getFloat, () => 1),\r\n]);\r\n\r\nconst iridescenceTextureInterpolation = getTextureTransformTree(\"iridescence.texture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/scale\", iridescenceTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/offset\", iridescenceTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_iridescence/iridescenceTexture/extensions/KHR_texture_transform/rotation\", iridescenceTextureInterpolation.rotation);\r\n\r\nconst iridescenceThicknessTextureInterpolation = getTextureTransformTree(\"iridescence.thicknessTexture\");\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/scale\",\r\n iridescenceThicknessTextureInterpolation.scale\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/offset\",\r\n iridescenceThicknessTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_iridescence/iridescenceThicknessTexture/extensions/KHR_texture_transform/rotation\",\r\n iridescenceThicknessTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenColorFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"sheen.color\", getColor3, () => 3),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"sheen.roughness\", getFloat, () => 1),\r\n]);\r\n\r\nconst sheenTextureInterpolation = getTextureTransformTree(\"sheen.texture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/scale\", sheenTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/offset\", sheenTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenColorTexture/extensions/KHR_texture_transform/rotation\", sheenTextureInterpolation.rotation);\r\n\r\nconst sheenRoughnessTextureInterpolation = getTextureTransformTree(\"sheen.textureRoughness\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/scale\", sheenRoughnessTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/offset\", sheenRoughnessTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_sheen/sheenRoughnessTexture/extensions/KHR_texture_transform/rotation\", sheenRoughnessTextureInterpolation.rotation);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"metallicF0Factor\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularColorFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"metallicReflectanceColor\", getColor3, () => 3),\r\n]);\r\n\r\nconst specularTextureInterpolation = getTextureTransformTree(\"metallicReflectanceTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/scale\", specularTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/offset\", specularTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularTexture/extensions/KHR_texture_transform/rotation\", specularTextureInterpolation.rotation);\r\nconst specularColorTextureInterpolation = getTextureTransformTree(\"reflectanceTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/scale\", specularColorTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/offset\", specularColorTextureInterpolation.offset);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_specular/specularColorTexture/extensions/KHR_texture_transform/rotation\",\r\n specularColorTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_transmission/transmissionFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.refractionIntensity\", getFloat, () => 1),\r\n]);\r\nconst transmissionTextureInterpolation = getTextureTransformTree(\"subSurface.refractionIntensityTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/scale\", transmissionTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/offset\", transmissionTextureInterpolation.offset);\r\nSetInterpolationForKey(\r\n \"/materials/{}/extensions/KHR_materials_transmission/transmissionTexture/extensions/KHR_texture_transform/rotation\",\r\n transmissionTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/attenuationColor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"subSurface.tintColor\", getColor3, () => 3),\r\n]);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/attenuationDistance\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.tintColorAtDistance\", getFloat, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/thicknessFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.maximumThickness\", getFloat, () => 1),\r\n]);\r\n\r\nconst thicknessTextureInterpolation = getTextureTransformTree(\"subSurface.thicknessTexture\");\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/scale\", thicknessTextureInterpolation.scale);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/offset\", thicknessTextureInterpolation.offset);\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_volume/thicknessTexture/extensions/KHR_texture_transform/rotation\", thicknessTextureInterpolation.rotation);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.translucencyIntensity\", getFloat, () => 1),\r\n]);\r\n\r\nconst diffuseTransmissionTextureInterpolation = getTextureTransformTree(\"subSurface.translucencyIntensityTexture\");\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/scale\",\r\n diffuseTransmissionTextureInterpolation.scale\r\n);\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/offset\",\r\n diffuseTransmissionTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionTexture/extensions/KHR_texture_transform/rotation\",\r\n diffuseTransmissionTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorFactor\", [\r\n new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"subSurface.translucencyColor\", getColor3, () => 3),\r\n]);\r\n\r\nconst diffuseTransmissionColorTextureInterpolation = getTextureTransformTree(\"subSurface.translucencyColorTexture\");\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/scale\",\r\n diffuseTransmissionColorTextureInterpolation.scale\r\n);\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/offset\",\r\n diffuseTransmissionColorTextureInterpolation.offset\r\n);\r\nSetInterpolationForKey(\r\n \"materials/{}/extensions/KHR_materials_diffuse_transmission/diffuseTransmissionColorTexture/extensions/KHR_texture_transform/rotation\",\r\n diffuseTransmissionColorTextureInterpolation.rotation\r\n);\r\n\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/color\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"diffuse\", getColor3, () => 3)]);\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/intensity\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"intensity\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/range\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"range\", getFloat, () => 1)]);\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/spot/innerConeAngle\", [\r\n new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"innerAngle\", getFloatBy2, () => 1),\r\n]);\r\nSetInterpolationForKey(\"/extensions/KHR_lights_punctual/lights/{}/spot/outerConeAngle\", [\r\n new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"angle\", getFloatBy2, () => 1),\r\n]);\r\n\r\nSetInterpolationForKey(\"/nodes/{}/extensions/EXT_lights_ies/color\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, \"diffuse\", getColor3, () => 3)]);\r\nSetInterpolationForKey(\"/nodes/{}/extensions/EXT_lights_ies/multiplier\", [new LightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"intensity\", getFloat, () => 1)]);\r\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Logger } from "@
|
|
1
|
+
import { Logger } from "@onerjs/core/Misc/logger.js";
|
|
2
2
|
import { registerGLTFExtension, unregisterGLTFExtension } from "../glTFLoaderExtensionRegistry.js";
|
|
3
3
|
import { GetPathToObjectConverter } from "./objectModelMapping.js";
|
|
4
4
|
import "./KHR_animation_pointer.data.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_animation_pointer.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"KHR_animation_pointer.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_animation_pointer.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,oCAAyB;AAE1C,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,8BAA8B,CAAC;AAEtC,MAAM,IAAI,GAAG,uBAAuB,CAAC;AAarC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,OAAO,qBAAqB;IAS9B;;OAEG;IACH,YAAY,MAAkB;QAX9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QASxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,sBAAsB,G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sB,CAAC,CAAC;QAC/D,CAAC;QAED,IAAI,CAAC;YACD,MAAM,GAAG,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACzD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;gBAC1B,MAAM,IAAI,KAAK,CAAC,GAAG,gBAAgB,oCAAoC,CAAC,CAAC;YAC7E,CAAC;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,wCAAwC,CACxD,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP;gBACI,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,aAAa;aAC/B,EACD,MAAM,CACT,CAAC;QACN,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,GAAG,gBAAgB,8BAA8B,OAAO,WAAW,CAAC,CAAC;YACjF,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;CACJ;AAED,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC","sourcesContent":["import type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport type { GLTFLoader } from \"../glTFLoader\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Animation } from \"core/Animations/animation\";\r\nimport type { IAnimatable } from \"core/Animations/animatable.interface\";\r\nimport type { IAnimation, IAnimationChannel } from \"../glTFLoaderInterfaces\";\r\nimport type { IKHRAnimationPointer } from \"babylonjs-gltf2interface\";\r\nimport { AnimationChannelTargetPath } from \"babylonjs-gltf2interface\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport type { GLTFPathToObjectConverter } from \"./gltfPathToObjectConverter\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\nimport { GetPathToObjectConverter } from \"./objectModelMapping\";\r\nimport \"./KHR_animation_pointer.data\";\r\n\r\nconst NAME = \"KHR_animation_pointer\";\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 KHR_animation_pointer extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"KHR_animation_pointer\"]: {};\r\n }\r\n}\r\n\r\n/**\r\n * [Specification PR](https://github.com/KhronosGroup/glTF/pull/2147)\r\n * !!! Experimental Extension Subject to Changes !!!\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class KHR_animation_pointer implements IGLTFLoaderExtension {\r\n /**\r\n * The name of this extension.\r\n */\r\n public readonly name = NAME;\r\n\r\n private _loader: GLTFLoader;\r\n private _pathToObjectConverter?: GLTFPathToObjectConverter<any, any, any>;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this._pathToObjectConverter = GetPathToObjectConverter(this._loader.gltf);\r\n }\r\n\r\n /**\r\n * Defines whether this extension is enabled.\r\n */\r\n public get enabled(): boolean {\r\n return this._loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n delete this._pathToObjectConverter; // GC\r\n }\r\n\r\n /**\r\n * Loads a glTF animation channel.\r\n * @param context The context when loading the asset\r\n * @param animationContext The context of the animation when loading the asset\r\n * @param animation The glTF animation property\r\n * @param channel The glTF animation channel property\r\n * @param onLoad Called for each animation loaded\r\n * @returns A void promise that resolves when the load is complete or null if not handled\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public _loadAnimationChannelAsync(\r\n context: string,\r\n animationContext: string,\r\n animation: IAnimation,\r\n channel: IAnimationChannel,\r\n onLoad: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void\r\n ): Nullable<Promise<void>> {\r\n const extension = channel.target.extensions?.KHR_animation_pointer as IKHRAnimationPointer;\r\n if (!extension || !this._pathToObjectConverter) {\r\n return null;\r\n }\r\n\r\n if (channel.target.path !== AnimationChannelTargetPath.POINTER) {\r\n Logger.Warn(`${context}/target/path: Value (${channel.target.path}) must be (${AnimationChannelTargetPath.POINTER}) when using the ${this.name} extension`);\r\n }\r\n\r\n if (channel.target.node != undefined) {\r\n Logger.Warn(`${context}/target/node: Value (${channel.target.node}) must not be present when using the ${this.name} extension`);\r\n }\r\n\r\n const extensionContext = `${context}/extensions/${this.name}`;\r\n\r\n const pointer = extension.pointer;\r\n if (!pointer) {\r\n throw new Error(`${extensionContext}: Pointer is missing`);\r\n }\r\n\r\n try {\r\n const obj = this._pathToObjectConverter.convert(pointer);\r\n if (!obj.info.interpolation) {\r\n throw new Error(`${extensionContext}/pointer: Interpolation is missing`);\r\n }\r\n return this._loader._loadAnimationChannelFromTargetInfoAsync(\r\n context,\r\n animationContext,\r\n animation,\r\n channel,\r\n {\r\n object: obj.object,\r\n info: obj.info.interpolation,\r\n },\r\n onLoad\r\n );\r\n } catch (e) {\r\n Logger.Warn(`${extensionContext}/pointer: Invalid pointer (${pointer}) skipped`);\r\n return null;\r\n }\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, true, (loader) => new KHR_animation_pointer(loader));\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DracoDecoder } from "@
|
|
2
|
-
import type { Nullable } from "@
|
|
3
|
-
import type { Geometry } from "@
|
|
4
|
-
import type { Mesh } from "@
|
|
1
|
+
import { DracoDecoder } from "@onerjs/core/Meshes/Compression/dracoDecoder.js";
|
|
2
|
+
import type { Nullable } from "@onerjs/core/types.js";
|
|
3
|
+
import type { Geometry } from "@onerjs/core/Meshes/geometry.js";
|
|
4
|
+
import type { Mesh } from "@onerjs/core/Meshes/mesh.js";
|
|
5
5
|
import type { IMeshPrimitive } from "../glTFLoaderInterfaces.js";
|
|
6
6
|
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
|
7
7
|
import { GLTFLoader } from "../glTFLoader.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable github/no-then */
|
|
2
|
-
import { DracoDecoder } from "@
|
|
3
|
-
import { VertexBuffer } from "@
|
|
2
|
+
import { DracoDecoder } from "@onerjs/core/Meshes/Compression/dracoDecoder.js";
|
|
3
|
+
import { VertexBuffer } from "@onerjs/core/Buffers/buffer.js";
|
|
4
4
|
import { GLTFLoader, ArrayItem, LoadBoundingInfoFromPositionAccessor } from "../glTFLoader.js";
|
|
5
5
|
import { registerGLTFExtension, unregisterGLTFExtension } from "../glTFLoaderExtensionRegistry.js";
|
|
6
6
|
const NAME = "KHR_draco_mesh_compression";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_draco_mesh_compression.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,OAAO,EAAE,YAAY,EAAE,2DAA6C;AAEpE,OAAO,EAAE,YAAY,EAAE,0CAA4B;AAQnD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,4BAA4B,CAAC;AAiB1C;;GAEG;AACH,gEAAgE;AAChE,MAAM,OAAO,0BAA0B;IAuBnC;;OAEG;IACH,YAAY,MAAkB;QAzB9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAY5B;;WAEG;QACI,kCAA6B,GAAG,IAAI,CAAC;QAQxC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAA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able github/no-then */\r\nimport { DracoDecoder } from \"core/Meshes/Compression/dracoDecoder\";\r\nimport type { Nullable } from \"core/types\";\r\nimport { VertexBuffer } from \"core/Buffers/buffer\";\r\nimport type { Geometry } from \"core/Meshes/geometry\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\n\r\nimport { MeshPrimitiveMode } from \"babylonjs-gltf2interface\";\r\nimport type { IKHRDracoMeshCompression } from \"babylonjs-gltf2interface\";\r\nimport type { IMeshPrimitive, IBufferView } from \"../glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem, LoadBoundingInfoFromPositionAccessor } from \"../glTFLoader\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"KHR_draco_mesh_compression\";\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 KHR_draco_mesh_compression extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"KHR_draco_mesh_compression\"]: {};\r\n }\r\n}\r\n\r\ninterface IBufferViewDraco extends IBufferView {\r\n _dracoBabylonGeometry?: Promise<Geometry>;\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class KHR_draco_mesh_compression 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 * The draco decoder used to decode vertex data or DracoDecoder.Default if not defined\r\n */\r\n public dracoDecoder?: DracoDecoder;\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 whether to use the normalized flag from the glTF accessor instead of the Draco data. Defaults to true.\r\n */\r\n public useNormalizedFlagFromAccessor = true;\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 = DracoDecoder.DefaultAvailable && this._loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose(): void {\r\n delete this.dracoDecoder;\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 _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {\r\n return GLTFLoader.LoadExtensionAsync<IKHRDracoMeshCompression, Geometry>(context, primitive, this.name, async (extensionContext, extension) => {\r\n if (primitive.mode != undefined) {\r\n if (primitive.mode !== MeshPrimitiveMode.TRIANGLES && primitive.mode !== MeshPrimitiveMode.TRIANGLE_STRIP) {\r\n throw new Error(`${context}: Unsupported mode ${primitive.mode}`);\r\n }\r\n }\r\n\r\n const attributes: { [kind: string]: number } = {};\r\n const normalized: { [kind: string]: boolean } = {};\r\n const loadAttribute = (name: string, kind: string) => {\r\n const uniqueId = extension.attributes[name];\r\n if (uniqueId == undefined) {\r\n return;\r\n }\r\n\r\n babylonMesh._delayInfo = babylonMesh._delayInfo || [];\r\n if (babylonMesh._delayInfo.indexOf(kind) === -1) {\r\n babylonMesh._delayInfo.push(kind);\r\n }\r\n\r\n attributes[kind] = uniqueId;\r\n\r\n if (this.useNormalizedFlagFromAccessor) {\r\n const accessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[name]);\r\n if (accessor) {\r\n normalized[kind] = accessor.normalized || false;\r\n }\r\n }\r\n };\r\n\r\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind);\r\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind);\r\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind);\r\n loadAttribute(\"TEXCOORD_0\", VertexBuffer.UVKind);\r\n loadAttribute(\"TEXCOORD_1\", VertexBuffer.UV2Kind);\r\n loadAttribute(\"TEXCOORD_2\", VertexBuffer.UV3Kind);\r\n loadAttribute(\"TEXCOORD_3\", VertexBuffer.UV4Kind);\r\n loadAttribute(\"TEXCOORD_4\", VertexBuffer.UV5Kind);\r\n loadAttribute(\"TEXCOORD_5\", VertexBuffer.UV6Kind);\r\n loadAttribute(\"JOINTS_0\", VertexBuffer.MatricesIndicesKind);\r\n loadAttribute(\"WEIGHTS_0\", VertexBuffer.MatricesWeightsKind);\r\n loadAttribute(\"COLOR_0\", VertexBuffer.ColorKind);\r\n\r\n const bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView) as IBufferViewDraco;\r\n if (!bufferView._dracoBabylonGeometry) {\r\n bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then(async (data) => {\r\n const dracoDecoder = this.dracoDecoder || DracoDecoder.Default;\r\n const positionAccessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[\"POSITION\"]);\r\n const babylonBoundingInfo =\r\n !this._loader.parent.alwaysComputeBoundingBox && !babylonMesh.skeleton && positionAccessor ? LoadBoundingInfoFromPositionAccessor(positionAccessor) : null;\r\n return await dracoDecoder\r\n ._decodeMeshToGeometryForGltfAsync(babylonMesh.name, this._loader.babylonScene, data, attributes, normalized, babylonBoundingInfo)\r\n .catch((error) => {\r\n throw new Error(`${context}: ${error.message}`);\r\n });\r\n });\r\n }\r\n\r\n return await bufferView._dracoBabylonGeometry;\r\n });\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, true, (loader) => new KHR_draco_mesh_compression(loader));\r\n"]}
|
|
1
|
+
{"version":3,"file":"KHR_draco_mesh_compression.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.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AI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,CAAC;yBACjI,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;wBACb,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;oBACpD,CAAC,CAAC,CAAC;gBACX,CAAC,CAAC,CAAC;YACP,CAAC;YAED,OAAO,MAAM,UAAU,CAAC,qBAAqB,CAAC;QAClD,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,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable github/no-then */\r\nimport { DracoDecoder } from \"core/Meshes/Compression/dracoDecoder\";\r\nimport type { Nullable } from \"core/types\";\r\nimport { VertexBuffer } from \"core/Buffers/buffer\";\r\nimport type { Geometry } from \"core/Meshes/geometry\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\n\r\nimport { MeshPrimitiveMode } from \"babylonjs-gltf2interface\";\r\nimport type { IKHRDracoMeshCompression } from \"babylonjs-gltf2interface\";\r\nimport type { IMeshPrimitive, IBufferView } from \"../glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem, LoadBoundingInfoFromPositionAccessor } from \"../glTFLoader\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"KHR_draco_mesh_compression\";\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 KHR_draco_mesh_compression extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"KHR_draco_mesh_compression\"]: {};\r\n }\r\n}\r\n\r\ninterface IBufferViewDraco extends IBufferView {\r\n _dracoBabylonGeometry?: Promise<Geometry>;\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class KHR_draco_mesh_compression 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 * The draco decoder used to decode vertex data or DracoDecoder.Default if not defined\r\n */\r\n public dracoDecoder?: DracoDecoder;\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 whether to use the normalized flag from the glTF accessor instead of the Draco data. Defaults to true.\r\n */\r\n public useNormalizedFlagFromAccessor = true;\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 = DracoDecoder.DefaultAvailable && this._loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose(): void {\r\n delete this.dracoDecoder;\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 _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {\r\n return GLTFLoader.LoadExtensionAsync<IKHRDracoMeshCompression, Geometry>(context, primitive, this.name, async (extensionContext, extension) => {\r\n if (primitive.mode != undefined) {\r\n if (primitive.mode !== MeshPrimitiveMode.TRIANGLES && primitive.mode !== MeshPrimitiveMode.TRIANGLE_STRIP) {\r\n throw new Error(`${context}: Unsupported mode ${primitive.mode}`);\r\n }\r\n }\r\n\r\n const attributes: { [kind: string]: number } = {};\r\n const normalized: { [kind: string]: boolean } = {};\r\n const loadAttribute = (name: string, kind: string) => {\r\n const uniqueId = extension.attributes[name];\r\n if (uniqueId == undefined) {\r\n return;\r\n }\r\n\r\n babylonMesh._delayInfo = babylonMesh._delayInfo || [];\r\n if (babylonMesh._delayInfo.indexOf(kind) === -1) {\r\n babylonMesh._delayInfo.push(kind);\r\n }\r\n\r\n attributes[kind] = uniqueId;\r\n\r\n if (this.useNormalizedFlagFromAccessor) {\r\n const accessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[name]);\r\n if (accessor) {\r\n normalized[kind] = accessor.normalized || false;\r\n }\r\n }\r\n };\r\n\r\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind);\r\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind);\r\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind);\r\n loadAttribute(\"TEXCOORD_0\", VertexBuffer.UVKind);\r\n loadAttribute(\"TEXCOORD_1\", VertexBuffer.UV2Kind);\r\n loadAttribute(\"TEXCOORD_2\", VertexBuffer.UV3Kind);\r\n loadAttribute(\"TEXCOORD_3\", VertexBuffer.UV4Kind);\r\n loadAttribute(\"TEXCOORD_4\", VertexBuffer.UV5Kind);\r\n loadAttribute(\"TEXCOORD_5\", VertexBuffer.UV6Kind);\r\n loadAttribute(\"JOINTS_0\", VertexBuffer.MatricesIndicesKind);\r\n loadAttribute(\"WEIGHTS_0\", VertexBuffer.MatricesWeightsKind);\r\n loadAttribute(\"COLOR_0\", VertexBuffer.ColorKind);\r\n\r\n const bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView) as IBufferViewDraco;\r\n if (!bufferView._dracoBabylonGeometry) {\r\n bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then(async (data) => {\r\n const dracoDecoder = this.dracoDecoder || DracoDecoder.Default;\r\n const positionAccessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[\"POSITION\"]);\r\n const babylonBoundingInfo =\r\n !this._loader.parent.alwaysComputeBoundingBox && !babylonMesh.skeleton && positionAccessor ? LoadBoundingInfoFromPositionAccessor(positionAccessor) : null;\r\n return await dracoDecoder\r\n ._decodeMeshToGeometryForGltfAsync(babylonMesh.name, this._loader.babylonScene, data, attributes, normalized, babylonBoundingInfo)\r\n .catch((error) => {\r\n throw new Error(`${context}: ${error.message}`);\r\n });\r\n });\r\n }\r\n\r\n return await bufferView._dracoBabylonGeometry;\r\n });\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, true, (loader) => new KHR_draco_mesh_compression(loader));\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IKHRInteractivity_Declaration, IKHRInteractivity_Graph, IKHRInteractivity_Node } from "babylonjs-gltf2interface";
|
|
2
|
-
import { FlowGraphBlockNames } from "@
|
|
3
|
-
import type { ISerializedFlowGraphBlock, ISerializedFlowGraphContext } from "@
|
|
2
|
+
import { FlowGraphBlockNames } from "@onerjs/core/FlowGraph/Blocks/flowGraphBlockNames.js";
|
|
3
|
+
import type { ISerializedFlowGraphBlock, ISerializedFlowGraphContext } from "@onerjs/core/FlowGraph/typeDefinitions.js";
|
|
4
4
|
import type { InteractivityGraphToFlowGraphParser } from "./interactivityGraphParser.js";
|
|
5
5
|
import type { IGLTF } from "../../glTFLoaderInterfaces.js";
|
|
6
6
|
interface IGLTFToFlowGraphMappingObject<I = any, O = any> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Logger } from "@
|
|
2
|
-
import { getAnimationTypeByFlowGraphType } from "@
|
|
1
|
+
import { Logger } from "@onerjs/core/Misc/logger.js";
|
|
2
|
+
import { getAnimationTypeByFlowGraphType } from "@onerjs/core/FlowGraph/flowGraphRichTypes.js";
|
|
3
3
|
export function getMappingForFullOperationName(fullOperationName) {
|
|
4
4
|
const [op, extension] = fullOperationName.split(":");
|
|
5
5
|
return getMappingForDeclaration({ op, extension });
|