Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RotationSnapping

Hierarchy

  • RotationSnapping

Index

Properties

Properties

Optional angles

angles: number[] = [0, 45, 90, 135, 180, 225, 270, 315]

Enabled snapping angles in degrees for rotating a sprite. The rotation angle is defined clockwise.

example

// Defaults to:

[0, 45, 90, 135, 180, 225, 270, 315]

Optional enabled

enabled: boolean = true

Whether sprites should snap to specific orientations during rotation interactions. This switch enables or disables rotation snapping.

example

// Defaults to:

true

Optional threshold

threshold: number = 20

This threshold defines the arc length of a rotation gesture where snapping at a snap angle occurs. It is measured in pixels.

example

// Defaults to:

20