A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
| Name | Stars | Last Commit | Description |
|---|---|---|---|
| three.js | ![GitHub |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>ES modules in the browser - almost - now | unpkg getLibs</title> | |
| <!-- Include the getlibs endpoint --> | |
| <script src="https://unpkg.com/getlibs"></script> | |
| </head> | |
| <body> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>ES modules in the browser - almost - now | Basics: script type module</title> | |
| </head> | |
| <body> | |
| <!-- Use a type set to "module" with a fallback --> | |
| <script type="module" src="app.js"></script> |
| const listeners = (function listAllEventListeners() { | |
| let elements = []; | |
| const allElements = document.querySelectorAll('*'); | |
| const types = []; | |
| for (let ev in window) { | |
| if (/^on/.test(ev)) types[types.length] = ev; | |
| } | |
| for (let i = 0; i < allElements.length; i++) { | |
| const currentElement = allElements[i]; |
| for voice in `say -v '?' | awk '{print $1}'`; do say -v "$voice" "Hi `whoami` my name is ${voice}"; done |
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
| Name | Stars | Last Commit | Description |
|---|---|---|---|
| three.js | ![GitHub |
| // Implementation 4: prevent the creation of an instance | |
| class SingletonNoInstance { | |
| constructor(enforcer) { | |
| throw new Error('Cannot construct singleton'); | |
| } | |
| static singletonMethod() { | |
| return 'singletonMethod'; | |
| } |
| // http://stackoverflow.com/a/26227662/1527470 | |
| const singleton = Symbol(); | |
| const singletonEnforcer = Symbol(); | |
| class SingletonEnforcer { | |
| constructor(enforcer) { | |
| if (enforcer !== singletonEnforcer) { | |
| throw new Error('Cannot construct singleton'); | |
| } |
| // http://amanvirk.me/singleton-classes-in-es6/ | |
| let instance = null; | |
| class SingletonModuleScopedInstance { | |
| constructor() { | |
| if (!instance) { | |
| instance = this; | |
| } | |
| this._type = 'SingletonModuleScopedInstance'; |
| class SingletonDefaultExportInstance { | |
| constructor() { | |
| this._type = 'SingletonDefaultExportInstance'; | |
| } | |
| singletonMethod() { | |
| return 'singletonMethod'; | |
| } | |
| static staticMethod() { |
| // http://www.2ality.com/2011/04/singleton-pattern-in-javascript-not.html | |
| const NoClassSingleton = { | |
| _instance: null, | |
| get instance() { | |
| if (!this._instance) { | |
| this._instance = { | |
| singletonMethod() { | |
| return 'singletonMethod'; | |
| }, |