Skip to content

Instantly share code, notes, and snippets.

View oldschooljarvis's full-sized avatar

Edwin Jarvis oldschooljarvis

View GitHub Profile
@oldschooljarvis
oldschooljarvis / famous\engine\issue222\1
Last active August 29, 2015 14:22
Node.setOpacity() values are not uniformly inherited across renderables #222\1
'use strict';
var f = require('famous');
f.core.FamousEngine.init();
var scene = f.core.FamousEngine.createScene();
var depth1 = scene.addChild();
new f.webglRenderables.Mesh(depth1).setGeometry('Circle').setBaseColor(new f.utilities.Color('red'));
new f.domRenderables.DOMElement(depth1, { tagName: 'div'}).setContent('depth1');
@oldschooljarvis
oldschooljarvis / famous\engine\issue226\1
Last active August 29, 2015 14:22
DOMElement containing 'img' tag kills all descendant DOMElements #226/1
'use strict';
var f = require('famous');
f.core.FamousEngine.init();
var scene = f.core.FamousEngine.createScene();
var depth1 = scene.addChild();
new f.webglRenderables.Mesh(depth1).setGeometry('Circle').setBaseColor(new f.utilities.Color('blue'));
new f.domRenderables.DOMElement(depth1, { tagName: 'div'}).setContent('depth1depth1');
@oldschooljarvis
oldschooljarvis / famous\engine\issue226\2
Last active August 29, 2015 14:22
DOMElement containing 'img' tag kills all descendant DOMElements #226/2
'use strict';
var f = require('famous');
f.core.FamousEngine.init();
var scene = f.core.FamousEngine.createScene();
var depth1 = scene.addChild();
new f.webglRenderables.Mesh(depth1).setGeometry('Circle').setBaseColor(new f.utilities.Color('blue'));
new f.domRenderables.DOMElement(depth1, { tagName: 'div'}).setContent('depth1depth1');
@oldschooljarvis
oldschooljarvis / famous\engine\issue226\3
Last active August 29, 2015 14:22
DOMElement containing 'img' tag kills all descendant DOMElements #226/3
'use strict';
var f = require('famous');
f.core.FamousEngine.init();
var scene = f.core.FamousEngine.createScene();
var depth1 = scene.addChild();
new f.webglRenderables.Mesh(depth1).setGeometry('Circle').setBaseColor(new f.utilities.Color('blue'));
new f.domRenderables.DOMElement(depth1, { tagName: 'div'}).setContent('depth1depth1');
@oldschooljarvis
oldschooljarvis / famous\engine\issue190\1
Created June 4, 2015 09:59
animation lag in hierarchical scenes #190\1
'use strict';
var f = require('famous');
f.core.FamousEngine.init();
var scene = f.core.FamousEngine.createScene();
var parent = scene.addChild();
new f.domRenderables.DOMElement(parent, { tagName: 'div' }).setContent('parent');
parent.setSizeMode('absolute','absolute','absolute').setAbsoluteSize(50, 50).setAlign(0.5, 0.5).setMountPoint(0.5, 0.5).setOrigin(0.5, 0.5);
@oldschooljarvis
oldschooljarvis / gist:2011f7d9ea0586c1f059
Created June 11, 2015 20:41
GL Image Texture Checkerboard Behavior
'use strict';
var f = require('famous');
f.core.FamousEngine.init();
var scene = f.core.FamousEngine.createScene();
//DOMElement image setup
var domImage = scene.addChild();
domImage.setSizeMode('absolute','absolute','absolute').setAbsoluteSize(200, 200).setAlign(0.5, 0.5).setMountPoint(0.5, 0.5).setOrigin(0.5, 0.5);
@oldschooljarvis
oldschooljarvis / gist:031463a0f8cb8fbf3d84
Created June 11, 2015 23:04
GL Image Texture Checkerboard Behavior #2
'use strict';
var f = require('famous');
f.core.FamousEngine.init();
var scene = f.core.FamousEngine.createScene();
//Function that spawns a node with an image mapped to a GL texture, then bounces it.
function spawnImageGL(src) {
var glImage = scene.addChild();
@oldschooljarvis
oldschooljarvis / gist:b1ad98ce661985068a83
Created June 17, 2015 18:31
Unable to load a texture - 0.6.0rc
'use strict';
var f = require('famous');
f.core.FamousEngine.init();
var node = f.core.FamousEngine.createScene().addChild();
node.setSizeMode('absolute', 'absolute', 'absolute').setAbsoluteSize(200, 200).setAlign(0.5, 0.5).setMountPoint(0.5, 0.5).setOrigin(0.5, 0.5);
//Works on 0.5.2, broken on 0.6.0rc
var texture = f.webglMaterials.TextureRegistry.register('someTexture', 'images/famous_logo.png');