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

Nebula.Color: Passing 0 as a color value causes a crash. #51

Closed
davidpuetter opened this issue Apr 15, 2019 · 3 comments
Closed

Nebula.Color: Passing 0 as a color value causes a crash. #51

davidpuetter opened this issue Apr 15, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@davidpuetter
Copy link

Version: 4.0.1.

Adding a Color behaviour to an emitter with 0 or 0x0 as a colour causes it to crash:
TypeError: Cannot read property 'getValue' of null.
0x000001 works.

Reason:
In src/math/ColorSpan.js Line 60 - you check if you have a colours object. 0 will return false therefore returning null.

@rohan-deshpande rohan-deshpande added the bug Something isn't working label Apr 15, 2019
manthrax added a commit that referenced this issue Jan 11, 2020
@manthrax
Copy link
Collaborator

PR #85

@rohan-deshpande
Copy link
Collaborator

rohan-deshpande commented Feb 5, 2020

@davidpox just noting that ColorSpan takes either the string 'random' or an array of strings as its constructor arg. Since createColorSpan is basically just a factory for creating ColorSpan instances, I think you'd need to pass '0' or '0x0', I haven't tried it though.

rohan-deshpande pushed a commit that referenced this issue Oct 26, 2020
@rohan-deshpande
Copy link
Collaborator

Resolved by #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants