Skip to content

Commit a8d2789

Browse files
authored
Inspector: Store parameters object+key (#32507)
1 parent cc8b010 commit a8d2789

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

examples/jsm/inspector/tabs/Parameters.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class ParametersGroup {
1313

1414
this.paramList = new Item( name );
1515

16+
this.objects = [];
17+
1618
}
1719

1820
close() {
@@ -93,6 +95,15 @@ class ParametersGroup {
9395

9496
};
9597

98+
99+
this._registerParameter( object, property, editor, subItem );
100+
101+
}
102+
103+
_registerParameter( object, property, editor, subItem ) {
104+
105+
this.objects.push( { object: object, key: property, editor: editor, subItem: subItem } );
106+
96107
}
97108

98109
addFolder( name ) {
@@ -291,6 +302,8 @@ class ParametersGroup {
291302

292303
};
293304

305+
this._registerParameter( object, property, editor, subItem );
306+
294307
return editor;
295308

296309
}
@@ -315,13 +328,16 @@ class Parameters extends Tab {
315328

316329
this.paramList = paramList;
317330

331+
this.groups = [];
332+
318333
}
319334

320335
createGroup( name ) {
321336

322337
const group = new ParametersGroup( this, name );
323338

324339
this.paramList.add( group.paramList );
340+
this.groups.push( group );
325341

326342
return group;
327343

0 commit comments

Comments
 (0)