@babylonjs/loaders 5.0.0-beta.8 → 5.0.0-beta.9
Sign up to get free protection for your applications and to get access to all the features.
package/glTF/2.0/glTFLoader.js
CHANGED
@@ -1244,34 +1244,34 @@ var GLTFLoader = /** @class */ (function () {
|
|
1244
1244
|
var getNextOutputValue;
|
1245
1245
|
switch (targetPath) {
|
1246
1246
|
case "position": {
|
1247
|
-
getNextOutputValue = function () {
|
1248
|
-
var value = Vector3.FromArray(data.output, outputBufferOffset);
|
1247
|
+
getNextOutputValue = function (scale) {
|
1248
|
+
var value = Vector3.FromArray(data.output, outputBufferOffset).scaleInPlace(scale);
|
1249
1249
|
outputBufferOffset += 3;
|
1250
1250
|
return value;
|
1251
1251
|
};
|
1252
1252
|
break;
|
1253
1253
|
}
|
1254
1254
|
case "rotationQuaternion": {
|
1255
|
-
getNextOutputValue = function () {
|
1256
|
-
var value = Quaternion.FromArray(data.output, outputBufferOffset);
|
1255
|
+
getNextOutputValue = function (scale) {
|
1256
|
+
var value = Quaternion.FromArray(data.output, outputBufferOffset).scaleInPlace(scale);
|
1257
1257
|
outputBufferOffset += 4;
|
1258
1258
|
return value;
|
1259
1259
|
};
|
1260
1260
|
break;
|
1261
1261
|
}
|
1262
1262
|
case "scaling": {
|
1263
|
-
getNextOutputValue = function () {
|
1264
|
-
var value = Vector3.FromArray(data.output, outputBufferOffset);
|
1263
|
+
getNextOutputValue = function (scale) {
|
1264
|
+
var value = Vector3.FromArray(data.output, outputBufferOffset).scaleInPlace(scale);
|
1265
1265
|
outputBufferOffset += 3;
|
1266
1266
|
return value;
|
1267
1267
|
};
|
1268
1268
|
break;
|
1269
1269
|
}
|
1270
1270
|
case "influence": {
|
1271
|
-
getNextOutputValue = function () {
|
1271
|
+
getNextOutputValue = function (scale) {
|
1272
1272
|
var value = new Array(targetNode._numMorphTargets);
|
1273
1273
|
for (var i = 0; i < targetNode._numMorphTargets; i++) {
|
1274
|
-
value[i] = data.output[outputBufferOffset++];
|
1274
|
+
value[i] = data.output[outputBufferOffset++] * scale;
|
1275
1275
|
}
|
1276
1276
|
return value;
|
1277
1277
|
};
|
@@ -1283,7 +1283,7 @@ var GLTFLoader = /** @class */ (function () {
|
|
1283
1283
|
case "STEP" /* STEP */: {
|
1284
1284
|
getNextKey = function (frameIndex) { return ({
|
1285
1285
|
frame: data.input[frameIndex] * _this.parent.targetFps,
|
1286
|
-
value: getNextOutputValue(),
|
1286
|
+
value: getNextOutputValue(1),
|
1287
1287
|
interpolation: AnimationKeyInterpolation.STEP
|
1288
1288
|
}); };
|
1289
1289
|
break;
|
@@ -1291,16 +1291,17 @@ var GLTFLoader = /** @class */ (function () {
|
|
1291
1291
|
case "LINEAR" /* LINEAR */: {
|
1292
1292
|
getNextKey = function (frameIndex) { return ({
|
1293
1293
|
frame: data.input[frameIndex] * _this.parent.targetFps,
|
1294
|
-
value: getNextOutputValue()
|
1294
|
+
value: getNextOutputValue(1)
|
1295
1295
|
}); };
|
1296
1296
|
break;
|
1297
1297
|
}
|
1298
1298
|
case "CUBICSPLINE" /* CUBICSPLINE */: {
|
1299
|
+
var invTargetFps_1 = 1 / _this.parent.targetFps;
|
1299
1300
|
getNextKey = function (frameIndex) { return ({
|
1300
1301
|
frame: data.input[frameIndex] * _this.parent.targetFps,
|
1301
|
-
inTangent: getNextOutputValue(),
|
1302
|
-
value: getNextOutputValue(),
|
1303
|
-
outTangent: getNextOutputValue()
|
1302
|
+
inTangent: getNextOutputValue(invTargetFps_1),
|
1303
|
+
value: getNextOutputValue(1),
|
1304
|
+
outTangent: getNextOutputValue(invTargetFps_1)
|
1304
1305
|
}); };
|
1305
1306
|
break;
|
1306
1307
|
}
|