pub struct MeshRef {
pub asset: Option<String>,
pub builtin: Option<String>,
pub shape: Option<Shape>,
pub resolution: Option<u32>,
}Expand description
How a prefab’s geometry is sourced. Exactly one field should be set.
Fields§
§asset: Option<String>The id of a glTF Asset.
builtin: Option<String>A built-in primitive: cube, sphere, cylinder, capsule, plane, quad.
shape: Option<Shape>A procedural shape recipe (see shape) — the browser meshes it at
load time. Ships the intent, not the vertices; additive, so browsers
that predate shapes simply skip the prefab.
resolution: Option<u32>Sampling resolution for shape meshing (grid cells per axis; default
40, clamped by the mesher).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MeshRef
impl<'de> Deserialize<'de> for MeshRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MeshRef
impl RefUnwindSafe for MeshRef
impl Send for MeshRef
impl Sync for MeshRef
impl Unpin for MeshRef
impl UnsafeUnpin for MeshRef
impl UnwindSafe for MeshRef
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