pub struct MeshDataJs { /* private fields */ }Expand description
Individual mesh data with express ID and color (matches MeshData interface)
Implementations§
Source§impl MeshDataJs
impl MeshDataJs
Sourcepub fn express_id(&self) -> u32
pub fn express_id(&self) -> u32
Get express ID
Sourcepub fn positions(&self) -> Float32Array
pub fn positions(&self) -> Float32Array
Get positions as Float32Array (copy to JS)
Sourcepub fn normals(&self) -> Float32Array
pub fn normals(&self) -> Float32Array
Get normals as Float32Array (copy to JS)
Sourcepub fn indices(&self) -> Uint32Array
pub fn indices(&self) -> Uint32Array
Get indices as Uint32Array (copy to JS)
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Get vertex count
Sourcepub fn triangle_count(&self) -> usize
pub fn triangle_count(&self) -> usize
Get triangle count
Trait Implementations§
Source§impl From<MeshDataJs> for JsValue
impl From<MeshDataJs> for JsValue
Source§fn from(value: MeshDataJs) -> Self
fn from(value: MeshDataJs) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for MeshDataJs
impl FromWasmAbi for MeshDataJs
Source§impl IntoWasmAbi for MeshDataJs
impl IntoWasmAbi for MeshDataJs
Source§impl LongRefFromWasmAbi for MeshDataJs
impl LongRefFromWasmAbi for MeshDataJs
Source§impl OptionFromWasmAbi for MeshDataJs
impl OptionFromWasmAbi for MeshDataJs
Source§impl OptionIntoWasmAbi for MeshDataJs
impl OptionIntoWasmAbi for MeshDataJs
Source§impl RefFromWasmAbi for MeshDataJs
impl RefFromWasmAbi for MeshDataJs
Source§type Anchor = RcRef<MeshDataJs>
type Anchor = RcRef<MeshDataJs>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for MeshDataJs
impl RefMutFromWasmAbi for MeshDataJs
Source§impl TryFromJsValue for MeshDataJs
impl TryFromJsValue for MeshDataJs
Source§impl VectorFromWasmAbi for MeshDataJs
impl VectorFromWasmAbi for MeshDataJs
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[MeshDataJs]>
Source§impl VectorIntoWasmAbi for MeshDataJs
impl VectorIntoWasmAbi for MeshDataJs
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[MeshDataJs]>) -> Self::Abi
Source§impl WasmDescribeVector for MeshDataJs
impl WasmDescribeVector for MeshDataJs
impl SupportsConstructor for MeshDataJs
impl SupportsInstanceProperty for MeshDataJs
impl SupportsStaticProperty for MeshDataJs
Auto Trait Implementations§
impl Freeze for MeshDataJs
impl RefUnwindSafe for MeshDataJs
impl Send for MeshDataJs
impl Sync for MeshDataJs
impl Unpin for MeshDataJs
impl UnwindSafe for MeshDataJs
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.