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
// 3 walls using each a 1920x1200 projector in a row but wall1 and wall2 collided as per projector physical placement | |
// so need to have a gap, as wall2 only uses 1866px so from x: 1920 (end wall1) to x:1974 (beginning wall2) we need | |
// to shift all pixels by 54px | |
// Also discard all pixels that cover the pillar area where another projector will be used with a cone mapping to play | |
// content on loop. | |
precision mediump float; | |
// supplied by pixijs | |
varying vec2 vTextureCoord; |
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
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
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
#!/bin/bash | |
VIDEOS=/Users/mm/videos/exported/ | |
find "$VIDEOS" -name '*.mp4' -exec sh -c 'ffmpeg -i "$0" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "${0%%.mp4}.webm"' {} \; | |
exit; |
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 fs = require('fs') | |
const path = require('path') | |
const dir = path.join(__dirname, 'exported') | |
const files = fs.readdirSync(dir) | |
console.log(files) | |
files.forEach(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
const size = 512 | |
const size2 = size / 2 | |
const c = document.createElement('canvas') | |
c.width = size | |
c.height = size | |
document.body.appendChild(c) | |
const ctx = c.getContext('2d') | |
ctx.fillStyle = '#ff0000' | |
ctx.fillRect(0, 0, size, size) |
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
Show hidden characters
[ | |
{ | |
"class": "sidebar_label", | |
"color": [131, 148, 150], | |
"font.bold": false, | |
"font.size": 16, | |
"font.face": "IBM Plex Mono" | |
}, | |
{ | |
"class": "sidebar_container", |
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
import { TweenMax } from 'gsap' | |
import 'gsap/ColorPropsPlugin' | |
const g = new Graphics() | |
g.beginFill(color, alpha) | |
g.drawRect(x, y, width, height) | |
g.endFill() | |
container.addChild(g) | |
TweenMax.to(g, 0.5, {colorProps: {tint: 0x00aaff, format: '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
export async function resizeImageData (imageData, width, height) { | |
const resizeWidth = width >> 0 | |
const resizeHeight = height >> 0 | |
const ibm = await window.createImageBitmap(imageData, 0, 0, imageData.width, imageData.height, { | |
resizeWidth, resizeHeight | |
}) | |
const canvas = document.createElement('canvas') | |
canvas.width = resizeWidth | |
canvas.height = resizeHeight | |
const ctx = canvas.getContext('2d') |
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
import { Application } from 'pixi.js' | |
const app = new Application({ | |
width: window.innerWidth, | |
height: window.innerHeight, | |
resolution: window.devicePixelRatio || 1, | |
antialias: true | |
}) | |
app.ticker.add(() => { |
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
/** | |
* @param {Array} arr - [140, 255, 1] | |
* @returns {Array} [0.5490196078, 1, 0.003921568627] | |
*/ | |
export function normalizeArray (arr, value) { | |
return arr.map(v => v / value) | |
} | |
/** | |
* @param {Number} colorNum 0xff00ff |