diff --git a/scene.js b/scene.js index df304f6..9c634dd 100644 --- a/scene.js +++ b/scene.js @@ -730,7 +730,7 @@ function createScene(options) { } for(var i = 0; i < numObjsNow(); ++i) { var o = objects[i] - if(o.isOpaque && o.isOpaque()) o.draw(cameraParams) + if(o.isOpaque && o.isOpaque() && !o.alwaysOnTop) o.draw(cameraParams) } gl.colorMask(true, true, true, true) @@ -1002,10 +1002,10 @@ function createScene(options) { var obj = objects[i] obj.axes = axes obj.pixelRatio = scene.pixelRatio - if(obj.isOpaque && obj.isOpaque()) { + if(obj.isOpaque && obj.isOpaque() && !obj.alwaysOnTop) { obj.draw(cameraParams) } - if(obj.isTransparent && obj.isTransparent()) { + if(obj.isTransparent && obj.isTransparent() && !obj.alwaysOnTop) { hasTransparent = true } } @@ -1016,7 +1016,7 @@ function createScene(options) { var legacyObjs = false for(var i=0; i