Closed wumaolinmaoan closed 3 months ago
The GizmoComponent
in gizmo-component.ts
has been updated to include a new property called coordinateSpace
, defaulting to CoordinateSpace.Local
. This property is serialized and used to determine the world transformation of the targetItem
based on its value, thus altering how the gizmo is rendered based on its coordinate space.
File | Change Summary |
---|---|
plugin-packages/editor-gizmo/src/gizmo-component.ts |
Added coordinateSpace property with default CoordinateSpace.Local and defined CoordinateSpace enum. |
sequenceDiagram
participant User
participant GizmoComponent
User->>GizmoComponent: Initialize GizmoComponent
GizmoComponent->>GizmoComponent: Set coordinateSpace to CoordinateSpace.Local
User->>GizmoComponent: Update targetItem
GizmoComponent->>GizmoComponent: Check coordinateSpace
alt coordinateSpace is Local
GizmoComponent->>GizmoComponent: Apply local transformation
else coordinateSpace is World
GizmoComponent->>GizmoComponent: Apply world transformation
end
GizmoComponent-->>User: Render gizmo based on coordinateSpace
In the land of code, where gizmos play,
Comes a change to guide the way.
A coordinate space, so wise and true,
Local or World, it’s up to you!
Transformations now align,
In the gizmo's dance, so fine.
🎨✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
coordinateSpace
property in the editor gizmo component to enhance gizmo rendering options.