GithubHelp home page GithubHelp logo

yermolim / glbim Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 4.0 4.9 MB

Three.js-based GLB model viewer written in TypeScript

License: GNU Affero General Public License v3.0

JavaScript 2.58% TypeScript 97.42%

glbim's Introduction

GLBIM ๐Ÿ—๏ธ

Three.js-based GLB/IFC model viewer

Created for personal use in a project focused on BIM, so use cases may be limited, but maybe will still be helpful to someone. The main goal was to make it possible to open dozens of large industrial building models with thousands of elements and millions of polygons while keeping an optimal render performance. Optimized mesh merging to reduce render calls, GPU picking, using only vertex colors, etc. were the ways to achieve it. Target models are static, without the need to take into account their internal structure, textures are ignored.

Main features:

  • loading multiple GLB(with draco compression support) and IFC models
  • huge performance optimization by merging all scene meshes into single mesh (or one mesh per loaded model optionally) with vertex colors (with alpha value supported) to reduce frame time by minimizing render calls
  • additional render speed optimization while moving/rotating camera by using simplified background scene
  • ability to interact with models (select/isolate/hide/color model meshes) from code by mesh ids*
  • mouse and touch support (pointer events used) with numerous actions available: orbit navigation (zoom/pan/rotate), single and multiple manual selections of model meshes (fast GPU picking with background scene is used), area mesh selection, isolation of selected meshes, highlighting model meshes on hover
  • detailed feedback about current viewer state by notifying of all changes in the opened scene using RxJS observables
  • customization with options provided, most of which are available for modification at runtime
  • custom axes helper with camera rotation on axis label click
  • HUD scene for showing custom 2d infographics on top of model view
  • vertex selection mode with point snap using raycaster and barycentric coordinates
  • distance measure mode (extremely useful for BIM)
  • auto-resized canvas with transparent background (so outer container background used, easy to switch colors)

Outside of scope:

The support of these possible features are outside of the current module scope and their implementation is implausible unless there will be a huge amount of requests for additional features, which I think is extremely unrealistic.

  • textures
  • animation
  • model editing

External dependencies:

*Mesh ids

A combination of model id and mesh 'name' field is used as mesh id (${modelId}|${meshName}). This id is used for all available manipulations with a mesh (selection/isolation/hiding/coloring etc.). If mesh id is not unique, any manipulation will affect all meshes with this id.

If I find time for this, or if there are any requests, I will add more details to the description.

glbim's People

Contributors

yermolim avatar

Stargazers

Meta avatar  avatar  avatar  avatar

Watchers

James Cloos avatar Rahul Y Gupta avatar  avatar

glbim's Issues

IFC.js integration

Hola!

This project is really cool. We are struggling with optimization in IFC.js, and in the future this kind of experiments might be very useful. Just checking in to say hello and let you know that if you ever want to integrate this with IFC.js ecosystem, build other things with IFC.js or just chat, you can count on us. ๐Ÿ˜‰

Sorry for opening the issue, but we didn't know how to contact you.

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.