MemoryModelSource class
Wraps already-loaded .glb bytes, for models fetched by the app (a
network download, a local cache, generated content).
key must uniquely identify the bytes; the widget reloads when the key changes, not when the buffer instance does. The buffer stays referenced while the widget is mounted, since an unmount/remount cycle re-imports from it after the shared template is evicted.
- Inheritance
-
- Object
- SceneModelSource
- MemoryModelSource
Constructors
- MemoryModelSource(Uint8List bytes, {required String key})
-
const
Properties
- bytes → Uint8List
-
The
.glbfile contents.final - cacheKey → String
-
Identifies the model. A rebuild whose source has the same key keeps the
loaded model; a different key discards it and loads the new source.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
Uniquely identifies bytes for diffing.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createNode(
) → Future< Node> -
Loads and imports the model, producing the shared template node tree.
inherited
-
load(
) → Future< Uint8List> -
Loads the model's
.glbbytes.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited