pub enum Primitives {
Points = 0,
Lines = 1,
LineLoop = 2,
LineStrip = 3,
Triangles = 4,
TriangleStrip = 5,
TriangleFan = 6,
}
Expand description
Passed to drawElements or drawArrays to draw primitives.
Variants§
Points = 0
Passed to drawElements or drawArrays to draw single points.
Lines = 1
Passed to drawElements or drawArrays to draw lines. Each vertex connects to the one after it.
LineLoop = 2
Passed to drawElements or drawArrays to draw lines. Each set of two vertices is treated as a separate line segment.
LineStrip = 3
Passed to drawElements or drawArrays to draw a connected group of line segments from the first vertex to the last.
Triangles = 4
Passed to drawElements or drawArrays to draw triangles. Each set of three vertices creates a separate triangle.
TriangleStrip = 5
Passed to drawElements or drawArrays to draw a connected group of triangles.
TriangleFan = 6
Passed to drawElements or drawArrays to draw a connected group of triangles. Each vertex connects to the previous and the first vertex in the fan.
Trait Implementations§
Source§impl Clone for Primitives
impl Clone for Primitives
Source§fn clone(&self) -> Primitives
fn clone(&self) -> Primitives
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for Primitives
impl Debug for Primitives
Source§impl From<Primitives> for JsValue
impl From<Primitives> for JsValue
Source§fn from(value: Primitives) -> Self
fn from(value: Primitives) -> Self
Source§impl FromWasmAbi for Primitives
impl FromWasmAbi for Primitives
Source§impl IntoWasmAbi for Primitives
impl IntoWasmAbi for Primitives
Source§impl OptionFromWasmAbi for Primitives
impl OptionFromWasmAbi for Primitives
Source§impl OptionIntoWasmAbi for Primitives
impl OptionIntoWasmAbi for Primitives
Source§impl TryFromJsValue for Primitives
impl TryFromJsValue for Primitives
Source§fn try_from_js_value(
value: JsValue,
) -> Result<Self, <Primitives as TryFromJsValue>::Error>
fn try_from_js_value( value: JsValue, ) -> Result<Self, <Primitives as TryFromJsValue>::Error>
Source§impl VectorFromWasmAbi for Primitives
impl VectorFromWasmAbi for Primitives
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Primitives]>
Source§impl VectorIntoJsValue for Primitives
impl VectorIntoJsValue for Primitives
fn vector_into_jsvalue(vector: Box<[Primitives]>) -> JsValue
Source§impl VectorIntoWasmAbi for Primitives
impl VectorIntoWasmAbi for Primitives
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Primitives]>) -> Self::Abi
Source§impl WasmDescribeVector for Primitives
impl WasmDescribeVector for Primitives
impl Copy for Primitives
Auto Trait Implementations§
impl Freeze for Primitives
impl RefUnwindSafe for Primitives
impl Send for Primitives
impl Sync for Primitives
impl Unpin for Primitives
impl UnwindSafe for Primitives
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.