evCreate API 5.7 Help

EvObjectReplicate Interface

The EvObjectReplicate TS interface defines a blueprint of a JS object that specifies the settings for creating copies of a given object item using the Replicate feature.

Properties

An EvObjectReplicate object has the following properties:

copies: number;

A number, the number of copies of a given object item that should be created.

optional flip: boolean;

A Boolean, a switch to flip (true) or not to flip (false) the copies of a given object item. The default value is false.

optional flipDirection: EvFlipDirection;

A member of the EvFlipDirection enumeration, the object item axes along which the copies should be flipped. The default value is "horizontal".

optional flipEvery: number;

A number, a step in the sequence of the copies that defines the positions of the copies that should be flipped.

The default value is 1, that is every copy. For example, if 2 is given, every second (even) copy will be flipped, and every first (odd) copy will keep the original direction.

flipEvery = 2 makes every second copy flipped horizontally

optional offsetGap: boolean;

A Boolean, a switch to:

  • true: move the copies from the original object item and spread them recursively at a given distance between the bounding boxes in the horizontal, vertical, or both directions.

  • false: stack the copies on top of the original object item.

The default value is false.

optional offsetX: number;

A number, a horizontal distance in the 2D length unit of measure global for the entire evCreate API to be set between the bounding boxes of the original object item and copies. Positive numbers move the copies right, and negative numbers move the copies left.

The default value is 0.

optional offsetY: number;

A number, a vertical distance in the 2D length unit of measure global for the entire evCreate API to be set between the bounding boxes of the original object item and copies. Positive numbers move the copies down, and negative numbers move the copies up.

The default value is 0.

optional rotateDegree: number;

A number, an angle in degrees to rotate the copies recursively in relation to the preceding object. Positive numbers rotate the copies clockwise, and negative numbers rotate the copies counterclockwise. A valid value is in the range from -359.0 to 359.0.

The default value is 0.

rotateDegree = 10 recursively rotates every next copy 10 degrees clockwise to the previous copy

optional rotatePoint: EvRefPoint;

A member of the EvRefPoint enumeration, the pivot point on the bounding boxes of the copies.

The default value is "center".

optional scaleH: number;

A number, a horizontal scale factor in a unit given in the scaleType property to recursively increase or decrease the widths of the copies in relation to the preceding object.

The default value depends on the given unit:

  • "percentage": 100%.

  • "ratio": 1.00.

  • "length": 1.00.

    Proportional 3/4 scale recursively makes every next copy smaller than the previous copy by the factor of 0.75

optional scaleType: EvScaleType;

A member of the EvScaleType enumeration, a unit for scaling the 2D sizes of the copies.

The default value is "percentage".

optional scaleV: number;

A number, a vertical scale factor in a unit given in the scaleType property to recursively increase or decrease the heights of the copies in relation to the preceding object.

The default value depends on the given unit:

  • "percentage": 100%.

  • "ratio": 1.00.

  • "length": 1.00.

Examples

TS

{ copies: 6, flip: true, flipDirection: EvFlipDirection.Horizontal, flipEvery: 2, offsetGap: true, offsetX: 0.1, offsetY: 0.1, rotateDegree: 10, rotatePoint: EvRefPoint.MiddleLeft, scaleH: 0.75, scaleType: EvScaleType.Ratio, scaleV: 0.75 }

JS

{ copies: 6, flip: true, flipDirection: "horizontal", flipEvery: 2, offsetGap: true, offsetX: 0.1, offsetY: 0.1, rotateDegree: 10, rotatePoint: "middle_left", scaleH: 0.75, scaleType: "ratio", scaleV: 0.75 }
01 May 2025