Skip to content

Some optimizations in SceneGraph code#809

Merged
dmarcos merged 3 commits intoaframevr:masterfrom
vincentfretin:break-loop-when-found
Jun 21, 2025
Merged

Some optimizations in SceneGraph code#809
dmarcos merged 3 commits intoaframevr:masterfrom
vincentfretin:break-loop-when-found

Conversation

@vincentfretin
Copy link
Contributor

@vincentfretin vincentfretin commented Jun 16, 2025

Break the for loop when entity is found in SceneGraph selectEntity
No need to still iterate over entities and do a comparison if we found the entity.
I found that when converting this React code to Solid via Claude 4, I figured I push that optimization in here as well.

In scenegraph/Entity.js, simplify getting visible property, it's okay to always use entity.object3D.visible, not need to check if it's a-scene.

@vincentfretin vincentfretin changed the title Break the for loop when entity is found in SceneGraph selectEntity Some optimizations in SceneGraph code Jun 16, 2025
@dmarcos dmarcos merged commit b0db8a2 into aframevr:master Jun 21, 2025
1 check passed
@vincentfretin vincentfretin deleted the break-loop-when-found branch June 21, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants