Skip to content

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 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

2 participants