#[non_exhaustive]pub enum ColorSpace {
NoColorSpace,
Srgb,
LinearSrgb,
}Expand description
The colour spaces constants.js names, as far as the port needs them.
three.js spells a colour space as a string constant, and one set of
constants is shared by ColorManagement, Color’s set*/get*
methods, Texture.colorSpace and renderer.outputColorSpace. This enum is
that set, and the one type all four take.
ColorManagement defines the two spaces three.js registers by default:
linear sRGB (the working space) and sRGB. Display P3 and the other spaces
in addons/math/ColorSpaces.js are not ported, which is why the enum is
#[non_exhaustive]. The KTX2 loader reports what a file declares in its
own Ktx2ColorSpace, which does have P3.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoColorSpace
NoColorSpace (''): no colour space at all. ColorManagement
converts nothing to or from it, and a texture tagged with it is sampled
with no transfer function. It is Texture.colorSpace’s default.
Srgb
SRGBColorSpace ('srgb'): Rec. 709 primaries, sRGB transfer.
LinearSrgb
LinearSRGBColorSpace ('srgb-linear'): Rec. 709 primaries, linear
transfer. ColorManagement.workingColorSpace.
Trait Implementations§
Source§impl Clone for ColorSpace
impl Clone for ColorSpace
impl Copy for ColorSpace
Source§impl Debug for ColorSpace
impl Debug for ColorSpace
impl Eq for ColorSpace
Source§impl Hash for ColorSpace
impl Hash for ColorSpace
Source§impl PartialEq for ColorSpace
impl PartialEq for ColorSpace
impl StructuralPartialEq for ColorSpace
Auto Trait Implementations§
impl Freeze for ColorSpace
impl RefUnwindSafe for ColorSpace
impl Send for ColorSpace
impl Sync for ColorSpace
impl Unpin for ColorSpace
impl UnsafeUnpin for ColorSpace
impl UnwindSafe for ColorSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.