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

bitECS: Fix F key inspect #6246

Closed
wants to merge 2 commits into from
Closed

bitECS: Fix F key inspect #6246

wants to merge 2 commits into from

Conversation

takahirox
Copy link
Contributor

Resolves #6207
Requires #6067

This PR fixes the broken F key inspect with the new loader.

Please refer to #6207 (comment) for the root issue.

keianhzo and others added 2 commits September 8, 2023 11:32
This commit adds bitECS object list support.

**Basic Strategy**

Reuse the existing A-Frame based code as much as possible for now.

In the related functions that take A-Frame element, take Object3D
instead. Object3D has a reference to A-Frame element in the A-Frame
based implementation and has a reference to Entity ID in the bitECS.
The functions process with A-Frame element or Entity ID depending on
whether new loader enabled.

Explicitly use shouldUseNewLoader() and/or make two functions, one
for A-Frame based and another one for bitECS based implementation,
if different logics are needed between A-Frame based and bitECS
based implementations. Duplicated codes may not be perfectly
removed but it would be simpler to follow the code rather than
the new loader pretends the old one. And it would be easier to edit
the code when we will get rid of A-Frame.

**Changes**

- Introduce MediaInfo component and save url and content type
  into it when loading media in media-loader. The info is used
  in the object list
- Fire listed_media_changed event when media is loaded via
  media-loader and when the loaded media entity is removed
- Take Object3D instead of A-Frame element in the related functions
- Use shouldUseNewLoader() and/or make two separated functions
  for A-Frame and bitECS where the different logics are needed

**Future TODOs**

- Support avatars
- Support Pinning
This commit fixes F key inspect with the new loader enabled.
@keianhzo
Copy link
Contributor

Closing this as it's already fixed by #6310

@keianhzo keianhzo closed this Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bitECS: F button for Focus doesn't work on objects
2 participants