-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 object list support #6067
Conversation
@@ -38,7 +38,7 @@ import { | |||
Billboard, | |||
MaterialTag, | |||
VideoTextureSource, | |||
Mirror | |||
Inspectable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is removing Mirror intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, It wasn't being used.
Related #6092 |
Sorry for the late review. Would you mind resolving the conflicts? |
11d1e30
to
d6ce19b
Compare
d6ce19b
to
972868d
Compare
Resolved the conflicts so far. I read through the changes and found that
Perhaps explicitly separating the codes between bitECS and A-Frame with |
972868d
to
4014332
Compare
0cdde4c
to
e79ba73
Compare
Ready for test and review. I have fixed some bugs, have cleaned up the code, have written the commit log and PR comment. |
273f33e
to
46347ea
Compare
@takahirox Thanks for updating this while I was away. I've added the missing support for pinning. I think that's the last missing part for this PR. |
This PR affects not only the new loader but also the old one so thinking we should test more carefully than other new loader specific PRs before merging. |
Would you mind separating the change for pinned objects stuff from this PR for quicker review? The review of this PR would be easier because we both already looked through the changes without the pinned objects stuff. |
You mean moving the last two commits to another PR? I can do that if that helps reviewing. |
Yes. If you do it, I will approve this PR immediately and can review another one later. |
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
e5889b6
to
0f22ff8
Compare
@takahirox I've removed the last two commits |
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 editthe code when we will get rid of A-Frame.
Changes
MediaInfo
component and save url and content type into it when loading media in media-loader. The info is used in the object listlisted_media_changed
event when media is loaded via media-loader and when the loaded media entity is removedObject3D
instead of A-Frame element in the related functionsshouldUseNewLoader()
and/or make two separated functionsfor A-Frame and bitECS where the different logics are needed
Future TODOs
Authors @keianhzo and @takahirox