update skinning tests
This commit is contained in:
@@ -98,19 +98,24 @@ void main() async {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
group('animations', () {
|
group('Skinning & animations', () {
|
||||||
test('get bone names', () async {
|
test('get bone names', () async {
|
||||||
var model = await viewer.loadGlb("$testDir/assets/shapes.glb");
|
var model = await viewer.loadGlb("$testDir/assets/shapes.glb");
|
||||||
var names = await viewer.getBoneNames(model);
|
var names = await viewer.getBoneNames(model);
|
||||||
expect(names.first, "Bone");
|
expect(names.first, "Bone");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('reset bones', () async {
|
||||||
|
var model = await viewer.loadGlb("$testDir/assets/shapes.glb");
|
||||||
|
await viewer.resetBones(model);
|
||||||
|
});
|
||||||
test('set from BVH', () async {
|
test('set from BVH', () async {
|
||||||
var model = await viewer.loadGlb("$testDir/assets/shapes.glb");
|
var model = await viewer.loadGlb("$testDir/assets/shapes.glb");
|
||||||
var animation = BVHParser.parse(
|
var animation = BVHParser.parse(
|
||||||
File("$testDir/assets/animation.bvh").readAsStringSync(),
|
File("$testDir/assets/animation.bvh").readAsStringSync(),
|
||||||
["Cylinder"],
|
|
||||||
boneRegex: RegExp(r"Bone$"));
|
boneRegex: RegExp(r"Bone$"));
|
||||||
await viewer.addBoneAnimation(model, animation);
|
await viewer.addBoneAnimation(model, animation);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user