Closed lgharib closed 3 years ago
Would it be possible to support dragging a second file over and dropping it? This may be impossible, so I just wanted to check.
Unable to load all zcad sample datasets
Sucess
'Bounding box not valid'
This issue is resulted from https://cdn.jsdelivr.net/npm/@zeainc/zea-engine@3/src/SceneTree/Camera.js
/**
* Calculates a new camera position that frames all the items passed in `treeItems` array, moving
* the camera to a point where we can see all of them.
*
* @param {GLBaseViewport} viewport - The viewport value.
* @param {array} treeItems - The treeItems value.
*/
frameView(viewport, treeItems) {
const boundingBox = new Box3()
for (const treeItem of treeItems) {
boundingBox.addBox3(treeItem.getParameter('BoundingBox').getValue())
}
if (!boundingBox.isValid()) {
console.warn('Bounding box not valid.')
return
}
Is this a known issue? For example https://svelte-template.zea.live/?zcad=%2Fdata%2FFidget-Spinner-2.zcad
We updated our zcad file format and this one is just a bit old. I will update it.
At the moment the solution supports dragging of multiple assets. However, they are currently binded to the same canvas (they will overlap each other if both assets are "visible")
This is what I get if I drag and drop multiple files. This is great.
Deploying with Cloudflare Pages
1b325d1
View logs