Resource
array
Resource management component. Used to manage and describe various types of resources such as textures, models, audio, etc., for dynamic loading and use in projects.
resource-name
string
The name of the resource, used to uniquely identify the resource. For example "brick_texture", "car_model", etc.
resource-type
string
The type of resource, determining the classification of the resource. Internally, the corresponding loader will be selected based on the passed type.
Options
TEXTUREImage textureCUBE_TEXTURECube textureOBJOBJ file materialGLTFGLB file materialMP3MP3 file materialFONTFont package materialHDREnvironment map material
resource-path
string
The path to the resource file, indicating where the resource file is stored in the project or its URL. Uses relative paths by default, please place resources in the public folder.
resource-show
boolean
An optional boolean value used to indicate whether to display the resource. In some cases, you may want to control whether the resource is visible or has been loaded. Default value is true (if this value is not passed).