ObjectUtils Class

Module: Utils

ObjectUtils is a collection of methods to apply operations to Object3D objects

Methods

getAudio

(
  • obj
  • audio
)
Array

Get all audio files in object and childs

Parameters:

Returns:

Array:

audio

getFonts

(
  • obj
  • fonts
)
Array

Get all fonts in a object and childs

Parameters:

Returns:

Array:

font array

getMaterials

(
  • obj
  • materials
  • materials
)

Get all materials in object and childs

Parameters:

  • obj Object3D
  • materials Array
  • materials Array

getRoot

(
  • obj
)
Object3D

Get object tree root.

For a object placed inside a running scene the root is always the program.

Parameters:

Returns:

Object3D:

root

getScene

(
  • obj
)
Object3D

Get scene that contains this object.

Parameters:

Returns:

Object3D:

scene

getTextures

(
  • obj
  • textures
)
Array

Get all textures in object and childs

Parameters:

  • obj Object3D
  • textures Array

    Textures array

Returns:

Array:

textures

isChildOf

(
  • parent
  • child
)
Boolean

Check if object is child of another object

Parameters:

Returns:

Boolean:

True if parent is parent of child

setMatrixAutoUpdate

(
  • obj
  • value
)

Set object and all its children matrixAutoUpdate value

Parameters:

setShadowCasting

(
  • obj
  • value
)

Set object and all children to cast shadows

Parameters:

setShadowReceiving

(
  • obj
  • value
)

Set object and all children to receive shadows

Parameters: