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
I am attesting that this GitHub handle aferriss is linked to the Tezos account tz1fo8NbDccJmuKdoadh245XtnVfnSHMTDFf for tzprofiles | |
sig:edsigtYpnKj64qSuk7bJUn61YrwqVftRLHQzG9Zg1pcyTKpud7b5wzrDCaafgWYH9dGCCL2Ae2Bgj4piL32nWEm5ZnRWf5ZmQ2W |
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
// gaussian blur filter modified from Filip S. at intel | |
// https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms | |
// this function takes three parameters, the texture we want to blur, the uvs, and the texelSize | |
vec3 gaussianBlur( sampler2D t, vec2 texUV, vec2 stepSize ){ | |
// a variable for our output | |
vec3 colOut = vec3( 0.0 ); | |
// stepCount is 9 because we have 9 items in our array , const means that 9 will never change and is required loops in glsl | |
const int stepCount = 9; |
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
typedef struct { | |
ofVec3f position; | |
ofMatrix4x4 transform; | |
NSUUID * uuid; | |
AREnvironmentProbeAnchor * rawAnchor; | |
vector<ofTexture> environmentTextures; | |
// All corevideo objs cause crash | |
// vector<CVOpenGLESTextureRef> openglTextures; | |
}EnvironmentAnchorObject; |
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
base = 256 | |
def encode(val): | |
r = val / (base * base) | |
g = (val / base) % base | |
b = val % base | |
return [float(r)/255.0, float(g)/255.0, float(b)/255.0] | |
def dot(K, L): | |
if len(K) != len(L): | |
return 0 |
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 index = 0 | |
var originalText = "Love" | |
var text = originalText | |
/// Letters is just an array of structs with information about character, fontSize, character width/height | |
var textPathLength = letters.map({$0.width}).reduce(0, +) /// The total length of my word before I start adding letters | |
while textPathLength.f < perimeter { | |
text += originalText[index] |
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
projectionMatrix = arCameraData.projectionMatrix | |
viewMatrix = arCameraData.viewMatrix | |
var floorDepthMap : [Float] = [] | |
if let tempDepthMap = groundPlaneDepthMap { | |
floorDepthMap = tempDepthMap | |
} |
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
module.exports = { | |
videos : function(asset){ | |
return new Promise(function(resolve, reject){ | |
var vElement = document.createElement('video'); | |
vElement.autoplay = true; | |
vElement.muted = true; | |
vElement.loop = true; | |
vElement.playsinline = true; | |
vElement.playsInline = 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
function cover(imgWidth, imgHeight, containerWidth, containerHeight){ | |
let wRatio = containerWidth / imgWidth; | |
let hRatio = containerHeight / imgHeight; | |
let coverRatio = Math.max(wRatio, hRatio); | |
return [imgWidth * coverRatio, imgHeight * coverRatio]; | |
} | |
function contain(imgWidth, imgHeight, containerWidth, containerHeight){ |
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
let canvas; | |
let img; | |
function preload(){ | |
img = loadImage("img.jpg"); | |
} | |
function setup() { | |
// shaders require WEBGL mode to work | |
canvas = createCanvas(windowWidth, windowHeight, WEBGL); |
NewerOlder