When working with a 2d canvas, if you want to check if something is no longer "on screen" you simply do something like this:
if( pos.x > window.innerWidth || pos.x < 0 ||
pos.y > window.innerHeight || pos.y < 0 ) {
// has left the screen
}
How would I check to see if something is still "on screen" ( in view of the camera ) in a three.js scene?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…