Skip to content
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

NodeUtils: getNodesKeys -> getNodeChildren #25581

Merged
merged 16 commits into from
Mar 1, 2023
Merged

Conversation

LeviPesin
Copy link
Contributor

Related issue: #25553 (comment)

Description

Slightly rework NodeUtils.getNodesKeys() and use it in Node.


// @TODO: Think about implement NodeArray and NodeObject.

if ( Array.isArray( node ) ) {
let childCacheKey = getCacheKey( childNode );
if ( ! childCacheKey.includes( ',' ) ) childCacheKey = childCacheKey.slice( childCacheKey.indexOf( '"' ), childCacheKey.indexOf( '}' ) );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line just converts childCacheKey to just uuid if it has only it (i.e. something like {uuid:"..."} to "...").

@sunag sunag added the Nodes label Feb 28, 2023
@sunag sunag added this to the r151 milestone Feb 28, 2023
@sunag
Copy link
Collaborator

sunag commented Mar 1, 2023

Node.serialize() seems still uses getNodesKey(), noticed in the webgl_nodes_materials_standard.html example.

@LeviPesin
Copy link
Contributor Author

Fixed!

@sunag sunag merged commit 98d3030 into mrdoob:dev Mar 1, 2023
@sunag
Copy link
Collaborator

sunag commented Mar 1, 2023

Thanks you for all @LeviPesin :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants