ModelAsset
Represents a raw model asset that can be loaded into the engine.
This record encapsulates the source of the model data (e.g., a file or stream), its name, and metadata. It provides methods to load and parse the model data into a usable format.
Since
2.0.0
Parameters
rawName
the original raw name or path of the asset
name
the sanitized, pack-compliant name of the asset
sizeAssume
the estimated size of the asset in bytes (0 if unknown)
supplier
a supplier for the input stream containing the model data
Constructors
Link copied to clipboard
@ApiStatus.Internal
Internal constructor for ModelAsset.
Types
Link copied to clipboard
interface StreamSupplier
A functional interface for supplying an input stream.
Functions
Link copied to clipboard
Link copied to clipboard
Creates a new ModelAsset from a file.
Creates a new ModelAsset from a path.
Creates a new ModelAsset from a name and byte array.
@NotNull
Creates a new ModelAsset from a name and stream supplier.
@NotNull
Creates a new ModelAsset from a name, stream supplier, and estimated size.
Link copied to clipboard
Loads and parses the model data from this asset.