Skip to main content

Canvas3DBuilder

Struct Canvas3DBuilder 

Source
pub struct Canvas3DBuilder {
    pub scene: Option<Arc<Scene3D>>,
    pub retained: Option<RetainedScene3D>,
    pub uncapped: bool,
    pub class: Option<ClassList>,
    pub style: Option<String>,
    pub id: Option<String>,
    pub width: Option<f32>,
    pub height: Option<f32>,
    pub on_camera_change: Option<Rc<dyn Fn(&OrbitControls)>>,
    pub events: Vec<Attribute>,
    pub children: Option<Vec<NodeBlueprint>>,
}

Fields§

§scene: Option<Arc<Scene3D>>§retained: Option<RetainedScene3D>§uncapped: bool§class: Option<ClassList>§style: Option<String>§id: Option<String>§width: Option<f32>§height: Option<f32>§on_camera_change: Option<Rc<dyn Fn(&OrbitControls)>>§events: Vec<Attribute>§children: Option<Vec<NodeBlueprint>>

Implementations§

Source§

impl Canvas3DBuilder

Source

pub fn scene(self, scene: impl IntoScene3DProp) -> Self

Source

pub fn class(self, class: impl Into<ClassList>) -> Self

Source

pub fn style(self, style: impl Into<String>) -> Self

Source

pub fn id(self, id: impl Into<String>) -> Self

Source

pub fn width(self, width: impl Into<Option<f32>>) -> Self

Source

pub fn height(self, height: impl Into<Option<f32>>) -> Self

Source

pub fn on_camera_change(self, cb: impl IntoCameraChangeProp) -> Self

Source

pub fn on_camera_change_fn(self, cb: impl Fn(&OrbitControls) + 'static) -> Self

Source

pub fn onmousedown(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onmousedown_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onmousemove(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onmousemove_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onmouseup(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onmouseup_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onwheel(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onwheel_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onpointerdown(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onpointerdown_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onpointermove(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onpointermove_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onpointerup(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onpointerup_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onclick(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onclick_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onresize(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn onresize_fn(self, handler: impl Fn(Event) + 'static) -> Self

Source

pub fn retained(self, handle: impl Into<Option<RetainedScene3D>>) -> Self

Binds a persistent RetainedScene3D handle for out-of-band zero-rebuild GPU updates.

Source

pub fn uncapped(self, uncapped: bool) -> Self

Opts this 3D canvas into uncapped vsync-off presentation when supported by the surface.

Source

pub fn children(self, children: Vec<NodeBlueprint>) -> Self

Source

pub fn build(self) -> View

Trait Implementations§

Source§

impl Default for Canvas3DBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>