Skip to content

refactor: rename defaultCamera/defaultRaycaster canvas props to camera/raycaster#48

Merged
bigmistqke merged 1 commit into
solidjs-community:nextfrom
bigmistqke:next
Apr 28, 2026
Merged

refactor: rename defaultCamera/defaultRaycaster canvas props to camera/raycaster#48
bigmistqke merged 1 commit into
solidjs-community:nextfrom
bigmistqke:next

Conversation

@bigmistqke
Copy link
Copy Markdown
Contributor

Summary

Renames the <Canvas> props defaultCamera and defaultRaycaster to camera and raycaster.

The default prefix was chosen to reflect how these props work internally: the canvas maintains a stack for both the active camera and raycaster, and these props seed the bottom of that stack — the fallback that's active unless something higher in the scene graph (e.g. a portal) pushes its own onto the stack.

While accurate, the default prefix turns out to be an implementation detail that leaks into the public API. From a user's perspective, camera and raycaster are simply "the camera/raycaster to use for this canvas" — the stack mechanism is invisible. The longer names also create friction for the common case where users just want to supply a custom camera without thinking about stacks at all.

Changes

  • Renames defaultCamera → camera and defaultRaycaster → raycaster on props
  • Updates all playground examples, tests, and README to use the new names

Breaking change

This is a rename-only breaking change. No behavior is altered. Users on the previous API need to rename their props.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 28, 2026

Open in StackBlitz

npm i https://pkg.pr.new/solid-three@48

commit: a7538f4

@bigmistqke bigmistqke merged commit dade8a4 into solidjs-community:next Apr 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant