Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

ModelMaterial

ModelMaterial = (original) => Material

What a drawn thing wears in place of each of its materials, handed the one it would wear: a model’s from its file, and the ground’s, the sea’s and the scatter’s from the engine. A model’s is the loaded file’s, which every other draw of the file wears, so return a new one, such as a clone. The World’s is the engine’s own copy, which may be returned patched, such as with an onBeforeCompile of the game’s, and stays the engine’s to dispose. Any other material it returns is the game’s to dispose.

Parameter Type
original Material

Material