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

@threlte/flex #641

Merged
merged 14 commits into from
Sep 28, 2023
Merged

@threlte/flex #641

merged 14 commits into from
Sep 28, 2023

Conversation

grischaerbe
Copy link
Collaborator

@grischaerbe grischaerbe commented Sep 28, 2023

@threlte/flex

This package will introduce a wrapper for yoga-layout.

Features

  • <Flex> and <Box> components
  • Automatically centered anchor if a child is not a <Box> component (DOM anchors are upper-left aligned whereas Three.js object anchors are centered)
  • Full type support on props
  • prop setter architecture makes it easy to type props
  • A class parser can be introduced to use a class-based syntax as opposed to individual props, a parser for tailwind-like classes is included
  • Slot props and bindings to force a layout reflow
  • The reflow is batched and will never happen more than once per frame

Examples

The package contains a SvelteKit app with examples located at the route '/', run pnpm dev at packages/flex to get started.

Bildschirmaufnahme.2023-09-28.um.12.58.46.mp4

Credits

Some calculations are taken from react-three-flex, thanks.

@grischaerbe grischaerbe added the enhancement New feature or request label Sep 28, 2023
@stackblitz
Copy link

stackblitz bot commented Sep 28, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Sep 28, 2023

🦋 Changeset detected

Latest commit: 633c9e4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@threlte/flex Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
threlte ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2023 0:18am

@grischaerbe
Copy link
Collaborator Author

Because changesets is not allowing us to do an alpha release only for this package, we'll release this into the wild without a documentation. As long as 0.1.0 is not reached this package is considered alpha and likely to break anytime. Use at your own risk.

@grischaerbe grischaerbe marked this pull request as ready for review September 28, 2023 12:32
@grischaerbe grischaerbe merged commit 7fd233c into main Sep 28, 2023
2 checks passed
@grischaerbe grischaerbe deleted the flex branch September 29, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant