-
Notifications
You must be signed in to change notification settings - Fork 19
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
Bundle less CDN example? #68
Comments
search for https://unpkg.com/browse/@pmndrs/vanilla/ https://www.jsdelivr.com/package/npm/@pmndrs/vanilla was not able to setup the imports correctly ,will look at it again later |
Somehow didn't work. Anyways, I will be keen to see an example without bundling. Thanks for replying. |
check this fiddle , is this what you meant ? |
Thank you for the example. All seems to work except for the "Outlines" helper. Simply executing the Outlines() function causes a different typeerror for different browsers. I'm wondering if my implementation is incorrect. I've forked your fiddle and imported the Outlines helper, example here: |
Ok, i've managed to get the Outlines() function on a CDN only instance working by fixing all the issues that propped up. Originally I imported vanilla-drei only for the outlines feature since no other implementation is good as react-three-drei's. Since that was the case I decided to just extract the code I needed. The application I was dealing with required VanillaJS so I had to transpile it with Babel. It should not return "TypeError: Right side of assignment cannot be destructured" anymore. If anyone else comes across this searching for a super hyperspecific scenario of where you are only allowed CDNs, VanillaJS and want some nice outlines, here are the snippets. Heres the HTML:
And the Javascript: loadObject.js
Hope this helps someone else. |
On jsfiddle i was able to get outline working without any changes. so the problem might be specific to your build environment, |
cool, will add that in the upcoming updates |
Is there a possibility for adding a vanila/bundleless/CDN example?
The text was updated successfully, but these errors were encountered: