Interaction Tools

Scene Picking

What this shows

Pick a scene object and highlight the current selection.

This example needs a Canvas2D-capable browser.

Loading scene…

Loading scene…

Key API excerpt

import * as EASEL from "@xsyetopz/easel";

raycaster.setFromCamera(pointer, camera);
const hit = raycaster.intersectObjects(cubes, false)[0];
selected.material.color.set(0xffe16b);