JavaScript depth mesh rendering