Class: GridMaterialProperty

GridMaterialProperty

new GridMaterialProperty(options)

Used to add mesh material effect classes for Entity type objects such as polygons and rectangles

Name Type Description
options Object optional

Object is an object that contains the following properties:

Name Type Default Description
color Property Color.WHITE optional

Specify the attribute of grid Color

cellAlpha Property 0.1 optional

Specify the numerical attribute of cell alpha.

lineCount Property new Cartesian2(8, 8) optional

Cartesian2 attribute, used to specify the number of gridlines for each axis.

lineThickness Property new Cartesian2(1.0, 1.0) optional

Cartesian2 attribute, used to specify the thickness of grid lines on each axis.

lineOffset Property new Cartesian2(0.0, 0.0) optional

Cartesian2 attribute specifies the starting offset of the gridlines along each coordinate axis.

Members

cellAlphaProperty

Gets or sets the numerical property of the specified cell alpha.

Default Value:
0.1

colorProperty

Get or set the property of the specified mesh color.

Default Value:
Color.WHITE

readonly definitionChangedEvent

Get the event thrown when the property definition changes. If calling getValue returns different results within the same time frame, it is considered that the definition has changed.

readonly isConstantBoolean

Get a value indicating whether the attribute is a constant. If getValue always returns the same result in the current definition, then the property is considered a constant.

lineCountProperty

Get or set the Cartesian2 property, specifying the number of gridlines for each axis.

Default Value:
new Cartesian2(8.0, 8.0)

lineOffsetProperty

Get or set the Cartesian2 property, specifying the starting offset of the gridlines along each coordinate axis.

Default Value:
new Cartesian2(0.0, 0.0)

lineThicknessProperty

Get or set the Cartesian2 property to specify the thickness of grid lines on each axis.

Default Value:
new Cartesian2(1.0, 1.0)

Methods

static fromJSON(json){GridMaterialProperty}

Deserialize JSON object to GridMaterialProperty instance

Name Type Description
json object

The serialized JSON object

Returns:
Type Description
GridMaterialProperty New GridMaterialProperty instance

equals(other){Boolean}

Compare this attribute with the provided attribute, return true if they are equal, otherwise return false.

Name Type Description
other Property optional

A property.

Returns:
Type Description
Boolean If left and right are equal, it is true; otherwise, it is false.

getType(time){String}

Retrieve the Material type for the specified time.

Name Type Description
time JulianDate

Value taking time.

Returns:
Type Description
String The type of T material.

getValue(time, result){Object}

Retrieve the attribute value of the attribute at the specified time.

Name Type Description
time JulianDate

The time to retrieve the attribute value.

result Object optional

If the object to store numerical values is omitted, a new instance will be created and returned.

Returns:
Type Description
Object The modified result parameters, or a new instance (if no result parameters are provided).

toJSON(){object}

Serialize GridMaterialProperty instance as JSON object

Returns:
Type Description
object JSON serialized object containing core configuration