To quick start:
# move to an empty folder
mkdir my-folder && cd my-folder
# paste regl.js file
pbpaste > regl.js| function logger(strings,...values) { | |
| var str = ""; | |
| for (let i = 0; i < strings.length; i++) { | |
| if (i > 0) { | |
| if (values[i-1] && typeof values[i-1] == "object") { | |
| if (values[i-1] instanceof Error) { | |
| if (values[i-1].stack) { | |
| str += values[i-1].stack; | |
| continue; | |
| } |
Fork of @surma's work here: https://gist.github.com/surma/b2705b6cca29357ebea1c9e6e15684cc
Using browserify + budo.
Build instructions:
emccnpm install| /* This can be the start of a module */ | |
| const makeHandler = cb => { | |
| return { | |
| get (object, prop, receiver) { | |
| if (Reflect.has(object, prop)) { | |
| return Reflect.get(...arguments) | |
| } | |
| return new Proxy(() => {}, { |
This might be handy if you have an SVG file that you want to use as, say, a mask for a generative algorithm.
Place the SVG file in the same directory that you are running penplot from.
| function getUpdates() { | |
| updateCell("B3", "ripple") | |
| updateCell("C3", "bitcoin") | |
| updateCell("D3", "ethereum") | |
| updateCell("E4", "litecoin") | |
| updateCell("F4", "iota") | |
| } | |
| function updateCell(cell, code) { | |
| const response = UrlFetchApp.fetch("https://api.coinmarketcap.com/v1/ticker/" + code + "/?convert=EUR") |
| import buffer from 'three-buffer-vertex-data'; | |
| export default function addBarycentricCoordinates (bufferGeometry) { | |
| const barycentric = []; | |
| const attrib = bufferGeometry.getIndex() || bufferGeometry.getAttribute('position'); | |
| const count = attrib.count / 3; | |
| if (count % 2 !== 0) { | |
| // Probably won't ever happen | |
| console.error('WARN: Got a weird decimal result for attribute count, skipping wireframe...'); | |
| return; |
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 |
| print("UPDATE AUG 2023: this script is beyond old and broken") | |
| print("You may find interesting and more up to date resources in the comments of the gist") | |
| exit() | |
| from slacker import Slacker | |
| import json | |
| import argparse | |
| import os | |
| # This script finds all channels, private channels and direct messages |
collecting links and documents about the topic
Object Systems (2004, as used in Thief 1998) http://chrishecker.com/images/6/6f/ObjSys.ppt