Skip to content

Fix mixin issue and consolidation refresh components#7

Merged
MakingSpiderSense merged 8 commits into
mainfrom
bugfix/refresh-raycaster-on-model-load/91-raycaster-refresh-fail
Jul 10, 2025
Merged

Fix mixin issue and consolidation refresh components#7
MakingSpiderSense merged 8 commits into
mainfrom
bugfix/refresh-raycaster-on-model-load/91-raycaster-refresh-fail

Conversation

@MakingSpiderSense
Copy link
Copy Markdown
Owner

@MakingSpiderSense MakingSpiderSense commented Jul 10, 2025

This pull request introduces significant changes to improve model loading behavior and refresh mechanisms in the scene. It removes redundant components (delayed-dynamic-body and refresh-raycaster-on-model-load) and consolidates their functionality into a new post-model-load-refresh component. There is a mixin issue that caused the refresh to never occur in some cases, which is fixed here. Additionally, documentation updates were made to clarify usage recommendations for models with textures.

Component Consolidation and Removal:

  • Removed delayed-dynamic-body component: The functionality to add a dynamic-body attribute after a delay has been deprecated and consolidated into the new post-model-load-refresh component.
  • Removed refresh-raycaster-on-model-load component: This component's functionality to refresh raycasters after models load has been integrated into the post-model-load-refresh component.
  • Added post-model-load-refresh component: Introduced a new component to handle refreshing raycasters and physics bodies after all models have loaded. This resolves race conditions caused by delayed texture loading. It includes configurable options for refreshing raycasters and physics bodies, and a fallback mechanism to ensure refresh occurs even if models fail to load within 5 seconds.

Documentation Updates:

  • Updated holdable component documentation: Added a recommendation to use the post-model-load-refresh component for scenes with models and textures to ensure proper raycaster and physics body initialization.

https://trello.com/c/vDoesUmp

Copilot AI review requested due to automatic review settings July 10, 2025 19:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR consolidates model load post-processing into a single component, removes redundant refresh and delay components, and updates related documentation.

  • Removed two separate components (delayed-dynamic-body, refresh-raycaster-on-model-load) and introduced post-model-load-refresh to handle both raycaster and physics-body refresh.
  • Added configurable fallback mechanism to force a refresh if models don't load within 5 seconds.
  • Updated holdable documentation to recommend using post-model-load-refresh for textured models.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/components/refresh-raycaster-on-model-load/...js Removed; functionality moved into post-model-load-refresh.
src/components/delayed-dynamic-body/...js Removed; functionality consolidated into new component.
src/components/post-model-load-refresh/post-model-load-refresh.js New component: handles refreshing raycasters and physics bodies, with timeout fallback.
src/components/holdable/holdable.js Documentation updated to recommend using post-model-load-refresh.

Comment thread src/components/post-model-load-refresh/post-model-load-refresh.js
Comment thread src/components/post-model-load-refresh/post-model-load-refresh.js
Comment thread src/components/post-model-load-refresh/post-model-load-refresh.js
@MakingSpiderSense MakingSpiderSense merged commit 75c0c94 into main Jul 10, 2025
@MakingSpiderSense MakingSpiderSense deleted the bugfix/refresh-raycaster-on-model-load/91-raycaster-refresh-fail branch July 10, 2025 19:42
@MakingSpiderSense MakingSpiderSense changed the title Bugfix/refresh raycaster on model load/91 raycaster refresh fail Fix mixin issue and consolidation refresh components Jul 10, 2025
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