Repository navigation
Simpler way to include an image #1785
neuhaus
started this conversation in
Show and tell
Replies: 1 comment
|
Why do you need two JS blocks exactly ? Every demo has a single one. Be aware that if you start using plugins, esm.sh will break apart and load multiple copies of three. Same thing on esm.run (jsdelivr variant of this feature). It is a good idea to create a Web Component for your need, however I will not provide an official one because there are just too much options, methods and events, let alone the plugins. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I don't like having to have two javascript blocks just to include a default 360° viewer for a fullscreen image.
I use esm.sh here instead of jsdelivr. It automatically resolves the "three" dependency, eliminating the need for an import map! I also wanted a custom element for the viewer itself.
So now I have this generic file
viewer-component.js:And then a minimalistic index.html with a new custom element:
Perhaps it's useful for someone...
All reactions