Skip to main content

GraphicsComplex

WLJS
Execution environment
GraphicsComplex[{pt1, pt2, ...}, data]

represents a graphics complex in which coordinates given as integers ii in graphics primitives in data are taken to be pti.

info

GraphicsComplex provides faster rendering for a complex primitives with many vertices and colors. It looks similar to an interfaces of OpenGL or other graphics framework, where buffers with coordinates are provided separately from the object instances.

danger

Limited functionality

Supported primitives

Line

GraphicsComplex[{{0,0}, {1,0}, {1,1}}, Line[{{1,2,3}}]] // Graphics

vertex colors are not supported

Polygon

GraphicsComplex[{{0,0}, {1,0}, {1,1}}, Polygon[{1,2,3}], "VertexColors"->{{1,1,0}, {0,1,1}, {0,1,1}}] // Graphics

vertex colors supports only the flat shading

Point

GraphicsComplex[{{0,0}, {1,0}, {1,1}}, Point[{{1,2,3}}]] // Graphics

or with colors

GraphicsComplex[{{0,0}, {1,0}, {1,1}}, Point[{{1,2,3}}], "VertexColors"->{{1,0,0}, {0,1,0}, {0,0,1}}] // Graphics

Arrow

Disk