relativeToProp(...)
Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.
relativeToProp(val : number[]) : this;
Sets the array of numbers giving the ratio of contributions that each node specified by relativeTo has on this node’s location.
For more information see:
Default value: [1]
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
val | number[] | The array of numbers to set. |
Returns
Section titled “Returns”this
Example
Section titled “Example”myobject.relativeTo([Z.screen, Z.screenRight]);myobject.relativeToProp([0.5, 0.5]);// myobject is now located halfway between the center and right of the screen