ThatOpen / engine_components

MIT License
338 stars 130 forks source link

HighlightMaterial selected do not work when fragmentPlan is not implemented #310

Closed MiguelG97 closed 4 months ago

MiguelG97 commented 8 months ago

Describe the bug πŸ“

I realized that when the navigation floorplan is not integrated, the highlight material on selected is not working

This is what happens when fragmentPlan is not integrated image

this is the other way: image

I noticed this piece of code make the difference in the fragmentplan file. However when copyied to the highlight feature without implementing fragment plan is not making it work.

    const canvas =
      viewer.renderer.get().domElement;
    canvas.addEventListener("click", () =>
      highlighter.clear("default")
    );
    highlighter.updateHighlight();

Reproduction ▢️

No response

Steps to reproduce πŸ”’

No response

System Info πŸ’»

"three": "^0.160.1",
    "web-ifc": "^0.0.51"
    "bim-fragment": "^1.4.0",
    "openbim-components": "^1.4.2",

Used Package Manager πŸ“¦

npm

Error Trace/Logs πŸ“ƒ

No response

Validations βœ…

agviegas commented 4 months ago

Hey @MiguelG97 this should be solved in the latest version of the libraries. Let us know otherwise.

PD: We've temporarily disabled the outline effect we had before when highlighting items because the highlighting logic changed a lot (now it's much more performant). We plan to add it again in the future.