Merge branch 'develop' of github.com:nmfisher/polyvox_filament into develop
This commit is contained in:
@@ -44,11 +44,14 @@ class ExampleWidget extends StatefulWidget {
|
|||||||
|
|
||||||
class _ExampleWidgetState extends State<ExampleWidget> {
|
class _ExampleWidgetState extends State<ExampleWidget> {
|
||||||
FilamentController? _filamentController;
|
FilamentController? _filamentController;
|
||||||
|
|
||||||
FilamentEntity? _shapes;
|
FilamentEntity? _shapes;
|
||||||
FilamentEntity? _flightHelmet;
|
FilamentEntity? _flightHelmet;
|
||||||
List<String>? _animations;
|
FilamentEntity? _buster;
|
||||||
FilamentEntity? _light;
|
FilamentEntity? _light;
|
||||||
|
|
||||||
|
List<String>? _animations;
|
||||||
|
|
||||||
StreamSubscription? _pickResultListener;
|
StreamSubscription? _pickResultListener;
|
||||||
String? picked;
|
String? picked;
|
||||||
|
|
||||||
@@ -356,6 +359,34 @@ class _ExampleWidgetState extends State<ExampleWidget> {
|
|||||||
});
|
});
|
||||||
_filamentController!.setViewFrustumCulling(_frustumCulling);
|
_filamentController!.setViewFrustumCulling(_frustumCulling);
|
||||||
}, "${_frustumCulling ? "Disable" : "Enable"} frustum culling"));
|
}, "${_frustumCulling ? "Disable" : "Enable"} frustum culling"));
|
||||||
|
|
||||||
|
children.addAll([
|
||||||
|
_item(() async {
|
||||||
|
await Permission.microphone.request();
|
||||||
|
}, "request permissions (tests inactive->resume)"),
|
||||||
|
_item(() async {
|
||||||
|
if (_buster != null) {
|
||||||
|
await _filamentController!.removeAsset(_buster!);
|
||||||
|
}
|
||||||
|
_buster = await (_filamentController as FilamentControllerFFI)
|
||||||
|
.loadGltf("assets/BusterDrone/scene.gltf", "assets/BusterDrone",
|
||||||
|
force: true);
|
||||||
|
await _filamentController!.playAnimation(_buster!, 0, loop: true);
|
||||||
|
}, "load buster")
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_animations != null) {
|
||||||
|
children.addAll(_animations!.map((a) => _item(() {
|
||||||
|
_filamentController!.playAnimation(
|
||||||
|
_shapes!, _animations!.indexOf(a),
|
||||||
|
replaceActive: true, crossfade: 0.5, loop: _loop);
|
||||||
|
}, "play animation ${_animations!.indexOf(a)} (replace/fade)")));
|
||||||
|
children.addAll(_animations!.map((a) => _item(() {
|
||||||
|
_filamentController!.playAnimation(
|
||||||
|
_shapes!, _animations!.indexOf(a),
|
||||||
|
replaceActive: false, loop: _loop);
|
||||||
|
}, "play animation ${_animations!.indexOf(a)} (noreplace)")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Stack(children: [
|
return Stack(children: [
|
||||||
|
|||||||
Reference in New Issue
Block a user