@@ -29,6 +29,8 @@ class SceneObjects{
29
29
this . nodeMeshes = [ ] ;
30
30
this . lidarsMeshes = [ ] ;
31
31
this . dummiesMeshes = [ ] ;
32
+ this . numberOfNodesCreated = 0 ;
33
+ this . numberOfLidarsCreated = 0 ;
32
34
33
35
const givenAreaPolygonRegions = [ [ ] ] ;
34
36
@@ -152,7 +154,8 @@ class SceneObjects{
152
154
console . log ( "Add Node button will work in an instant" ) ;
153
155
return ;
154
156
}
155
- const newCamera = new Node ( nodes . length , mode , typeID , x , y , z , p , a , r )
157
+ const newCamera = new Node ( this . numberOfNodesCreated , mode , typeID , x , y , z , p , a , r ) ;
158
+ this . numberOfNodesCreated ++ ;
156
159
if ( ! isBuilder ) newCamera . uiElement = new NodeUI ( newCamera , sceneManager ) ;
157
160
158
161
//Offset
@@ -176,6 +179,9 @@ class SceneObjects{
176
179
177
180
sceneManager . sceneSensorHeight = z ;
178
181
182
+ document . getElementById ( "display-lidars-rays-button" ) . classList . add ( "hidden" ) ;
183
+ document . getElementById ( "display-frustums-button" ) . classList . remove ( "hidden" ) ;
184
+
179
185
this . populateStorage ( ) ;
180
186
}
181
187
@@ -220,7 +226,8 @@ class SceneObjects{
220
226
console . log ( "Add Lidar button will work in an instant" ) ;
221
227
return ;
222
228
}
223
- const newLidar = new Lidar ( lidars . length , typeID , x , z , r ) ;
229
+ const newLidar = new Lidar ( this . numberOfLidarsCreated , typeID , x , z , r ) ;
230
+ this . numberOfLidarsCreated ++ ;
224
231
if ( ! isBuilder ) newLidar . uiElement = new LidarUI ( newLidar , sceneManager ) ;
225
232
226
233
//Offset
@@ -242,6 +249,9 @@ class SceneObjects{
242
249
lidars . push ( newLidar ) ;
243
250
this . lidarsMeshes . push ( newLidar . mesh ) ;
244
251
252
+ document . getElementById ( "display-lidars-rays-button" ) . classList . remove ( "hidden" ) ;
253
+ document . getElementById ( "display-frustums-button" ) . classList . add ( "hidden" ) ;
254
+
245
255
this . populateStorage ( ) ;
246
256
}
247
257
@@ -250,14 +260,14 @@ class SceneObjects{
250
260
const visibles = lidars . filter ( l => l . raysAppear ) ;
251
261
lidars . forEach ( l => l . changeVisibility ( visibles . length != lidars . length ) ) ;
252
262
const iconElem = document . getElementById ( 'display-lidars-rays-button-icon' ) ;
253
- if ( iconElem ) iconElem . dataset . icon = visibles . length != nodes . length ? "akar-icons:eye-open " : "akar-icons:eye-slashed " ;
263
+ if ( iconElem ) iconElem . dataset . icon = visibles . length != nodes . length ? "akar-icons:eye-slashed " : "akar-icons:eye-open " ;
254
264
}
255
265
256
266
this . updateRaysIcon = function ( )
257
267
{
258
268
const visibles = lidars . filter ( l => l . raysAppear ) ;
259
269
const iconElem = document . getElementById ( 'display-lidars-rays-button-icon' ) ;
260
- if ( iconElem ) iconElem . dataset . icon = visibles . length != 0 ? "akar-icons:eye-open " : "akar-icons:eye-slashed " ;
270
+ if ( iconElem ) iconElem . dataset . icon = visibles . length != 0 ? "akar-icons:eye-slashed " : "akar-icons:eye-open " ;
261
271
}
262
272
263
273
this . removeLidars = function ( )
0 commit comments