pub struct RendererJs(/* private fields */);
Implementations§
Source§impl RendererJs
impl RendererJs
pub fn initialize_recorder(&mut self)
pub fn start_animating(&self)
pub fn stop_animating(&self)
pub fn set_animation_callback( &mut self, animation_callback: Option<AnimationCallbackJs>, )
pub fn start_recording(&mut self)
pub fn stop_recording(&self)
pub fn clear_recorded_data(&self)
pub fn recorder_initialized(&self) -> bool
pub fn is_animating(&self) -> bool
pub fn is_recording(&self) -> bool
pub fn renderer_data(&self) -> RendererDataJs
pub fn builder() -> RendererDataBuilderJs
pub fn canvas(&self) -> HtmlCanvasElement
pub fn gl(&self) -> WebGl2RenderingContext
pub fn fragment_shader(&self, fragment_shader_id: String) -> Option<WebGlShader>
pub fn vertex_shader(&self, vertex_shader_id: String) -> Option<WebGlShader>
pub fn program(&self, program_id: String) -> Option<WebGlProgram>
pub fn uniform(&self, uniform_id: String) -> Option<UniformJs>
pub fn buffer(&self, buffer_id: String) -> Option<BufferJs>
pub fn attribute(&self, attribute_id: String) -> Option<AttributeJs>
pub fn texture(&self, texture_id: String) -> Option<TextureJs>
pub fn framebuffer(&self, framebuffer_id: String) -> Option<FramebufferJs>
pub fn transform_feedback( &self, transform_feedback_id: String, ) -> Option<WebGlTransformFeedback>
pub fn vao(&self, vao_id: String) -> Option<WebGlVertexArrayObject>
pub fn user_ctx(&self) -> Option<Object>
pub fn use_program(&self, program_id: String)
pub fn use_vao(&self, vao_id: String)
pub fn update_uniform(&self, uniform_id: String)
pub fn update_uniforms(&self)
pub fn render(&self)
pub fn save_image(&self)
pub fn render_callback(&self) -> Option<RenderCallbackJs>
Methods from Deref<Target = RendererJsInner>§
Sourcepub fn initialize_recorder(&mut self)
pub fn initialize_recorder(&mut self)
Must be called before starting to record.
This prevents unexpected initialization of a MediaRecorder, when the user wasn’t expecting to need one from the handle.
pub fn start_animating(&self)
pub fn stop_animating(&self)
pub fn set_animation_callback( &mut self, animation_callback: Option<impl Into<AnimationCallback<VertexShaderId, FragmentShaderId, ProgramId, UniformId, BufferId, AttributeId, TextureId, FramebufferId, TransformFeedbackId, VertexArrayObjectId, UserCtx>>>, )
pub fn start_recording(&mut self)
pub fn stop_recording(&self)
pub fn clear_recorded_data(&self)
pub fn recorder_initialized(&self) -> bool
pub fn is_animating(&self) -> bool
pub fn is_recording(&self) -> bool
pub fn canvas(&self) -> HtmlCanvasElement
pub fn gl(&self) -> WebGl2RenderingContext
pub fn fragment_shader( &self, fragment_shader_id: &FragmentShaderId, ) -> Option<WebGlShader>
pub fn vertex_shader( &self, vertex_shader_id: &VertexShaderId, ) -> Option<WebGlShader>
pub fn program(&self, program_id: &ProgramId) -> Option<WebGlProgram>
pub fn uniform( &self, uniform_id: &UniformId, ) -> Option<Uniform<ProgramId, UniformId>>
pub fn buffer(&self, buffer_id: &BufferId) -> Option<Buffer<BufferId>>
pub fn attribute( &self, attribute_id: &AttributeId, ) -> Option<Attribute<VertexArrayObjectId, BufferId, AttributeId>>
pub fn texture(&self, texture_id: &TextureId) -> Option<Texture<TextureId>>
pub fn framebuffer( &self, framebuffer_id: &FramebufferId, ) -> Option<Framebuffer<FramebufferId>>
pub fn transform_feedback( &self, transform_feedback_id: &TransformFeedbackId, ) -> Option<WebGlTransformFeedback>
pub fn vao( &self, vao_id: &VertexArrayObjectId, ) -> Option<WebGlVertexArrayObject>
pub fn user_ctx(&self) -> Option<UserCtx>
pub fn use_program(&self, program_id: &ProgramId) -> &Self
pub fn use_vao(&self, vao_id: &VertexArrayObjectId) -> &Self
pub fn update_uniform(&self, uniform_id: &UniformId) -> &Self
pub fn update_uniforms(&self) -> &Self
pub fn render(&self) -> &Self
pub fn save_image(&self)
pub fn render_callback( &self, ) -> RenderCallback<VertexShaderId, FragmentShaderId, ProgramId, UniformId, BufferId, AttributeId, TextureId, FramebufferId, TransformFeedbackId, VertexArrayObjectId, UserCtx>
Trait Implementations§
Source§impl Deref for RendererJs
impl Deref for RendererJs
Source§impl DerefMut for RendererJs
impl DerefMut for RendererJs
Source§fn deref_mut(&mut self) -> &mut RendererJsInner
fn deref_mut(&mut self) -> &mut RendererJsInner
Mutably dereferences the value.
Source§impl From<Renderer<String, String, String, String, String, String, String, String, String, String, Object>> for RendererJs
impl From<Renderer<String, String, String, String, String, String, String, String, String, String, Object>> for RendererJs
Source§fn from(js_renderer_handle_inner: RendererJsInner) -> Self
fn from(js_renderer_handle_inner: RendererJsInner) -> Self
Converts to this type from the input type.
Source§impl From<RendererDataJs> for RendererJs
impl From<RendererDataJs> for RendererJs
Source§fn from(renderer_data_js: RendererDataJs) -> Self
fn from(renderer_data_js: RendererDataJs) -> Self
Converts to this type from the input type.
Source§impl From<RendererJs> for JsValue
impl From<RendererJs> for JsValue
Source§fn from(value: RendererJs) -> Self
fn from(value: RendererJs) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for RendererJs
impl FromWasmAbi for RendererJs
Source§impl IntoWasmAbi for RendererJs
impl IntoWasmAbi for RendererJs
Source§impl LongRefFromWasmAbi for RendererJs
impl LongRefFromWasmAbi for RendererJs
Source§impl OptionFromWasmAbi for RendererJs
impl OptionFromWasmAbi for RendererJs
Source§impl OptionIntoWasmAbi for RendererJs
impl OptionIntoWasmAbi for RendererJs
Source§impl RefFromWasmAbi for RendererJs
impl RefFromWasmAbi for RendererJs
Source§type Anchor = RcRef<RendererJs>
type Anchor = RcRef<RendererJs>
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 RendererJs
impl RefMutFromWasmAbi for RendererJs
Source§impl TryFromJsValue for RendererJs
impl TryFromJsValue for RendererJs
Source§impl VectorFromWasmAbi for RendererJs
impl VectorFromWasmAbi for RendererJs
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[RendererJs]>
Source§impl VectorIntoJsValue for RendererJs
impl VectorIntoJsValue for RendererJs
fn vector_into_jsvalue(vector: Box<[RendererJs]>) -> JsValue
Source§impl VectorIntoWasmAbi for RendererJs
impl VectorIntoWasmAbi for RendererJs
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[RendererJs]>) -> Self::Abi
Source§impl WasmDescribeVector for RendererJs
impl WasmDescribeVector for RendererJs
impl SupportsConstructor for RendererJs
impl SupportsInstanceProperty for RendererJs
impl SupportsStaticProperty for RendererJs
Auto Trait Implementations§
impl Freeze for RendererJs
impl !RefUnwindSafe for RendererJs
impl !Send for RendererJs
impl !Sync for RendererJs
impl Unpin for RendererJs
impl !UnwindSafe for RendererJs
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> 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::Abi
Source§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
.