Closed chloesun closed 5 years ago
Regarding your 2nd question:
I believe I've already run into this issue and I seem to recall that the resetView method is not fully implemented in the xeokit library:
https://xeokit.github.io/xeokit-sdk/docs/file/src/viewer/Viewer.js.html#lineNumber241
Might be worth opening an issue about this over there.
As for your highlighting question, I'll try and have a look at it sometime in the near future hopefully.
@barnabasmolnar Thanks, I already submitted an issue over there, just found this method https://xeokit.github.io/xeokit-sdk/docs/class/src/viewer/scene/scene/Scene.js~Scene.html#instance-method-setObjectsHighlighted looks like it may solve my first issue
I tried to use that method and it leads to the same problem. I tested with an id
of an object and went through the debugger to figure out what's wrong:
Pass this.objects
to _withEntities
and you can see the this.objects
which is entities
is an empty{ }
object, so no entity is selected and highlighted. @xeolabs
I'm trying to extend the functionality of GLTFViewer component. One method is to highlight the entity based on the given
id
, and another one is to reset the view, and I tried to implement by myself:While trying to
console.log(scene.objects)
, I was expecting to get the object contains all the objects, but I got an empty object{ }
, but when I click the little triangle, I can see the objects inside..and I can't access the value. Hovering the littlei
icon, it showsValue below was evaluated just now
About resetting the view, I found this https://xeokit.github.io/xeokit-sdk/docs/class/src/viewer/Viewer.js~Viewer.html#instance-method-resetView,
and I added a button in the render method to trigger resetView, but this doesn't work...
Hope to get some input from you guys, thanks!