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.
type Id = string | number; | |
interface Node { | |
id: Id; | |
color: string; | |
radius: number; | |
x: number; | |
y: number; | |
strokeWidth?: number; | |
strokeColor?: string; |
export class Node<T>{ | |
data: T; | |
prev: Node<T> = null; | |
next: Node<T> = null; | |
constructor(data: T) { | |
this.data = data; | |
} | |
} |
const url = `https://maps.google.com`; | |
fetch(`https://is.gd/create.php?format=simple&url=${url}`) | |
.then(r => r.text()) | |
.then(r => console.log(r)); |
function intersection(...lists) { | |
const result = []; | |
const resultLUT = {}; | |
for(let i = 0; i < lists.length; i++) { | |
const currentList = lists[i]; | |
for(let y = 0; y < currentList.length; y++) { | |
const currentValue = currentList[y]; | |
if(!resultLUT[currentValue]) { | |
let existsInAll = true; |
import React, { useReducer, Reducer, createContext, ReactNode, Dispatch } from "react"; | |
type Action = <A>(dispatch: Dispatch<A>) => Function; | |
export default function <S, A extends Action>( | |
reducer: Reducer<S, A>, | |
actions: Record<string, A>, | |
initialState: S | |
) { | |
const Context = createContext<S>({} as S); |
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.
license: mit | |
height: 500 | |
border: no |
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: ` |
node_modules | |
dist |