Skip to content

Conversation

NSTCG
Copy link
Collaborator

@NSTCG NSTCG commented Jan 29, 2025

No description provided.

Copy link
Collaborator

@Squareys Squareys left a comment

Choose a reason for hiding this comment

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

This will be such a nice component!

@NSTCG NSTCG force-pushed the add-xr-mode-switch branch 4 times, most recently from d54b8ab to ffddab3 Compare February 3, 2025 15:41
* that depend on XR session states.
*
*/

Copy link
Collaborator

Choose a reason for hiding this comment

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

Superfluous newline here

const mode = this.scope;

// Handle current object
if (mode === 0 || mode === 2) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe either add comments like 0 /* this object */, or an enum, such that this reads mode == Scope.ThisObject

Copy link
Collaborator

Choose a reason for hiding this comment

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

That enum can also be exported and this.scope can be typed to it (I think), such that people can easily add them at runtime and just this.object.addComponent('xr-active-switch', {scope: Scope.ThisObject, ifInXR: Action.Activate});

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, there it may make sense to make the defaults Action.Keep, since the most sensible default is that leaving out an explicit configuration just does nothing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

And maybe we call it Action.None? That's a bit clearer than Keep, also for the enum value 'none'

@NSTCG NSTCG force-pushed the add-xr-mode-switch branch 2 times, most recently from d4564c6 to 0db127f Compare July 11, 2025 09:53
@NSTCG NSTCG force-pushed the add-xr-mode-switch branch from 0db127f to 41cddfb Compare July 23, 2025 07:41
@NSTCG NSTCG force-pushed the add-xr-mode-switch branch from 41cddfb to eb956da Compare July 23, 2025 08:46
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