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

Fix missing link warning #6532

Open
wants to merge 1,250 commits into
base: fix/chat-logs-padding
Choose a base branch
from

Conversation

HussainAther
Copy link

Summary

  • Added a console.warn message to gltf-model-plus.js when a link is missing or improperly defined.
  • This helps with debugging link-related issues and prevents silent failures.

Testing

  • Ensure media links load correctly.
  • If a link is missing, check for console warnings in the browser console.

keianhzo and others added 30 commits October 13, 2023 11:15
…awner-permissions-check

Check for spawn permissions when grabbing the object spawner
…nu-spawn-check

Check spawn_move_media in object menu
…k-fix

Remove MediaLink when MediaLoader is removed
…visibility-fix

Set the nav mesh visibility when a nav mesh is loaded
…king

Clamp component parameters to make the client more resilient
This commit adds new loader toggle UI in room settings that allows
room owners to enable/disable the new loader.

Changes
* Rename hub.user_data.hubsUseNewLoader to
  hub.user_data.hubs_use_new_loader for naming consistency
* Add new loader toggle UI in room settings
This commit forces all the clients to reload the page when
the new loader activation flag is toggled.

Changes
* In Hubs Channels hub_refresh listener detect
  user_data.hubs_use_new_loader flag change
* Reload the page in five seconds if detected
* Add and show new loader refresh prompt when detected
…rIsToggled

Reload when the new loader is toggled
This commit renames "New Loader" to "bitECS based Client"

Background:

The name "New Loader" may not really make sense to users
because the new code is not only related to loading stuffs
but it affects the Hubs Client core design and implementation.

It would be better to rename "New Loader" where users can see
the name, although we may keep internally using "New Loader"
as a project name.

Changes:
* Rename "New Loader" to "bitECS based Client" where it's exposed
  to users
* Add description for the toggle UI
* Remove outdated comments
DougReeder and others added 26 commits October 5, 2024 22:57
Invites & sharing Room URL use Web Share API if available
Adds Share button to picture and video items in Chat
Scene page: replaces 'Share on Twitter' w/ 'Share' (using Web Share API)
HUD Invite button: fixes by calling Web Share API directly
Reverts "Merge pull request Hubs-Foundation#6487 from mozilla/scene-grabbables".

This reverts commit 4324d10, reversing
changes made to 746413d.

This fixes the following GitHub bugs:
Spacebar Menu Scale and Rotate Buttons Do Nothing When Interacted With Hubs-Foundation#6496
Physics doesn't work when in-room objects are thrown Hubs-Foundation#6503
Physics doesn't continue working after moving an object that has had physics permanently enabled on it Hubs-Foundation#6504
The spacebar menu doesn't show up for objects which have been dropped in the room from a file browser Hubs-Foundation#6505

This reverts the changes from the following commits:
c23b7d4
Add warning for negative scale when creating interactables bounds

ae050ee
Revert media collision mask

ec12e4c
Scene grabbables support
Update the links in the various package.json and package-lock.json files to point to the new Hubs Foundation URLs.

This also helps fix conflicts when fetching add-ons and their dependencies.
This returns to getting the latest versions of the addons and also helps fix conflicts when fetching add-ons and their dependencies.
npm throws errors if the capitalization between a dependency listed here and a dependency listed in an addon is different, so this makes sure there are no dependency conflicts.
…cene-grabbables-support

Revert scene grabbables support
Merge in the revert of the scene grabbables support PR.  This likely breaks the addons branch because this functionality is depended on by at least the behavior graphs addon and possibly addons themselves.
Revert the changes from the last merge as the functionality from the "Scene grabbables support" PR is expected to be present in this branch and has stuff built on top of it.

This reverts commit e449f66, reversing
changes made to 7a99b6f.
Pass the eid of the object to the updateRigidBody function instead of the bodyId for the bitECS versions of rotating and scaling via the spacebar menu buttons.  updateRigidBody attempts to get the bodyId from the eid, so doing it beforehand prevented the body from being found.

Update the check for whether the aframe object is a rigid body by checking for the "body-helper" attribute.  This allows the update of the object to be kinematic to go through when the spacebar rotate/scale buttons are engaged.

Check if what is being hovered over when grabbing something is a HoldableButton and if it is, then use that as the hold target instead of the 3D object.  This causes the grab to interact with the button and start the transform instead of just moving the object.

Note: if you attempt to throw the object in the aframe loader and then try to rotate it again with the button, the physics system will fight it for some reason and prevent the rotation.  Clicking on the object a couple times will cause the physics system to release it, but the reason for this behavior is unknown; it could possibly be related to ownership not being set properly or the rigid body not being updated properly.  This behavior was fixed on the bitECS side by passing the eid instead of the bodyId to the updateRigidBody function, but activating the rigid body update on the aframe side (mentioned above) didn't fix it for the aframe side.
Copy link
Contributor

@DougReeder DougReeder left a comment

Choose a reason for hiding this comment

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

The fixes look good, but the PR should be against the addons branch.

Comment on lines 598 to 608
if (["image", "video", "model"].includes(componentName)) {
if (!ext.link || !ext.link.href) {
console.warn("Warning: Attempted to load a link but the href is missing!", ext);
} else {
ext["media-link"] = {
src: ext.link.href
};
delete ext.link;
}
}
}

src: ext.link.href
};
delete ext.link;
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks good, but please fix the indentation.

Copy link
Author

@HussainAther HussainAther Mar 10, 2025

Choose a reason for hiding this comment

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

Sure, how exact should I fix it?

EDIT: Ok, I see it now. Thanks. It should be just be two spaces.

@HussainAther HussainAther changed the base branch from master to fix/chat-logs-padding March 10, 2025 05:23
@DougReeder
Copy link
Contributor

DougReeder commented Mar 10, 2025

Ah, you'll need to create a new branch from master or addons, then cherry-pick your commits into it, so the PR is clean. It's probably easier to create a new PR from that branch. Sorry.

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.

9 participants