Skip to content

Instantly share code, notes, and snippets.

View MagnusThor's full-sized avatar
🏠
Working from home

Magnus 'Bagzy' Thor MagnusThor

🏠
Working from home
  • Freelancer & member of coloquium
  • Sweden
View GitHub Profile
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
uniform sampler2D textureA; //<-- eye
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
uniform sampler2D textureA; //<-- eye
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
@MagnusThor
MagnusThor / es6Proxies_TypeScript_labs.ts
Created March 21, 2017 14:43
ES6 Proxies , Observable , change tracking , deep / plain
export class ProxyWrapperBase {
constructor() {
}
onChange(target: Object, key: PropertyKey, newValue: any, oldValue: any){
}
}
export class BinaryMessage {
Buffer: ArrayBuffer;
private header: Uint8Array
GetMessage(buffer: ArrayBuffer): any {
let headerLen = 8;
let header = new Uint8Array(buffer, 0, headerLen);
let payloadLength = ThorIO.Client.Utils.arrayToLong(header);
@MagnusThor
MagnusThor / ChatController.ts
Last active August 10, 2016 12:24
An example of how to build a "chat" using on a state-full thor-io controller (typescript,nodejs,express)
import {
ThorIO,CanInvoke,ControllerProperties,CanSet
} from "thor-io.vnext"
// simple model
class ChatMessage
{
text:string;
}
// location controllers/controller.js
// this will store the messages and act as a fake db .-)
var fakeDb = {
messages : []
};
var ChatController = (function (db) {
// find out who this message targets?