@babylonjs/loaders 5.24.0 → 5.26.0
Sign up to get free protection for your applications and to get access to all the features.
- package/STL/stlFileLoader.d.ts +4 -4
- package/STL/stlFileLoader.js +4 -4
- package/STL/stlFileLoader.js.map +1 -1
- package/glTF/1.0/glTFBinaryExtension.d.ts +1 -1
- package/glTF/1.0/glTFBinaryExtension.js +1 -1
- package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
- package/glTF/1.0/glTFLoader.d.ts +3 -3
- package/glTF/1.0/glTFLoader.js +3 -3
- package/glTF/1.0/glTFLoader.js.map +1 -1
- package/glTF/1.0/glTFLoaderInterfaces.d.ts +45 -45
- package/glTF/1.0/glTFLoaderInterfaces.js +8 -8
- package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -1
- package/glTF/1.0/glTFLoaderUtils.d.ts +1 -1
- package/glTF/1.0/glTFLoaderUtils.js +1 -1
- package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.js +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +5 -8
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +4 -7
- package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +3 -7
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +3 -7
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +3 -6
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +3 -6
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +3 -7
- package/glTF/2.0/Extensions/EXT_texture_webp.js +3 -7
- package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +5 -15
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +5 -15
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.d.ts +14 -35
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.d.ts +133 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.js +169 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_animation_pointer.js +56 -208
- package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +3 -7
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +4 -8
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +6 -9
- package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_ior.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_iridescence.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_specular.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_translucency.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +4 -11
- package/glTF/2.0/Extensions/KHR_materials_variants.js +4 -11
- package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_volume.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +2 -3
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js +2 -3
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_texture_basisu.js +3 -7
- package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_texture_transform.js +3 -7
- package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +2 -3
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +2 -3
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +6 -14
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +6 -14
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_lod.d.ts +8 -26
- package/glTF/2.0/Extensions/MSFT_lod.js +8 -26
- package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +1 -1
- 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 +1 -1
- 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/glTFLoader.d.ts +55 -52
- package/glTF/2.0/glTFLoader.js +217 -91
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/2.0/glTFLoaderAnimation.d.ts +29 -0
- package/glTF/2.0/glTFLoaderAnimation.js +66 -0
- package/glTF/2.0/glTFLoaderAnimation.js.map +1 -0
- package/glTF/2.0/glTFLoaderExtension.d.ts +20 -7
- package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.d.ts +58 -31
- package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
- package/glTF/glTFFileLoader.d.ts +20 -53
- package/glTF/glTFFileLoader.js +17 -50
- package/glTF/glTFFileLoader.js.map +1 -1
- package/package.json +3 -3
- package/glTF/2.0/Extensions/KHR_animation_pointer.map.d.ts +0 -15
- package/glTF/2.0/Extensions/KHR_animation_pointer.map.js +0 -454
- package/glTF/2.0/Extensions/KHR_animation_pointer.map.js.map +0 -1
- package/glTF/2.0/glTFUtilities.d.ts +0 -7
- package/glTF/2.0/glTFUtilities.js +0 -23
- package/glTF/2.0/glTFUtilities.js.map +0 -1
@@ -1,454 +0,0 @@
|
|
1
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
2
|
-
import { Animation } from "@babylonjs/core/Animations/animation.js";
|
3
|
-
import { Quaternion, Vector3, Matrix } from "@babylonjs/core/Maths/math.vector.js";
|
4
|
-
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
5
|
-
import { Material } from "@babylonjs/core/Materials/material.js";
|
6
|
-
const parseIntIndex = (str) => {
|
7
|
-
const targetIndex = parseInt(str);
|
8
|
-
if (isNaN(targetIndex)) {
|
9
|
-
return -1;
|
10
|
-
}
|
11
|
-
return targetIndex;
|
12
|
-
};
|
13
|
-
const getGltfNode = (gltf, index) => {
|
14
|
-
if (gltf.nodes) {
|
15
|
-
const i = parseIntIndex(index);
|
16
|
-
if (i != -1) {
|
17
|
-
return gltf.nodes[i];
|
18
|
-
}
|
19
|
-
}
|
20
|
-
return null;
|
21
|
-
};
|
22
|
-
const getGltfMaterial = (gltf, index) => {
|
23
|
-
if (gltf.materials) {
|
24
|
-
const i = parseIntIndex(index);
|
25
|
-
if (i != -1) {
|
26
|
-
return gltf.materials[i];
|
27
|
-
}
|
28
|
-
}
|
29
|
-
return null;
|
30
|
-
};
|
31
|
-
const getGltfCamera = (gltf, index) => {
|
32
|
-
if (gltf.cameras) {
|
33
|
-
const i = parseIntIndex(index);
|
34
|
-
if (i != -1) {
|
35
|
-
return gltf.cameras[i];
|
36
|
-
}
|
37
|
-
}
|
38
|
-
return null;
|
39
|
-
};
|
40
|
-
const getGltfExtension = (gltf, index) => {
|
41
|
-
if (gltf.extensions && index) {
|
42
|
-
return gltf.extensions[index];
|
43
|
-
}
|
44
|
-
return null;
|
45
|
-
};
|
46
|
-
const getMatrix = (_target, source, offset, scale) => {
|
47
|
-
return scale ? Matrix.FromArray(source, offset).scale(scale) : Matrix.FromArray(source, offset);
|
48
|
-
};
|
49
|
-
const getVector3 = (_target, source, offset, scale) => {
|
50
|
-
return scale ? Vector3.FromArray(source, offset).scaleInPlace(scale) : Vector3.FromArray(source, offset);
|
51
|
-
};
|
52
|
-
const getQuaternion = (_target, source, offset, scale) => {
|
53
|
-
return scale ? Quaternion.FromArray(source, offset).scaleInPlace(scale) : Quaternion.FromArray(source, offset);
|
54
|
-
};
|
55
|
-
const getColor3 = (_target, source, offset, scale) => {
|
56
|
-
return scale ? Color3.FromArray(source, offset).scale(scale) : Color3.FromArray(source, offset);
|
57
|
-
};
|
58
|
-
const getAlpha = (_target, source, offset, scale) => {
|
59
|
-
return scale ? source[offset + 3] * scale : source[offset + 3];
|
60
|
-
};
|
61
|
-
const getFloat = (_target, source, offset, scale) => {
|
62
|
-
return scale ? source[offset] * scale : source[offset];
|
63
|
-
};
|
64
|
-
const getMinusFloat = (_target, source, offset, scale) => {
|
65
|
-
return -(scale ? source[offset] * scale : source[offset]);
|
66
|
-
};
|
67
|
-
const getNextFloat = (_target, source, offset, scale) => {
|
68
|
-
return scale ? source[offset + 1] * scale : source[offset + 1];
|
69
|
-
};
|
70
|
-
const getFloatBy2 = (_target, source, offset, scale) => {
|
71
|
-
return (scale ? source[offset] * scale : source[offset]) * 2;
|
72
|
-
};
|
73
|
-
const getWeights = (target, source, offset, scale) => {
|
74
|
-
if (target._numMorphTargets) {
|
75
|
-
const value = new Array(target._numMorphTargets);
|
76
|
-
for (let i = 0; i < target._numMorphTargets; i++) {
|
77
|
-
value[i] = scale ? source[offset++] * scale : source[offset++];
|
78
|
-
}
|
79
|
-
return value;
|
80
|
-
}
|
81
|
-
return null;
|
82
|
-
};
|
83
|
-
class AbstractAnimationPointerPropertyInfos {
|
84
|
-
constructor(type, name, get) {
|
85
|
-
this.type = type;
|
86
|
-
this.name = name;
|
87
|
-
this.get = get;
|
88
|
-
}
|
89
|
-
_buildAnimation(animatable, fps, keys, babylonAnimationGroup, animationTargetOverride = null) {
|
90
|
-
if (animatable || animationTargetOverride) {
|
91
|
-
const animationName = `${babylonAnimationGroup.name}_channel${babylonAnimationGroup.targetedAnimations.length}_${this.name}`;
|
92
|
-
const babylonAnimation = new Animation(animationName, this.name, fps, this.type);
|
93
|
-
babylonAnimation.setKeys(keys);
|
94
|
-
if (animationTargetOverride != null && animationTargetOverride.animations != null) {
|
95
|
-
animationTargetOverride.animations.push(babylonAnimation);
|
96
|
-
babylonAnimationGroup.addTargetedAnimation(babylonAnimation, animationTargetOverride);
|
97
|
-
}
|
98
|
-
else if (animatable) {
|
99
|
-
animatable.animations = animatable.animations || Array(1);
|
100
|
-
animatable.animations.push(babylonAnimation);
|
101
|
-
babylonAnimationGroup.addTargetedAnimation(babylonAnimation, animatable);
|
102
|
-
}
|
103
|
-
}
|
104
|
-
}
|
105
|
-
isValid(_target) {
|
106
|
-
return true;
|
107
|
-
}
|
108
|
-
}
|
109
|
-
class TransformNodeAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
110
|
-
constructor(type, name, get = getVector3) {
|
111
|
-
super(type, name, get);
|
112
|
-
}
|
113
|
-
isValid(target) {
|
114
|
-
return target._babylonTransformNode !== null && target._babylonTransformNode !== undefined;
|
115
|
-
}
|
116
|
-
buildAnimations(target, fps, keys, group, animationTargetOverride = null) {
|
117
|
-
return this._buildAnimation(target._babylonTransformNode, fps, keys, group, animationTargetOverride);
|
118
|
-
}
|
119
|
-
}
|
120
|
-
class CameraAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
121
|
-
constructor(type, name, get = getFloat) {
|
122
|
-
super(type, name, get);
|
123
|
-
}
|
124
|
-
isValid(target) {
|
125
|
-
return target._babylonCamera != null && target._babylonCamera !== undefined;
|
126
|
-
}
|
127
|
-
buildAnimations(target, fps, keys, group, animationTargetOverride = null) {
|
128
|
-
return this._buildAnimation(target._babylonCamera, fps, keys, group, animationTargetOverride);
|
129
|
-
}
|
130
|
-
}
|
131
|
-
class MaterialAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
132
|
-
constructor(type, name, get = getFloat, fillMode = Material.TriangleFillMode) {
|
133
|
-
super(type, name, get);
|
134
|
-
this.fillMode = fillMode;
|
135
|
-
}
|
136
|
-
isValid(target) {
|
137
|
-
const data = target._data;
|
138
|
-
if (data) {
|
139
|
-
const c = data[this.fillMode];
|
140
|
-
if (c) {
|
141
|
-
return c.babylonMaterial !== null && c.babylonMaterial !== undefined;
|
142
|
-
}
|
143
|
-
}
|
144
|
-
return false;
|
145
|
-
}
|
146
|
-
buildAnimations(target, fps, keys, group, animationTargetOverride = null) {
|
147
|
-
return this._buildAnimation(target._data[this.fillMode].babylonMaterial, fps, keys, group, animationTargetOverride);
|
148
|
-
}
|
149
|
-
}
|
150
|
-
class LightAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
151
|
-
constructor(type, name, get = getFloat) {
|
152
|
-
super(type, name, get);
|
153
|
-
}
|
154
|
-
isValid(target) {
|
155
|
-
return target && target.length != 0;
|
156
|
-
}
|
157
|
-
// note : the extensions array store directly the BabylonLight reference
|
158
|
-
buildAnimations(target, fps, keys, group, animationTargetOverride = null, params) {
|
159
|
-
const i = parseIntIndex(params[1]);
|
160
|
-
const l = i >= 0 && i < target.lights.length ? target.lights[i] : null;
|
161
|
-
return this._buildAnimation(l._babylonLight, fps, keys, group, animationTargetOverride);
|
162
|
-
}
|
163
|
-
}
|
164
|
-
class WeightAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
165
|
-
constructor(type, name, get = getWeights) {
|
166
|
-
super(type, name, get);
|
167
|
-
}
|
168
|
-
isValid(target) {
|
169
|
-
return target._numMorphTargets;
|
170
|
-
}
|
171
|
-
buildAnimations(targetNode, fps, keys, babylonAnimationGroup, _animationTargetOverride = null) {
|
172
|
-
if (targetNode._numMorphTargets) {
|
173
|
-
for (let targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
|
174
|
-
const animationName = `${babylonAnimationGroup.name}_channel${babylonAnimationGroup.targetedAnimations.length}`;
|
175
|
-
const babylonAnimation = new Animation(animationName, this.name, fps, this.type);
|
176
|
-
babylonAnimation.setKeys(keys.map((key) => ({
|
177
|
-
frame: key.frame,
|
178
|
-
inTangent: key.inTangent ? key.inTangent[targetIndex] : undefined,
|
179
|
-
value: key.value[targetIndex],
|
180
|
-
outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined,
|
181
|
-
interpolation: key.interpolation,
|
182
|
-
})));
|
183
|
-
if (targetNode._primitiveBabylonMeshes) {
|
184
|
-
for (const m of targetNode._primitiveBabylonMeshes) {
|
185
|
-
const babylonMesh = m;
|
186
|
-
if (babylonMesh.morphTargetManager) {
|
187
|
-
const morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
|
188
|
-
const babylonAnimationClone = babylonAnimation.clone();
|
189
|
-
morphTarget.animations.push(babylonAnimationClone);
|
190
|
-
babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, morphTarget);
|
191
|
-
}
|
192
|
-
}
|
193
|
-
}
|
194
|
-
}
|
195
|
-
}
|
196
|
-
}
|
197
|
-
}
|
198
|
-
const CoreAnimationNodesPointerMap = {
|
199
|
-
getTarget: getGltfNode,
|
200
|
-
hasIndex: true,
|
201
|
-
matrix: {
|
202
|
-
properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_MATRIX, "matrix", getMatrix)],
|
203
|
-
},
|
204
|
-
translation: {
|
205
|
-
properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_VECTOR3, "position")],
|
206
|
-
},
|
207
|
-
rotation: {
|
208
|
-
properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_QUATERNION, "rotationQuaternion", getQuaternion)],
|
209
|
-
},
|
210
|
-
scale: {
|
211
|
-
properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_VECTOR3, "scaling")],
|
212
|
-
},
|
213
|
-
weights: {
|
214
|
-
getStride: (target) => {
|
215
|
-
return target._numMorphTargets;
|
216
|
-
},
|
217
|
-
properties: [new WeightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "influence")],
|
218
|
-
},
|
219
|
-
};
|
220
|
-
const CoreAnimationCamerasPointerMap = {
|
221
|
-
hasIndex: true,
|
222
|
-
getTarget: getGltfCamera,
|
223
|
-
orthographic: {
|
224
|
-
xmag: {
|
225
|
-
properties: [
|
226
|
-
new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "orthoLeft", getMinusFloat),
|
227
|
-
new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "orthoRight", getNextFloat),
|
228
|
-
],
|
229
|
-
},
|
230
|
-
ymag: {
|
231
|
-
properties: [
|
232
|
-
new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "orthoBottom", getMinusFloat),
|
233
|
-
new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "orthoTop", getNextFloat),
|
234
|
-
],
|
235
|
-
},
|
236
|
-
zfar: {
|
237
|
-
properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "maxZ")],
|
238
|
-
},
|
239
|
-
znear: {
|
240
|
-
properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "minZ")],
|
241
|
-
},
|
242
|
-
},
|
243
|
-
perspective: {
|
244
|
-
aspectRatio: {
|
245
|
-
// not supported.
|
246
|
-
},
|
247
|
-
yfov: {
|
248
|
-
properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "fov")],
|
249
|
-
},
|
250
|
-
zfar: {
|
251
|
-
properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "maxZ")],
|
252
|
-
},
|
253
|
-
znear: {
|
254
|
-
properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "minZ")],
|
255
|
-
},
|
256
|
-
},
|
257
|
-
};
|
258
|
-
const CoreAnimationMaterialsPointerMap = {
|
259
|
-
hasIndex: true,
|
260
|
-
getTarget: getGltfMaterial,
|
261
|
-
pbrMetallicRoughness: {
|
262
|
-
baseColorFactor: {
|
263
|
-
properties: [
|
264
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, "albedoColor", getColor3),
|
265
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "alpha", getAlpha),
|
266
|
-
],
|
267
|
-
},
|
268
|
-
metallicFactor: {
|
269
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "metallic")],
|
270
|
-
},
|
271
|
-
roughnessFactor: {
|
272
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "roughness")],
|
273
|
-
},
|
274
|
-
baseColorTexture: {
|
275
|
-
extensions: {
|
276
|
-
KHR_texture_transform: {
|
277
|
-
scale: {
|
278
|
-
properties: [
|
279
|
-
// MAY introduce set scale(Vector2) into texture.
|
280
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "albedoTexture.uScale"),
|
281
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "albedoTexture.vScale", getNextFloat),
|
282
|
-
],
|
283
|
-
},
|
284
|
-
offset: {
|
285
|
-
properties: [
|
286
|
-
// MAY introduce set offset(Vector2) into texture.
|
287
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "albedoTexture.uOffset"),
|
288
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "albedoTexture.vOffset", getNextFloat),
|
289
|
-
],
|
290
|
-
},
|
291
|
-
rotation: {
|
292
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "albedoTexture.wAng", getMinusFloat)],
|
293
|
-
},
|
294
|
-
},
|
295
|
-
},
|
296
|
-
},
|
297
|
-
},
|
298
|
-
emissiveFactor: {
|
299
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, "emissiveColor", getColor3)],
|
300
|
-
},
|
301
|
-
normalTexture: {
|
302
|
-
scale: {
|
303
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "bumpTexture.level")],
|
304
|
-
},
|
305
|
-
},
|
306
|
-
occlusionTexture: {
|
307
|
-
strength: {
|
308
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "ambientTextureStrength")],
|
309
|
-
},
|
310
|
-
extensions: {
|
311
|
-
KHR_texture_transform: {
|
312
|
-
scale: {
|
313
|
-
properties: [
|
314
|
-
// MAY introduce set scale(Vector2) into texture.
|
315
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "ambientTexture.uScale"),
|
316
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "ambientTexture.vScale", getNextFloat),
|
317
|
-
],
|
318
|
-
},
|
319
|
-
offset: {
|
320
|
-
properties: [
|
321
|
-
// MAY introduce set offset(Vector2) into texture.
|
322
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "ambientTexture.uOffset"),
|
323
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "ambientTexture.vOffset", getNextFloat),
|
324
|
-
],
|
325
|
-
},
|
326
|
-
rotation: {
|
327
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "ambientTexture.wAng", getMinusFloat)],
|
328
|
-
},
|
329
|
-
},
|
330
|
-
},
|
331
|
-
},
|
332
|
-
emissiveTexture: {
|
333
|
-
extensions: {
|
334
|
-
KHR_texture_transform: {
|
335
|
-
scale: {
|
336
|
-
properties: [
|
337
|
-
// MAY introduce set scale(Vector2) into texture.
|
338
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "emissiveTexture.uScale"),
|
339
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "emissiveTexture.vScale", getNextFloat),
|
340
|
-
],
|
341
|
-
},
|
342
|
-
offset: {
|
343
|
-
properties: [
|
344
|
-
// MAY introduce set offset(Vector2) into texture.
|
345
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "emissiveTexture.uOffset"),
|
346
|
-
new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "emissiveTexture.vOffset", getNextFloat),
|
347
|
-
],
|
348
|
-
},
|
349
|
-
rotation: {
|
350
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "emissiveTexture.wAng", getMinusFloat)],
|
351
|
-
},
|
352
|
-
},
|
353
|
-
},
|
354
|
-
},
|
355
|
-
extensions: {
|
356
|
-
KHR_materials_ior: {
|
357
|
-
ior: {
|
358
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "indexOfRefraction")],
|
359
|
-
},
|
360
|
-
},
|
361
|
-
KHR_materials_clearcoat: {
|
362
|
-
clearcoatFactor: {
|
363
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "clearCoat.intensity")],
|
364
|
-
},
|
365
|
-
clearcoatRoughnessFactor: {
|
366
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "clearCoat.roughness")],
|
367
|
-
},
|
368
|
-
},
|
369
|
-
KHR_materials_sheen: {
|
370
|
-
sheenColorFactor: {
|
371
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, "sheen.color", getColor3)],
|
372
|
-
},
|
373
|
-
sheenRoughnessFactor: {
|
374
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "sheen.roughness")],
|
375
|
-
},
|
376
|
-
},
|
377
|
-
KHR_materials_specular: {
|
378
|
-
specularFactor: {
|
379
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "metallicF0Factor")],
|
380
|
-
},
|
381
|
-
specularColorFactor: {
|
382
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, "metallicReflectanceColor", getColor3)],
|
383
|
-
},
|
384
|
-
},
|
385
|
-
KHR_materials_emissive_strength: {
|
386
|
-
emissiveStrength: {
|
387
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "emissiveIntensity")],
|
388
|
-
},
|
389
|
-
},
|
390
|
-
KHR_materials_transmission: {
|
391
|
-
transmissionFactor: {
|
392
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "subSurface.refractionIntensity")],
|
393
|
-
},
|
394
|
-
},
|
395
|
-
KHR_materials_volume: {
|
396
|
-
attenuationColor: {
|
397
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, "subSurface.tintColor", getColor3)],
|
398
|
-
},
|
399
|
-
attenuationDistance: {
|
400
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "subSurface.tintColorAtDistance")],
|
401
|
-
},
|
402
|
-
thicknessFactor: {
|
403
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "subSurface.maximumThickness")],
|
404
|
-
},
|
405
|
-
},
|
406
|
-
KHR_materials_iridescence: {
|
407
|
-
iridescenceFactor: {
|
408
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "iridescence.intensity")],
|
409
|
-
},
|
410
|
-
iridescenceIor: {
|
411
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "iridescence.indexOfRefraction")],
|
412
|
-
},
|
413
|
-
iridescenceThicknessMinimum: {
|
414
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "iridescence.minimumThickness")],
|
415
|
-
},
|
416
|
-
iridescenceThicknessMaximum: {
|
417
|
-
properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "iridescence.maximumThickness")],
|
418
|
-
},
|
419
|
-
},
|
420
|
-
},
|
421
|
-
};
|
422
|
-
const CoreAnimationExtensionsPointerMap = {
|
423
|
-
getTarget: getGltfExtension,
|
424
|
-
KHR_lights_punctual: {
|
425
|
-
isIndex: true,
|
426
|
-
lights: {
|
427
|
-
hasIndex: true,
|
428
|
-
color: {
|
429
|
-
properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, "diffuse", getColor3)],
|
430
|
-
},
|
431
|
-
intensity: {
|
432
|
-
properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "intensity")],
|
433
|
-
},
|
434
|
-
range: {
|
435
|
-
properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "range")],
|
436
|
-
},
|
437
|
-
spot: {
|
438
|
-
innerConeAngle: {
|
439
|
-
properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "innerAngle", getFloatBy2)],
|
440
|
-
},
|
441
|
-
outerConeAngle: {
|
442
|
-
properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "angle", getFloatBy2)],
|
443
|
-
},
|
444
|
-
},
|
445
|
-
},
|
446
|
-
},
|
447
|
-
};
|
448
|
-
export const CoreAnimationPointerMap = {
|
449
|
-
nodes: CoreAnimationNodesPointerMap,
|
450
|
-
materials: CoreAnimationMaterialsPointerMap,
|
451
|
-
cameras: CoreAnimationCamerasPointerMap,
|
452
|
-
extensions: CoreAnimationExtensionsPointerMap,
|
453
|
-
};
|
454
|
-
//# sourceMappingURL=KHR_animation_pointer.map.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"KHR_animation_pointer.map.js","sourceRoot":"","sources":["../../../../../../../lts/loaders/generated/glTF/2.0/Extensions/KHR_animation_pointer.map.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,SAAS,EAAE,gDAAkC;AAEtD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,6CAA+B;AACrE,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAE/C,OAAO,EAAE,QAAQ,EAAE,8CAAgC;AAgBnD,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE;IAClC,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,WAAW,CAAC,EAAE;QACpB,OAAO,CAAC,CAAC,CAAC;KACb;IACD,OAAO,WAAW,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,WAAW,GAAwB,CAAC,IAAW,EAAE,KAAa,EAAE,EAAE;IACpE,IAAI,IAAI,CAAC,KAAK,EAAE;QACZ,MAAM,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;YACT,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACxB;KACJ;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CA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E,gBAAgB;IAC3B,mBAAmB,EAAE;QACjB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE;YACJ,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE;gBACH,UAAU,EAAE,CAAC,IAAI,kCAAkC,CAAC,SAAS,CAAC,oBAAoB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;aAC7G;YACD,SAAS,EAAE;gBACP,UAAU,EAAE,CAAC,IAAI,kCAAkC,CAAC,SAAS,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;aACnG;YACD,KAAK,EAAE;gBACH,UAAU,EAAE,CAAC,IAAI,kCAAkC,CAAC,SAAS,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;aAC/F;YACD,IAAI,EAAE;gBACF,cAAc,EAAE;oBACZ,UAAU,EAAE,CAAC,IAAI,kCAAkC,CAAC,SAAS,CAAC,mBAAmB,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;iBACjH;gBACD,cAAc,EAAE;oBACZ,UAAU,EAAE,CAAC,IAAI,kCAAkC,CAAC,SAAS,CAAC,mBAAmB,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;iBAC5G;aACJ;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAQ;IACxC,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,gCAAgC;IAC3C,OAAO,EAAE,8BAA8B;IACvC,UAAU,EAAE,iCAAiC;CAChD,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { Animation } from \"core/Animations/animation\";\r\nimport type { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport { Quaternion, Vector3, Matrix } from \"core/Maths/math.vector\";\r\nimport { Color3 } from \"core/Maths/math.color\";\r\nimport type { IGLTF } from \"../glTFLoaderInterfaces\";\r\nimport { Material } from \"core/Materials/material\";\r\nimport type { IAnimatable } from \"core/Animations/animatable.interface\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\nimport type { Nullable } from \"core/types\";\r\n\r\nexport type GetGltfNodeTargetFn = (source: IGLTF, indices: string) => any;\r\ntype GetValueFn = (target: any, source: Float32Array, offset: number, scale?: number) => any;\r\n\r\nexport interface IAnimationPointerPropertyInfos {\r\n type: number;\r\n name: string;\r\n get: GetValueFn;\r\n isValid(target: any): boolean;\r\n buildAnimations(target: any, fps: number, keys: any[], group: AnimationGroup, animationTargetOverride: Nullable<IAnimatable>, params?: any): void;\r\n}\r\n\r\nconst parseIntIndex = (str: string) => {\r\n const targetIndex = parseInt(str);\r\n if (isNaN(targetIndex)) {\r\n return -1;\r\n }\r\n return targetIndex;\r\n};\r\n\r\nconst getGltfNode: GetGltfNodeTargetFn = (gltf: IGLTF, index: string) => {\r\n if (gltf.nodes) {\r\n const i = parseIntIndex(index);\r\n if (i != -1) {\r\n return gltf.nodes[i];\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nconst getGltfMaterial: GetGltfNodeTargetFn = (gltf: IGLTF, index: string) => {\r\n if (gltf.materials) {\r\n const i = parseIntIndex(index);\r\n if (i != -1) {\r\n return gltf.materials[i];\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nconst getGltfCamera: GetGltfNodeTargetFn = (gltf: IGLTF, index: string) => {\r\n if (gltf.cameras) {\r\n const i = parseIntIndex(index);\r\n if (i != -1) {\r\n return gltf.cameras[i];\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nconst getGltfExtension: GetGltfNodeTargetFn = (gltf: IGLTF, index: string) => {\r\n if (gltf.extensions && index) {\r\n return gltf.extensions[index];\r\n }\r\n return null;\r\n};\r\n\r\nconst getMatrix: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return scale ? Matrix.FromArray(source, offset).scale(scale) : Matrix.FromArray(source, offset);\r\n};\r\n\r\nconst getVector3: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return scale ? Vector3.FromArray(source, offset).scaleInPlace(scale) : Vector3.FromArray(source, offset);\r\n};\r\n\r\nconst getQuaternion: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return scale ? Quaternion.FromArray(source, offset).scaleInPlace(scale) : Quaternion.FromArray(source, offset);\r\n};\r\n\r\nconst getColor3: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return scale ? Color3.FromArray(source, offset).scale(scale) : Color3.FromArray(source, offset);\r\n};\r\n\r\nconst getAlpha: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return scale ? source[offset + 3] * scale : source[offset + 3];\r\n};\r\n\r\nconst getFloat: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return scale ? source[offset] * scale : source[offset];\r\n};\r\n\r\nconst getMinusFloat: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return -(scale ? source[offset] * scale : source[offset]);\r\n};\r\n\r\nconst getNextFloat: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return scale ? source[offset + 1] * scale : source[offset + 1];\r\n};\r\n\r\nconst getFloatBy2: GetValueFn = (_target: any, source: Float32Array, offset: number, scale?: number) => {\r\n return (scale ? source[offset] * scale : source[offset]) * 2;\r\n};\r\n\r\nconst getWeights: GetValueFn = (target: any, source: Float32Array, offset: number, scale?: number) => {\r\n if (target._numMorphTargets) {\r\n const value = new Array<number>(target._numMorphTargets!);\r\n for (let i = 0; i < target._numMorphTargets!; i++) {\r\n value[i] = scale ? source[offset++] * scale : source[offset++];\r\n }\r\n return value;\r\n }\r\n return null;\r\n};\r\n\r\nabstract class AbstractAnimationPointerPropertyInfos implements IAnimationPointerPropertyInfos {\r\n public constructor(public type: number, public name: string, public get: GetValueFn) {}\r\n\r\n protected _buildAnimation(\r\n animatable: Nullable<IAnimatable>,\r\n fps: number,\r\n keys: any[],\r\n babylonAnimationGroup: AnimationGroup,\r\n animationTargetOverride: Nullable<IAnimatable> = null\r\n ) {\r\n if (animatable || animationTargetOverride) {\r\n const animationName = `${babylonAnimationGroup!.name}_channel${babylonAnimationGroup.targetedAnimations.length}_${this.name}`;\r\n const babylonAnimation = new Animation(animationName, this.name, fps, this.type);\r\n babylonAnimation.setKeys(keys);\r\n\r\n if (animationTargetOverride != null && animationTargetOverride.animations != null) {\r\n animationTargetOverride.animations.push(babylonAnimation);\r\n babylonAnimationGroup.addTargetedAnimation(babylonAnimation, animationTargetOverride);\r\n } else if (animatable) {\r\n animatable.animations = animatable.animations || Array<Animation>(1);\r\n animatable.animations.push(babylonAnimation);\r\n babylonAnimationGroup.addTargetedAnimation(babylonAnimation, animatable);\r\n }\r\n }\r\n }\r\n public isValid(_target: any): boolean {\r\n return true;\r\n }\r\n\r\n public abstract buildAnimations(target: any, fps: number, keys: any[], group: AnimationGroup, animationTargetOverride: Nullable<IAnimatable>, params?: any): void;\r\n}\r\n\r\nclass TransformNodeAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {\r\n public constructor(type: number, name: string, get: GetValueFn = getVector3) {\r\n super(type, name, get);\r\n }\r\n public isValid(target: any): boolean {\r\n return target._babylonTransformNode !== null && target._babylonTransformNode !== undefined;\r\n }\r\n\r\n public buildAnimations(target: any, fps: number, keys: any[], group: AnimationGroup, animationTargetOverride: Nullable<IAnimatable> = null): void {\r\n return this._buildAnimation(target._babylonTransformNode, fps, keys, group, animationTargetOverride);\r\n }\r\n}\r\n\r\nclass CameraAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {\r\n public constructor(type: number, name: string, get: GetValueFn = getFloat) {\r\n super(type, name, get);\r\n }\r\n\r\n public isValid(target: any): boolean {\r\n return target._babylonCamera != null && target._babylonCamera !== undefined;\r\n }\r\n\r\n public buildAnimations(target: any, fps: number, keys: any[], group: AnimationGroup, animationTargetOverride: Nullable<IAnimatable> = null): void {\r\n return this._buildAnimation(target._babylonCamera, fps, keys, group, animationTargetOverride);\r\n }\r\n}\r\n\r\nclass MaterialAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {\r\n public constructor(type: number, name: string, get: GetValueFn = getFloat, public fillMode: any = Material.TriangleFillMode) {\r\n super(type, name, get);\r\n }\r\n\r\n public isValid(target: any): boolean {\r\n const data = target._data;\r\n if (data) {\r\n const c = data[this.fillMode];\r\n if (c) {\r\n return c.babylonMaterial !== null && c.babylonMaterial !== undefined;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n public buildAnimations(target: any, fps: number, keys: any[], group: AnimationGroup, animationTargetOverride: Nullable<IAnimatable> = null): void {\r\n return this._buildAnimation(target._data[this.fillMode].babylonMaterial, fps, keys, group, animationTargetOverride);\r\n }\r\n}\r\n\r\nclass LightAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {\r\n public constructor(type: number, name: string, get: GetValueFn = getFloat) {\r\n super(type, name, get);\r\n }\r\n\r\n public isValid(target: any): boolean {\r\n return target && target.length != 0;\r\n }\r\n\r\n // note : the extensions array store directly the BabylonLight reference\r\n public buildAnimations(target: any, fps: number, keys: any[], group: AnimationGroup, animationTargetOverride: Nullable<IAnimatable> = null, params: any): void {\r\n const i = parseIntIndex(params[1]);\r\n const l = i >= 0 && i < target.lights.length ? target.lights[i] : null;\r\n return this._buildAnimation(l._babylonLight, fps, keys, group, animationTargetOverride);\r\n }\r\n}\r\n\r\nclass WeightAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {\r\n public constructor(type: number, name: string, get: GetValueFn = getWeights) {\r\n super(type, name, get);\r\n }\r\n public isValid(target: any): boolean {\r\n return target._numMorphTargets;\r\n }\r\n public buildAnimations(targetNode: any, fps: number, keys: any[], babylonAnimationGroup: AnimationGroup, _animationTargetOverride: Nullable<IAnimatable> = null): void {\r\n if (targetNode._numMorphTargets) {\r\n for (let targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {\r\n const animationName = `${babylonAnimationGroup.name}_channel${babylonAnimationGroup.targetedAnimations.length}`;\r\n const babylonAnimation = new Animation(animationName, this.name, fps, this.type);\r\n babylonAnimation.setKeys(\r\n keys.map((key) => ({\r\n frame: key.frame,\r\n inTangent: key.inTangent ? key.inTangent[targetIndex] : undefined,\r\n value: key.value[targetIndex],\r\n outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined,\r\n interpolation: key.interpolation,\r\n }))\r\n );\r\n\r\n if (targetNode._primitiveBabylonMeshes) {\r\n for (const m of targetNode._primitiveBabylonMeshes) {\r\n const babylonMesh = m as Mesh;\r\n if (babylonMesh.morphTargetManager) {\r\n const morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);\r\n const babylonAnimationClone = babylonAnimation.clone();\r\n morphTarget.animations.push(babylonAnimationClone);\r\n babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, morphTarget);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nconst CoreAnimationNodesPointerMap: any = {\r\n getTarget: getGltfNode,\r\n hasIndex: true,\r\n matrix: {\r\n properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_MATRIX, \"matrix\", getMatrix)],\r\n },\r\n translation: {\r\n properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_VECTOR3, \"position\")],\r\n },\r\n rotation: {\r\n properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_QUATERNION, \"rotationQuaternion\", getQuaternion)],\r\n },\r\n scale: {\r\n properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_VECTOR3, \"scaling\")],\r\n },\r\n weights: {\r\n getStride: (target: any) => {\r\n return target._numMorphTargets;\r\n },\r\n properties: [new WeightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"influence\")],\r\n },\r\n};\r\n\r\nconst CoreAnimationCamerasPointerMap: any = {\r\n hasIndex: true,\r\n getTarget: getGltfCamera,\r\n orthographic: {\r\n xmag: {\r\n properties: [\r\n new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"orthoLeft\", getMinusFloat),\r\n new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"orthoRight\", getNextFloat),\r\n ],\r\n },\r\n ymag: {\r\n properties: [\r\n new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"orthoBottom\", getMinusFloat),\r\n new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"orthoTop\", getNextFloat),\r\n ],\r\n },\r\n zfar: {\r\n properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"maxZ\")],\r\n },\r\n znear: {\r\n properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"minZ\")],\r\n },\r\n },\r\n perspective: {\r\n aspectRatio: {\r\n // not supported.\r\n },\r\n yfov: {\r\n properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"fov\")],\r\n },\r\n zfar: {\r\n properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"maxZ\")],\r\n },\r\n znear: {\r\n properties: [new CameraAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"minZ\")],\r\n },\r\n },\r\n};\r\n\r\nconst CoreAnimationMaterialsPointerMap: any = {\r\n hasIndex: true,\r\n getTarget: getGltfMaterial,\r\n pbrMetallicRoughness: {\r\n baseColorFactor: {\r\n properties: [\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, \"albedoColor\", getColor3),\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"alpha\", getAlpha),\r\n ],\r\n },\r\n metallicFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"metallic\")],\r\n },\r\n roughnessFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"roughness\")],\r\n },\r\n baseColorTexture: {\r\n extensions: {\r\n KHR_texture_transform: {\r\n scale: {\r\n properties: [\r\n // MAY introduce set scale(Vector2) into texture.\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"albedoTexture.uScale\"),\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"albedoTexture.vScale\", getNextFloat),\r\n ],\r\n },\r\n offset: {\r\n properties: [\r\n // MAY introduce set offset(Vector2) into texture.\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"albedoTexture.uOffset\"),\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"albedoTexture.vOffset\", getNextFloat),\r\n ],\r\n },\r\n rotation: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"albedoTexture.wAng\", getMinusFloat)],\r\n },\r\n },\r\n },\r\n },\r\n },\r\n emissiveFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, \"emissiveColor\", getColor3)],\r\n },\r\n normalTexture: {\r\n scale: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"bumpTexture.level\")],\r\n },\r\n },\r\n occlusionTexture: {\r\n strength: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"ambientTextureStrength\")],\r\n },\r\n extensions: {\r\n KHR_texture_transform: {\r\n scale: {\r\n properties: [\r\n // MAY introduce set scale(Vector2) into texture.\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"ambientTexture.uScale\"),\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"ambientTexture.vScale\", getNextFloat),\r\n ],\r\n },\r\n offset: {\r\n properties: [\r\n // MAY introduce set offset(Vector2) into texture.\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"ambientTexture.uOffset\"),\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"ambientTexture.vOffset\", getNextFloat),\r\n ],\r\n },\r\n rotation: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"ambientTexture.wAng\", getMinusFloat)],\r\n },\r\n },\r\n },\r\n },\r\n emissiveTexture: {\r\n extensions: {\r\n KHR_texture_transform: {\r\n scale: {\r\n properties: [\r\n // MAY introduce set scale(Vector2) into texture.\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"emissiveTexture.uScale\"),\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"emissiveTexture.vScale\", getNextFloat),\r\n ],\r\n },\r\n offset: {\r\n properties: [\r\n // MAY introduce set offset(Vector2) into texture.\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"emissiveTexture.uOffset\"),\r\n new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"emissiveTexture.vOffset\", getNextFloat),\r\n ],\r\n },\r\n rotation: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"emissiveTexture.wAng\", getMinusFloat)],\r\n },\r\n },\r\n },\r\n },\r\n extensions: {\r\n KHR_materials_ior: {\r\n ior: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"indexOfRefraction\")],\r\n },\r\n },\r\n KHR_materials_clearcoat: {\r\n clearcoatFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.intensity\")],\r\n },\r\n clearcoatRoughnessFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"clearCoat.roughness\")],\r\n },\r\n },\r\n KHR_materials_sheen: {\r\n sheenColorFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, \"sheen.color\", getColor3)],\r\n },\r\n sheenRoughnessFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"sheen.roughness\")],\r\n },\r\n },\r\n KHR_materials_specular: {\r\n specularFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"metallicF0Factor\")],\r\n },\r\n specularColorFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, \"metallicReflectanceColor\", getColor3)],\r\n },\r\n },\r\n KHR_materials_emissive_strength: {\r\n emissiveStrength: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"emissiveIntensity\")],\r\n },\r\n },\r\n KHR_materials_transmission: {\r\n transmissionFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.refractionIntensity\")],\r\n },\r\n },\r\n KHR_materials_volume: {\r\n attenuationColor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, \"subSurface.tintColor\", getColor3)],\r\n },\r\n attenuationDistance: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.tintColorAtDistance\")],\r\n },\r\n thicknessFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"subSurface.maximumThickness\")],\r\n },\r\n },\r\n KHR_materials_iridescence: {\r\n iridescenceFactor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.intensity\")],\r\n },\r\n iridescenceIor: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.indexOfRefraction\")],\r\n },\r\n iridescenceThicknessMinimum: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.minimumThickness\")],\r\n },\r\n iridescenceThicknessMaximum: {\r\n properties: [new MaterialAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"iridescence.maximumThickness\")],\r\n },\r\n },\r\n },\r\n};\r\n\r\nconst CoreAnimationExtensionsPointerMap: any = {\r\n getTarget: getGltfExtension,\r\n KHR_lights_punctual: {\r\n isIndex: true,\r\n lights: {\r\n hasIndex: true, // we have an array of light into the extension.\r\n color: {\r\n properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_COLOR3, \"diffuse\", getColor3)],\r\n },\r\n intensity: {\r\n properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"intensity\")],\r\n },\r\n range: {\r\n properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"range\")],\r\n },\r\n spot: {\r\n innerConeAngle: {\r\n properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"innerAngle\", getFloatBy2)],\r\n },\r\n outerConeAngle: {\r\n properties: [new LightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, \"angle\", getFloatBy2)],\r\n },\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const CoreAnimationPointerMap: any = {\r\n nodes: CoreAnimationNodesPointerMap,\r\n materials: CoreAnimationMaterialsPointerMap,\r\n cameras: CoreAnimationCamerasPointerMap,\r\n extensions: CoreAnimationExtensionsPointerMap,\r\n};\r\n"]}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { AccessorType } from "babylonjs-gltf2interface";
|
2
|
-
/**
|
3
|
-
* Used internally to determine how much data to be gather from input buffer at each key frame.
|
4
|
-
* @param accessorType the accessor type
|
5
|
-
* @returns the number of item to be gather at each keyframe
|
6
|
-
*/
|
7
|
-
export declare function getDataAccessorElementCount(accessorType: AccessorType): 1 | 2 | 3 | 4 | 9 | 16;
|
@@ -1,23 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Used internally to determine how much data to be gather from input buffer at each key frame.
|
3
|
-
* @param accessorType the accessor type
|
4
|
-
* @returns the number of item to be gather at each keyframe
|
5
|
-
*/
|
6
|
-
export function getDataAccessorElementCount(accessorType) {
|
7
|
-
switch (accessorType) {
|
8
|
-
case "SCALAR" /* SCALAR */:
|
9
|
-
return 1;
|
10
|
-
case "VEC2" /* VEC2 */:
|
11
|
-
return 2;
|
12
|
-
case "VEC3" /* VEC3 */:
|
13
|
-
return 3;
|
14
|
-
case "VEC4" /* VEC4 */:
|
15
|
-
case "MAT2" /* MAT2 */:
|
16
|
-
return 4;
|
17
|
-
case "MAT3" /* MAT3 */:
|
18
|
-
return 9;
|
19
|
-
case "MAT4" /* MAT4 */:
|
20
|
-
return 16;
|
21
|
-
}
|
22
|
-
}
|
23
|
-
//# sourceMappingURL=glTFUtilities.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"glTFUtilities.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFUtilities.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,YAA0B;IAClE,QAAQ,YAAY,EAAE;QAClB;YACI,OAAO,CAAC,CAAC;QACb;YACI,OAAO,CAAC,CAAC;QACb;YACI,OAAO,CAAC,CAAC;QACb,uBAAuB;QACvB;YACI,OAAO,CAAC,CAAC;QACb;YACI,OAAO,CAAC,CAAC;QACb;YACI,OAAO,EAAE,CAAC;KACjB;AACL,CAAC","sourcesContent":["import { AccessorType } from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Used internally to determine how much data to be gather from input buffer at each key frame.\r\n * @param accessorType the accessor type\r\n * @returns the number of item to be gather at each keyframe\r\n */\r\nexport function getDataAccessorElementCount(accessorType: AccessorType) {\r\n switch (accessorType) {\r\n case AccessorType.SCALAR:\r\n return 1;\r\n case AccessorType.VEC2:\r\n return 2;\r\n case AccessorType.VEC3:\r\n return 3;\r\n case AccessorType.VEC4:\r\n case AccessorType.MAT2:\r\n return 4;\r\n case AccessorType.MAT3:\r\n return 9;\r\n case AccessorType.MAT4:\r\n return 16;\r\n }\r\n}\r\n"]}
|