3 ms·
What is translate? From my really quick search it seems to be a canvas method, and I don't know that much about canvas, but I'm not sure if there's an easy way
by dkuntz2 13y ago
What is translate? From my really quick search it seems to be a canvas method, and I don't know that much about canvas, but I'm not sure if there's an easy way to implement it that keeps the simplicity of the script.
My main goal was to have a functioning parallax effect that was reasonably simple.
- spartanatreyu 13y ago"Translate" is a part of css3's 2d transforms. Here's the mdn page: https://developer.mozilla.org/en-US/docs/Web/CSS/transform https://developer.mozilla.org/en-US/docs/Web/CSS/transform There's also a 3d version and if you set the z value to 0, the whole site looks the same and runs ridiculously better. here's the performance stats: http://jsperf.com/translate3d-vs-xy/28 http://jsperf.com/translate3d-vs-xy/28