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

WIP: Wasm Yoga port (2021) #67

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

WIP: Wasm Yoga port (2021) #67

wants to merge 2 commits into from

Conversation

astahmer
Copy link

Closes #30 #66
Based on #37

I'm definetely not familiar with both WASM and the react-three-flex so please forgive me if anything seems wrong.
I feel like the rebase went mostly fine, but please double-check everything especially the conditions in src/Flex.tsx, around the lines of // Recalc all the sizes

One issue remaining is the getIsTopLevelChild in src/util.ts which needs a missing yoga binding (YGNodeGetParent)

@astahmer astahmer mentioned this pull request Sep 18, 2021
@drcmda
Copy link
Member

drcmda commented Sep 18, 2021

i would love for this project to go forward but i have no idea how to review or test for validity. but after all, if it's maintained the maintainers intuition has more worth than any of that. if you came that far, would you want to take over so that we can move forward more rapidly? i could help with demos testing it out and getting more traction so others can join and help.

could you quickly go into the advantages of the new port? is it faster/slimmer/safer ...

@astahmer
Copy link
Author

well, kinda awkward situation but.. same ? I don't think I'm the right guy for the job here 😅
i've got no knowledge on most subjects there, I barely got into 3d/threejs/r3f (like about 3 days ago), I ended up doing this by just trying to start the app using vite without troubles

I litterally have no idea what are the advantages besides the one listed in the original PR, which says that it's slimmer (and looking at the diff on .size-snapshot.json, it seems to be the case indeed !)

Maybe @saitonakamura can help ?

@saitonakamura
Copy link
Collaborator

saitonakamura commented Sep 18, 2021

Haha, I was just too afraid to touch wasm, but if you're saying that you don't have experience too (cause you managed to make it work I assumed you are 😅) I can give it a shot. I have pretty good understanding of react-three-flex by now so there's that

@giulioz
Copy link
Member

giulioz commented Sep 18, 2021

I've tried this approach myself some time ago, the problem is that the code becomes way less easy to maintain and the size/speed advantage is not much. Have you been able to experience real benefits with this?

@astahmer
Copy link
Author

I've tried this approach myself some time ago, the problem is that the code becomes way less easy to maintain and the size/speed advantage is not much. Have you been able to experience real benefits with this?

Yeah I did notice that the API wasn't as straightforward as before with yoga-wasm-slim, doesn't seem to be the case with https://github.com/pinqy520/yoga-layout-wasm tho

As for the benefits, no idea, but I couldn't get @react-three/flex running with Vite without it (see #66)

@saitonakamura
Copy link
Collaborator

I took my shot at it and here's what I came up with #69

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.

Decouple from yoga-layout-prebuilt
4 participants