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

Create single utility type to encapsulate color argument #29

Closed
joshuaellis opened this issue Feb 25, 2021 · 0 comments · Fixed by #107
Closed

Create single utility type to encapsulate color argument #29

joshuaellis opened this issue Feb 25, 2021 · 0 comments · Fixed by #107
Labels
current release issues to do with the current release of Three enhancement New feature or request good first issue Good for newcomers

Comments

@joshuaellis
Copy link
Member

joshuaellis commented Feb 25, 2021

Describe the feature you'd like:

Certain functions & properties have the type Color | string | number because they create a THREE.Color in the function and those are the arguments that THREE.Color can take, like the example below:

    renderPass: (
        renderer: WebGLRenderer,
        passMaterial: Material,
        renderTarget: WebGLRenderTarget,
        clearColor: Color | string | number,
        clearAlpha: Color | string | number,
    ) => void;

Suggested implementation:

Therefore we want to create a utility type so instead of typing Color | string | number we only need to write one, this would then need to replace all instances of the previous type across the codebase.

@joshuaellis joshuaellis added enhancement New feature or request good first issue Good for newcomers current release issues to do with the current release of Three labels Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
current release issues to do with the current release of Three enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant