How yarodash/shadertoy works
This is a browser-based GLSL shader playground. Users edit a fragment shader, apply it, and see it rendered continuously on a WebGL canvas; they can also add named image textures and use the documented time and mouse uniforms. The graph follows the React entry point into the app, then separates shader editing/compilation, canvas rendering, and texture management. Source excerpts establish the principal calls; README documentation supplies the product capabilities. Some rendering and texture details are implemented directly inside App.js or ImageSelector.js.
Main entry points: App.js App orchestration · ImageSelector.js Image selector · ImageSelectorList.js Texture list · webgl-scripts.js WebGL utilities
Components 12
Playground interface
- React entry
src/index.js - App orchestration
src/App.js - Shader errors
src/ErrorShow.js
Shader pipeline
- Fragment editor
src/FragmentShaderInput.js - Default shaders
src/defaultShaders.js
Canvas rendering
- WebGL utilities
src/webgl-scripts.js - Canvas input
src/Canvas.js - Shader render loop
src/App.js
Texture inputs
- Texture list
src/ImageSelectorList.js - Image selector
src/ImageSelector.js - Image reload hook
src/customHooks.js
Other components
- User
Connections 15
- User → React entry: opens app
src/index.js - React entry → App orchestration: renders
src/index.js - App orchestration → Fragment editor: renders
src/App.js - Fragment editor → App orchestration: updates source
src/FragmentShaderInput.js - App orchestration → Default shaders: loads defaults
src/App.js - App orchestration → WebGL utilities: compiles and links
src/App.js - App orchestration → Canvas input: renders
src/App.js - Canvas input → WebGL utilities: initializes context
src/Canvas.js - App orchestration → Shader render loop: runs
src/App.js - Shader render loop → WebGL utilities: binds textures
src/App.js - App orchestration → Shader errors: displays errors
src/App.js - App orchestration → Texture list: renders and supplies state
src/App.js - Texture list → Image selector: renders selectors
src/ImageSelectorList.js - Image selector → Image reload hook: uses reload hook
src/ImageSelector.js - Image selector → Texture list: updates texture state
src/ImageSelectorList.js