SceneModel constructor
SceneModel(
- String assetPath, {
- Key? key,
- String? variant,
- List<
SceneAnimationSpec> animations = const [], - WidgetBuilder? placeholder,
- Widget error(
- BuildContext context,
- Object error
- void onLoaded(
- Node modelRoot
- String? name,
- Vector3? position,
- Quaternion? rotation,
- Vector3? scale,
- Matrix4? transform,
- bool visible = true,
- List<
Component> components = const [], - SceneNodeController? controller,
- List<
Widget> children = const [],
Loads the model from the asset bundle at assetPath.
Not const because the source is derived; use SceneModel.from with a const AssetModelSource when const construction matters.
Implementation
SceneModel(
String assetPath, {
super.key,
this.variant,
this.animations = const [],
this.placeholder,
this.error,
this.onLoaded,
super.name,
super.position,
super.rotation,
super.scale,
super.transform,
super.visible,
super.components,
super.controller,
super.children,
}) : source = AssetModelSource(assetPath);