Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/threejs_4_deno/src/core/Raycaster.js>Raycaster#setFromCamera

A simple transformation of three.js for use within a Deno workflow
Go to Latest
method Raycaster.prototype.setFromCamera
import { Raycaster } from "https://deno.land/x/threejs_4_deno@v121/src/core/Raycaster.js";

Updates the ray with a new origin and direction.

Parameters

coords: { x: number; y: number; }

2D coordinates of the mouse, in normalized device coordinates (NDC)---X and Y components should be between -1 and 1.

camera: Camera

camera from which the ray should originate