Skip to content

bp3d is a js library built on three.js that allows users to design an interior space such as a home, apartment or shop. It supports most popular 3d model formats, like glTF, obj, fbx, stl, etc.

Notifications You must be signed in to change notification settings

thingraph/bp3d-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bp3d-examples

An example project for bp3d.

What is bp3d?

bp3d is a js library built on three.js that allows users to design an interior space such as a home, apartment or shop. Its code references the blueprint3d implementation.

Many thanks to three.js, blueprint3d, npm, etc.

Features

  • Edit in 2d floorplan to create walls/rooms

- Edit in 3d model design to add entities. E.g., s/he can add doors, windows, furnitures, etc.

- Edit entity with gizmo and snap

- Toggle wall exterior and roof visibility

Plugins

It is easy to build your own plugins based on @bp3d/core.

These are some plugins in @bp3d/plugins:

  • AxisGizmoPlugin
  • GroundGridPlugin
  • SkyboxPlugin
  • ToolbarPlugin
  • ViewCubePlugin

Examples

import { Viewer2d, Viewer3d } from "@bp3d/core";
import { SkyboxPlugin } from "@bp3d/plugins";

const viewer3d = new Viewer3d({ containerId: "viewer3d" });
new SkyboxPlugin(viewer3d);

const myPlan = "http://www.abc.com/myplan.bp3d";
viewer3d.loadPlan(myPlan);
viewer3d.goToHomeView();

API guidelines

JSON

Json Encoding: UTF-8 encoding without BOM

Coordinate System

Uses right handed, y-up coordinate system, which is consistent with three.js and glTF. That means,

  • User need to make sure any input data (point, direction, bounding box, matrix, etc.) is right handed, y-up.
  • Any data an API returns, is right handed, y-up.
Typical coordinate systems
Platform Handed Up
UE left handed z-up
Three.JS / glTF right handed y-up
Unity 3D right handed z-up
Revit / SketchUp / 3dMax right handed z-up

Units

  • Length unit: Meter
  • Area unit: Squre Meter
  • Angle unit: Degree (0 - 360), Counter clock wise (CCW)
  • Time unit: Second

Matrix

A matrix is an array of 16 float numbers, in column-major order, length unit is Meter.

Color

use rgb/rgba, values between 0-1

Case sensitivity

All strings are case sensitive unless otherwise specified.

About

bp3d is a js library built on three.js that allows users to design an interior space such as a home, apartment or shop. It supports most popular 3d model formats, like glTF, obj, fbx, stl, etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5