vec3.create

Section: Vec3

What it does

vec3.create brings a vec3 object into being: it is how the rest of the script comes to have one. It takes x, y and z.

Signature

vec3.create(x, y, z)

Arguments

  • x
  • y
  • z

Example · generated

function update(dt) {  vec3.create(0, 2, 0);}

vec3.create is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.

20 members in vec3