Let's make sure our Express app has the required base modules:
# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon
#![feature(lang_items)] | |
#![no_std] | |
#[no_mangle] | |
pub fn add_one(x: i32) -> i32 { | |
x + 1 | |
} | |
// needed for no_std |
//--------------------------------------------------------------------------// | |
// Flow field animator by Etienne Jacob (www.necessary-disorder.tumblr.com) // | |
// Processing code (https://processing.org) // | |
// Saves frames, then you must use something else to make the GIF // | |
//--------------------------------------------------------------------------// | |
/// This code starts with the rendering system I took from @beesandbombs | |
/// (it also contains some useful functions and stuff) | |
/// You don't have to understand it | |
/// Just know that it does an average on many drawings to get a motion blur effect | |
/// from drawings parametrized by the global variable t going from 0 to 1 |
import _ from 'underscore'; | |
export default class TextureAtlas { | |
constructor(json, image) { | |
this._textures = {}; | |
let texture = new THREE.Texture(image); | |
texture.needsUpdate = true; | |
let frames = json.frames; | |
_.keys(frames).forEach(function(key, i) { |
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)const delay = (callback, duration) => { | |
const tick = () => | |
getProgress(time) < 1 ? requestAnimationFrame(tick) : callback(); | |
const time = { | |
duration, | |
id: requestAnimationFrame(tick) | |
}; | |
}; |
const UUIDS = { | |
INFO: 0x180A, | |
TEMPERATURE: 0x1809, | |
BATTERY: 0x180F, | |
}; | |
const mainLoopTimeout = 60000; | |
const buttonPressTimeout = 5000; | |
const buttonInitialValue = 0; | |
const buttonValueIncrement = 10; |
var cameraZ = camera.position.z; | |
var planeZ = 5; | |
var distance = cameraZ - planeZ; | |
var aspect = viewWidth / viewHeight; | |
var vFov = camera.fov * Math.PI / 180; | |
var planeHeightAtDistance = 2 * Math.tan(vFov / 2) * distance; | |
var planeWidthAtDistance = planeHeightAtDistance * aspect; | |
// or |
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 Chrome Canary:
alias hydra='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --no-sandbox --js-flags="--user-data-dir=/tmp/profile --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces"'
For regular ol' Chrome: