Version 1 (modified by trac, 16 years ago) ( diff )

--

Custom object types

Defines Point2d and SColour as JS classes. The former is fully implemented but never registered, so it's not actually available in script. It serves as a demonstration of how to add a new type.

class SColour (JSObject)

  • Overview:
    • Holds RGBA values (stored as float)
  • Syntax:
    • SColour() set everything to 0
    • SColour(float r, float g, float b) alpha=1
    • SColour(float r, float g, float b, float a)
  • Parameters:
    • color/alpha specifications. default values are listed above.
  • Returns:
  • Notes:
Note: See TracWiki for help on using the wiki.