Appearance
skyUtils
SkyUtils
Kind: global class
new SkyUtils()
天空盒
SkyUtils.createSky(radius, widthSegments, heightSegments, skyCenter) ⇒ fthree.Mesh
创建带地平线渐变的天空
Kind: static method of SkyUtils
Returns: fthree.Mesh - sky
| Param | Type | Description |
|---|---|---|
| radius | number | 半径 推荐 radius 最小值为 4000,最大值为 20000 |
| widthSegments | number | - 宽度段 |
| heightSegments | number | 高度段 |
| skyCenter | fthree.Vector3 | 天空中心 |
SkyUtils.createSkyFromTextures(url) ⇒ THREE.Texture
贴图天空盒
Kind: static method of SkyUtils
Returns: THREE.Texture - 天空纹理
| Param | Type | Description |
|---|---|---|
| url | string | 贴图路径 |
SkyUtils.createSphereSkyBox(radius, map, positions) ⇒ THREE.Mesh
球形贴图天空
Kind: static method of SkyUtils
Returns: THREE.Mesh - sky
| Param | Type | Description |
|---|---|---|
| radius | number | 半径 |
| map | string | 贴图路径 |
| positions | Array | 天空盒中心点 |
SkyUtils.updateSphereSkybox(scene, opts)
更新球形天空盒
Kind: static method of SkyUtils
| Param | Type | Description |
|---|---|---|
| scene | THREE.Scene | 场景 |
| opts | object | 参数 |
| opts.radius | number | 半径 |
| opts.map | string | 纹理 |
| opts.positions | Array | 数组 |
SkyUtils.createDynamicSky(opts, animationManager)
动态天空
Kind: static method of SkyUtils
| Param | Type | Description |
|---|---|---|
| opts | object | 动态天空参数 |
| opts.cloudSpeed | number | 云层流动速度 |
| opts.cloudScale | number | 云朵大小 |
| opts.cloudInt | number | 云层色彩 |
| opts.skycolor1 | string | 西方天空颜色 |
| opts.skycolor2 | string | 东方天空颜色 |
| opts.radius | number | 半径 |
| opts.position | Array | 位置数组 |
| opts.rotation | Array | 旋转数组 |
| animationManager | * | 全局动画管理器 |