English中文

Moon

new Cesium.Moon(options)

以 3D 形式绘制月亮。 Draws the Moon in 3D.
名称 Name 类型 Type 说明 Description
options object 可选 optional 具有以下属性的对象: Object with the following properties:
名称 Name 类型 Type 默认值 Default 说明 Description
show boolean true 可选 optional 确定是否渲染月亮。 Determines whether the moon will be rendered.
textureUrl string buildModuleUrl('Assets/Textures/moonSmall.jpg') 可选 optional 月亮纹理。 The moon texture.
ellipsoid Ellipsoid Ellipsoid.MOON 可选 optional 月球椭球体。 The moon ellipsoid.
onlySunLighting boolean true 可选 optional 使用太阳作为唯一的光源。 Use the sun as the only light source.
示例: Example:
scene.moon = new Cesium.Moon();
另见: See:

成员 Members

获取定义月球形状的椭球体。 Get the ellipsoid that defines the shape of the moon.
默认值: Default Value: Ellipsoid.MOON

onlySunLighting : boolean

使用太阳作为唯一的光源。 Use the sun as the only light source.
默认值: Default Value: true
确定是否显示月亮。 Determines if the moon will be shown.
默认值: Default Value: true

textureUrl : string

月亮纹理。 The moon texture.
默认值: Default Value: buildModuleUrl('Assets/Textures/moonSmall.jpg')

方法 Methods

销毁该对象持有的 WebGL 资源。销毁对象可以确定性地释放 WebGL 资源,而不是依赖垃圾收集器来销毁该对象。 Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

一旦对象被销毁,就不应再使用;调用除 Once an object is destroyed, it should not be used; calling any function other than isDestroyed 将导致 will result in a DeveloperError 例外。因此,分配返回值( exception. Therefore, assign the return value (undefined) 到对象,如示例中所做的那样。 ) to the object as done in the example.
抛出: Throws:
  • DeveloperError : This object was destroyed, i.e., destroy() was called.
示例: Example:
moon = moon && moon.destroy();
另见: See:

isDestroyed()boolean

如果该对象被销毁则返回 true;否则为假。 Returns true if this object was destroyed; otherwise, false.

如果该对象被破坏,则不应使用它;调用除 If this object was destroyed, it should not be used; calling any function other than isDestroyed 将导致 will result in a DeveloperError exception.
返回: Returns:
true 如果该物体被摧毁;否则, if this object was destroyed; otherwise, false.
另见: See:
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.