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 |
function constructor(spec) { | |
let {member} = spec, | |
{other} = other_constructor(spec), | |
method = function () { | |
// member, other, method, spec... | |
}; | |
return Object.freeze({ | |
method, | |
other |
{ | |
// http://eslint.org/docs/rules/ | |
"env": { | |
"browser": true, // browser global variables. | |
"node": false, // Node.js global variables and Node.js-specific rules. | |
"worker": false, // web workers global variables. | |
"amd": false, // defines require() and define() as global variables as per the amd spec. | |
"mocha": false, // adds all of the Mocha testing global variables. | |
"jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0. |
// 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'; | |
}, |
class SingletonDefaultExportInstance { | |
constructor() { | |
this._type = 'SingletonDefaultExportInstance'; | |
} | |
singletonMethod() { | |
return 'singletonMethod'; | |
} | |
static staticMethod() { |
// http://amanvirk.me/singleton-classes-in-es6/ | |
let instance = null; | |
class SingletonModuleScopedInstance { | |
constructor() { | |
if (!instance) { | |
instance = this; | |
} | |
this._type = 'SingletonModuleScopedInstance'; |
// 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'); | |
} |
// Implementation 4: prevent the creation of an instance | |
class SingletonNoInstance { | |
constructor(enforcer) { | |
throw new Error('Cannot construct singleton'); | |
} | |
static singletonMethod() { | |
return 'singletonMethod'; | |
} |
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 |
for voice in `say -v '?' | awk '{print $1}'`; do say -v "$voice" "Hi `whoami` my name is ${voice}"; done |
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]; |