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

Change private members in gizmo to protected #12796

Merged
merged 2 commits into from
Aug 3, 2022

Conversation

braineo
Copy link
Contributor

@braineo braineo commented Jul 26, 2022

close #12795

I changed most of member from private to protected, even for those with public setters and getters, as setters and getters can be overwritten.

Except for

  1. caching variables like _tmpQuaternion
  2. static method of mesh creation

One thing I'm not sure about is the shader code inplaneRotationGizmo.ts. If I change from private to protected, eslint complains about naming convention, but I wonder whether it is worth to rename.

private static _RotationGizmoFragmentShader

I'll leave this as a draft for discussion for now, and meanwhile continue to test the extendability on this PR.

@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@azure-pipelines
Copy link

@sebavan sebavan requested review from CedricGuillemet and RaananW and removed request for CedricGuillemet July 26, 2022 15:40
Copy link
Contributor

@CedricGuillemet CedricGuillemet left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

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

I have commented on the issue create and have one comment regarding this specific PR -
is there a reason to make the private static function protected?

@braineo
Copy link
Contributor Author

braineo commented Jul 28, 2022

I have commented on the issue create and have one comment regarding this specific PR - is there a reason to make the private static function protected?

Not really functions, but static shader code. these 2 lines are in the whole 200+ line constructor function. maybe it is useful to overwrite the shader for convenience?

        Effect.ShadersStore["rotationGizmoVertexShader"] = PlaneRotationGizmo._RotationGizmoVertexShader;
        Effect.ShadersStore["rotationGizmoFragmentShader"] = PlaneRotationGizmo._RotationGizmoFragmentShader;

@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@azure-pipelines
Copy link

@deltakosh
Copy link
Contributor

Hey @braineo, I think we are good to go

Wanna remove the draft? (I can do it if you prefer :))

@sebavan sebavan marked this pull request as ready for review August 3, 2022 22:20
@braineo
Copy link
Contributor Author

braineo commented Aug 3, 2022

Hey @braineo, I think we are good to go

Wanna remove the draft? (I can do it if you prefer :))

Oh there are other gizmo interfaces not added, I’m bit busy this week, gonna add all when I find some time.

@sebavan sebavan merged commit 38b0c50 into BabylonJS:master Aug 3, 2022
@sebavan
Copy link
Member

sebavan commented Aug 3, 2022

@braineo, no problem I guess another PR would do for the other ones

RaananW pushed a commit that referenced this pull request Dec 9, 2022
Change private members in gizmo to protected

Former-commit-id: 9938106a358e7b1f8c1e99a992cecea95264ec62
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.

Change private members in gizmo to protected ones
5 participants