format
typescript
Ray.Clone(val)class: Ray
description
This is a static function that copies the given Ray object and returns a new Ray object.
parameter
| param_name | type | description |
|---|---|---|
| val | Ray | The Ray object to be copied. |
return
| type | description |
|---|---|
Ray | A new Ray object. |
code example
typescript
const ray = new Ray(new Vector3(0, 0, 0), new
Vector3(0, 0, 1));
const ray2 = Ray.clone(ray);