24 Artifact Type Object
The Artifact type object represents an asset that can be loaded into the space.
Artifact type is defined as
interface Artifact {
content: string // REQUIRED
type: ArtifactType // REQUIRED
metadata: Metadata // RECOMMENDED
}
where
contentis REQUIRED, and stores the content to be loaded into the scene.typeis REQUIRED, and its value MUST be of typeArtifactType. It specifies the artifact type ofcontentand therefore implies the possible loaders that an implementation can use to load thecontent.metadatais RECOMMENDED, and its value MUST be of typeMetadata. It stores relevant information about the asset. If it is not provided, the default MUST be used.
24.01 ArtifactType data
The ArtifactType indicates the artifact type of the asset and therefore the loader that the implementation needs to use to correctly load it. Modules can define more ArtifactType values than those specified in this section.
type ArtifactType = "model"
- For
modelartifact type, the implementation need to use aGLTFLoaderto load the content, following the glTF standard.
The artifact type, the type member of Artifact, and the ArtifactType type should not be confused with the JSON object type or JSON type. In this document, the single word "type" is reserved for JSON type.
24.02 Artifact Content
The artifact content, as specified in the content field of the Artifact object, MUST be a path or Uniform Resource Locator (URL) to the data that can be loaded by the loader and presented in the scene.
For artifact content of type "model", it is RECOMMENDED that the data be a model file following the GLTF standard. When loaded, such a model contains a local origin.