Doc > Expressions > copRes

Doc > Expressions > copRes

Returns the resolution of a texture of a COP node.

Description

It takes 1 or 2 arguments

copRes(<input_index_or_node_path>, )

  • <input_index_or_node_path> is a number or a string
  • <vector_component> is a string or number, either 'x', 'y', 0 or 1

Usage

  • copRes('/COP/image1') - returns the size of the texture, as a THREE.Vector2
  • copRes('/COP/image1', 'x') - returns the x component of the size of the texture, as a number