Translation
Move shapes using thex and y props on the Shape component.
x and y props translate the entire shape. The first square appears at (40, 40) and the second at (120, 120).
Rotation
Rotate shapes around their origin using therotation prop (in degrees).
- Tab Title
- Tab Title
Scale
Scale shapes using thescaleX and scaleY props.
- Tab Title
- Tab Title
- Tab Title
Combined Transforms
Combine translation, rotation, and scaling for complex transformations.- Translates the shape to (100, 100)
- Scales it by 1.2x
- Rotates it 30 degrees
Transform Origin
Control the transform origin point by carefully positioning your geometry.- Tab Title
- Tab Title
- Tab Title
Animated Transforms
Transforms can be animated using React state or animation libraries.rotation prop every frame.
Negative Scales
Use negative scale values to flip shapes.- Tab Title
- Tab Title
- Tab Title