Skip to content

Editor IFC support #28098

@harryhjsh

Description

@harryhjsh

Description

Per the discussion in #25057 and the implementation in #25440, IFCLoader was removed from addons. The editor still dynamically imports it from jsm/examples/loaders, where it obviously no longer exists, meaning the editor fails to load IFC models. (Link to editor import of IFCLoader.js)

I tried starting a PR to update the import maps for the editor as per the changes to the IFC example in #25440, which results in imports working on the first page reload after clearing my cache, but seems to result in a number of failed requests for web-ifc-mt.worker.js when trying to import after a second reload. I think this is potentially related to editor/sw.js, but I can't quite pin it down (sorry).

I imagine it'd be equally valid to remove IFC support from the editor, as it doesn't make use of any other external loaders, but this might be a bit of a shame.

Apologies for this slightly off-topic aside:

I found getting to the bottom of this was a bit difficult, I think due to the deprecation of web-ifc-three mentioned in #27467. This means that most of the documentation links on https://github.com/ThatOpen/web-ifc-three are 404s at the moment, so trying to dig into where this request for web-ifc-mt.worker.js originated from, and whether there was a way to avoid it, was a bit more challenging than it might've been. Is there still a plan to migrate the example (and potentially the editor) to https://github.com/ThatOpen/engine_components? I think it's a bit of a challenge to make use of the current example code given the temporarily missing docs.

Reproduction steps

  1. Visit https://threejs.org/editor/
  2. Try importing an IFC file (e.g. https://github.com/mrdoob/three.js/blob/dev/examples/models/ifc/rac_advanced_sample_project.ifc)
  3. Observe errors in console

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions