J Wylie Кулик 7c12a6bf32
Fixed render loop in webgl example (#2759)
* Fixed render loop

* Added gloo-console, added gloo-render but can't use due to errors. Removed (for now) unused Arc, eliminated unused (for now) update fn

* Cleaned up gloo-render experiment

* Style/readability minor fixes

* Clean code

* Comments in code on reasons for Rc wrap of gl, and for why we don't use gloo-render's request_animation_frame

* Update PR

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
2022-08-30 08:39:03 +02:00
..
2022-04-11 17:02:59 +05:00
2021-12-08 19:13:40 +01:00

WebGL Example

Demo

This is a simple demo using WebGL with Yew to initialize the GL context, create a render loop, and draw to the canvas with basic shaders using web-sys.

Concepts

  • Accessing a DOM element using NodeRef.
  • Using Javascript APIs with web-sys.

Improvements

  • Use a much more flashy shader