Constructor
new SkyBoxPlugin(options)
Parameters:
Name | Type | Description |
---|---|---|
options |
object | 参数 |
Example
{
dir: 纹理贴图目录 例如:'assets/skybox/'
files: 盒子6个面的贴图,顺序为 px nx py ny pz nz ,注意通常全景图片采用左手坐标系,而threejs采用右手坐标系,如果遇到这样的情况,图片顺序为
['right.png','left.png','top.png','bottom.png','front.png','back.png']
}
Methods
clear()
移除天空盒,恢复原始背景
enable(enable)
开启/关闭天空盒
Parameters:
Name | Type | Default | Description |
---|---|---|---|
enable |
* | true |
enableEnvironment(enable)
开启/关闭环境贴图
Parameters:
Name | Type | Default | Description |
---|---|---|---|
enable |
* | true |