A room as data, shown in 3D
room-view makes a 3D model from one record of a room: its walls, windows, outlets and furniture. This sample room is not a real room. Turn it, and select a part to see its measurements.
Outlets, by the load of their circuit
Circuits
Each outlet is on a circuit, and each circuit has a limit. Select a circuit to see its outlets and the machines on them. A line goes from each outlet to its machines. The line on a meter is at 80% of the limit.
Parts of the room
Each part is one record of the room data. Select a part to see it in the room.
Put a room in a page
pnpm add @mark1russell7/room-view three
import { SAMPLE_SCENE } from "@mark1russell7/room-view/sample";
import { createRoomViewer } from "@mark1russell7/room-view/three";
// The viewer fills this element, so give the element a height.
const room = document.querySelector("#room");
const viewer = createRoomViewer(room, {
scene: SAMPLE_SCENE,
onSelect: (pick) => console.log(pick),
});
In a browser with no WebGL 2, createRoomViewer gives undefined, and it changes nothing in the page.
Install the package from npm: npm install @mark1russell7/room-view. Releases shows each version, and Status shows the open work.