relativeToProp(...)

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

Parameter Type Description
val number[] The array of numbers to set.

Returns

this

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
zapcode branded_zapcode i