SceneView constructor
const
SceneView(
- Scene scene, {
- Key? key,
- Camera? camera,
- SceneCameraBuilder? cameraBuilder,
- SceneViewsBuilder? viewsBuilder,
- bool autoTick = true,
- double? pixelRatio,
- SceneTickCallback? onTick,
- ResourceGroup? loading,
- SceneLoadingBuilder? loadingBuilder,
- Duration revealMinDuration = Duration.zero,
- bool warmUp = false,
- bool debugWidgetInput = false,
- List<
Widget> children = const [],
Renders scene, driving a repaint each frame.
At most one of camera, cameraBuilder, or viewsBuilder may be
provided. When none is, the view renders through the scene's primary
camera (Scene.camera), falling back to a default camera when the scene
has none, so SceneView(scene) always renders something.
Implementation
const SceneView(
Scene this.scene, {
super.key,
this.camera,
this.cameraBuilder,
this.viewsBuilder,
this.autoTick = true,
this.pixelRatio,
this.onTick,
this.loading,
this.loadingBuilder,
this.revealMinDuration = Duration.zero,
this.warmUp = false,
this.debugWidgetInput = false,
this.children = const [],
}) : environment = null,
environmentIntensity = 1.0,
exposure = 1.0,
toneMapping = null,
assert(
(camera != null ? 1 : 0) +
(cameraBuilder != null ? 1 : 0) +
(viewsBuilder != null ? 1 : 0) <=
1,
'Provide at most one of camera, cameraBuilder, or viewsBuilder.',
);