NLB Framework

The aim of this project is to develop a browser-based Building Information Model (BIM) framework in JavaScript for creating and editing the layout of spaces and the placement of fixtures, fittings, furniture, appliances, sensors and equipment within both single and multi-storey buildings. A further aim is to do it in a way that is as compatible with as many other building analysis tools and other BIM applications as possible.

Overview

This documentation details all the namespaces, classes and enumerators that make up the framework, which you can access directly using the menus above. However, for a better understanding of the framework and some guided navigation through it, see the following tutorials.

  • App Structure

    Outlines the structure of the source folder and what a host application needs to do to use the framework effectively. As a result, it focusses mainly in the application support classes and the global static objects that glue the framework together.

  • Model Geometry

    Details how the framework generates and stores model geometry, and how it is converted to renderable meshes in order to strike a balance between memory and GPU resources.

  • Interactive Selection

    Details how the framework deals with the interactive selection and manipulation of entities within the model, as well as all the user modes and handlers involved, and how they are processed by and pass through the various application support classes.

  • Custom Classes

    The framework was designed right from the outset to be extensible, so this tutorial details the kind of boilerplate code required to effectively subclass the core BIM classes and add custom functionality.

  • Dynamic Parameters

    Dynamic parameters are the key mechanism by which a host application's user interface can interact with the building model, so this tutorial details how parameters are added to and managed by classes, as well as how the UI can access and modify them.

  • Coding Conventions

    Details all the code formatting preferences and idiomatic/idiosyncratic conventions used within the framework. The intention is not to enforce compliance with them, but to explain what they are and why they are there to make reading and understanding the codebase a little easier.

  • Attribute Maps

    Details how the framework handles additional building information not required by the BIM classes that users can assign to entities within the model.

Building and Testing

This project does not yet require a build step, so you should be able to simply open the src/index.html in any reasonably modern browser and be good to go. You can even do this by double-clicking on the file or dragging it into an existing browser tab as it should work fine even using the file:// protocol.

To generate the production distribution files, you will need to have node installed to run the build scripts. If you have, then simply run the following from the top level folder in a terminal to generate the dist subfolder.

node ./build-utils.js
node ./build.js

In order to compile the API documentation, there are a range of scripts defined in the top level package.json file, so you will need to have npm (or yarn) installed as well as node. To install the dev dependencies at the top level and in the JSDoc folders, run the following from the top level folder in a terminal.

npm install
cd jsdoc
npm install
cd ink-docstrap
npm install
cd ../..

To actually compile the API documentation, run the following from the same terminal.

npm run build-docs

License

This work is protected by copyright laws and international treaties.
Copyright (c) 2025, Dr. Andrew Marsh.
All Rights Reserved.