Class: Primitive
Primitive allows for a more direct level of control over how an object is rendered, allowing drawing points, lines and polygons; with specifications over the draw mode. The shape is passed to the render system as is, without modification.
Hierarchy
-
↳ Primitive
Table of contents
Constructors
Properties
Methods
Constructors
constructor
+ new Primitive(material
: Material, zOrder
: number, points?
: Polygon, drawMode?
: DrawMode): Primitive
Parameters:
Name | Type |
---|---|
material |
Material |
zOrder |
number |
points |
Polygon |
drawMode |
DrawMode |
Returns: Primitive
Inherited from: Component
Properties
drawMode
• drawMode: DrawMode
Draw mode of the primitive, allows direct control over how the primitive is rendered.
key
• key: string
material
• material: Material
Material to apply when rendering the primitive.
points
• points: Polygon
List of points to pass to the render system, the shape that will be rendered.
zOrder
• zOrder: number
Order which the primitive should appear, if it should appear infront/behind other objects, the higher the value the more precedence it is given and will appear in front of objects with a lower value.
KEY
▪ Readonly
Static
KEY: primitive= "primitive"
Key of the primitive component.
MESSAGE_ADD
▪ Readonly
Static
MESSAGE_ADD: component_add= "component_add"
Inherited from: Component.MESSAGE_ADD
MESSAGE_REMOVE
▪ Readonly
Static
MESSAGE_REMOVE: component_remove= "component_remove"
Inherited from: Component.MESSAGE_REMOVE
Methods
Free
▸ Free(): void
Returns: void
Overrides: Component