WebGL Snippets
A collection of WebGL code snippets to speed up your WebGL development in Visual Studio Code.
Features
- Snippets for basic WebGL setup, shaders, buffers, and more.
- Includes debugging and utility snippets.
- Supports JavaScript.
Usage
- Install the extension.
- Open a JavaScript file.
- Type a snippet prefix (e.g.,
webgl.program ) and press Tab to insert the snippet.
Snippets
Prefix |
Description |
webgl.program |
Basic WebGL program setup. |
webgl.steps |
Step-by-step WebGL setup. |
webgl.rotation |
Code for rotating a triangle. |
webgl.texture.create |
Code for creating a texture. |
webgl.debug |
Debugging WebGL programs. |
webgl.cube.coordinates |
Cube coordinates for WebGL. |
webgl.circle |
Circle coordinates for WebGL. |
webgl.keycode |
Windows Key Codes. |
Installation
- Clone the repository:
git clone https://github.com/mpotulom28/webgl-snippets.git
- Open the folder in VS Code.
- Run
npm install to install dependencies.
- Run
vsce package to package the extension.
- Install the
.vsix file in VS Code.
License
MIT
| |