This article is a work in progress.

About Validation and Debug Support


  • Turning on an off
  • performance implications

About "Printing"

Generating a string representation of a object with desired precision and formatting.

Every object has a formatString({...opts}) method that allows you to stringify an object with special options set. Each object also defines the built-in JavaScript function toString() to call formatString() with the global printing options in the config object.

  • toString and formatString methods print with controllable precision
Print ParameterDefaultDescription
printPrecision4Number of significant digits
printTypesfalsePrints the name of the type (e.g. Vector3[...] instead of [...]
printDegreesfalsePrints degrees instead of radians (e.g. for Euler and SphericalCoordinates)
printRowMajortruePrints matrices as row major which makes them look more familiar instead of as column major (which is how they are stored internally for WebGL compatibility).