An indexed container for 3D objects and associated information, such as transform hierarchies, meshes, cameras, and lights.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- Model I/O
You create a
MDLAsset object by loading data from a URL, and you can export an asset to any of several file formats. To access the objects contained in an asset, use Fast Enumeration, the
object method, or subscripting. Each object in an asset can be the root of a hierarchy of objects. To traverse that hierarchy, use an object’s
An asset may contain timed information, such as a series of mesh morphs. In such cases, the asset’s
frame property is nonzero and the
end properties indicate the range of sample times available in the asset data. For objects contained in the asset, you can use methods such as
bounding to access object properties at a specific time sample. Requesting a sample outside the time range clamps to the start or end sample. Some asset formats support continuous sampling with interpolation for times between the samples stored in the asset; other asset formats are discrete. For an asset with discrete time information, requesting a sample time that falls between the samples stored in the asset returns data for the immediately preceding time.