File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 88 RELATIVE_DEPTH ,
99 IS_LEAF ,
1010 RANDOM_COLOR ,
11+ RANDOM_NODE_COLOR ,
1112} from './three/DebugTilesRenderer.js' ;
1213import { TilesRenderer } from './three/TilesRenderer.js' ;
1314import { B3DMLoader } from './three/B3DMLoader.js' ;
@@ -49,4 +50,5 @@ export {
4950 RELATIVE_DEPTH ,
5051 IS_LEAF ,
5152 RANDOM_COLOR ,
53+ RANDOM_NODE_COLOR ,
5254} ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { SphereHelper } from './SphereHelper.js';
55
66const ORIGINAL_MATERIAL = Symbol ( 'ORIGINAL_MATERIAL' ) ;
77const HAS_RANDOM_COLOR = Symbol ( 'HAS_RANDOM_COLOR' ) ;
8+ const HAS_RANDOM_NODE_COLOR = Symbol ( 'HAS_RANDOM_NODE_COLOR' ) ;
89
910function emptyRaycast ( ) { }
1011
@@ -253,12 +254,18 @@ export class DebugTilesRenderer extends TilesRenderer {
253254
254255 }
255256
256- if ( colorMode !== RANDOM_COLOR && colorMode !== RANDOM_NODE_COLOR ) {
257+ if ( colorMode !== RANDOM_COLOR ) {
257258
258259 delete c . material [ HAS_RANDOM_COLOR ] ;
259260
260261 }
261262
263+ if ( colorMode !== RANDOM_NODE_COLOR ) {
264+
265+ delete c . material [ HAS_RANDOM_NODE_COLOR ] ;
266+
267+ }
268+
262269 // Set the color on the basic material
263270 switch ( colorMode ) {
264271
@@ -324,10 +331,10 @@ export class DebugTilesRenderer extends TilesRenderer {
324331 }
325332 case RANDOM_NODE_COLOR : {
326333
327- if ( ! c . material [ HAS_RANDOM_COLOR ] ) {
334+ if ( ! c . material [ HAS_RANDOM_NODE_COLOR ] ) {
328335
329336 c . material . color . setHSL ( h , s , l ) ;
330- c . material [ HAS_RANDOM_COLOR ] = true ;
337+ c . material [ HAS_RANDOM_NODE_COLOR ] = true ;
331338
332339 }
333340 break ;
You can’t perform that action at this time.
0 commit comments