Flix3DScene class

A mutable scene entity collection; rendering is provided by a renderer backend.

Inheritance

Constructors

Flix3DScene({String name = 'Untitled'})
Creates an empty scene with the given name.

Properties

entities → List<Flix3DEntity>
Immutable snapshot of the entities in insertion order.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
name → String
Scene display name.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addEntity({required String id, required String name, Flix3DTransform transform = const Flix3DTransform(), Flix3DCamera? camera, Flix3DDirectionalLight? directionalLight}) → Flix3DEntity
Adds an entity and notifies listeners.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clear() → void
Removes all entities and notifies listeners if the scene changed.
dispose() → void
Discards any resources used by the object.
inherited
entity(String id) → Flix3DEntity?
Returns the entity with id, or null when it is not in this scene.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeEntity(String id) → bool
Removes id, returning whether an entity was removed.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() → String
A string representation of this object.
inherited
updateEntity(String id, {String? name, Flix3DTransform? transform, Flix3DCamera? camera, Flix3DDirectionalLight? directionalLight, bool removeCamera = false, bool removeDirectionalLight = false}) → Flix3DEntity
Replaces the named entity with a copy and notifies listeners.

Operators

operator ==(Object other) → bool
The equality operator.
inherited