the code should be called right after we obtain the GL context. Don't forget to reset/edit ignoreCommands if you intend to capture some of those.
fakeGl.captureOperations(40)
...
fakeGl.ignoreCommands = []
function loadImageFile(inputEl) { | |
inputEl.addEventListener('change', function () { | |
inputEl.disabled = true; | |
var file0 = inputEl.files[0]; // BLOB | |
var url = URL.createObjectURL(file0); | |
//console.log('url', url); | |
var img = new Image; | |
img.onload = function() { | |
//ctx.drawImage(img, 20, 20); | |
} |
Your GPS device has messed up and the recorded route has a faulty segment?
This code iterates over recorded points, finding biggest distance discrepancy and allowing you to remove it and save an altered XML version leaving out those measurements.
const http = require('http'); | |
const https = require('https'); | |
const HEADERS = {}; | |
function get(url, body, moreHeaders) { | |
const prot = url.indexOf('https:') === 0 ? https : http; | |
return new Promise((resolve, reject) => { | |
const r = prot.request( | |
url, |
const fs = require('fs'); | |
const readline = require('readline'); | |
async function* readJsonlGen(filename) { | |
const lineReader = readline.createInterface({ | |
input: fs.createReadStream(filename), | |
}); | |
let i = 0; | |
for await (const line of lineReader) { |
function spy(fn, prot = fn.prototype) { | |
function proxy() { | |
const args = Array.prototype.slice.call(arguments); | |
proxy.calls.push(args); | |
proxy.called = true; | |
return fn.apply(this, args); | |
} | |
proxy.prototype = prot; |
'use strict'; | |
function parseTime(s) { | |
let t = 0; | |
const p = s.split(':'); | |
let ss = p.pop().replace(',', '.'); | |
t += parseFloat(ss); | |
ss = parseInt( p.pop() || '0', 10); | |
t += ss * 60; | |
ss = parseInt( p.pop() || '0', 10); |
I hereby claim:
To claim this, I am signing this object: