Pawn.(constructor)

Construct a pawn object.

Signature:

constructor(name: string, resourceManager: ResourceManager, materialManager: MaterialManager);

Parameters

ParameterDescription
nameThe name of this pawn. The API doesn't check the uniqueness of name amongst all pawns.
resourceManagerThe resource manager object.
materialManagerThe material manager object.

Example

var pawn3 = new Modelo.Scene3D.Pawn("pawn3", viewer.getResourceManager(), viewer.getMaterialManager());
pawn3.load(modelId).then(() => {
    viewer.getScene().addPawn(pawn3);
});