HTML5ゲームをコーディングしていますが、チュートリアルとまったく同じように実行しましたが、「Uncaught TypeError:Object isnotafunction」というエラーが発生しました。誰でも私を助けることができますか?
var amplitude = 150;
var period = 2000;
animation = new Kinetic.Animation({
// ERROR APPEARS HERE
func: function (frame)
{
hook.setY(amplitude * Math.sin(frame.time * 2 * Math.PI / period));
hook.setX(fisherGroup.getX());
},
node: shapesLayer
});
fisherGroup.on("mousedown", function(){
animation.start();
});
私が作成したもの:hook = new Kinetic.Image()
そしてfisherGroup = new Kinetic.Group()
この段落の上。