ModelVisuals class final

edu-07b: the path edu-07a's own doc comment names as the one prop does not close — a real glTF/.f3d asset, loaded the way every other modelled thing in this repo already loads one (decodeModelInIsolate + ModelAsset.fromDocument, fixture_visuals.dart's own _load), rather than a box or a cylinder standing in for it.

A model entity, not a second PropVisuals. doc/edu-00-interactive-format.md §6 and §11 already settle the shape: {"type": "model", "name": "engine-body", "at": [...], "asset": "assets/models/engine.f3d"}. What changes between a prop and this is not the entity's own contract — a name, a position, a yaw — but what backs it: one procedural MeshNode there, a whole decoded hierarchy of them here, most of them themselves named (ModelNode.name) and therefore addressable a level layer deeper than a prop ever needs to be — "engine-body#valve_cover", not just "engine-body".

Constructors

ModelVisuals(Scene scene, {required GraphicsDevice device, AssetSource source(String path)?, IssueSink? onIssue})

Properties

device → GraphicsDevice
final
hashCode → int
The hash code for this object.
no setterinherited
nodes → Map<String, SceneNode>
no setter
onIssue → IssueSink
final
restPositions → Map<String, Vector3>
Where each root stood as authored, the same contract PropVisuals.restPositions already keeps — built from the root only: a sub-node's rest pose is already carried by the model itself (ModelNode.translation), which is what an absent offsets entry for it already means.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scene → Scene
final

Methods

add(EntityDef entity) → Future<SceneNode?>
Decodes and instantiates entity's asset if it names a model; null and no effect otherwise, PropVisuals.add's own "not every entity is mine" contract. Awaited by the caller, not fired and forgotten the way FixtureVisuals._addModel is — a lesson's steps read a node's rest position the moment the level opens, so the model has to already be in the scene by the time LevelReady/LessonReady is emitted, not two frames later.
dispose() → void
Takes every model this built out of the scene and releases its uploads — FixtureVisuals.dispose's own contract for the models it caches, kept here for the ones this class owns outright rather than shares.
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

Constants

entityType → const String