Comments (8)
I'm actually currently implementing Fragment cloning. Once I solve that, implementing this should be a piece of cake.
from components.
You are right! We temporarily removed the highlight feature for the new refactor, as the way the highlight works has changed drastically. This is not a but. But don't worry, we'll put it back the next milestone. I'll remove the bug
flag and add a feature
flag instead
from components.
Hi @agviegas any update on this issue/feature? I noticed this as well in my recent migration to the new refactor.
from components.
I'll do it asap. We have few hands. Hopefully these weeks, I'll post any updates here
from components.
Thanks for the update @agviegas
Shall I take it up and create a pull request once done? I would like to contribute if possible.
from components.
For temporary solution I use this code. Maybe It will helpful for somebody
const highlightMats = {
default: new MeshBasicMaterial({
color: '#674db3',
depthTest: false,
opacity: 0.8,
transparent: true,
}),
};
const highlightFragment = (fragmentMap: FragmentIdMap) => {
const components = new Components();
const fragmentsManager = components.get(OBC.FragmentsManager);
for (const fragID in fragmentMap) {
const fragment = fragmentsManager.list.get(fragID);
if (!fragment) continue;
fragment.mesh.material = [highlightMats.default];
}
};
from components.
Yeah, this workaround is good.
But, one extra thing it probably needs is to make a copy of the mesh and highlight the copy so that the original mesh retains it materials once the highlight is disabled. The copy can be deleted on highlight removal.
from components.
Will be available from @thatopen/[email protected]
(I hope to publish later today). Now there's an outline component that allows to add outlines to fragments and can be used with the highlighter easily. With this code:
const outliner = components.get(OBCF.Outliner);
outliner.world = world;
outliner.enabled = true;
outliner.create(
"example",
new THREE.MeshBasicMaterial({
color: 0xbcf124,
transparent: true,
opacity: 0.5,
}),
);
highlighter.events.select.onHighlight.add((fragIdMap) => {
outliner.clear("example");
outliner.add("example", fragIdMap);
});
This is the result:
2024-08-06.13-39-54.mp4
The highlighter tutorial will also be updated with this.
from components.
Related Issues (20)
- 2D Plans problem HOT 8
- Issue using "@thatopen/components" when using watchify HOT 3
- ClipEdges is not working anymore HOT 2
- Config optional to unloadLostGeometries and toHide when using culler for IfcStreamer. HOT 4
- IfcStreamer load multiple json files
- Camera controls broken if the zoom distance is too high HOT 1
- Multiple Building Not in Center HOT 3
- Fragment loading fails with large IFC file HOT 5
- Consistency in process and language in the documentation
- Highlighter - Improving events
- Display IFCGRID in 3D view HOT 3
- Highlighter - AutoToggle is active during function highlighter.highlightByID HOT 2
- Each CullerRenderer creates a new WebGL context HOT 7
- Possible memory leak when disposing HOT 1
- some IFC mesh elements not being properly processed with ifcLoader HOT 10
- Static Errors class to throw and document all errors in the library
- Same model twice breaks the scene (with culler in place) HOT 2
- Investigate "Please ignore" messages in tree in umdasch 700MB model
- I generated tile json files using IfcGeometriyTiler, but I don't know how to use these files HOT 2
- npm i @thatopen/fragments errors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from components.