DVSceneAsset class final

A reference to a 3D asset, with what is needed to trust it.

Also the value a @DVModel.model3dField() holds, so a model and a scene describe an asset the same way.

Constructors

DVSceneAsset({required DVSceneAssetKind kind, required DVSceneAssetSource source, required String reference, String? sha256, int? byteLength, int? triangles, DVImage? poster})
const

Properties

byteLength → int?
final
hashCode → int
The hash code for this object.
no setteroverride
kind → DVSceneAssetKind
final
poster → DVImage?
The still shown where the scene cannot render.
final
reference → String
The bundle key, storage key or URL, depending on source.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sha256 → String?
Lower-case hex SHA-256 of the bytes. Required before a stored or network asset is loaded (see DVSceneAssetPolicy), because a key or a URL says where bytes are, not which bytes they are.
final
source → DVSceneAssetSource
final
triangles → int?
Triangles in the model's default scene, as counted at upload or import.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(Object? json, [String path = 'asset']) → DVSceneAsset?
Reads an asset from JSON; null reads as null, as a model field does.