add support for multiple bone animations using quaternions

This commit is contained in:
Nick Fisher
2023-11-17 23:44:30 +08:00
parent f5d5a36f22
commit 572a945025
13 changed files with 1266 additions and 1254 deletions

View File

@@ -1,5 +1,7 @@
import 'dart:typed_data';
import 'package:vector_math/vector_math_64.dart';
///
/// Specifies frame data (i.e. weights) to animate the morph targets contained in [morphTargets] under a mesh named [mesh].
/// [data] is laid out as numFrames x numMorphTargets.
@@ -40,7 +42,7 @@ class MorphAnimationData {
class BoneAnimationData {
final String boneName;
final List<String> meshNames;
final Float32List frameData;
final List<Quaternion> frameData;
double frameLengthInMs;
BoneAnimationData(
this.boneName, this.meshNames, this.frameData, this.frameLengthInMs);