Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

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.

View as Markdown
import { facing } from '@dioramajs/model/hotspots'

.

function facing(d: Vector3): { pitch: number; yaw: number }

Parameters

NameTypeDescription
dVector3

Defined in packages/model/src/hotspots.ts.