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
'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'); |
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
'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'); |
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
'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'); |
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
'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'); |
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
'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); |
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
'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); |
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
'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(); |
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
'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'); |