瀏覽代碼

add SkyBox and GroundSkyBox

tags/2.1.4
Caven Chen 4 年之前
父節點
當前提交
f79b2ea11a
共有 4 個文件被更改,包括 12 次插入11 次删除
  1. 3
    3
      modules/exts/GroundSkyBox.js
  2. 1
    1
      modules/exts/index.js
  3. 6
    5
      modules/thirdpart/index.js
  4. 2
    2
      packages/core/src/components.js

modules/exts/SkyBox.js → modules/exts/GroundSkyBox.js 查看文件

@@ -48,10 +48,10 @@ const SkyBoxVS = `
}
`

class SkyBox extends Cesium.SkyBox {
class GroundSkyBox extends Cesium.SkyBox {
constructor(options = {}) {
super(options)
this.offsetAngle = options?.offsetAngle || 90
this.offsetAngle = options?.offsetAngle
}

update(frameState, useHdr) {
@@ -187,4 +187,4 @@ class SkyBox extends Cesium.SkyBox {
}
}

export default SkyBox
export default GroundSkyBox

+ 1
- 1
modules/exts/index.js 查看文件

@@ -3,4 +3,4 @@
* @Date: 2021-02-21 17:51:00
*/

export { default as SkyBox } from './SkyBox'
export { default as GroundSkyBox } from './GroundSkyBox'

+ 6
- 5
modules/thirdpart/index.js 查看文件

@@ -9,16 +9,17 @@ const thirdPart = {
Cartesian2: Cesium.Cartesian2,
Cartesian3: Cesium.Cartesian3,
SceneMode: Cesium.SceneMode,
SkyBox: Cesium.SkyBox,
Color: Cesium.Color,
Rect: Cesium.Rectangle,
ShadowMode: Cesium.ShadowMode,
JulianDate: Cesium.JulianDate,
HeightReference: Cesium.HeightReference,
HorizontalOrigin: Cesium.HorizontalOrigin,
VerticalOrigin: Cesium.VerticalOrigin,
CallbackProperty: Cesium.CallbackProperty,
ClassificationType: Cesium.ClassificationType,
ShadowMode: Cesium.ShadowMode,
TilesetStyle: Cesium.Cesium3DTileStyle,
CallbackProperty: Cesium.CallbackProperty,
JulianDate: Cesium.JulianDate,
Color: Cesium.Color,
Rect: Cesium.Rectangle,
GeographicTilingScheme: Cesium.GeographicTilingScheme,
WebMercatorTilingScheme: Cesium.WebMercatorTilingScheme,
ColorMaterialProperty: Cesium.ColorMaterialProperty,

+ 2
- 2
packages/core/src/components.js 查看文件

@@ -174,7 +174,7 @@ import WindLayer from '@dc-modules/wind/WindLayer'
/**
* exts
*/
import { SkyBox } from '@dc-modules/exts'
import { GroundSkyBox } from '@dc-modules/exts'

/**
* thirdPart
@@ -333,7 +333,7 @@ const components = {
/**
* exts
*/
SkyBox,
GroundSkyBox,
/**
* thirdPart
*/

Loading…
取消
儲存