Skip to content

Commit

Permalink
chore: update hotspots
Browse files Browse the repository at this point in the history
  • Loading branch information
enijar committed Sep 19, 2023
1 parent 9ceb098 commit cef29ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Binary file modified public/assets/hotspot.glb
Binary file not shown.
7 changes: 4 additions & 3 deletions src/components/hotspot/hotspot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,25 +171,26 @@ export default function Hotspot({
<group scale-x={flipped ? -1 : 1}>
<group position={[0.67, 0, 0]}>
<mesh geometry={nodes.Hotspot_Surround_01.geometry}>
<meshBasicMaterial color="#35373e" />
<meshBasicMaterial color="#babcbe" />
</mesh>
<mesh
position-x={width + padding}
geometry={nodes.Hotspot_Surround_03001.geometry}
>
<meshBasicMaterial color="#35373e" />
<meshBasicMaterial color="#babcbe" />
</mesh>
</group>
<group position={labelPosition}>
<mesh>
<boxBufferGeometry args={[width + padding, 0.395, 0.057]} />
<meshBasicMaterial color="#35373e" />
<meshBasicMaterial color="#babcbe" />
</mesh>
<Text
scale-x={flipped ? -1 : 1}
position-x={0.025}
position-z={0.057 + 0.0001}
fontSize={0.395 / 2}
color="#000000"
onAfterRender={(renderer, scene, camera, geometry) => {
const nextWidth = Math.abs(geometry.boundingBox.max.x * 2);
if (nextWidth === Infinity) return;
Expand Down
7 changes: 4 additions & 3 deletions src/components/model-hotspot/model-hotspot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,26 @@ export default function ModelHotspot({
<group scale-x={flipped ? -1 : 1}>
<group position={[0.67, 0, 0]}>
<mesh geometry={nodes.Hotspot_Surround_01.geometry}>
<meshBasicMaterial color="#35373e" />
<meshBasicMaterial color="#babcbe" />
</mesh>
<mesh
position-x={width + padding}
geometry={nodes.Hotspot_Surround_03001.geometry}
>
<meshBasicMaterial color="#35373e" />
<meshBasicMaterial color="#babcbe" />
</mesh>
</group>
<group position={labelPosition}>
<mesh>
<boxBufferGeometry args={[width + padding, 0.395, 0.057]} />
<meshBasicMaterial color="#35373e" />
<meshBasicMaterial color="#babcbe" />
</mesh>
<Text
scale-x={flipped ? -1 : 1}
position-x={0.025}
position-z={0.057 + 0.0001}
fontSize={0.395 / 2}
color="#000000"
onAfterRender={(renderer, scene, camera, geometry) => {
const nextWidth = Math.abs(geometry.boundingBox.max.x * 2);
if (nextWidth === Infinity) return;
Expand Down

0 comments on commit cef29ff

Please sign in to comment.