ZeaInc / zea-svelte-template

This Svelte Template is a preconfigured Svelte app that combines the engine and many of the popular plugins.
https://www.zea.live/en/ecosystem/svelte-template
MIT License
0 stars 0 forks source link

Add a drop file feature to load zcad files and gltf files. #37

Closed phtaylor closed 3 years ago

phtaylor commented 3 years ago

Make it possible to simply drag n drop files into the viewer.

  1. If no cad file is already loaded, then show the drop here overlay.
  2. If a user drops a zcad file, or a gltf file, then load that file.
  3. IF a user drags and drops another file, then ideally it could load the second file.

See here for this previous effort that was never finished. https://github.com/ZeaInc/gltf-loader/pull/2/commits/b013f95105ef1916d36754fe637069aa61b6a118

phtaylor commented 3 years ago

It looks like dropping glb files isn't quite working.

Here is the original implementation that does work.

https://github.com/ZeaInc/gltf-loader/commit/b013f95105ef1916d36754fe637069aa61b6a118#diff-8db0ea56b4cdff062269c7ea165c52fbec6e2693c52bf7118f54a7069e2175e1R174-R188

https://github.khronos.org/glTF-Sample-Viewer-Release/assets/models/2.0/GearboxAssy/glTF/GearboxAssy.gltf