Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

Pixel perfect in Papervision3d

Did you ever wonder how to create a pixel perfect animation in Papervision3d? I designed my portfolio site in Photoshop, but when I tried to integrate the 3D effects I spent a lot of time in changing the zoom and focus length to match the exact dimensions. And even then they were not perfect.

I found an easy solution here. Just change the z property of your 3d objects like that:

yourobject.z = (camera.zoom  * camera.focus) - Math.abs(camera.z);
If you enjoy this post, share it on Twitter, Facebook or LinkedIn.