English中文

ImageMaterialProperty

new Cesium.ImageMaterialProperty(options)

A MaterialProperty 映射到图像 that maps to image Material uniforms.
名称 Name 类型 Type 说明 Description
options object 可选 optional 具有以下属性的对象: Object with the following properties:
名称 Name 类型 Type 默认值 Default 说明 Description
image Property | string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement 可选 optional 指定图像、URL、画布或视频的属性。 A Property specifying the Image, URL, Canvas, or Video.
repeat Property | Cartesian2 new Cartesian2(1.0, 1.0) 可选 optional A Cartesian2 属性指定图像在每个方向上重复的次数。 Property specifying the number of times the image repeats in each direction.
color Property | Color Color.WHITE 可选 optional 应用于图像的颜色 The color applied to the image
transparent Property | boolean false 可选 optional 当图像具有透明度时(例如,当 png 具有透明部分时)设置为 true Set to true when the image has transparency (for example, when a png has transparent sections)

成员 Members

获取或设置 Color 属性,指定应用于图像的所需颜色。 Gets or sets the Color Property specifying the desired color applied to the image.
默认值: Default Value: 1.0
获取每当此属性的定义更改时引发的事件。如果对 getValue 的调用同时返回不同的结果,则认为定义已更改。 Gets the event that is raised whenever the definition of this property changes. The definition is considered to have changed if a call to getValue would return a different result for the same time.
获取或设置指定要使用的图像、URL、画布或视频的属性。 Gets or sets the Property specifying Image, URL, Canvas, or Video to use.
获取一个值,该值指示该属性是否为常量。如果 getValue 始终为当前定义返回相同的结果,则属性被视为常量。 Gets a value indicating if this property is constant. A property is considered constant if getValue always returns the same result for the current definition.
获取或设置 Gets or sets the Cartesian2 属性指定图像在每个方向上重复的次数。 Property specifying the number of times the image repeats in each direction.
默认值: Default Value: new Cartesian2(1, 1)
获取或设置指定图像是否具有透明度的布尔属性 Gets or sets the Boolean Property specifying whether the image has transparency
默认值: Default Value: 1.0

方法 Methods

将此属性与提供的属性进行比较并返回 Compares this property to the provided property and returns true 如果它们相等, if they are equal, false otherwise.
名称 Name 类型 Type 说明 Description
other Property 可选 optional 其他财产。 The other property.
返回: Returns:
true 如果左和右相等, if left and right are equal, false otherwise.
得到 Gets the Material 在规定的时间输入。 type at the provided time.
名称 Name 类型 Type 说明 Description
time JulianDate 检索类型的时间。 The time for which to retrieve the type.
返回: Returns:
材料的类型。 The type of material.

getValue(time, result)object

获取指定时间的属性值。 Gets the value of the property at the provided time.
名称 Name 类型 Type 默认值 Default 说明 Description
time JulianDate JulianDate.now() 可选 optional 检索值的时间。如果省略,则使用当前系统时间。 The time for which to retrieve the value. If omitted, the current system time is used.
result object 可选 optional 用于存储值的对象,如果省略,则会创建并返回一个新实例。 The object to store the value into, if omitted, a new instance is created and returned.
返回: Returns:
修改后的结果参数或新实例(如果未提供结果参数)。 The modified result parameter or a new instance if the result parameter was not supplied.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.