Skip to main content

๐Ÿ”„๏ธ Migrating previous versions

We deliver new features and bugfixes with each release. While we try to keep the API as stable as possible, there might be situations in which it's impossible to do it without holding back the project progress. That's why we: ๐Ÿ‘‡๐Ÿป

  • Keep all the past docs in this page. ๐Ÿ“š
  • Make a migration guide for each version (starting in 3.1.x) covering all components. ๐Ÿš€
What does this guide cover?

โ˜๐Ÿป Before you startโ€‹

You will need to upgrade all the versions of our libraries, as well as it's peer dependencies (watch out three.js). You can't combine old and new libraries. ๐Ÿ“šโžก๏ธ๐Ÿ“š

This is the legend we'll use to have an easy overview of changes in the API:

  • ๐ŸŸฐ means no breaking change in the API.
  • ใ€ฐ๏ธ means something small changed (e.g. a method/component name changed).
  • โžฐ means something changed considerably or completely.
  • ๐Ÿ”œ means the component has been removed temporarily.
  • โœ–๏ธ means the component has been removed permanently.

You'll find more info about removed components below. ๐Ÿ‘‡๐Ÿป

What about new features?

The main purpose of this article is to migrate existing apps, and you can't migrate features that didn't exist before. New features won't be covered here unless they are the substitution of a previous feature. To see how new features work, check out the latest tutorials. The only exception are new features that substitute existing ones, which will be covered here too.

And one last thing: if you get stuck, please ask in our community (ideally, providing a minimal example we can test). ๐Ÿซก

๐Ÿ›‘ About removed featuresโ€‹

If you have an existing app, it's possible that some of the features you used from previous versions are not there anymore, temporarily or permanently. Depending on the specific scenario, there are different solutions: ๐Ÿ‘‡๐Ÿป

  • โœ–๏ธ If the feature was permanently removed because it's not needed anymore (e.g. the culler), you shouldn't have a need to replace it. it's not needed anymore (e.g. the culler), so you shouldn't have a need to replace it at all.

  • โœ–๏ธ If the feature was permanently removed because what it did is done by something else (e.g. the civil tools, which have been merged into one), replacing the component with the new one should give you the features back.

  • โœ–๏ธ If the feature was permanently removed because we consider it out of scope (like the Json exporter), we append the link to the original code here, so that you can copy and maintain it yourself in your project if you need it.

  • ๐Ÿ”œ If the feature was temporarily removed because we will add it in a future path or release, you just have to wait until we add it. If you can't wait to have it in your solution, our suggestion is that you stick to the previous version of the library until we add it back.

If you have any questions about your specific case, let us know in the community! ๐Ÿซฑ๐Ÿปโ€๐Ÿซฒ๐Ÿป

๐Ÿ“— web-ifcโ€‹

The first thing you will need to do is update web-ifc (our core IFC library) to the correct version. All versions of the library should use the same web-ifc version (let us know otherwise). You can find the correct version here. Please install it as a dependency in your project and use the correct WASM file (tutorials like the IfcLoader cover this). ๐Ÿ™๐Ÿป

๐Ÿ“˜ fragmentsโ€‹

๐ŸŸฐ FragmentsModelsโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

๐ŸŸฐ IfcImporterโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

๐ŸŸฐ ModelInformationโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

๐ŸŸฐ Raycastingโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

๐ŸŸฐ VisibilityOperationsโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

๐Ÿ“™ componentsโ€‹

๐ŸŸฐ BCFTopicsโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

ใ€ฐ๏ธ BoundingBoxerโ€‹

Original tutorial โžก๏ธ New tutorial

This API can do pretty much the same as before, but more performantly and with an extra method to give you more control:

  • Before, we generated a three.js mesh that we used to compute the bounding boxes, so you would use add to add the Fragments model, which was a simple three.js mesh (not very performant).

  • Now we are taking advantage of the new Fragments performance and giving you more control. You can use addFromModels if you want to get the bbox of full models (you can select which one by passing an argument with their ids), or addFromModelIdMap if you want the bbox of specific items by defining a model id map as shown in the tutorial. ๐Ÿ˜Ž

