|
|
|
|
|
|
|
|
var conf = { |
|
|
var conf = { |
|
|
scroll_speed: 0.4, |
|
|
|
|
|
|
|
|
scroll_speed: 0.3, |
|
|
scroll_speed_fast: 1.1, |
|
|
scroll_speed_fast: 1.1, |
|
|
scroll_friction: 0.8, |
|
|
scroll_friction: 0.8, |
|
|
chars: "SANOTEHUCP", |
|
|
chars: "SANOTEHUCP", |
|
|
|
|
|
|
|
|
scroll.velocity *= conf.scroll_friction; |
|
|
scroll.velocity *= conf.scroll_friction; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (tdiff < 100 && scroll.velocity < -0.1 && scroll.velocity > 0.1) { |
|
|
|
|
|
|
|
|
if (tdiff < 100 && scroll.velocity > -0.1 && scroll.velocity < 0.1) { |
|
|
scroll.velocity = 0; |
|
|
scroll.velocity = 0; |
|
|
cancelAnimationFrame(scroll.raf); |
|
|
cancelAnimationFrame(scroll.raf); |
|
|
scroll.raf = null; |
|
|
scroll.raf = null; |