facing function
The model's own yaw and pitch (radians) that turn the direction `d`, given in the model's space before its rotation, towards the viewer: `pivot.rotation.set(pitch, yaw, 0)` brings it to +z.
import { facing } from '@dioramajs/model/hotspots'.
function facing(d: Vector3): { pitch: number; yaw: number }Parameters
| Name | Type | Description |
|---|---|---|
d | Vector3 |
Defined in packages/model/src/hotspots.ts.