1. Skyboxs

1.1. 初始化 new Skyboxs(options)

显示自定义的天空盒集合,设置不同类型的天空盒。

1.2. new Skyboxs(options)

Param Type Default Description
[options] Object

包含以下参数的Object对象:

[options.type] String "默认"

天空盒类型,有蓝天、晚霞、星空、默认四种

[options.show] Boolean true

是否显示天空盒

Example

var currentSkyBox = new BOSGeo.SkyBoxs({
    type: '蓝天',
    show: true
});

1.3. 属性

属性名 Type Default Description
type String "默认"

天空盒类型,有蓝天、晚霞、星空、默认四种

show Boolean true

是否显示天空盒

1.3.1. skyBoxs.add(name, sources, [skyboxType])

添加新的天空盒

Kind : instance method of SkyBoxs

Param Type Default Description
name String

名称

sources Object

六个多维数据集映射面的每一个的源URL或 Image 对象,如 sources = { positiveX : 'Assets/Images/skyboxs/lantian/px.png', negativeX : 'Assets/Images/skyboxs/lantian/nx.png', positiveY : 'Assets/Images/skyboxs/lantian/py.png', negativeY : 'Assets/Images/skyboxs/lantian/ny.png', positiveZ : 'Assets/Images/skyboxs/lantian/pz.png', negativeZ : 'Assets/Images/skyboxs/lantian/nz.png' }

[skyboxType] String 'GroundSkyBox'

天空盒类别,有'GroundSkyBox'(近地天空盒)和'SkyBox'(星球天空盒),默认为'GroundSkyBox'。

Example

let sources = {
    positiveX: 'Assets/Images/skyboxs/lantian/px.png',
    negativeX: 'Assets/Images/skyboxs/lantian/nx.png',
    positiveY: 'Assets/Images/skyboxs/lantian/py.png',
    negativeY: 'Assets/Images/skyboxs/lantian/ny.png',
    positiveZ: 'Assets/Images/skyboxs/lantian/pz.png',
    negativeZ: 'Assets/Images/skyboxs/lantian/nz.png'
}
skyBoxs.add('新天空盒', sources, 'GroundSkyBox')
版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2022 all right reserved,powered by Gitbook该文件修订时间: 2022-07-19 11:34:25

results matching ""

    No results matching ""