Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chinedufn/webgl-water-tutorial
/ functions
Functions
94 in github.com/chinedufn/webgl-water-tutorial
⨍
Functions
94
◇
Types & classes
26
↓ 27 callers
Method
get_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 callers
Method
msg
(&mut self, msg: &Msg)
src/app/store/mod.rs:23
↓ 11 callers
Method
camera
(&self)
src/app/store/mod.rs:50
↓ 9 callers
Method
create_element
(self)
src/controls.rs:212
↓ 7 callers
Method
texture_unit
0, 1, 2, ... etc. Useful for `gl.uniform1i` calls
src/render/texture_unit.rs:28
↓ 6 callers
Method
use_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 callers
Method
get_eye_pos
(&self)
src/app/store/camera.rs:54
↓ 5 callers
Method
get_shader
Get one of our Shader's
src/shader/mod.rs:50
↓ 5 callers
Method
prepare_for_render
( &self, gl: &WebGlRenderingContext, renderable: &impl Render<'a>, key: &str,
src/render/mod.rs:197
↓ 5 callers
Method
render
(&mut self, gl: &WebGlRenderingContext, state: &State, assets: &Assets)
src/render/mod.rs:74
↓ 5 callers
Method
water
(&self)
src/app/store/mod.rs:54
↓ 4 callers
Method
TEXTURE_N
(&self)
src/render/texture_unit.rs:16
↓ 3 callers
Method
clock
The current time in milliseconds
src/app/store/mod.rs:59
↓ 3 callers
Function
load_texture_image
(gl: Rc<WebGlRenderingContext>, src: &str, texture_unit: TextureUnit)
src/load_texture_img.rs:10
↓ 3 callers
Method
projection
(&self)
src/app/store/camera.rs:64
↓ 3 callers
Method
render_meshes
( &self, gl: &GL, state: &State, assets: &Assets, clip_plane: [f32; 4]
src/render/render_meshes.rs:16
↓ 3 callers
Method
shader
(&'a self)
src/render/mesh/skinned_mesh.rs:28
↓ 3 callers
Method
view
(&self)
src/app/store/camera.rs:23
↓ 2 callers
Method
bind_vao
(&self, vao: &Vao)
src/render/mod.rs:216
↓ 2 callers
Function
compile_shader
Create a shader program using the WebGL APIs
src/shader/mod.rs:120
↓ 2 callers
Method
get_mesh
(&self, mesh_name: &str)
src/app/assets/mod.rs:60
↓ 2 callers
Method
set_pos
(&mut self, x: i32, y: i32)
src/app/store/mouse.rs:17
↓ 2 callers
Method
set_pressed
(&mut self, pressed: bool)
src/app/store/mouse.rs:13
↓ 2 callers
Method
shader
(&'a self)
src/render/textured_quad.rs:49
↓ 2 callers
Method
shader
(&'a self)
src/render/water_tile.rs:26
↓ 2 callers
Method
shader
(&'a self)
src/render/mesh/non_skinned_mesh.rs:29
↓ 2 callers
Method
view_flipped_y
(&self)
src/app/store/camera.rs:38
↓ 1 callers
Function
append_controls
(app: Rc<App>)
src/controls.rs:13
↓ 1 callers
Method
assets
(&self)
src/app/mod.rs:27
↓ 1 callers
Function
attach_mouse_down_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:59
↓ 1 callers
Function
attach_mouse_move_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:87
↓ 1 callers
Function
attach_mouse_up_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:75
↓ 1 callers
Function
attach_mouse_wheel_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:102
↓ 1 callers
Function
attach_touch_end_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:149
↓ 1 callers
Function
attach_touch_move_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:133
↓ 1 callers
Function
attach_touch_start_handler
(canvas: &HtmlCanvasElement, app: Rc<App>)
src/canvas.rs:118
↓ 1 callers
Method
buffer_attributes
(&self, gl: &WebGlRenderingContext)
src/render/water_tile.rs:30
↓ 1 callers
Function
create_fresnel_control
(app: Rc<App>)
src/controls.rs:97
↓ 1 callers
Function
create_reflectivity_control
(app: Rc<App>)
src/controls.rs:73
↓ 1 callers
Function
create_show_scenery_control
(app: Rc<App>)
src/controls.rs:183
↓ 1 callers
Function
create_use_reflection_checkbox
(app: Rc<App>)
src/controls.rs:162
↓ 1 callers
Function
create_use_refraction_checkbox
(app: Rc<App>)
src/controls.rs:141
↓ 1 callers
Method
create_vao
(&self)
src/render/mod.rs:183
↓ 1 callers
Function
create_wave_speed_control
(app: Rc<App>)
src/controls.rs:119
↓ 1 callers
Function
create_webgl_context
(app: Rc<App>)
src/canvas.rs:15
↓ 1 callers
Method
get_armature
(&self, armature_name: &str)
src/app/assets/mod.rs:64
↓ 1 callers
Method
get_pos
(&self)
src/app/store/mouse.rs:22
↓ 1 callers
Method
get_pressed
(&self)
src/app/store/mouse.rs:9
↓ 1 callers
Function
init_canvas
(app: Rc<App>)
src/canvas.rs:26
↓ 1 callers
Function
link_program
Link a shader program using the WebGL APIs
src/shader/mod.rs:145
↓ 1 callers
Method
make_textured_quad_vertices
Combine our vertex data so that we can pass one array to the GPU
src/render/textured_quad.rs:78
↓ 1 callers
Method
orbit_left_right
(&mut self, delta: f32)
src/app/store/camera.rs:71
↓ 1 callers
Method
orbit_up_down
(&mut self, delta: f32)
src/app/store/camera.rs:75
↓ 1 callers
Method
render_reflection_fbo
( &mut self, gl: &WebGlRenderingContext, state: &State, assets: &Assets, )
src/render/mod.rs:126
↓ 1 callers
Method
render_reflection_visual
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mod.rs:164
↓ 1 callers
Method
render_refraction_fbo
( &mut self, gl: &WebGlRenderingContext, state: &State, assets: &Assets, )
src/render/mod.rs:106
↓ 1 callers
Method
render_refraction_visual
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mod.rs:146
↓ 1 callers
Method
render_water
(&mut self, gl: &WebGlRenderingContext, state: &State)
src/render/mod.rs:94
↓ 1 callers
Method
set_armature_uniforms
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mesh/skinned_mesh.rs:117
↓ 1 callers
Method
show_scenery
(&self)
src/app/store/mod.rs:63
↓ 1 callers
Method
zoom
(&mut self, zoom: f32)
src/app/store/camera.rs:91
Method
buffer_attributes
(&self, gl: &GL)
src/render/textured_quad.rs:53
Method
buffer_attributes
(&self, gl: &WebGlRenderingContext)
src/render/mesh/skinned_mesh.rs:32
Method
buffer_attributes
(&self, gl: &WebGlRenderingContext)
src/render/mesh/non_skinned_mesh.rs:33
Method
buffer_f32_data
(gl: &GL, data: &[f32], attrib: u32, size: i32)
src/render/render_trait.rs:17
Method
buffer_u16_indices
(gl: &GL, indices: &[u16])
src/render/render_trait.rs:53
Method
buffer_u8_data
(gl: &GL, data: &[u8], attrib: u32, size: i32)
src/render/render_trait.rs:35
Method
create_reflection_framebuffer
( gl: &WebGlRenderingContext, )
src/render/framebuffer.rs:90
Method
create_refraction_framebuffer
( gl: &WebGlRenderingContext, )
src/render/framebuffer.rs:24
Method
deref
(&self)
src/app/store/mod.rs:124
Method
download_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
Method
download_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
Function
main
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
Method
new
()
src/lib.rs:48
Method
new
Create a new ShaderSystem
src/shader/mod.rs:26
Method
new
( left: u16, top: u16, width: u16, height: u16, texture_unit: u8,
src/render/textured_quad.rs:25
Method
new
(gl: &WebGlRenderingContext)
src/render/mod.rs:45
Method
new
(shader: &'a Shader)
src/render/water_tile.rs:16
Method
new
Create a new instance of our WebGL Water application
src/app/mod.rs:18
Method
new
()
src/app/assets/mod.rs:13
Method
new
()
src/app/store/water.rs:10
Method
new
()
src/app/store/mod.rs:17
Method
new
()
src/app/store/camera.rs:12
Method
render
Render the scene. `index.html` will call this once every requestAnimationFrame
src/lib.rs:91
Method
render
(&self, gl: &WebGlRenderingContext, _state: &State)
src/render/textured_quad.rs:64
Method
render
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/water_tile.rs:52
Method
render
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mesh/skinned_mesh.rs:72
Method
render
(&self, gl: &WebGlRenderingContext, state: &State)
src/render/mesh/non_skinned_mesh.rs:56
Method
shader_kind
()
src/render/textured_quad.rs:45
Method
shader_kind
()
src/render/water_tile.rs:22
Method
shader_kind
()
src/render/mesh/skinned_mesh.rs:24
Method
shader_kind
()
src/render/mesh/non_skinned_mesh.rs:25
Method
start
Start our WebGL Water application. `index.html` will call this function in order to begin rendering.
src/lib.rs:63
Method
update
Update our simulation
src/lib.rs:86