diff --git a/docs/Markup.md b/docs/Markup.md index 119238f..a6817da 100644 --- a/docs/Markup.md +++ b/docs/Markup.md @@ -36,7 +36,7 @@ var panning = new Motio(element, { fps: 30, // Frames per second. More fps = higher CPU load. speedX: -30 // Negative horizontal speed = panning to left. }); -sprite.play(); // start animation +panning.play(); // start animation // Sprite var element = document.querySelector('#sprite'); @@ -65,4 +65,4 @@ To have a correctly working sprite based animation, you need an element that is This means that the element width & height (specifically the element's border box size) has to equal the width & height of one animation frame. The element size is set by you in CSS. You can set padding, margin, and border, Motio will still work, as long as the border-box size equals the size of one frame. The only thing that'll break it is changing the `background-origin`. So don't touch that :) -Also, calling spriote based Motio on hidden elements just doesn't work, as Motio cannot retrieve their size. In this case, use [`width`](Options.md#width) & [`height`](Options.md#height) options to set the width and height of the element manually. \ No newline at end of file +Also, calling spriote based Motio on hidden elements just doesn't work, as Motio cannot retrieve their size. In this case, use [`width`](Options.md#width) & [`height`](Options.md#height) options to set the width and height of the element manually.