-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Inspector: Store parameters object+key #32507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
| this.paramList = new Item( name ); | ||
|
|
||
| /** @type {Array<{ object:object, key:string, editor:object, subItem:Item }>} */ | ||
| this.data = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this.objects?
| }; | ||
|
|
||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some spaces in the code; you might need to format it using mrdoob code style.
|
|
||
| this._addParameter( object, property, editor, subItem ); | ||
|
|
||
| this._registerParameter( object, property, editor, subItem ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add _registerParameter() inside _addParameter() to simplify the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's what I did at first but the button method didnt call _addParameter - maybe an oversight?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add a method exception for the button; that would simplify things anyway.
| /** @type {List} */ | ||
| this.paramList = paramList; | ||
|
|
||
| /** @type {Array<ParametersGroup>} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to remove the js-doc now; we can do this entirely in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this just be extra work later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because it needed to be redone anyway.
You can follow js-doc? The style of js-doc we use is different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed :) If you prefer I can remove it (or change it to match the style if you can point me to an example or docs). I feel comfortable with js-doc (use it a lot in our js projects)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 218 to 223 in 5ae9a2e
| /** | |
| * Adds the given vector to this instance. | |
| * | |
| * @param {Vector3} v - The vector to add. | |
| * @return {Vector3} A reference to this vector. | |
| */ |
Related issue: #32485
Description
Currently the inspector does not provide access to the objects and keys that are being controlled by the inspector UI.
This PR adds storing the parameters (object + key) in the parameters group to be accessible for external inspector tools (e.g. chrome extensions).
This contribution is funded by Needle