API Reference

Class List

pc.ModelHandler

Resource handler used for loading pc.Model resources.

Summary

Methods

addParser

Add a parser that converts raw data into a pc.Model Default parser is for JSON models.

Details

Constructor

ModelHandler(device, defaultMaterial)

Parameters

devicepc.GraphicsDevice

The graphics device that will be rendering.

defaultMaterialpc.StandardMaterial

The shared default material that is used in any place that a material is not specified.

Methods

addParser(parser, decider)

Add a parser that converts raw data into a pc.Model Default parser is for JSON models.

Parameters

parserobject

See JsonModelParser for example.

deciderpc.callbacks.AddParser

Function that decides on which parser to use. Function should take (url, data) arguments and return true if this parser should be used to parse the data into a pc.Model. The first parser to return true is used.