This is an extensive documentation for Svader, a JavaScript library that allows developers to render GPU-accelerated graphics in web applications. Here's a summary of the key points:
WebGL vs. WebGPU
Svader Features
resolution, scale, and time.Svader Parameters
parameters property is an array of objects with the following properties:
label: The name of the parameter to be used for debugging.binding: An integer matching the variable in the shader code.value: The value of the parameter or a string specifying a built-in value. If not a built-in value, it should be an ArrayBuffer/ArrayBufferView.storage: Optional, defaults to false. Whether the parameter is a storage variable rather than a uniform variable.Svader Built-in Values
"resolution": A vec2f of the canvas width and height in physical device pixels."scale": An f32 of the ratio between CSS pixels and physical device pixels, i.e., zoom level."time": An f32 of the current time in seconds."offset": A vec2f to be added to the @builtin(position) of the fragment shader.Svader Usage
parameters property to pass parameters to the renderer.resolution, scale, and time.Overall, Svader provides a powerful toolset for developers to render GPU-accelerated graphics in web applications. By understanding its features, parameters, and built-in values, developers can optimize their application's performance and create engaging user experiences.
3d party APIs integration made easy. Auth, caching, logging & monitoring, data mapping, retries, mocking, fallback and more...
Ready to use, fancy React components to make the web fun again. Free & Open Source.
A multilingual Next.js 15 starter with built-in i18n support. Launch your global-ready web application with a clean, efficient, and SEO-friendly found...