PrinterKit | Wiki

Easing Options


Range functions have various easing options for change between two values. Easing setting defaults to linear.

hex = Hexagon(1)
shape1 = extrude(hex, 3)
shape2 = extrude(hex, 3)
shape3 = extrude(hex, 3)
shape1.scaleXY = RangeEase(1.5, 0.5, Easing.LINEAR, Direction.OUT)
shape2.scaleXY = RangeEase(1.5, 0.5, Easing.CUBIC, Direction.OUT)
shape3.scaleXY = RangeEase(1.5, 0.5, Easing.BOUNCE, Direction.OUT)
shape1.stepCountHint = 100
shape2.stepCountHint = 100
shape3.stepCountHint = 100
render(shape1 >> vec(-3,0,0), shape2 >> vec(0,0,0), shape3 >> vec(3,0,0))


Easing Mode
Easing.BOUNCE
Easing.CIRCULAR
Easing.CUBIC
Easing.ELASTIC
Easing.EXPONENTIAL
Easing.LINEAR
Easing.QUADRATIC
Easing.QUARTIC
Easing.QUINTIC
Easing.SINE


Can ease into to final value, ease out to it, or both.

hex = Hexagon(1)
shape1 = extrude(hex, 5)
shape2 = extrude(hex, 5)
shape3 = extrude(hex, 5)
shape1.scaleXY = RangeEase(1.5, 0.5, Easing.CUBIC, Direction.OUT)
shape2.scaleXY = RangeEase(1.5, 0.5, Easing.CUBIC, Direction.IN)
shape3.scaleXY = RangeEase(1.5, 0.5, Easing.CUBIC, Direction.IN_OUT)
shape1.stepCountHint = 100
shape2.stepCountHint = 100
shape3.stepCountHint = 100
render(shape1 >> vec(-3,0,0), shape2 >> vec(0,0,0), shape3 >> vec(3,0,0))


Easing Direction
Direction.IN
Direction.IN_OUT
Direction.OUT