Class/Object

cesium

PerInstanceColorAppearance

Related Docs: object PerInstanceColorAppearance | package cesium

Permalink

class PerInstanceColorAppearance extends Object

An appearance for GeometryInstance instances with color attributes. This allows several geometry instances, each with a different color, to be drawn with the same Primitive as shown in the second example below.

alias PerInstanceColorAppearance

- The options object takes the following properties - {Boolean} [options.flat=false] When true, flat shading is used in the fragment shader, which means lighting is not taking into account. - {Boolean} [options.faceForward=!options.closed] When true, the fragment shader flips the surface normal as needed to ensure that the normal faces the viewer to avoid dark spots. This is useful when both sides of a geometry should be shaded like WallGeometry - {Boolean} [options.translucent=true] When true, the geometry is expected to appear translucent so PerInstanceColorAppearance#renderState has alpha blending enabled. - {Boolean} [options.closed=false] When true, the geometry is expected to be closed so PerInstanceColorAppearance#renderState has backface culling enabled. - {String} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader. - {String} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader. - {RenderState} [options.renderState] Optional render state to override the default render state.

Annotations
@RawJSType() @native() @JSName( "Cesium.PerInstanceColorAppearance" )
Example:
  1. // A solid white line segment var primitive = new Cesium.Primitive({ geometryInstances : new Cesium.GeometryInstance({ geometry : new Cesium.SimplePolylineGeometry({ positions : Cesium.Cartesian3.fromDegreesArray([ 0.0, 0.0, 5.0, 0.0 ]) }), attributes : { color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 1.0, 1.0, 1.0)) } }), appearance : new Cesium.PerInstanceColorAppearance({ flat : true, translucent : false }) }); // Two rectangles in a primitive, each with a different color var instance = new Cesium.GeometryInstance({ geometry : new Cesium.RectangleGeometry({ rectangle : Cesium.Rectangle.fromDegrees(0.0, 20.0, 10.0, 30.0) }), attributes : { color : new Cesium.Color(1.0, 0.0, 0.0, 0.5) } }); var anotherInstance = new Cesium.GeometryInstance({ geometry : new Cesium.RectangleGeometry({ rectangle : Cesium.Rectangle.fromDegrees(0.0, 40.0, 10.0, 50.0) }), attributes : { color : new Cesium.Color(0.0, 0.0, 1.0, 0.5) } }); var rectanglePrimitive = new Cesium.Primitive({ geometryInstances : [instance, anotherInstance], appearance : new Cesium.PerInstanceColorAppearance() });

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PerInstanceColorAppearance
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PerInstanceColorAppearance(options: PerInstanceColorAppearanceOptions)

    Permalink
  2. new PerInstanceColorAppearance()

    Permalink
    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. var closed: Boolean

    Permalink
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. var faceForward: Boolean

    Permalink
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. var flat: Boolean

    Permalink
  12. var fragmentShaderSource: String

    Permalink
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getFragmentShaderSource(): String

    Permalink
  15. def getRenderState(): Dynamic

    Permalink
  16. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  20. def isTranslucent(): Boolean

    Permalink
  21. var material: Material

    Permalink
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  26. var renderState: Any

    Permalink
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. var translucent: Boolean

    Permalink
  31. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  32. var vertexFormat: VertexFormat

    Permalink
  33. var vertexShaderSource: String

    Permalink
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped