javascript - Render objects on top using renderDepth with Three.js -



javascript - Render objects on top using renderDepth with Three.js -

i'm trying render objects on top of other objects.

in fiddle, greenish torus knots render on top of reddish boxes , floor.

i've been trying mesh.renderdepth = 0, 1, 1000 , changes nothing.

the material has been created so:

material = new three.meshbasicmaterial( { color: 0x00ff00, transparent: true, opacity: 0.5 } );

how can accomplish using renderdepth? missing other setting?

using depthtest true works not acceptable because concave meshes (like torus) suffer overlapping polygons, when opaque.

and while haven't managed this other solution 2 scenes running, strikes me having more overhead , perhaps less flexible using renderdepth

fully working jsfiddle: http://jsfiddle.net/qhssj/

thanks help

this post little old, stumbling upon this, sure objects custom renderdepth have material depthwrite set false:

material.depthwrite = false

here update posted fiddle: http://jsfiddle.net/qhssj/20/

javascript three.js

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -