Interface: ILoaderOptionsSchema

查看 llm.txt

最后一次编辑于 2026-10-22

指定继承自AssetLoader的自定义资源加载器,可以接受的的额外配置的schema。 在基础库版本v2.29.2以上导出。

比如使用CubeTextureLoader加载资源时:

<xr-asset-load
  type="cube-texture" asset-id="sky-cube" src="/assets/textures/skybox/"
  options="faces: right.jpg left.jpg top.jpg bottom.jpg front.jpg back.jpg"
/>

对应的schema接口为:

export interface ICubeTextureLoaderOptions {
  // left right top bottom front back
  faces: string[];
}
```ts

对应的`schema`为:
```ts
schema = {
  faces: {type: 'array'}
};

Indexable

▪ [key: string]: { defaultValue?: any ; type: string }