ใ€ฐ๏ธ Classifierโ€‹

Original tutorial โžก๏ธ New tutorial

The classifier can do the same as before and much more, thanks to the performance power of Fragments.

๐ŸŸฐ Clipperโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

โœ–๏ธ Cullersโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The culler's mission was to hide items that were unseen in the scene to increase performance. This problem is already automatically managed by Fragments internally, so there's no need of an external component to do this anymore. โ˜๐Ÿป

With the new fragments, you should be able to handle bigger models a lot faster than before. If you have any problems or detect any regression, let us know in the community. ๐Ÿซฑ๐Ÿปโ€๐Ÿซฒ๐Ÿป

Alternative

There's no alternative, as this feature wasn't removed per se. It's now automatically managed by Fragments. If you have any issues with this, let us know in the community.

๐Ÿ”œ Exploderโ€‹

Original tutorial โžก๏ธ ๐Ÿ”œ

The exploder was a great component to take a look at the model inner spaces like a toy. This had to be removed because the new Fragments don't allow editing (yet). Once we publish the Fragments edit API, we'll put this component back, and this API should be back without changes. ๐Ÿ”ฅ

Alternative

As an alternative in your application, you can isolate floor plans using the hider. We know, it's not as cool as exploding, but don't worry: this will be back soon.

ใ€ฐ๏ธ FragmentsManagerโ€‹

Original tutorial โžก๏ธ New tutorial

Internally, Fragments is now completely different. This has forced us to make 3 changes to this API: ๐Ÿงฉ๐Ÿงฉ๐Ÿงฉ

  • You need to initialize the worker before using Fragments.

  • You need to call fragments.update() when you want the Fragments models to update their LODs and culling depending on the user's camera position. This is shown in the new tutorial.

  • All the fragments related methods are now in FragmentsManager.core. The reason is that this object is an instance of the FragmentsModels and we don't want to replicate that API. The advantage of using the FragmentsManager is that it's a component, so it's globally available and automatically disposed when calling components.dispose().

๐ŸŸฐ Gridsโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

๐ŸŸฐ Hiderโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

โžฐ IfcFinderโ€‹

Original tutorial โžก๏ธ New tutorial

This component has changed a lot because when we first created it, we did it for IFC STEP. But the very reason why we created Fragments is that we realized that IFC STEP is a format that was never designed to be performant. After years, we could never get a decent 3D viewer with IFC STEP. We didn't want to end up in the same situation with the Finder. ๐Ÿค”

Fragments are taking over

All components we create from now on will be using Fragments, our open native format, to take advantage of its performance and speed (except for the IFC STEP importers and exporters of course).

That said, the mission of the finder is the same: find data in our BIM models using complex queries: ๐Ÿ‘‡๐Ÿป

In summary, you can do the same as before, but the API is different, it works directly in Fragments and it's faster. If you have any problems with this, let us know in the community. ๐Ÿซฑ๐Ÿปโ€๐Ÿซฒ๐Ÿป

Alternative

If in spite of the performance issues you still want to make queries to IFC STEP as we did before, you can take the code of the previous component to your project.

โœ–๏ธ IfcGeometryTilerโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The main goal of the IfcGeometryTiler was to set up mesh streaming to be able to represent bigger IFC files. This had various problems: ๐Ÿ“บ

  • The set up was very complex and verbose
  • It relied too much on the network (slow internet = poor experience)
  • The load of bigger objects / many simultaneous was very slow
  • It made the logic of many components exponentially more complex and buggy

With the new version of Fragments, this is no longer necessary. Fragments can load hundreds of files or multi gigabytes in seconds without streaming, skipping all the downsides above while keeping the speed benefits. ๐Ÿ”ฅ

Alternative

There's not alternative because we don't see the need at the moment. As we haven't hit a project we can't open with the new Fragments yet, we have decided to drop streaming for now. We might revisit it in the future if we need to represent thousands of BIM models or hundreds of gigabytes simultaneously.

