Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gizmo updates #6992

Merged
merged 42 commits into from
Sep 27, 2024
Merged

Gizmo updates #6992

merged 42 commits into from
Sep 27, 2024

Conversation

kpal81xd
Copy link
Contributor

@kpal81xd kpal81xd commented Sep 26, 2024

Fixes #6981
Fixes #6990

  • Gizmo follows nodes when attached
  • Updated api to allow gizmo.attach to accept a single node
  • Layer is created internally and reused by other gizmos unless specified
  • constructor modified to omit app parameter
  • Refactored AxisShapes into separate Shape classes
  • Added shading flag to TransformGizmo types and set default to false

API changes

  • new Gizmo(app: AppBase, camera: CameraComponent, layer: Layer) -> new Gizmo(camera: CameraComponent, layer: Layer)
  • gizmo.attach(nodes?: GraphNode[] = []) -> gizmo.attach(nodes?: GraphNode[] | GraphNode = [])
  • NEW: const layer = Gizmo.createLayer(app: AppBase, layerName?: string = 'Gizmo', layerIndex?: number | undefined)

N.B The createLayer static function will create a new layer and will add it to the scene. The Gizmo class constructor will append the layer to the camera's set of layers.

Preview

image

@kpal81xd
Copy link
Contributor Author

@kungfooman okay found the error mesh instances were trying to be referenced after being destroyed oops

@kpal81xd kpal81xd merged commit f052a53 into main Sep 27, 2024
7 of 8 checks passed
@kpal81xd kpal81xd deleted the gizmos branch September 27, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gizmo doesn't follow what it is attached to Simplify Gizmo creation
5 participants