@babylonjs/loaders 5.21.0 → 5.22.0
Sign up to get free protection for your applications and to get access to all the features.
- package/OBJ/mtlFileLoader.js +25 -27
- package/OBJ/mtlFileLoader.js.map +1 -1
- package/OBJ/objFileLoader.js +112 -124
- package/OBJ/objFileLoader.js.map +1 -1
- package/OBJ/solidParser.js +118 -125
- package/OBJ/solidParser.js.map +1 -1
- package/STL/stlFileLoader.js +61 -63
- package/STL/stlFileLoader.js.map +1 -1
- package/glTF/1.0/glTFBinaryExtension.js +26 -30
- package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
- package/glTF/1.0/glTFLoader.js +409 -432
- package/glTF/1.0/glTFLoader.js.map +1 -1
- package/glTF/1.0/glTFLoaderUtils.js +33 -37
- package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.js +27 -31
- package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +48 -59
- package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +24 -29
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +13 -16
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_texture_webp.js +13 -16
- package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +22 -26
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.js +63 -76
- package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.map.js +90 -120
- package/glTF/2.0/Extensions/KHR_animation_pointer.map.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +25 -28
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +27 -30
- package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +25 -28
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +15 -18
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.js +21 -24
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js +27 -31
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +24 -27
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +23 -26
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_specular.js +23 -26
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_translucency.js +20 -23
- package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +82 -86
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +19 -22
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_variants.js +79 -97
- package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.js +20 -23
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js +6 -8
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_basisu.js +13 -16
- package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_transform.js +12 -15
- package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +12 -15
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +77 -95
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_lod.js +114 -139
- package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +12 -15
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +12 -15
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
- package/glTF/2.0/glTFLoader.js +739 -823
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/glTFFileLoader.js +337 -404
- package/glTF/glTFFileLoader.js.map +1 -1
- package/glTF/glTFValidation.js +32 -39
- package/glTF/glTFValidation.js.map +1 -1
- package/legacy/legacy-glTF.js +3 -3
- package/legacy/legacy-glTF.js.map +1 -1
- package/legacy/legacy-glTF1.js +2 -2
- package/legacy/legacy-glTF1.js.map +1 -1
- package/legacy/legacy-glTF2.js +12 -12
- package/legacy/legacy-glTF2.js.map +1 -1
- package/legacy/legacy-objFileLoader.js +2 -2
- package/legacy/legacy-objFileLoader.js.map +1 -1
- package/legacy/legacy-stlFileLoader.js +2 -2
- package/legacy/legacy-stlFileLoader.js.map +1 -1
- package/package.json +3 -6
@@ -1,97 +1,95 @@
|
|
1
|
-
import { __extends } from "tslib";
|
2
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
3
2
|
import { Animation } from "@babylonjs/core/Animations/animation.js";
|
4
3
|
import { Quaternion, Vector3, Matrix } from "@babylonjs/core/Maths/math.vector.js";
|
5
4
|
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
6
5
|
import { Material } from "@babylonjs/core/Materials/material.js";
|
7
|
-
|
8
|
-
|
6
|
+
const parseIntIndex = (str) => {
|
7
|
+
const targetIndex = parseInt(str);
|
9
8
|
if (isNaN(targetIndex)) {
|
10
9
|
return -1;
|
11
10
|
}
|
12
11
|
return targetIndex;
|
13
12
|
};
|
14
|
-
|
13
|
+
const getGltfNode = (gltf, index) => {
|
15
14
|
if (gltf.nodes) {
|
16
|
-
|
15
|
+
const i = parseIntIndex(index);
|
17
16
|
if (i != -1) {
|
18
17
|
return gltf.nodes[i];
|
19
18
|
}
|
20
19
|
}
|
21
20
|
return null;
|
22
21
|
};
|
23
|
-
|
22
|
+
const getGltfMaterial = (gltf, index) => {
|
24
23
|
if (gltf.materials) {
|
25
|
-
|
24
|
+
const i = parseIntIndex(index);
|
26
25
|
if (i != -1) {
|
27
26
|
return gltf.materials[i];
|
28
27
|
}
|
29
28
|
}
|
30
29
|
return null;
|
31
30
|
};
|
32
|
-
|
31
|
+
const getGltfCamera = (gltf, index) => {
|
33
32
|
if (gltf.cameras) {
|
34
|
-
|
33
|
+
const i = parseIntIndex(index);
|
35
34
|
if (i != -1) {
|
36
35
|
return gltf.cameras[i];
|
37
36
|
}
|
38
37
|
}
|
39
38
|
return null;
|
40
39
|
};
|
41
|
-
|
40
|
+
const getGltfExtension = (gltf, index) => {
|
42
41
|
if (gltf.extensions && index) {
|
43
42
|
return gltf.extensions[index];
|
44
43
|
}
|
45
44
|
return null;
|
46
45
|
};
|
47
|
-
|
46
|
+
const getMatrix = (_target, source, offset, scale) => {
|
48
47
|
return scale ? Matrix.FromArray(source, offset).scale(scale) : Matrix.FromArray(source, offset);
|
49
48
|
};
|
50
|
-
|
49
|
+
const getVector3 = (_target, source, offset, scale) => {
|
51
50
|
return scale ? Vector3.FromArray(source, offset).scaleInPlace(scale) : Vector3.FromArray(source, offset);
|
52
51
|
};
|
53
|
-
|
52
|
+
const getQuaternion = (_target, source, offset, scale) => {
|
54
53
|
return scale ? Quaternion.FromArray(source, offset).scaleInPlace(scale) : Quaternion.FromArray(source, offset);
|
55
54
|
};
|
56
|
-
|
55
|
+
const getColor3 = (_target, source, offset, scale) => {
|
57
56
|
return scale ? Color3.FromArray(source, offset).scale(scale) : Color3.FromArray(source, offset);
|
58
57
|
};
|
59
|
-
|
58
|
+
const getAlpha = (_target, source, offset, scale) => {
|
60
59
|
return scale ? source[offset + 3] * scale : source[offset + 3];
|
61
60
|
};
|
62
|
-
|
61
|
+
const getFloat = (_target, source, offset, scale) => {
|
63
62
|
return scale ? source[offset] * scale : source[offset];
|
64
63
|
};
|
65
|
-
|
64
|
+
const getMinusFloat = (_target, source, offset, scale) => {
|
66
65
|
return -(scale ? source[offset] * scale : source[offset]);
|
67
66
|
};
|
68
|
-
|
67
|
+
const getNextFloat = (_target, source, offset, scale) => {
|
69
68
|
return scale ? source[offset + 1] * scale : source[offset + 1];
|
70
69
|
};
|
71
|
-
|
70
|
+
const getFloatBy2 = (_target, source, offset, scale) => {
|
72
71
|
return (scale ? source[offset] * scale : source[offset]) * 2;
|
73
72
|
};
|
74
|
-
|
73
|
+
const getWeights = (target, source, offset, scale) => {
|
75
74
|
if (target._numMorphTargets) {
|
76
|
-
|
77
|
-
for (
|
75
|
+
const value = new Array(target._numMorphTargets);
|
76
|
+
for (let i = 0; i < target._numMorphTargets; i++) {
|
78
77
|
value[i] = scale ? source[offset++] * scale : source[offset++];
|
79
78
|
}
|
80
79
|
return value;
|
81
80
|
}
|
82
81
|
return null;
|
83
82
|
};
|
84
|
-
|
85
|
-
|
83
|
+
class AbstractAnimationPointerPropertyInfos {
|
84
|
+
constructor(type, name, get) {
|
86
85
|
this.type = type;
|
87
86
|
this.name = name;
|
88
87
|
this.get = get;
|
89
88
|
}
|
90
|
-
|
91
|
-
if (animationTargetOverride === void 0) { animationTargetOverride = null; }
|
89
|
+
_buildAnimation(animatable, fps, keys, babylonAnimationGroup, animationTargetOverride = null) {
|
92
90
|
if (animatable || animationTargetOverride) {
|
93
|
-
|
94
|
-
|
91
|
+
const animationName = `${babylonAnimationGroup.name}_channel${babylonAnimationGroup.targetedAnimations.length}_${this.name}`;
|
92
|
+
const babylonAnimation = new Animation(animationName, this.name, fps, this.type);
|
95
93
|
babylonAnimation.setKeys(keys);
|
96
94
|
if (animationTargetOverride != null && animationTargetOverride.animations != null) {
|
97
95
|
animationTargetOverride.animations.push(babylonAnimation);
|
@@ -103,129 +101,101 @@ var AbstractAnimationPointerPropertyInfos = /** @class */ (function () {
|
|
103
101
|
babylonAnimationGroup.addTargetedAnimation(babylonAnimation, animatable);
|
104
102
|
}
|
105
103
|
}
|
106
|
-
}
|
107
|
-
|
104
|
+
}
|
105
|
+
isValid(_target) {
|
108
106
|
return true;
|
109
|
-
};
|
110
|
-
return AbstractAnimationPointerPropertyInfos;
|
111
|
-
}());
|
112
|
-
var TransformNodeAnimationPointerPropertyInfos = /** @class */ (function (_super) {
|
113
|
-
__extends(TransformNodeAnimationPointerPropertyInfos, _super);
|
114
|
-
function TransformNodeAnimationPointerPropertyInfos(type, name, get) {
|
115
|
-
if (get === void 0) { get = getVector3; }
|
116
|
-
return _super.call(this, type, name, get) || this;
|
117
107
|
}
|
118
|
-
|
108
|
+
}
|
109
|
+
class TransformNodeAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
110
|
+
constructor(type, name, get = getVector3) {
|
111
|
+
super(type, name, get);
|
112
|
+
}
|
113
|
+
isValid(target) {
|
119
114
|
return target._babylonTransformNode !== null && target._babylonTransformNode !== undefined;
|
120
|
-
}
|
121
|
-
|
122
|
-
if (animationTargetOverride === void 0) { animationTargetOverride = null; }
|
115
|
+
}
|
116
|
+
buildAnimations(target, fps, keys, group, animationTargetOverride = null) {
|
123
117
|
return this._buildAnimation(target._babylonTransformNode, fps, keys, group, animationTargetOverride);
|
124
|
-
};
|
125
|
-
return TransformNodeAnimationPointerPropertyInfos;
|
126
|
-
}(AbstractAnimationPointerPropertyInfos));
|
127
|
-
var CameraAnimationPointerPropertyInfos = /** @class */ (function (_super) {
|
128
|
-
__extends(CameraAnimationPointerPropertyInfos, _super);
|
129
|
-
function CameraAnimationPointerPropertyInfos(type, name, get) {
|
130
|
-
if (get === void 0) { get = getFloat; }
|
131
|
-
return _super.call(this, type, name, get) || this;
|
132
118
|
}
|
133
|
-
|
119
|
+
}
|
120
|
+
class CameraAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
121
|
+
constructor(type, name, get = getFloat) {
|
122
|
+
super(type, name, get);
|
123
|
+
}
|
124
|
+
isValid(target) {
|
134
125
|
return target._babylonCamera != null && target._babylonCamera !== undefined;
|
135
|
-
}
|
136
|
-
|
137
|
-
if (animationTargetOverride === void 0) { animationTargetOverride = null; }
|
126
|
+
}
|
127
|
+
buildAnimations(target, fps, keys, group, animationTargetOverride = null) {
|
138
128
|
return this._buildAnimation(target._babylonCamera, fps, keys, group, animationTargetOverride);
|
139
|
-
};
|
140
|
-
return CameraAnimationPointerPropertyInfos;
|
141
|
-
}(AbstractAnimationPointerPropertyInfos));
|
142
|
-
var MaterialAnimationPointerPropertyInfos = /** @class */ (function (_super) {
|
143
|
-
__extends(MaterialAnimationPointerPropertyInfos, _super);
|
144
|
-
function MaterialAnimationPointerPropertyInfos(type, name, get, fillMode) {
|
145
|
-
if (get === void 0) { get = getFloat; }
|
146
|
-
if (fillMode === void 0) { fillMode = Material.TriangleFillMode; }
|
147
|
-
var _this = _super.call(this, type, name, get) || this;
|
148
|
-
_this.fillMode = fillMode;
|
149
|
-
return _this;
|
150
129
|
}
|
151
|
-
|
152
|
-
|
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;
|
153
138
|
if (data) {
|
154
|
-
|
139
|
+
const c = data[this.fillMode];
|
155
140
|
if (c) {
|
156
141
|
return c.babylonMaterial !== null && c.babylonMaterial !== undefined;
|
157
142
|
}
|
158
143
|
}
|
159
144
|
return false;
|
160
|
-
}
|
161
|
-
|
162
|
-
if (animationTargetOverride === void 0) { animationTargetOverride = null; }
|
145
|
+
}
|
146
|
+
buildAnimations(target, fps, keys, group, animationTargetOverride = null) {
|
163
147
|
return this._buildAnimation(target._data[this.fillMode].babylonMaterial, fps, keys, group, animationTargetOverride);
|
164
|
-
};
|
165
|
-
return MaterialAnimationPointerPropertyInfos;
|
166
|
-
}(AbstractAnimationPointerPropertyInfos));
|
167
|
-
var LightAnimationPointerPropertyInfos = /** @class */ (function (_super) {
|
168
|
-
__extends(LightAnimationPointerPropertyInfos, _super);
|
169
|
-
function LightAnimationPointerPropertyInfos(type, name, get) {
|
170
|
-
if (get === void 0) { get = getFloat; }
|
171
|
-
return _super.call(this, type, name, get) || this;
|
172
148
|
}
|
173
|
-
|
149
|
+
}
|
150
|
+
class LightAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
151
|
+
constructor(type, name, get = getFloat) {
|
152
|
+
super(type, name, get);
|
153
|
+
}
|
154
|
+
isValid(target) {
|
174
155
|
return target && target.length != 0;
|
175
|
-
}
|
156
|
+
}
|
176
157
|
// note : the extensions array store directly the BabylonLight reference
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
var l = i >= 0 && i < target.lights.length ? target.lights[i] : null;
|
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;
|
181
161
|
return this._buildAnimation(l._babylonLight, fps, keys, group, animationTargetOverride);
|
182
|
-
};
|
183
|
-
return LightAnimationPointerPropertyInfos;
|
184
|
-
}(AbstractAnimationPointerPropertyInfos));
|
185
|
-
var WeightAnimationPointerPropertyInfos = /** @class */ (function (_super) {
|
186
|
-
__extends(WeightAnimationPointerPropertyInfos, _super);
|
187
|
-
function WeightAnimationPointerPropertyInfos(type, name, get) {
|
188
|
-
if (get === void 0) { get = getWeights; }
|
189
|
-
return _super.call(this, type, name, get) || this;
|
190
162
|
}
|
191
|
-
|
163
|
+
}
|
164
|
+
class WeightAnimationPointerPropertyInfos extends AbstractAnimationPointerPropertyInfos {
|
165
|
+
constructor(type, name, get = getWeights) {
|
166
|
+
super(type, name, get);
|
167
|
+
}
|
168
|
+
isValid(target) {
|
192
169
|
return target._numMorphTargets;
|
193
|
-
}
|
194
|
-
|
195
|
-
if (_animationTargetOverride === void 0) { _animationTargetOverride = null; }
|
170
|
+
}
|
171
|
+
buildAnimations(targetNode, fps, keys, babylonAnimationGroup, _animationTargetOverride = null) {
|
196
172
|
if (targetNode._numMorphTargets) {
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
babylonAnimation.setKeys(keys.map(
|
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) => ({
|
201
177
|
frame: key.frame,
|
202
178
|
inTangent: key.inTangent ? key.inTangent[targetIndex] : undefined,
|
203
179
|
value: key.value[targetIndex],
|
204
180
|
outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined,
|
205
181
|
interpolation: key.interpolation,
|
206
|
-
})
|
182
|
+
})));
|
207
183
|
if (targetNode._primitiveBabylonMeshes) {
|
208
|
-
for (
|
209
|
-
|
210
|
-
var babylonMesh = m;
|
184
|
+
for (const m of targetNode._primitiveBabylonMeshes) {
|
185
|
+
const babylonMesh = m;
|
211
186
|
if (babylonMesh.morphTargetManager) {
|
212
|
-
|
213
|
-
|
187
|
+
const morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
|
188
|
+
const babylonAnimationClone = babylonAnimation.clone();
|
214
189
|
morphTarget.animations.push(babylonAnimationClone);
|
215
190
|
babylonAnimationGroup.addTargetedAnimation(babylonAnimationClone, morphTarget);
|
216
191
|
}
|
217
192
|
}
|
218
193
|
}
|
219
|
-
};
|
220
|
-
var this_1 = this;
|
221
|
-
for (var targetIndex = 0; targetIndex < targetNode._numMorphTargets; targetIndex++) {
|
222
|
-
_loop_1(targetIndex);
|
223
194
|
}
|
224
195
|
}
|
225
|
-
}
|
226
|
-
|
227
|
-
|
228
|
-
var CoreAnimationNodesPointerMap = {
|
196
|
+
}
|
197
|
+
}
|
198
|
+
const CoreAnimationNodesPointerMap = {
|
229
199
|
getTarget: getGltfNode,
|
230
200
|
hasIndex: true,
|
231
201
|
matrix: {
|
@@ -241,13 +211,13 @@ var CoreAnimationNodesPointerMap = {
|
|
241
211
|
properties: [new TransformNodeAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_VECTOR3, "scaling")],
|
242
212
|
},
|
243
213
|
weights: {
|
244
|
-
getStride:
|
214
|
+
getStride: (target) => {
|
245
215
|
return target._numMorphTargets;
|
246
216
|
},
|
247
217
|
properties: [new WeightAnimationPointerPropertyInfos(Animation.ANIMATIONTYPE_FLOAT, "influence")],
|
248
218
|
},
|
249
219
|
};
|
250
|
-
|
220
|
+
const CoreAnimationCamerasPointerMap = {
|
251
221
|
hasIndex: true,
|
252
222
|
getTarget: getGltfCamera,
|
253
223
|
orthographic: {
|
@@ -285,7 +255,7 @@ var CoreAnimationCamerasPointerMap = {
|
|
285
255
|
},
|
286
256
|
},
|
287
257
|
};
|
288
|
-
|
258
|
+
const CoreAnimationMaterialsPointerMap = {
|
289
259
|
hasIndex: true,
|
290
260
|
getTarget: getGltfMaterial,
|
291
261
|
pbrMetallicRoughness: {
|
@@ -449,7 +419,7 @@ var CoreAnimationMaterialsPointerMap = {
|
|
449
419
|
},
|
450
420
|
},
|
451
421
|
};
|
452
|
-
|
422
|
+
const CoreAnimationExtensionsPointerMap = {
|
453
423
|
getTarget: getGltfExtension,
|
454
424
|
KHR_lights_punctual: {
|
455
425
|
isIndex: true,
|
@@ -475,7 +445,7 @@ var CoreAnimationExtensionsPointerMap = {
|
|
475
445
|
},
|
476
446
|
},
|
477
447
|
};
|
478
|
-
export
|
448
|
+
export const CoreAnimationPointerMap = {
|
479
449
|
nodes: CoreAnimationNodesPointerMap,
|
480
450
|
materials: CoreAnimationMaterialsPointerMap,
|
481
451
|
cameras: CoreAnimationCamerasPointerMap,
|
@@ -1 +1 @@
|
|
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,IAAM,aAAa,GAAG,UAAC,GAAW;IAC9B,IAAM,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,IAAM,WAAW,GAAwB,UAAC,IAAW,EAAE,KAAa;IAChE,IAAI,IAAI,CAAC,KAAK,EAAE;QACZ,IAAM,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,CAAC;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K,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
|
+
{"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,CAAC;AAEF,MAAM,eAAe,GAAwB,CAAC,IAAW,EAAE,KAAa,EAAE,EAAE;IACxE,IAAI,IAAI,CAAC,SAAS,EAAE;QAChB,MAAM,CAAC,GAAG,aAAa,CAAC,KAAK,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I,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"]}
|