How to avoid selecting objects through the upper div when using three.js raycaster

when using three.js, use raycaster to select objects. If there is div occlusion on the upper layer of the canvas, the mouse can still select the model in the canvas. If you want to select a model that is not available when there is div occlusion, how to do


check whether you clicked on canvas

        if(!(event.target instanceof HTMLCanvasElement)){
            return;
        }

if there is more than one canvas in it,
you can add an id to three's canvas
renderer.domElement.id= "your GUID"
and then judge the id

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf1e5b-31da1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf1e5b-31da1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?