If you have any performance issues with the new Fragments, let us know in the community.

๐Ÿ”œ IfcIsolatorโ€‹

Original tutorial โžก๏ธ ๐Ÿ”œ

The IfcIsolator was created mainly to allow people to send us objects that failed in their IFC files without sending us the whole file, as often they are private. The problem is that its implementation is not very performant, and now we have a new use for this feature. ๐Ÿ‘‡๐Ÿป

Our core IFC library has a limit of ~2gb for IFCs. We want to use the isolator to split down bigger IFC STEP files so that we can process them. And this requires a performant implementation. We are now rebuilding the isolator from scratch. As soon as we have it ready, it will be back with the same API, a much better performance and a key role: allowing us to open gigantic IFC files. ๐Ÿ’ฃ

Alternative

If you were using the isolator, you can easily copy it's original source code and use it in your project. It's decoupled from anything else. If you have any questions, let us know in the community.

โœ–๏ธ IfcJsonExporterโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The main goal of the JSON exporter was to export the properties of the BIM models to JSON, as we had no other way of storing them. This is not very efficient. Now that we have Fragments, our own native format, we don't need this. It's important to note that while exporting an IFC to JSON might sound tempting, IFC STEP is actually less verbose than a JSON, so you will end up with very big files. ๐Ÿ‹

Alternative

If you still want to get a JSON from your IFC STEP files, you can check out the original code, which is very simple and uses our core IFC library.

ใ€ฐ๏ธ IfcLoaderโ€‹

Original tutorial โžก๏ธ New tutorial

The API for this just have some slight changes in the signature of the IfcLoader.load method. You can check them out here and here. ๐Ÿ 

๐Ÿ”œ IfcPropertiesManagerโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

Editing, creating and deleting properties is key for us, and the only reason we didn't include it here is because we have to rebuild it from scratch for the new Fragments. In the next release (Q3) we are releasing the Fragments Edit API and this component will be back (as well as other components to edit geometries, materials, etc). ๐ŸŽฏ

Alternative

In the meantime, if you want to know how to work with Fragments and properties, you can check out the following tutorials:

โœ–๏ธ IfcPropertiesTilerโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The main goal of the IfcPropertiesTiler was to set up mesh streaming to be able to represent bigger IFC files, which is not necessary with the new Fragments. See IfcGeometryTiler for more details. ๐Ÿ”Ž

โœ–๏ธ IfcRelationsIndexerโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The main goal of this component was to compute the indirect relations within the IFC STEP file. In IFC, many relations are indirect, so that if you don't preindex them, you are forced to traverse the whole data every time you make a query. That means that in order to know the properties of a wall, you need to traverse the whole IFC (yes, this would be very slow). ๐Ÿฅฒ

Now Fragments does this automatically. All Fragments files relations are indexed. So there's no need for this component anymore. So just like the Cullers, this component was not removed: it's handled by Fragments now. โšกโšกโšก

Alternative

There's no alternative, as this feature wasn't removed per se. It's now automatically managed by Fragments. If you have any issues with this, let us know in the community.

โœ–๏ธ MeasurementUtilsโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The goal of measurement utils was to provide some general logic to create measurements in simple Three.js objects. Now that we have Fragments, we have adapted all the measuring logic to it, and this class is now useless. If you miss any of the specific methods, you can check them out in the old file, as they were not a lot of code. If you want measuring tools check out the alternatives. ๐Ÿ‘‡๐Ÿป

Alternative

If you want to make measurements in your app, check out the following tutorials: ๐Ÿ“๐Ÿ“

๐Ÿ”œ MiniMapโ€‹

Original tutorial โžก๏ธ ๐Ÿ”œ

The only reason this is not available yet is because we didn't have time before the release, but we'll add this back as a patch very soon. In the meantime, let us know in the community if you have any questions. ๐Ÿ™๐Ÿป

๐ŸŸฐ OrthoPerspectiveCameraโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

