frame/event loop
scene.start({
idleFunc: function() {
/* Animate scale, rotate and blendFactor of second texture layer
*/
scene.findNode("theTexture").set("layers", {
"1":{
scale: {
x: texScale,
y: texScale
},
rotate: {
z: texAngle
},
// http://scenejs.wikispaces.com/texture#Texture%20Layers-Layer%20Blend%20Factor
blendFactor: Math.abs(Math.sin(texAngle * 0.01))
}
});
texAngle += 0.4;
texScale = (texScale + 0.01) % 10.0;
}
});