Simple raycaster for canvas elements