This file contains 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
vec3 rgb2hsv(vec3 c) | |
{ | |
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); | |
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); | |
float d = q.x - min(q.w, q.y); | |
float e = 1.0e-10; | |
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); | |
} |
This file contains 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
setInterval(function() { | |
var w = document.querySelector("body").offsetWidth; | |
var h = document.querySelector("body").offsetHeight; | |
var c = {x: w/2, y: h/2}; | |
var tolerance = (w < h ? w/8 : h/8); | |
var dx = c.x + (Math.random() * tolerance) * (Math.random() > 0.5 ? 1 : -1); | |
var dy = c.y + (Math.random() * tolerance) * (Math.random() > 0.5 ? 1 : -1); |
This file contains 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
** Custom ViewGroup class which will be used to EAT all the touch events. nom nom nom. ** | |
public class customViewGroup extends ViewGroup { | |
public customViewGroup(Context context) { | |
super(context); | |
} | |
@Override | |
protected void onLayout(boolean changed, int l, int t, int r, int b) { |
This file contains 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
<element name="x-thing" attributes="" constructor="x-thing" reset-style-inheritance="false"> | |
//INCLUDE A LITE COMMENT FOR API HERE? LINK? COPYRIGHT? | |
<template> <!-- INERT MARKUP --> | |
<style> | |
/* default styles */ | |
@host { | |
*{ | |
position: relative; | |
opacity: 1; | |
width:100%; |