Skip to content

Instantly share code, notes, and snippets.

View donmccurdy's full-sized avatar

Don McCurdy donmccurdy

View GitHub Profile
@mikelyndon
mikelyndon / VAT.md
Created March 15, 2023 16:53
Pseudo code and notes for generating a vertex animation texture for a fixed point count deforming geometry.

Vertex Animation Textures

Prerequisites

  • Normals
  • UVs

Create orient attribute (allows us to update normals in the vertex shader)

  • Create normal (N) attribute if missing
  • Create tangentu attribute (preferably MikkT)
  • Create matrix3 from N and tangentu
  • Convert matrix3 to orient attribute (quaternion)
@mattdesl
mattdesl / animated-grid.js
Created July 27, 2018 15:45
animated grid lines
const canvasSketch = require('canvas-sketch');
const { lerp } = require('./util/math');
const settings = {
animate: true,
duration: 3,
dimensions: [ 640, 640 ],
scaleToView: true,
playbackRate: 'throttle',
fps: 24
@zeux
zeux / vertexcodec-comparison.txt
Last active May 23, 2019 16:45
Comparison of vertexcodec/indexcodec from meshoptimizer with Google Draco
Using fixed-point encoding for position (14 bits per component) and texture coordinates (12 bits per component), with 32-bit index buffer
and this vertex format:
// 12 bytes
struct PackedVertexOct
{
unsigned short px, py, pz;
unsigned char nu, nv; // octahedron encoded normal, aliases .pw
unsigned short tx, ty;
};
@mattdesl
mattdesl / about.md
Last active February 22, 2024 06:39
Parse & render SVG with penplot

parse & render SVG file with penplot

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.

test

@mattdesl
mattdesl / about.md
Last active July 17, 2023 09:20
optimizing & de-duplicating geometry in GLTF files

optimize GLTF file

This optimizes a GLTF file that was exported by blender (or similar) by de-duplicating buffer views (i.e. chunks of bytes) that are equal and removing redundant accessors.

For example, 100 cubes of different scales/materials/rotations/etc should all end up using a single BufferGeometry in ThreeJS, which isn't the case with current GLTF exporters in Blender and parsers for ThreeJS.

In scenes with a lot of instancing, it can dramatically reduce total file size as well as render performance. In one test scene:

Before: 4.8MB file size, 832 THREE.Geometry instances across 832 THREE.Mesh objects
After: 661KB file size, 13 THREE.Geometry instances across 832 THREE.Mesh objects

@jsantell
jsantell / web-ar-projects.md
Last active June 29, 2019 03:01
Projects for WebARonARKit and WebARonARCore

Projects for WebARonARKit and WebARonARCore

New Projects

Leave a comment to add a project you've created or found!

Browsers

@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 4, 2024 12:46
A collection of WebGL and WebGPU frameworks and libraries

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.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@Azgaar
Azgaar / .block
Last active November 22, 2023 14:26
Fantasy Map Generator
license: gpl-3.0
height: 570
border: no
@Wilto
Wilto / mornay-mac.md
Last active February 19, 2016 07:36
Macaroni and Weird Mornay Sauce

Macaroni and Sauce Mornay (kinda)

  • A box of shells
  • 6 Tbsp. butter
  • 1 C. unseasoned breadcrumbs
  • 1/4 C. all-purpose flour
  • 1/8 C. minced leeks
  • 2 C. milk
@brunosan
brunosan / index.md
Last active June 15, 2018 23:57
This is a list inspired by some of our current or potential lines of work at the World Bank Innovation Labs. The “Innovations in Big Data Analytics” program helps to strengthen the World Bank capabilities to effectively use big data in its operational and strategic work.

This is a list inspired by some of our current or potential lines of work at the World Bank Innovation Labs. The “Innovations in Big Data Analytics” program helps to strengthen the World Bank capabilities to effectively use big data in its operational and strategic work.

We are always looking for great Data Scientists. If you can solve any of these [using open software], you'll be heads down helping us from day one. Email us to brunosanchez@worldbank.org

(This list is updated frequently).

1. Nightlights from Satellite

We are building an open stack to process nightly data from satellite and query light output from all known villages. Currently we are doing 20 years of nightly data for 600,000 villages in India.