ใ€ฐ๏ธ Raycastersโ€‹

Original tutorial โžก๏ธ New tutorial

The only change in this component is that now caster.castRay is async because we are also raycasting Fragments, which are managed by web workers and require asynchronous code. โฑ๏ธ

๐ŸŸฐ ShadowedSceneโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป Just make sure you follow the new tutorial to cast shadows on top of the Fragments meshes.

๐ŸŸฐ Viewpointsโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป

๐ŸŸฐ Worldsโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. ๐Ÿ‘๐Ÿป Make sure to check out the new tutorial, as there are some extra features, and you'll see the combination with the newer components.

๐Ÿ“• components-frontโ€‹

โœ–๏ธ AngleMeasurementโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

We have removed this component because we haven't seen anyone using it. If you have a need for this, let us know of your use case and we'll add it back! ๐Ÿ“

Alternative

Tell us about your use case in the community and we'll add it back.

๐ŸŸฐ AreaMeasurementโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

โžฐ Civil3DNavigatorโ€‹

Original tutorial โžก๏ธ New tutorial

The previous civil components had several problems: ๐Ÿงจ

  • They were very disaggregated, making it hard to make them work together in a flexible way.
  • They were very opinionated (e.g. it wasn't possible to handle multiple alignments).

So when we rebuild alignments for fragments, given that these components' adoption was still relatively small, we thought it was a great opportunity to improve them. ๐Ÿ“ˆ

Now there's a single component: the civil navigators, which allow to do the same you could do with 3d, horizontal and vertical navigator components, but with benefits:

  • works with the new Fragments, and therefore it's a lot more performant.
  • less opinionated and more flexible (supporting multiple alignments simultaneously).
  • supports dynamic station labels.

In the new tutorial, you can see how to create multiple navigators (both 3d and 2d) and combine them with the cross section navigator to have a full civil navigation experience. ๐Ÿ›ฃ๏ธ

๐ŸŸฐ CivilCrossSectionNavigatorโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

โœ–๏ธ CivilElevationNavigatorโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The vertical, horizontal and 3d civil navigators have been merged into one to be able to do the same as before but more flexibly. Check out the civil 3d navigator for more details. ๐Ÿ›ฃ๏ธ

Alternative

โœ–๏ธ CivilPlanNavigatorโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The vertical, horizontal and 3d civil navigators have been merged into one to be able to do the same as before but more flexibly. Check out the civil 3d navigator for more details. ๐Ÿ›ฃ๏ธ

Alternative

โžฐ ClipEdgesโ€‹

Original tutorial โžก๏ธ New tutorial

Due to the integral changes in the structures of the new Fragments, we were force to change the API of the clipping edges, which are tightly coupled with the BIM models geometry. You can do the same as before, but you'll need to make some changes to your code: ๐Ÿ‘‡๐Ÿป

If you have any questions about this, let us know in the community!

ใ€ฐ๏ธ EdgeMeasurementโ€‹

Original tutorial โžก๏ธ New tutorial

This component is now just merged with the length measurement component, but it's API is identical. Just check out the tutorial to see how to activate it. ๐Ÿ“

๐Ÿ”œ FaceMeasurementโ€‹

Original tutorial โžก๏ธ New tutorial

We didn't add this one because we run out of time before the release, but we'll add this as a patch soon. It's going to be part of face measurement, just like edge measurement is a part of length measurement. Likewise, besides the fact that it's now a part of another component, the API won't change. ๐Ÿ™๐Ÿป

๐ŸŸฐ Highlighterโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

โœ–๏ธ IfcStreamerโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The main goal of the IfcPropertiesTiler was to set up mesh streaming to be able to represent bigger IFC files, which is not necessary with the new Fragments. See IfcGeometryTiler for more details. ๐Ÿ”Ž

๐ŸŸฐ LengthMeasurementโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

๐ŸŸฐ Markerโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

ใ€ฐ๏ธ Plansโ€‹

Original tutorial โžก๏ธ New tutorial

The plans and sections component has been substituted by the more generic and flexible Views component, which is also implemented to work with BCF features. The API is very similar, and here you can see how to create plans as before. To get edges, check out the new clip styler tutorial. ๐Ÿ 

โžฐ PostproductionRendererโ€‹

Original tutorial โžก๏ธ New tutorial

The old postproduction renderer had some problems:

  • ๐Ÿ“ท Added extra dependencies to the project, increasing its size.
  • ๐Ÿ“ท It was hard to set up / configure.
  • ๐Ÿ“ท The AO effect wasn't very efficient.
  • ๐Ÿ“ท The lines and outlines effects visual quality was far from perfect.

With the new postproduction renderer, we have solved this all:

  • ๐Ÿ“ธ You can now select styles, which will automatically configure the renderer optimally to have the look you want.
  • ๐Ÿ“ธ It doesn't use external libraries, just pure three.js, reducing the dependencies.
  • ๐Ÿ“ธ It has an improved lines and outlines effect with better visual quality.

In summary, using the renderer itself won't change much. What changes is how you configure it and fine tune the appearance of your app. If you have any questions, let us know in the community. ๐Ÿซฑ๐Ÿปโ€๐Ÿซฒ๐Ÿป

ใ€ฐ๏ธ Sectionsโ€‹

Original tutorial โžก๏ธ New tutorial

The plans and sections component has been substituted by the more generic and flexible Views component, which is also implemented to work with BCF features. The API is very similar, and here you can see how to create sections or elevations views as before. To get edges, check out the new clip styler tutorial. ๐Ÿ 

โœ–๏ธ ShadowDropperโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

The original shadow dropper was made a long time ago to get a performant and beautiful shadow. Now that we have the shadowed scene component (more precise and equally efficient) this doesn't make sense anymore. ๐Ÿ•ถ๏ธ

Alternative

Use the ShadowedScene instead. If you have any questions or suggestions, let us know in the community!

๐ŸŸฐ VolumeMeasurementโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป We removed the tutorial because it's just like the rest of measurement tools. ๐Ÿ“๐Ÿ“

๐Ÿ“” uiโ€‹

๐ŸŸฐ Componentโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

๐ŸŸฐ Tableโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

๐ŸŸฐ DataTransformโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

๐ŸŸฐ ExportingDataโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

๐ŸŸฐ LoadFunctionโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

๐ŸŸฐ Searchingโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

๐Ÿ““ ui-obcโ€‹

โœ–๏ธ ClassificationsTreeโ€‹

Original tutorial โžก๏ธ โœ–๏ธ

We have removed this one because it can easily be done just using our UI libraries in 3 minutes, so it didn't add much value. You have an example in the classifier tutorial. โ˜๐Ÿป

Alternative

Check out the classifier tutorial and build a more powerful menu in 3 minutes.

ใ€ฐ๏ธ ElementPropertiesโ€‹

Original tutorial โžก๏ธ New tutorial

We have merged ElementProperties and EntityAttributes in the same component. It covers both use cases and the API changes are minimal. Check out the new tutorial for the new features, and let us know if you have any questions. ๐Ÿ“ƒ

ใ€ฐ๏ธ EntityAttributesโ€‹

Original tutorial โžก๏ธ New tutorial

We have merged ElementProperties and EntityAttributes in the same component. It covers both use cases and the API changes are minimal. Check out the new tutorial for the new features, and let us know if you have any questions. ๐Ÿ“ƒ

๐ŸŸฐ ModelsListโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป

ใ€ฐ๏ธ RelationsTreeโ€‹

Original tutorial โžก๏ธ New tutorial

The name of this comonent changed, but it's API is the same. ๐Ÿ‘๐Ÿป

๐ŸŸฐ TopicsUIโ€‹

Original tutorial โžก๏ธ New tutorial

This API didn't have a breaking change, it's the same in both tutorials. Don't forget to check out the latest tutorial to see the new cool features in store.๐Ÿ‘๐Ÿป