Skip to main content

Canvas3DBuilder

Struct Canvas3DBuilder 

Source
pub struct Canvas3DBuilder {
Show 14 fields pub scene: Option<Arc<Scene3D>>, pub retained: Option<RetainedScene3D>, pub uncapped: bool, pub responsive: bool, pub class: Option<ClassList>, pub style: Option<String>, pub id: Option<String>, pub title: Option<String>, pub __strata_key: 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§responsive: bool§class: Option<ClassList>§style: Option<String>§id: Option<String>§title: Option<String>§__strata_key: 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 IntoClassList) -> Self

Source

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

Source

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

Source

pub fn title(self, title: impl IntoOptionalString) -> Self

Source

pub fn key(self, key: impl Display) -> 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 responsive(self, responsive: bool) -> Self

When true, omits inline width/height attributes so CSS/flex classes (w-full h-full, flex-1, split panes) control the resolved viewport size.

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<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onmousemove<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onmouseup<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onmouseenter<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onmouseleave<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onwheel<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onpointerdown<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onpointermove<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onpointerup<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onclick<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn ondblclick<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn oncontextmenu<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self

Source

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

Source

pub fn onresize<Args>( self, handler: impl EventHandlerMarker<Args> + '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: impl IntoChildren<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> IntoInitialState<T> for T

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>