HTML5尚在发展当中,说替代Flash还言之过早,但它所实现的炫目功能大家也是有目共睹的,一个canvas
可以做成如此效果,那我们为什么不继续期待它的前景呢?
关键代码:
javascript:
1
2
3
4
5
var
stage =
new
Clay.Stage(640, 480, document.getElementById(
"canvas"
));
var
world = stage.getWorld();
var
camera = stage.getCamera();
camera.set(0, 0, 800);
camera.setTarget(Clay.Vector.ZERO);