Skip to content

Working with Scroller

bapquad edited this page Feb 28, 2022 · 2 revisions

This content show you how to work with scroller component of CaremJS.

Create the scroller

The scroller created by Carem.Scroller class.

let earth = new Carem.Scroller(asset, scene);

The default direct move from right to left. we can change the direction with SetDirect method.

Or use the flip the scroller like as following

earth.SetFlip(CAREM_FLIP_HORIZONTAL);

Setup the velocity

The scroller velocity can changed by using

earth.SetVelocity(0.25);

image

Good luck and see you at other guide.

Clone this wiki locally