Skip to content
On this page

skyUtils

SkyUtils

Kind: global class

new SkyUtils()

天空盒

SkyUtils.createSky(radius, widthSegments, heightSegments, skyCenter) ⇒ fthree.Mesh

创建带地平线渐变的天空

Kind: static method of SkyUtils
Returns: fthree.Mesh - sky

ParamTypeDescription
radiusnumber半径 推荐 radius 最小值为 4000,最大值为 20000
widthSegmentsnumber- 宽度段
heightSegmentsnumber高度段
skyCenterfthree.Vector3天空中心

SkyUtils.createSkyFromTextures(url) ⇒ THREE.Texture

贴图天空盒

Kind: static method of SkyUtils
Returns: THREE.Texture - 天空纹理

ParamTypeDescription
urlstring贴图路径

SkyUtils.createSphereSkyBox(radius, map, positions) ⇒ THREE.Mesh

球形贴图天空

Kind: static method of SkyUtils
Returns: THREE.Mesh - sky

ParamTypeDescription
radiusnumber半径
mapstring贴图路径
positionsArray天空盒中心点

SkyUtils.updateSphereSkybox(scene, opts)

更新球形天空盒

Kind: static method of SkyUtils

ParamTypeDescription
sceneTHREE.Scene场景
optsobject参数
opts.radiusnumber半径
opts.mapstring纹理
opts.positionsArray数组

SkyUtils.createDynamicSky(opts, animationManager)

动态天空

Kind: static method of SkyUtils

ParamTypeDescription
optsobject动态天空参数
opts.cloudSpeednumber云层流动速度
opts.cloudScalenumber云朵大小
opts.cloudIntnumber云层色彩
opts.skycolor1string西方天空颜色
opts.skycolor2string东方天空颜色
opts.radiusnumber半径
opts.positionArray位置数组
opts.rotationArray旋转数组
animationManager*全局动画管理器