5.0.1

Type Guards

TresJS provides type guard methods to help you determine the type of a Three.js object.

To help you work with Three.js objects more effectively, TresJS provides a set of type guard methods. These methods allow you to determine the type of a Three.js object, making your code more robust and easier to maintain. The supported type guards are:

  • isBufferGeometry
  • isCamera
  • isColor
  • isColorRepresentation
  • isFog
  • isGroup
  • isLayers
  • isLight
  • isMaterial
  • isMesh
  • isObject3D
  • isOrthographicCamera
  • isPerspectiveCamera
  • isScene