# Modeler
A class
that renders the pattern's preview on the appropriate 3d models and renders the scene.
# Constructor
Instantiates a Modeler.
- Arguments
options
- Type:
Object
- Properties:
canvas
required- Type:
HTMLCanvasElement
- Type:
pattern
required- Type:
AcPattern
- Type:
- Type:
# Instance Accessors
# canvas
The canvas that the modeler draws the scene to.
get
- Type:
HTMLCanvasElement
- Type:
# pattern
The pattern that the modeler renders on the model.
get
- Type:
AcPattern
- Type:
# source
The source from the pattern to draw. The source can be either the pixels or a section from the pattern.
get
- Type:
PixelsSource
- Default:
pattern.pixels
- Type:
set
- Type:
PixelsSource
- Type:
# pixelFilter
Whether or not to apply pixel filtering. If turned on, will incur a slight performance cost.
get
- Type:
boolean
- Default:
false
- Type:
set
- Type:
boolean
- Type:
# Instance Methods
# setup
Sets up the 3d scene. Must be run before the modeler begins reacting to any changes.
- Returns
- Type:
Promise<void>
- Type:
# play
Puts the modeler into a reactive state.
- Returns
- Type:
Promise<void>
- Type:
# pause
Puts the modeler into an unreactive state.
- Returns
- Type:
Promise<void>
- Type:
# dispose
Puts the modeler into a stopped state and cleans up all resources expended. The modeler cannot be used beyond this function call.
- Returns
- Type:
Promise<void>
- Type: