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-device-pixel-ratio.md
Created April 3, 2018 12:01
Support table - device pixel ratio.md
Device OS OS version Browser Browser version Device pixel ratio
Apple iPad 5th iOS 11.0.3 Mobile Safari 11.0 2
Apple iPad Air 2 iOS 8.4 Mobile Safari 8.0 2
Apple iPad Mini 3 iOS 8.1.2 Mobile Safari 8.0 2
Apple iPad Pro iOS 11.2.1 Mobile Safari 11.0 2
Apple iPhone 5S iOS 8.1.3 Mobile Safari 8.0 2
Apple iPhone 6 Plus iOS 8.1 Mobile Safari 8.0 3
Apple iPhone 6 iOS 8.1.3 Mobile Safari 8.0 2
Apple iPhone 6S Plus iOS 9.0.1 Mobile Safari 9.0
@TimvanScherpenzeel
TimvanScherpenzeel / support-table-webgl-extensions.md
Created April 3, 2018 12:03
Support table - WebGL 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 / 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 / support-table-webgl1-webgl2.md
Created April 5, 2018 07:52
Support table - WebGL & WebGL2 support
Device OS OS version Browser Browser version WebGL WebGL2
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 8.0 X
Apple iPhone 6S Plus iOS 9.0.1 Mobile Safari 9.0 X
@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 / unlock-autoplay-audio-video.md
Last active April 21, 2022 20:30
Implementing audio and video autoplay unlocking

Implementing audio and video autoplay unlocking

Due to recent changes in the autoplay policy of Chrome 66 developers of interactive experiences on the web are facing new challenges regarding audio and video autoplay. The new policy has unfortunately broken many of the older experiences that rely on autoplaying audio and video.

So how to move forward?

Previous solutions

Previously developers used to face this issue on iOS mobile devices where the audio context was locked. Most developers fixed this by using the initial touch event of a user to unlock the audio.

@TimvanScherpenzeel
TimvanScherpenzeel / index.js
Last active June 14, 2023 12:39
Website scraping using Puppeteer and Node.js
// Native
const fs = require('fs');
const path = require('path');
// Vendor
const { ArgumentParser } = require('argparse');
const fetch = require('node-fetch');
const mkdirp = require('mkdirp');
const puppeteer = require('puppeteer');
@TimvanScherpenzeel
TimvanScherpenzeel / building-COLLADA2GLTF-MacOS-High-Sierra.md
Last active July 17, 2022 19:50
Building instructions for COLLADA2GLTF for MacOS High Sierra Version 10.13.4
# Tested on MacOS High Sierra Version 10.13.4

# Clone Git repo
git clone git@github.com:KhronosGroup/COLLADA2GLTF.git

cd COLLADA2GLTF

# Apple LLVM version 9.1.0 (clang-902.0.39.1) doesn't include