Skip to content

Instantly share code, notes, and snippets.

@oldschooljarvis
Created June 17, 2015 18:31
Show Gist options
  • Save oldschooljarvis/b1ad98ce661985068a83 to your computer and use it in GitHub Desktop.
Save oldschooljarvis/b1ad98ce661985068a83 to your computer and use it in GitHub Desktop.
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');
new f.webglRenderables.Mesh(node).setGeometry('Plane').setBaseColor(f.webglMaterials.Material.image([],{ texture: texture }));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment