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

simplify threejs imports #53

Merged
merged 4 commits into from
Jan 8, 2023
Merged

simplify threejs imports #53

merged 4 commits into from
Jan 8, 2023

Conversation

ChristopherChudzicki
Copy link
Collaborator

@ChristopherChudzicki ChristopherChudzicki commented Jan 7, 2023

This PR simplifies the "three" imports as discussed in #49.

Do not merge: Until Threestrap v0.5.1 is published. Oh, the CI tests should fail until then anyway.

Previously we were importing from specific three/src files. Why change? Because:
    - we can still tree shake
    - we were actually (indeirectly) using bare imports before, too: MathBox (via Threestrap) imports from "three/examples/jsm/controls/OrbitControls", and OrbitControls imports bare "three"
    - "three" seems like the more official import pattern; it's what is documented at https://threejs.org/docs/#manual/en/introduction/Installation

See also #49
@sritchie
Copy link
Collaborator

sritchie commented Jan 7, 2023

Great work, I'll get all these reviewed and merged this morning. It was really nice to see the bundle size improvements!

@sritchie
Copy link
Collaborator

sritchie commented Jan 7, 2023

As you say, it looks like the failures come from no threestrap 0.5.1 yet. I'm excited to get publishing automated here...

Thanks for undoing my unintentionally-destructive work here!!

@sritchie
Copy link
Collaborator

sritchie commented Jan 7, 2023

(Merge away when threestrap's published)

Now that it's published
@ChristopherChudzicki
Copy link
Collaborator Author

@sritchie Thanks for the reviews! PR for the instanceof of change will be a bit later today, I hope.

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.

2 participants