This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testData = [[-0.002345,0.049722,-0.006237,180,120,95], | |
[-0.002345,0.049744,-0.006316,180,120,95], | |
[-0.002397,0.049722,-0.006316,180,120,95], | |
[-0.002488,0.049722,-0.007304,183,122,97], | |
[-0.002345,0.049773,-0.007304,183,122,97], | |
[-0.002345,0.049722,-0.007538,183,122,97], | |
[-0.001620,0.049722,-0.005327,189,127,101], | |
[-0.001356,0.049722,-0.004959,189,127,101], | |
[-0.001356,0.049826,-0.005327,189,127,101], | |
[-0.001356,0.050038,-0.006316,192,129,103], |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const handler = { | |
get(target, key) { | |
if (key == 'isProxy') | |
return true; | |
const prop = target[key]; | |
if (typeof prop == 'undefined') | |
return; | |
if (!prop.isProxy && typeof prop === 'object') | |
target[key] = new Proxy(prop, handler); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(#.) (\w*) (\d*) (\d*) (\S*) (\S*) (\S*) ?(\S*)? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var str=`#N canvas 654 312 778 598 12; | |
#X obj 70 130 midiin 1, f 38; | |
#X floatatom 140 250 5 0 0 0 - - -; | |
#X symbolatom 70 190 10 0 0 0 - - -; | |
#X obj 30 130 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 | |
-1; | |
#X obj 140 280 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 | |
1; | |
#X obj 170 280 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 | |
-262144 -1 -1 0 256; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In rows of 16 chars | |
ascii 0-127 | |
↑↓≡◧◨■◫❏¦°ÄÇÖÜßà | |
äçèéêîñö÷øüь…█←→ | |
!"#$%&'()*+,-./ | |
0123456789:;<=>? | |
@ABCDEFGHIJKLMNO | |
PQRSTUVWXYZ[\]^_ | |
`abcdefghijklmno |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// modified from derick bailey https://derickbailey.com/2015/07/19/using-es6-generators-to-recursively-traverse-a-nested-data-structure/ | |
function getType(object) { | |
return Object.prototype.toString.call(object) | |
.match(/^\[object\s(.*)\]$/)[1].toLowerCase() | |
} | |
function isArray(o) { | |
return getType(o) === 'array'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from https://qroph.github.io/2018/07/30/smooth-paths-using-catmull-rom-splines.html | |
function getCurve(points,tension,alpha,closed) { | |
_tension = tension || 0; | |
_alpha = alpha || 0.5; | |
_closed = closed || false; | |
_points = points || []; | |
const dist = (p0, p1) => { | |
return Math.sqrt(Math.pow(p1.x - p0.x, 2) + Math.pow(p1.y - p0.y, 2)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://github.com/jkroso/parse-svg-path | |
var cmdLength = {a:7, c:6, h:1, l:2, m:2, q:4, s:4, t:2, v:1, z:0} | |
var segPattern = /([astvzqmhlc])([^astvzqmhlc]*)/ig | |
var numPattern = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig | |
function parseVals(args) { | |
var nums = args.match(numPattern) | |
return nums ? nums.map(Number) : [] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var writeTextToFile = function(text, filePath) { | |
var t = [NSString stringWithFormat:@"%@", text], | |
f = [NSString stringWithFormat:@"%@", filePath]; | |
return [t writeToFile:f atomically:true encoding:NSUTF8StringEncoding error:nil]; | |
} | |
var readTextFromFile = function(filePath) { | |
var fileManager = [NSFileManager defaultManager]; | |
if([fileManager fileExistsAtPath:filePath]) { | |
return [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; |