Skip to content

Instantly share code, notes, and snippets.

View w8r's full-sized avatar
💭
learning

Alexander Milevski w8r

💭
learning
View GitHub Profile
@w8r
w8r / README.md
Created December 14, 2019 22:19 — forked from vprtwn/README.md
Force Editor + Pan/Zoom

Drag from an existing node to add a new node or link. Click to select/deselect nodes/links. Hit the DELETE key to remove the selected node or link. Drag to pan. Scroll to zoom.

Built with D3.js.

@w8r
w8r / Bunny.js
Created July 30, 2019 09:19 — forked from bberak/Bunny.js
How to use regl in React or React Native
import React, { PureComponent } from "react";
import { StyleSheet } from "react-native";
import ReglView from "./ReglView";
import mat4 from "gl-mat4";
import bunny from "bunny";
export default class Bunny extends PureComponent {
drawCommand = regl => {
return regl({
vert: `
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@w8r
w8r / .gitignore
Created January 10, 2018 10:20
OpenLayers, Rollup, and Closure Compiler
/node_modules/
bundle.js
@w8r
w8r / bresenham.c
Created January 10, 2018 10:02 — forked from lyjia/bresenham.c
bresenham.c
/********************************************************************
* *
* Curve Rasterizing Algorithm *
* *
********************************************************************/
/**
* @author Zingl Alois
* @date 22.08.2016
* @version 1.2
@w8r
w8r / .block
Created September 26, 2017 12:11 — forked from mbostock/.block
Collision Detection
license: gpl-3.0
@w8r
w8r / README.md
Created September 26, 2017 12:07 — forked from eweitnauer/README.md
Quadtree 3

This example demonstrates how to take the size of objects into account when selecting objects efficiently with a quadtree. Selected objects are shown in red, visited but not selected objects are shown in yellow. The efficiency depends on the biggest width and biggest height among all object. It is assumed that all objects are rectangle-shaped.

Example series:

Based on Mike Bostock's quadtree example.

@w8r
w8r / README.md
Created September 13, 2017 15:10 — forked from nitaku/README.md
Stability of Peano curve

This example shows the stability of the Peano space-filling curve: each order of the curve can be overlapped to each other (click the canvas to see it).

By stability, we indicate the property of the curve to yield stable layouts, suitable for treemaps that follow our data cartography methodology. According to it, a slight change in input data should be reflected only by a slight change in the map. An unstable curve (like the classical Hilbert curve, see this example) could cause a map to flip even if a single cell is added.

@w8r
w8r / .block
Created August 21, 2017 11:38 — forked from mbostock/.block
Bonne
license: gpl-3.0
height: 900
@w8r
w8r / .block
Created February 23, 2017 10:01 — forked from enjalot/.block
Rainbow Pack (adapted for d3.unconf badge)
license: gpl-3.0
height: 960