Skip to content

Commit 1b0e8fc

Browse files
Change color of axes ticks from black to gray
This is closer to Wolfram Language bahaviour.
1 parent 9527e7e commit 1b0e8fc

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/graphics3d.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export default function (
103103
scene.add(light);
104104
});
105105

106+
const grayBasicMaterial = getBasicMaterial([0.4, 0.4, 0.4], 1);
107+
106108
const boundingBox = new LineSegments(
107109
new BufferGeometry().setAttribute(
108110
'position',
@@ -144,7 +146,7 @@ export default function (
144146
extent.xmin, extent.ymax, extent.zmin,
145147
]), 3)
146148
),
147-
getBasicMaterial([0.4, 0.4, 0.4], 1)
149+
grayBasicMaterial
148150
);
149151

150152
scene.add(boundingBox);
@@ -167,22 +169,14 @@ export default function (
167169
]), 3);
168170

169171
// axes ticks
170-
const
171-
tickMaterial = getBasicMaterial([0, 0, 0], 1),
172-
ticks = new Array(3),
173-
ticksSmall = new Array(3);
172+
const ticks = new Array(3), ticksSmall = new Array(3);
174173

175174
for (let i = 0; i < 3; i++) {
176175
if (hasAxes[i]) {
177176
axesGeometry[i] = new BufferGeometry().setAttribute(
178177
'position',
179178
axesVerticesPosition
180179
);
181-
182-
scene.add(new LineSegments(
183-
axesGeometry[i],
184-
tickMaterial
185-
));
186180
}
187181
}
188182

@@ -196,7 +190,7 @@ export default function (
196190
3
197191
)
198192
),
199-
tickMaterial
193+
grayBasicMaterial
200194
);
201195

202196
scene.add(ticks[i]);
@@ -209,7 +203,7 @@ export default function (
209203
3
210204
)
211205
),
212-
tickMaterial
206+
grayBasicMaterial
213207
);
214208

215209
scene.add(ticksSmall[i]);

0 commit comments

Comments
 (0)