Tootsville.FurnitureBuilder.makeFurnitureColorizeMaterial

Function

Tootsville.FurnitureBuilder.makeFurnitureColorizeMaterial is a function with lambda list: (furniture, scene)

Make a colorizer function for a material for “furniture”.

Materials in an item's model can be recolored on a per-item basis when they have specific (case-insensitive) names for those materials.

Color names are specific names understood by TOOTSVILLE PARSE-COLOR24 or the HTML #RGB or #RRGGBB forms. Other formats understood by TOOTSVILLE PARSE-COLOR24 are not understood by Tootsville.UI.interpretTootColor and are not supported. The game server will only send colors in these formats.

Any material named base will have its diffuse color set to the baseColor of the item, with its specular color set to a lighter version of that same color.

Any material named alt will likewise have its diffuse color set to the altColor of that item, with its specular color set to a lighter version of that same color.

Finally, any material named map will have the diffuse color set to a texture map based on the file named in specialTexture of that item, if any. The specific file will be loaded by Tootsville.FurnitureBuilder.setMaterialTexture from a file whose path is https://jumbo.tootsville.org/Assets/Textures/5/ and whose name on that path is given by specialTexture. It can be a PNG, JPEG, or SVG file. See setMaterialTexture for details.