PM_Visible

PM_Visible

Provides a pawn with an interface to the WebGL renderer. Visible pawns can set up draw calls and attach materials and geometry to them.

Note: In order to work properly the PM_Visible mixin should be combined with PM_Spatial or one of its descendants. Listens to event:viewGlobalChanged to update the transform in the draw call.

Methods

# setDrawCall(dataopt)

Adds a draw call to the pawn. The draw call will have its transform automatically updated when the pawn moves.

Parameters:
Name Type Attributes Description
data DrawCall <optional>

A webGL renderer draw call.