Skip to main content
Floorkit is a public package on npm. You do not need a token or a private registry.

Requirements

  • A browser app that uses a bundler, such as Vite.
  • Three.js 0.168. Floorkit makes Three.js objects and your app shows them.
  • TypeScript is optional. The package includes its type declarations.
For a project from an empty folder, follow the quickstart. Floorkit is ESM; browser geometry needs WebAssembly. You can validate building JSON outside a browser without starting the kernel.

Install the package

1

Add Floorkit and its peer packages

opengeometry is the geometry kernel. Floorkit installs it as a dependency. Install it directly too, because the next step imports its WebAssembly file.
2

Start the geometry kernel

The kernel is a WebAssembly file. Give its address to Floorkit one time, when your app starts. With Vite, the ?url import gives you the address.
Wait for this call to finish before you create geometry.
3

Add the Vite types

TypeScript must know the ?url import. A new Vite app knows it already: its tsconfig.json has "types": ["vite/client"]. If yours does not, put this line in src/vite-env.d.ts:

Use one copy of Three.js

The text package currently depends on a different Three.js version. Tell npm to use your app’s version everywhere. Add this field to your app’s package.json, then run the install commands above:
npm ls three should show one version. If you installed before adding the override, follow Troubleshooting.

Use a different bundler

Floorkit needs only the address of opengeometry_bg.wasm. Each bundler that can copy a file and give you its address works. You can also copy the file into your public folder and pass its path as text.

Import from one place

All classes, functions and types come from the package root:

Next steps

Quickstart

Show a room with a door and a window.

Troubleshooting

Fix an install or a start-up problem.
Last modified on October 12, 2026