Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Material
    • CesiumMaterial

Index

Constructors

constructor

  • new CesiumMaterial(options?: { fabric: any; magnificationFilter?: TextureMagnificationFilter; minificationFilter?: TextureMinificationFilter; strict?: boolean; translucent?: boolean | ((...params: any[]) => any) }): CesiumMaterial
  • Parameters

    • Optional options: { fabric: any; magnificationFilter?: TextureMagnificationFilter; minificationFilter?: TextureMinificationFilter; strict?: boolean; translucent?: boolean | ((...params: any[]) => any) }
      • fabric: any
      • Optional magnificationFilter?: TextureMagnificationFilter
      • Optional minificationFilter?: TextureMinificationFilter
      • Optional strict?: boolean
      • Optional translucent?: boolean | ((...params: any[]) => any)

    Returns CesiumMaterial

Properties

materials

materials: any

Maps sub-material names to Material objects.

shaderSource

shaderSource: string

The glsl shader source for this material.

translucent

translucent: boolean | ((...params: any[]) => any)

When true or a function that returns true, the geometry is expected to appear translucent.

type

type: string

The material type. Can be an existing type or a new type. If no type is specified in fabric, type is a GUID.

uniforms

uniforms: any

Maps uniform names to their values.

Static Readonly AlphaMapType

AlphaMapType: string

Gets the name of the alpha map material.

Static Readonly AspectRampMaterialType

AspectRampMaterialType: string

Gets the name of the aspect ramp material.

Static Readonly BumpMapType

BumpMapType: string

Gets the name of the bump map material.

Static Readonly CheckerboardType

CheckerboardType: string

Gets the name of the checkerboard material.

Static Readonly ColorType

ColorType: string

Gets the name of the color material.

Static DefaultCubeMapId

DefaultCubeMapId: string

Gets or sets the default cube map texture uniform value.

Static DefaultImageId

DefaultImageId: string

Gets or sets the default texture uniform value.

Static Readonly DiffuseMapType

DiffuseMapType: string

Gets the name of the diffuce map material.

Static Readonly DiffusionRingMaterialType

DiffusionRingMaterialType: string

扩散圈材质

Static DirectionMaterialType

DirectionMaterialType: string

方向箭头材质

Static Readonly DotType

DotType: string

Gets the name of the dot material.

Static Readonly ElevationContourType

ElevationContourType: string

Gets the name of the elevation contour material.

Static Readonly ElevationRampType

ElevationRampType: string

Gets the name of the elevation contour material.

Static Readonly EmissionMapType

EmissionMapType: string

Gets the name of the emmision map material.

Static Readonly FadeType

FadeType: string

Gets the name of the fade material.

Static Readonly GridType

GridType: string

Gets the name of the grid material.

Static Readonly ImageType

ImageType: string

Gets the name of the image material.

Static Readonly NormalMapType

NormalMapType: string

Gets the name of the normal map material.

Static Readonly PolylineArrowType

PolylineArrowType: string

Gets the name of the polyline arrow material.

Static Readonly PolylineDashDynamicType

PolylineDashDynamicType: string

动态DashLine

Static Readonly PolylineDashType

PolylineDashType: string

Gets the name of the polyline glow material.

Static Readonly PolylineGlowType

PolylineGlowType: string

Gets the name of the polyline glow material.

Static Readonly PolylineOutlineType

PolylineOutlineType: string

Gets the name of the polyline outline material.

Static RadarMaterialType

RadarMaterialType: string

雷达材质

Static Readonly RimLightingType

RimLightingType: string

Gets the name of the rim lighting material.

Static Readonly RoadNetWorkMaterialType

RoadNetWorkMaterialType: string

路网材质

Static Readonly SlopeRampMaterialType

SlopeRampMaterialType: string

Gets the name of the slope ramp material.

Static Readonly SpecularMapType

SpecularMapType: string

Gets the name of the specular map material.

Static Readonly StripeType

StripeType: string

Gets the name of the stripe material.

Static Readonly TrailMaterialType

TrailMaterialType: string

轨迹线材质

Static Readonly WaterType

WaterType: string

Gets the name of the water material.

Methods

destroy

  • destroy(): void
  • 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.

    example

    material = material && material.destroy();

    Returns void

isDestroyed

  • isDestroyed(): boolean
  • 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 boolean

    True if this object was destroyed; otherwise, false.

isTranslucent

  • isTranslucent(): boolean
  • Gets whether or not this material is translucent.

    Returns boolean

    true if this material is translucent, false otherwise.

Static fromType

  • fromType(type: string, uniforms?: any): Material
  • Creates a new material using an existing material type.

    Shorthand for: new Material({fabric : {type : type}});

    example

    var material = Cesium.Material.fromType('Color', { color : new Cesium.Color(1.0, 0.0, 0.0, 1.0) });

    Parameters

    • type: string

      The base material type.

    • Optional uniforms: any

    Returns Material

    New material object.