> For the complete documentation index, see [llms.txt](https://bimwhale.gitbook.io/ifc-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bimwhale.gitbook.io/ifc-js/developer-guide/step-by-step/dealing-with-the-mainobject.md).

# Dealing with the mainObject

The `mainObject` (see `/src/ifc-to-three.js/scene/mainObject.js`) is a part of Three.

{% hint style="danger" %}
We cannot use Three inside a Web Worker!
{% endhint %}

We simply exclude that object. Instead, we return an empty object.

```javascript
function constructProject(ifcData) {
    const finder = createIfcItemsFinder(ifcData);
    bindAllElements(finder);
    const ifcProjects = get(finder, t.IfcProject);
    const elements = finder.findAllProducts(ifcProjects);
    const spaces = get(finder, t.IfcSpace);
    const units = get(finder, t.IfcUnitAssignment)[0];
    return {
      [s.ifcProject]: ifcProjects,
      [s.products]: elements,
      [s.spaces]: spaces,
      [s.units]: units,
      [s.mainObject]: {} // mainObject
    };
}
```

Please note that this change will break the regular code.&#x20;
