MCPcopy Create free account

hub / github.com/chinedufn/webgl-water-tutorial / functions

Functions94 in github.com/chinedufn/webgl-water-tutorial

↓ 27 callersMethodget_uniform_location
Get the location of a uniform. If this is our first time retrieving it we will cache it so that for future retrievals we won't need to query the shade
src/shader/mod.rs:100
↓ 14 callersMethodmsg
(&mut self, msg: &Msg)
src/app/store/mod.rs:23
↓ 11 callersMethodcamera
(&self)
src/app/store/mod.rs:50
↓ 9 callersMethodcreate_element
(self)
src/controls.rs:212
↓ 7 callersMethodtexture_unit
0, 1, 2, ... etc. Useful for `gl.uniform1i` calls
src/render/texture_unit.rs:28
↓ 6 callersMethoduse_program
Use a shader program. We cache the last used shader program to avoid unnecessary calls to the GPU.
src/shader/mod.rs:56
↓ 5 callersMethodget_eye_pos
(&self)
src/app/store/camera.rs:54
↓ 5 callersMethodget_shader
Get one of our Shader's
src/shader/mod.rs:50
↓ 5 callersMethodprepare_for_render
( &self, gl: &WebGlRenderingContext, renderable: &impl Render<'a>, key: &str,
src/render/mod.rs:197
↓ 5 callersMethodrender
(&mut self, gl: &WebGlRenderingContext, state: &State, assets: &Assets)
src/render/mod.rs:74
↓ 5 callersMethodwater
(&self)
src/app/store/mod.rs:54
↓ 4 callersMethodTEXTURE_N
(&self)
src/render/texture_unit.rs:16
↓ 3 callersMethodclock
The current time in milliseconds
src/app/store/mod.rs:59
↓ 3 callersFunctionload_texture_image
(gl: Rc<WebGlRenderingContext>, src: &str, texture_unit: TextureUnit)
src/load_texture_img.rs:10
↓ 3 callersMethodprojection
(&self)
src/app/store/camera.rs:64
↓ 3 callersMethodrender_meshes
( &self, gl: &GL, state: &State, assets: &Assets, clip_plane: [f32; 4]
src/render/render_meshes.rs:16
↓ 3 callersMethodshader
(&'a self)
src/render/mesh/skinned_mesh.rs:28
↓ 3 callersMethodview
(&self)
src/app/store/camera.rs:23
↓ 2 callersMethodbind_vao
(&self, vao: &Vao)
src/render/mod.rs:216
↓ 2 callersFunctioncompile_shader
Create a shader program using the WebGL APIs
src/shader/mod.rs:120
↓ 2 callersMethodget_mesh
(&self, mesh_name: &str)
src/app/assets/mod.rs:60
↓ 2 callersMethodset_pos
(&mut self, x: i32, y: i32)
src/app/store/mouse.rs:17
↓ 2 callersMethodset_pressed
(&mut self, pressed: bool)
src/app/store/mouse.rs:13
↓ 2 callersMethodshader
(&'a self)
src/render/textured_quad.rs:49
↓ 2 callersMethodshader
(&'a self)
src/render/water_tile.rs:26
↓ 2 callersMethodshader
(&'a self)
src/render/mesh/non_skinned_mesh.rs:29
↓ 2 callersMethodview_flipped_y
(&self)
src/app/store/camera.rs:38
↓ 1 callersFunctionappend_controls
(app: Rc<App>)
src/controls.rs:13
↓ 1 callersMethodassets
(&self)
src/app/mod.rs:27
↓ 1 callersFunctionattach_mouse_down_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:59
↓ 1 callersFunctionattach_mouse_move_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:87
↓ 1 callersFunctionattach_mouse_up_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:75
↓ 1 callersFunctionattach_mouse_wheel_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:102
↓ 1 callersFunctionattach_touch_end_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:149
↓ 1 callersFunctionattach_touch_move_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:133
↓ 1 callersFunctionattach_touch_start_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:118
↓ 1 callersMethodbuffer_attributes
(&self, gl: &WebGlRenderingContext)
src/render/water_tile.rs:30
↓ 1 callersFunctioncreate_fresnel_control
(app: Rc<App>)
src/controls.rs:97
↓ 1 callersFunctioncreate_reflectivity_control
(app: Rc<App>)
src/controls.rs:73
↓ 1 callersFunctioncreate_show_scenery_control
(app: Rc<App>)
src/controls.rs:183
↓ 1 callersFunctioncreate_use_reflection_checkbox
(app: Rc<App>)
src/controls.rs:162
↓ 1 callersFunctioncreate_use_refraction_checkbox
(app: Rc<App>)
src/controls.rs:141
↓ 1 callersMethodcreate_vao
(&self)
src/render/mod.rs:183
↓ 1 callersFunctioncreate_wave_speed_control
(app: Rc<App>)
src/controls.rs:119
↓ 1 callersFunctioncreate_webgl_context
(app: Rc<App>)
src/canvas.rs:15
↓ 1 callersMethodget_armature
(&self, armature_name: &str)
src/app/assets/mod.rs:64
↓ 1 callersMethodget_pos
(&self)
src/app/store/mouse.rs:22
↓ 1 callersMethodget_pressed
(&self)
src/app/store/mouse.rs:9
↓ 1 callersFunctioninit_canvas
(app: Rc<App>)
src/canvas.rs:26
↓ 1 callersFunctionlink_program
Link a shader program using the WebGL APIs
src/shader/mod.rs:145
↓ 1 callersMethodmake_textured_quad_vertices
Combine our vertex data so that we can pass one array to the GPU
src/render/textured_quad.rs:78
↓ 1 callersMethodorbit_left_right
(&mut self, delta: f32)
src/app/store/camera.rs:71
↓ 1 callersMethodorbit_up_down
(&mut self, delta: f32)
src/app/store/camera.rs:75
↓ 1 callersMethodrender_reflection_fbo
( &mut self, gl: &WebGlRenderingContext, state: &State, assets: &Assets, )
src/render/mod.rs:126
↓ 1 callersMethodrender_reflection_visual
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mod.rs:164
↓ 1 callersMethodrender_refraction_fbo
( &mut self, gl: &WebGlRenderingContext, state: &State, assets: &Assets, )
src/render/mod.rs:106
↓ 1 callersMethodrender_refraction_visual
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mod.rs:146
↓ 1 callersMethodrender_water
(&mut self, gl: &WebGlRenderingContext, state: &State)
src/render/mod.rs:94
↓ 1 callersMethodset_armature_uniforms
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mesh/skinned_mesh.rs:117
↓ 1 callersMethodshow_scenery
(&self)
src/app/store/mod.rs:63
↓ 1 callersMethodzoom
(&mut self, zoom: f32)
src/app/store/camera.rs:91
Methodbuffer_attributes
(&self, gl: &GL)
src/render/textured_quad.rs:53
Methodbuffer_attributes
(&self, gl: &WebGlRenderingContext)
src/render/mesh/skinned_mesh.rs:32
Methodbuffer_attributes
(&self, gl: &WebGlRenderingContext)
src/render/mesh/non_skinned_mesh.rs:33
Methodbuffer_f32_data
(gl: &GL, data: &[f32], attrib: u32, size: i32)
src/render/render_trait.rs:17
Methodbuffer_u16_indices
(gl: &GL, indices: &[u16])
src/render/render_trait.rs:53
Methodbuffer_u8_data
(gl: &GL, data: &[u8], attrib: u32, size: i32)
src/render/render_trait.rs:35
Methodcreate_reflection_framebuffer
( gl: &WebGlRenderingContext, )
src/render/framebuffer.rs:90
Methodcreate_refraction_framebuffer
( gl: &WebGlRenderingContext, )
src/render/framebuffer.rs:24
Methodderef
(&self)
src/app/store/mod.rs:124
Methoddownload_armatures
In a real application you would download via XHR or fetch request, but here we just included_bytes! for simplicity
src/app/assets/mod.rs:44
Methoddownload_meshes
In a real application you would download via XHR or fetch request, but here we just included_bytes! for simplicity
src/app/assets/mod.rs:22
Functionmain
Generates the `meshes.bytes` and `armatures.bytes` files that get included into the wasm binary. The tutorial repository should come with these files
build.rs:24
Methodnew
()
src/lib.rs:48
Methodnew
Create a new ShaderSystem
src/shader/mod.rs:26
Methodnew
( left: u16, top: u16, width: u16, height: u16, texture_unit: u8,
src/render/textured_quad.rs:25
Methodnew
(gl: &WebGlRenderingContext)
src/render/mod.rs:45
Methodnew
(shader: &'a Shader)
src/render/water_tile.rs:16
Methodnew
Create a new instance of our WebGL Water application
src/app/mod.rs:18
Methodnew
()
src/app/assets/mod.rs:13
Methodnew
()
src/app/store/water.rs:10
Methodnew
()
src/app/store/mod.rs:17
Methodnew
()
src/app/store/camera.rs:12
Methodrender
Render the scene. `index.html` will call this once every requestAnimationFrame
src/lib.rs:91
Methodrender
(&self, gl: &WebGlRenderingContext, _state: &State)
src/render/textured_quad.rs:64
Methodrender
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/water_tile.rs:52
Methodrender
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mesh/skinned_mesh.rs:72
Methodrender
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mesh/non_skinned_mesh.rs:56
Methodshader_kind
()
src/render/textured_quad.rs:45
Methodshader_kind
()
src/render/water_tile.rs:22
Methodshader_kind
()
src/render/mesh/skinned_mesh.rs:24
Methodshader_kind
()
src/render/mesh/non_skinned_mesh.rs:25
Methodstart
Start our WebGL Water application. `index.html` will call this function in order to begin rendering.
src/lib.rs:63
Methodupdate
Update our simulation
src/lib.rs:86