Skip to content

Instantly share code, notes, and snippets.

View TimvanScherpenzeel's full-sized avatar

Tim van Scherpenzeel TimvanScherpenzeel

View GitHub Profile
@TimvanScherpenzeel
TimvanScherpenzeel / support-table-webgl2-extensions.md
Created April 3, 2018 12:04
Support table - WebGL2 extensions

| Device | OS | OS version | Browser | Browser version | ANGLE_instanced_arrays | EXT_blend_minmax | EXT_frag_depth | EXT_shader_texture_lod | EXT_texture_filter_anisotropic | WEBKIT_EXT_texture_filter_anisotropic | OES_element_index_uint | OES_standard_derivatives | OES_texture_float | OES_texture_float_linear | OES_texture_half_float | OES_texture_half_float_linear | OES_vertex_array_object | WEBGL_compressed_texture_s3tc | WEBKIT_WEBGL_compressed_texture_s3tc | WEBGL_debug_renderer_info | WEBGL_debug_shaders | WEBGL_depth_texture | MOZ_WEBGL_depth_texture | WEBKIT_WEBGL_depth_texture | WEBGL_draw_buffers | WEBGL_lose_context | MOZ_WEBGL_lose_context | WEBKIT_WEBGL_lose_context | EXT_color_buffer_float | EXT_color_buffer_half_float | EXT_disjoint_timer_query | EXT_disjoint_timer_query_webgl2 | EXT_sRGB | WEBGL_color_buffer_float | WEBGL_compressed_texture_astc | MOZ_WEBGL_compressed_texture_atc | WEBKIT_WEBGL_compressed_texture_atc | WEBGL_compressed_texture_atc | WEBGL_compresse

@TimvanScherpenzeel
TimvanScherpenzeel / damaged-helmet-draco-broken.json
Created April 23, 2018 17:57
damaged-helmet-draco-broken.json
{
"accessors": [
{
"componentType": 5123,
"count": 46356,
"max": [
14555
],
"min": [
0
@TimvanScherpenzeel
TimvanScherpenzeel / damaged-helmet-draco.json
Created April 23, 2018 17:58
damaged-helmet-draco.json
{
"accessors": [
{
"componentType": 5123,
"count": 46356,
"max": [
14555
],
"min": [
0
@TimvanScherpenzeel
TimvanScherpenzeel / support-table-compressed-textures.md
Last active July 20, 2018 21:51
Support table - Compressed textures
Device OS OS version Browser Browser version ASTC ETC ETC1 S3TC PVRTC
Apple iPad 5th iOS 11.0.3 Mobile Safari 11.0 X
Apple iPad Air 2 iOS 8.4 Mobile Safari 8.0 X
Apple iPad Mini 3 iOS 8.1.2 Mobile Safari 8.0 X
Apple iPad Pro iOS 11.2.1 Mobile Safari 11.0 X
Apple iPhone 5S iOS 8.1.3 Mobile Safari 8.0 X
Apple iPhone 6 Plus iOS 8.1 Mobile Safari 8.0 X
Apple iPhone 6 iOS 8.1.3 Mobile Safari
@TimvanScherpenzeel
TimvanScherpenzeel / .htaccess
Created May 8, 2019 13:28
Client side routing fix on reload
# BEGIN ROUTING
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
# END ROUTING
@TimvanScherpenzeel
TimvanScherpenzeel / binpack-loader.ts
Created August 16, 2019 09:27
Loading a .binpack file
private loadBinpack = (item: ILoadItem): Promise<any> =>
this.loadArrayBuffer(item).then((data: TVoidable<ArrayBuffer>): any => {
if (data) {
let content = null;
let contentArray = null;
let binaryChunk: TNullable<ArrayBuffer> = null;
let byteOffset = null;
let chunkIndex = 0;
let chunkLength = 0;
let chunkType = null;
import os
import sys
import shutil
import multiprocessing as mp
from itertools import repeat as re
import dateparser
import pytz
import json
import csv
import datetime
@TimvanScherpenzeel
TimvanScherpenzeel / Thread.ts
Last active October 14, 2020 12:07
A re-usable thread implementation
// Implementation based on https://github.com/developit/greenlet and https://github.com/developit/task-worklet
class Thread {
private taskId = 0;
private promises: any = {};
private worker: Worker | null = new Worker(
URL.createObjectURL(
new Blob(
[
`(${() => {
@TimvanScherpenzeel
TimvanScherpenzeel / donations.md
Last active October 29, 2020 10:30
Donation addresses

ETH

BTC

// The following defined constants and descriptions are directly ported from https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants.
// Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/.
// Contributors
// https://developer.mozilla.org/en-US/profiles/Sheppy
// https://developer.mozilla.org/en-US/profiles/fscholz
// https://developer.mozilla.org/en-US/profiles/AtiX
// https://developer.mozilla.org/en-US/profiles/Sebastianz