pub struct LineBasicMaterial {
pub color: Color,
pub opacity: f32,
pub alpha_test: f32,
pub transparent: Option<bool>,
pub line_width: f32,
pub dashed: bool,
pub dash_scale: f32,
pub dash_size: f32,
pub gap_size: f32,
pub tone_mapped: bool,
pub render_state: RenderState,
}Expand description
Flat-color line material. Mirrors three.js’s LineBasicMaterial.
Fields§
§color: Color§opacity: f32§alpha_test: f32three.js alphaTest: fragments whose alpha (opacity × map alpha) is
below this are discarded. 0 (the default) keeps every fragment.
transparent: Option<bool>three.js transparent. Some is three.js’s flag as given — false
draws opaquely whatever the opacity. None (the default) blends when
opacity < 1, the rule this crate used before it had the flag.
line_width: f32three.js linewidth, in pixels (× the renderer’s pixel ratio, as a
point’s size is). 1 draws line primitives; wider, each segment is a
round-capped quad (vs_wide_lines) — what three.js’s linewidth
never did under WebGL. Thinner and transparent, the quad too, each
pixel taking the share of it the line covers, so a 0.3-pixel line
draws at 0.3 of its colour instead of lighting whole pixels or none
(opaque, it stays a line primitive). On the WebGPU/WebGL2 renderer; the Metal
renderer has its own set_line_width.
dashed: bool§dash_scale: f32§dash_size: f32§gap_size: f32§tone_mapped: boolthree.js toneMapped (default true): whether the renderer’s tone
mapping applies to this material’s output.
render_state: RenderStatethree.js depthTest / depthWrite / depthFunc / colorWrite.
depth_test: false draws the line over the depth buffer (an x-ray
or overlay stroke).
Implementations§
Trait Implementations§
Source§impl Clone for LineBasicMaterial
impl Clone for LineBasicMaterial
impl Copy for LineBasicMaterial
Source§impl Debug for LineBasicMaterial
impl Debug for LineBasicMaterial
Source§impl Default for LineBasicMaterial
impl Default for LineBasicMaterial
Source§impl From<LineBasicMaterial> for Material
impl From<LineBasicMaterial> for Material
Source§fn from(m: LineBasicMaterial) -> Self
fn from(m: LineBasicMaterial) -> Self
Auto Trait Implementations§
impl Forget for LineBasicMaterial
impl Freeze for LineBasicMaterial
impl Move for LineBasicMaterial
impl RefUnwindSafe for LineBasicMaterial
impl Send for LineBasicMaterial
impl Sync for LineBasicMaterial
impl Unpin for LineBasicMaterial
impl UnsafeUnpin for LineBasicMaterial
impl UnwindSafe for LineBasicMaterial
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more