我用 PhysicsJS 做了一个简单的“动画”,我有这个身体:
balon = Physics.body('circle', {
x: 50,
y: random(20, 350),
vx: 0.45,
angle: random(0,360),
angularVelocity:-0.005,
radius: 60,
mass: 1,
fixed: true
});
balon.view = new Image();
balon.view.src = 'ballon.png';
一切正常,但我需要为“球”添加一个阴影,这意味着我需要使用两个图像“ballon.png”,第二个图像(阴影)需要固定在第一个图像上(不要' t 随身体旋转)。
有什么想法很热吗?
先感谢您 !