Skip to content

Commit

Permalink
feat: improve alignment curves appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Mar 27, 2024
1 parent 0e76a97 commit 8bc0f54
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 7 additions & 2 deletions resources/openbim-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -120606,7 +120606,12 @@ class CurveHighlighter {
const pointsGeometry = new THREE$1.BufferGeometry();
const pointsAttr = new THREE$1.BufferAttribute(new Float32Array(), 3);
pointsGeometry.setAttribute("position", pointsAttr);
const pointsMaterial = new THREE$1.PointsMaterial({ size, color });
const pointsMaterial = new THREE$1.PointsMaterial({
size,
color,
sizeAttenuation: false,
depthTest: false,
});
const points = new THREE$1.Points(pointsGeometry, pointsMaterial);
points.frustumCulled = false;
this.scene.add(points);
Expand All @@ -120617,7 +120622,7 @@ CurveHighlighter.settings = {
colors: {
LINE: [213 / 255, 0 / 255, 255 / 255],
CIRCULARARC: [0 / 255, 46, 255 / 255],
CLOTHOID: [0 / 255, 255 / 255, 234 / 255],
CLOTHOID: [0 / 255, 255 / 255, 0 / 255],
PARABOLIC: [0 / 255, 255 / 255, 72 / 255],
},
};
Expand Down
1 change: 0 additions & 1 deletion src/civil/Road3DNavigator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@

navigator.highlighter.hoverCurve.material.color.set(1, 1, 1);
navigator.highlighter.hoverPoints.material.color.set(1, 1, 1);
navigator.highlighter.selectPoints.material.size = 5;

const sphere = new THREE.Sphere(undefined, 20);

Expand Down
9 changes: 7 additions & 2 deletions src/civil/RoadNavigator/src/curve-highlighter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class CurveHighlighter {
colors: {
LINE: [213 / 255, 0 / 255, 255 / 255],
CIRCULARARC: [0 / 255, 46, 255 / 255],
CLOTHOID: [0 / 255, 255 / 255, 234 / 255],
CLOTHOID: [0 / 255, 255 / 255, 0 / 255],
PARABOLIC: [0 / 255, 255 / 255, 72 / 255],
} as { [curve: string]: number[] },
};
Expand Down Expand Up @@ -172,7 +172,12 @@ export class CurveHighlighter {
const pointsGeometry = new THREE.BufferGeometry();
const pointsAttr = new THREE.BufferAttribute(new Float32Array(), 3);
pointsGeometry.setAttribute("position", pointsAttr);
const pointsMaterial = new THREE.PointsMaterial({ size, color });
const pointsMaterial = new THREE.PointsMaterial({
size,
color,
sizeAttenuation: false,
depthTest: false,
});
const points = new THREE.Points(pointsGeometry, pointsMaterial);
points.frustumCulled = false;
this.scene.add(points);
Expand Down

0 comments on commit 8bc0f54

Please sign in to comment.