Checks a material index from user input and returns its stored code (material + 1, the value of bits 16-31). Undefined or NO_MATERIAL give 0 (none); anything but an integer in 0-MAX_MATERIAL is a RangeError.
material + 1
RangeError
Checks a material index from user input and returns its stored code (
material + 1, the value of bits 16-31). Undefined or NO_MATERIAL give 0 (none); anything but an integer in 0-MAX_MATERIAL is aRangeError.