TextureLoader
纹理加载器加载texture的一个类。 内部使用ImageLoader来加载文件。 texture在给material赋值的时候是微任务异步的,为了确保的修改属性在赋值前。
基础用法
纹理显示算法
属性控制
API
Attributes
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
type | 纹理类型 | TextureType | 'map' | Yes |
url | 构造函数参数 | string | '' | Yes |
load | 构造函数参数 | TextureLoaderOnLoad | () => undefined | No |
progress | 构造函数参数 | TextureLoaderOnProgress | () => undefined | No |
error | 构造函数参数 | TextureLoaderOnError | () => undefined | No |
options | 实例属性 | TextureLoaderOptions | {} | No |
Events
| Name | Description | Type |
|---|---|---|
load | 实例创建后触发方法 | Function |
managerLoad | LoadingManager方法 | Function |
managerStart | LoadingManager方法 | Function |
managerProgress | LoadingManager方法 | Function |
managerError | LoadingManager方法 | Function |
Slots
| Name | Description |
|---|---|
default | 默认插槽 |