-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Deprecate THREE.NoColorSpace, use 'null' instead #25899
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Can I ask why "null" is better or more clear than "NoColorSpace"? The Anyway not a strong feeling. Just surprised null seemed better to others. |
I have no preference here, but we need to decide very soon. Both options seem fine to me. /cc @WestLangley @mrdoob
I would push back a little on the idea that this means "no conversion is necessary" — it means the texture has not been assigned a color space. In some (TBD) contexts this could be interpreted as an error, and a warning would be logged.
The preview in docs will appear as shown below. I don't think we would need to list That said, on the balance we generally do not use nullable enums in three.js... Counter-examples: NoToneMapping, CullFaceNone, NoBlending, NeverDepth, NeverStencilFunc. I think @mrdoob's concern is that we may want the renderer's color space to be unspecified so we can auto-upgrade to Display P3 in the future. Using |
Yes but when assigned appropriately it means do not perform a conversion since this is not color data which made sense to me.
Yes this is the bit that feels most strange and inconsistent to me - and why I didn't understand the "consistent" rationale for using null.
I don't know enough about these plans so I can't comment. Sorry for noise! Again both are usable so if everyone else is good with this it should be fine. |
Just want to comment that I prefer |
70ae890
to
43ad10c
Compare
Interesting... I'll study this today 🤔 |
Okay, lets keep |
If the auto-color-space idea ever went forward, instead of
Assuming that color space could be reliably detected (I believe that was the concern that closed the other issue) the AutoColorSpace value would perhaps be more intuitive than null. |
Related:
While cleaning up docs, I'm also trying to mention the CSS Color Module Level 4 strings ("srgb", "srgb-linear") where appropriate, to clarify the mappings to CSS. I've left DisplayP3ColorSpace undocumented for now, as it's not ready for use.