Skip to content

Instantly share code, notes, and snippets.

View edsilv's full-sized avatar

Edward Silverton edsilv

View GitHub Profile
@edsilv
edsilv / wunder-der-verebung.json
Created June 1, 2022 12:45
IIIF Discovery Test Annotation
{
"type": "Annotation",
"motivation": ["contentState"],
"target": {
"id": "https://iiif.wellcomecollection.org/presentation/b18035723/canvases/b18035723_0022.JP2#xywh=1156,1585,501,544",
"type": "Canvas",
"partOf": [
{
"id": "https://iiif.wellcomecollection.org/presentation/v2/b18035723",
"type": "Manifest"
@edsilv
edsilv / SVGIconToggleGroup.tsx
Created December 18, 2021 16:33
SVGIconToggleGroup
import React from 'react';
import { styled } from '@stitches/react';
import { violet, blackA, mauve } from '@radix-ui/colors';
// import { TextAlignLeftIcon, TextAlignCenterIcon, TextAlignRightIcon } from '@radix-ui/react-icons';
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
const StyledToggleGroup = styled(ToggleGroupPrimitive.Root, {
display: 'inline-flex',
backgroundColor: mauve.mauve6,
borderRadius: 4,
@edsilv
edsilv / annotations.json
Last active August 29, 2021 21:28
darklab annotation json
{
"version": "1.1",
"objectID": "DC1_LUHM23071",
"notes": "asjdh al dlka jdlkajds lkajds",
"views": {
"V_102": {
"view": {
"space": "object",
"position": [
458.79573438185946,
{
"options": {
"targetSound": "beep",
"distractorSize": 0.7,
"targetColor": "green",
"distractorModels": [
"cone",
"sphere",
"torus",
"cylinder",
@edsilv
edsilv / r3f-video.ts
Created April 25, 2021 20:15
r3f video
import React, { useEffect, useState, useRef } from 'react'
import { Vec3 } from './Types'
import { Image } from './Image'
import { useSpring } from '@react-spring/core'
import { a } from '@react-spring/three'
import { useAsset } from 'use-asset'
export const Video = ({
src,
position = [0, 0, 0],
@edsilv
edsilv / regress.md
Created March 13, 2021 10:24
regress

In the beginning, there was the Word, and the Word was Void.

Gödel looked upon the Void, and comprehended it not. For it was utterly empty.

If only I could measure this expanse, I could know where it begins and ends, he thought.

So Gödel rendered Scale unto the Void, and he saw that it was good.

The Void now lay at his feet, a perfect cube of deepest black.

@edsilv
edsilv / UV.tsx
Last active November 23, 2020 20:26
UV.tsx
import React, { useRef, useLayoutEffect, useEffect, useState } from "react";
// @ts-ignore
import { init, Viewer } from "universalviewer";
import "../../assets/uv.css";
// @ts-ignore
import classNames from "classnames";
const UV = ({
manifest,
embedded = false,
@edsilv
edsilv / iiif-3d-manifest-rendering.json
Created June 11, 2020 14:00
IIIF 3D Manifest (Rendering)
{
"@context": [
"http://www.w3.org/ns/anno.jsonld",
"http://iiif.io/api/presentation//context.json"
],
"id": "https://example.org/iiif/book1/manifest",
"type": "Manifest",
"label": { "en": [ "Image 1" ] },
"items": [
{
@edsilv
edsilv / iiif-3d-manifest.json
Last active June 11, 2020 14:07
IIIF 3D Manifest
{
"@context": [
"http://www.w3.org/ns/anno.jsonld",
"http://iiif.io/api/presentation/3/context.json"
],
"id": "https://example.org/iiif/model1/manifest",
"type": "Manifest",
"label": { "en": [ "Model 1" ] },
"items": [
{