I expected the grey surface to be rotating around its center on the right, lower corner of its parent in the SAME plane as the yellow surface.
What am i missing?
var initialTime = Date.now();
var grey = new famous.core.Surface({
size: [500, 500],
properties: {
backgroundColor: 'rgba(0, 0, 0, 0.7)',
color: 'white'
},
content: '<div style="padding: 20px">A</div>',
classes: ['backfaceVisibility']
});
var yellow = new famous.core.Surface({
properties: {
backgroundColor: 'rgba(250, 250, 0, 0.7)'
},
content: '<h1>ende</h1>',
size: [200, 200],
classes: ['backfaceVisibility']
});
var m2 = new famous.core.Modifier({
transform: function () {
return famous.core.Transform.rotateZ(0.002 * (Date.now() - initialTime));
},
origin: [0.5, 0.5],
align: [1, 1]
});
var m1 = new famous.core.Modifier({
transform: function () {
return famous.core.Transform.rotateY(0.0002 * (Date.now() - initialTime));
},
align: [0.5, 0.5],
origin: [0.5, 0.5]
});
var virtualNode = context.add(m1);
virtualNode.add(yellow);
virtualNode.add(m2).add(grey);