Skip to content

Instantly share code, notes, and snippets.

@tomjnsn
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomjnsn/d68e17dc790abe874378 to your computer and use it in GitHub Desktop.
Save tomjnsn/d68e17dc790abe874378 to your computer and use it in GitHub Desktop.
famo.us double origin
require(function(require, exports, module) {
var Engine = require('famous/core/Engine');
var ImageSurface = require('famous/surfaces/ImageSurface');
var mainContext = Engine.createContext();
var img = new ImageSurface({
size: [4877, 3515],
content: 'http://upload.wikimedia.org/wikipedia/commons/4/4e/Pleiades_large.jpg'
});
var centeringModifier = new Modifier({
origin: [0.5, 0.5]
});
mainContext.add(centeringModifier).add(img);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment