Skip to content

Material component documentation

Peter Crew edited this page Jan 15, 2019 · 1 revision

This page covers the Material, MaterialColours, and MaterialComponent classes. For more information on how to set up models so that they are ready to have a custom material, check here.


MaterialComponent

This component allows an entity to have changeable colours on the parts of its model that have special colour values (check the above link to check how to do this).

Constructor

The constructor takes a single JavaScript which can have the following properties:

Name Type Required? Description
materials Material[] Yes The custom materials that the entity can have. The first material in the array is the natural colour of the entity.
secondNaturalMaterial boolean No If true, the entity can have a second natural colour (taken from the second material in the materials array).

Material

Defines a custom material that can be purchased for an entity.

Constructor

The constructor takes three arguments: a Colour defining the custom colour, an integer stating the cost in DP, and a String that is taken as the name of the colour. For example, new Material(new Colour(1, 0, 0), 25, "Bright Red") defines a bright red colour that costs 25DP to purchase.


MaterialColours

This purely static class contains a collection of fields defining standard material colours found in Equilinox. The type of all of the colours is Colour.

Fields

  • RED
  • RUBY_RED
  • YELLOW
  • ORANGE
  • DARK_ORANGE
  • LIGHT_BLUE
  • DARK_BLUE
  • PINK
  • LIGHT_PINK
  • PURPLE
  • DARK_PURPLE
  • LILAC
  • CYAN
  • BEIGE
  • MUD
  • LIGHT_BROWN
  • BROWN
  • DARK_BROWN
  • YELLOW_GREEN
  • DARK_GREEN
  • BLUE_GREEN
  • BRIGHT_GREEN
  • LIGHT_GREEN
  • GREEN
  • PALE_GREEN
  • MUD_GREEN
  • GOLD
  • WHITE
  • GREY
  • LIGHT_GREY
  • DARK_GREY
  • BLACK
Clone this wiki locally