@@ -103,6 +103,8 @@ export default function (
103
103
scene . add ( light ) ;
104
104
} ) ;
105
105
106
+ const grayBasicMaterial = getBasicMaterial ( [ 0.4 , 0.4 , 0.4 ] , 1 ) ;
107
+
106
108
const boundingBox = new LineSegments (
107
109
new BufferGeometry ( ) . setAttribute (
108
110
'position' ,
@@ -144,7 +146,7 @@ export default function (
144
146
extent . xmin , extent . ymax , extent . zmin ,
145
147
] ) , 3 )
146
148
) ,
147
- getBasicMaterial ( [ 0.4 , 0.4 , 0.4 ] , 1 )
149
+ grayBasicMaterial
148
150
) ;
149
151
150
152
scene . add ( boundingBox ) ;
@@ -167,22 +169,14 @@ export default function (
167
169
] ) , 3 ) ;
168
170
169
171
// 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 ) ;
174
173
175
174
for ( let i = 0 ; i < 3 ; i ++ ) {
176
175
if ( hasAxes [ i ] ) {
177
176
axesGeometry [ i ] = new BufferGeometry ( ) . setAttribute (
178
177
'position' ,
179
178
axesVerticesPosition
180
179
) ;
181
-
182
- scene . add ( new LineSegments (
183
- axesGeometry [ i ] ,
184
- tickMaterial
185
- ) ) ;
186
180
}
187
181
}
188
182
@@ -196,7 +190,7 @@ export default function (
196
190
3
197
191
)
198
192
) ,
199
- tickMaterial
193
+ grayBasicMaterial
200
194
) ;
201
195
202
196
scene . add ( ticks [ i ] ) ;
@@ -209,7 +203,7 @@ export default function (
209
203
3
210
204
)
211
205
) ,
212
- tickMaterial
206
+ grayBasicMaterial
213
207
) ;
214
208
215
209
scene . add ( ticksSmall [ i ] ) ;
0 commit comments