Floor3D.tsx

src/views/three/Floor3D.tsx
import { useMemo } from 'react';
import * as THREE from 'three';
import type { ThreeEvent } from '@react-three/fiber';
import type { Room } from '../../scene/schema';
import { describeRoom, SELECTED_COLOR, type Selected3D } from '../../scene/describe';
import type { UnitSystem } from '../../scene/units';
type Props = {
room: Room;
/** Vertical position of the floor surface (default 0). */
y?: number;
color?: string;
units: UnitSystem;
selectedId: string | null;
onSelect: (sel: Selected3D | null) => void;
};
export function Floor3D({ room, y = 0, color, units, selectedId, onSelect }: Props) {
const geom = useMemo(() => {
const shape = new THREE.Shape();

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC