# 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;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bimwhale.gitbook.io/ifc-js/developer-guide/step-by-step/dealing-with-the-mainobject.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
