add setBoneTransform method

This commit is contained in:
Nick Fisher
2023-11-17 16:40:17 +08:00
parent daf319bf2c
commit f5d5a36f22
13 changed files with 182 additions and 70 deletions

View File

@@ -55,6 +55,17 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
.transformToUnitCube(ExampleWidgetState.shapes!);
},
child: const Text('Transform to unit cube')),
MenuItemButton(
onPressed: ExampleWidgetState.shapes == null
? null
: () async {
await widget.controller.setBoneTransform(
ExampleWidgetState.shapes!,
"Cylinder",
0,
Matrix4.rotationX(pi / 2));
},
child: const Text('Set bone tranform to identity for Cylinder')),
MenuItemButton(
onPressed: () async {
var names = await widget.controller