GraphicTemplate Interface

A reusable representation of a RenderGraphic. You can use createGraphicFromTemplate to produce a RenderGraphic from a template. The template contains all of the WebGL resources required to render the graphics, so no matter how many times you use the template, no additional GPU resources will be allocated. The primary use for a template is instanced rendering - efficiently drawing many repetitions of the same graphic with different positions, scales, rotations, and symbology. Using instancing to draw 1 template N times is far more efficient than drawing N RenderGraphics created from the same template. You can instance a template by supplying a RenderInstances to createGraphicFromTemplate, unless isInstanceable is false.

@see - finishTemplate to create a template from a GraphicBuilder.

Properties

Name Type Description
isInstanceable Readonly boolean Whether the graphics in this template can be instanced.  

Defined in

Last Updated: 21 November, 2024