Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IFCWorker.js.15776 report an error #167

Closed
Runasia opened this issue May 10, 2023 · 3 comments
Closed

IFCWorker.js.15776 report an error #167

Runasia opened this issue May 10, 2023 · 3 comments

Comments

@Runasia
Copy link

Runasia commented May 10, 2023

Hello
I had a bug in as mentioned above , it just like say i lack some wasm file or another some thing. but if i run it in browser.
it can arrive
console.log("here")
but can't array
console.log("or here")
and what is magic word..

image

` ifc_init() {
const ifc_loader = new IFCLoader()
ifc_loader.ifcManager.setWasmPath("../wasm")
// await ifc_loader.ifcManager.setWasmPath("/wasm/")
ifc_loader.ifcManager.parser.setupOptionalCategories({
[IFCSPACE]: false

      }
  )

  //npm i three-mesh-bvh或yarn add three-mesh-bvh
  ifc_loader.ifcManager.setupThreeMeshBVH(
      acceleratedRaycast,
      computeBoundsTree,
      disposeBoundsTree,
  );


  ifc_loader.ifcManager.setOnProgress(
      (event) => {
        const progress = (event.total / event.progress) * 100;
        console.log("Progress: ", progress, "%");

      }
  )


  ifc_loader.ifcManager.applyWebIfcConfig({
    COORDINATE_TO_ORIGIN: true,
    USE_FAST_BOOLS: false,
  });



   ifc_loader.ifcManager.useWebWorkers(
      true,
      "/ifc_worker/IFCWorker.js"
  );

 
  console.log("here")
  ifc_loader.load('/bimModel/rac_advanced_sample_project.ifc', function (model) {
    scene.add(model);
    console.log("or here")
    this.update_render()

  })


},`
@Runasia
Copy link
Author

Runasia commented May 10, 2023

image

Go ahead, it's say instantiateArrayBuffer has some..? please help me . Thinks!

@berry4u
Copy link

berry4u commented May 11, 2023

similar error I reported yesterday in issue #168

@Runasia Runasia closed this as completed May 12, 2023
@Runasia
Copy link
Author

Runasia commented May 12, 2023

I find that if i delete the 'await' behind of the ifc_loader.load() in my code , it can work ,so i think its maybe due to async mistake. is not like code of my first up.
` async ifc_init() {
const ifc_loader = new IFCLoader()
await ifc_loader.ifcManager.setWasmPath("../wasm/")
// await ifc_loader.ifcManager.setWasmPath("/wasm/")
await ifc_loader.ifcManager.parser.setupOptionalCategories({
[IFCSPACE]: false

      }
  )




  ifc_loader.ifcManager.setOnProgress(
      (event) => {
        const progress = (event.total / event.progress) * 100;
        console.log("Progress: ", progress, "%");

      }
  )


  await ifc_loader.ifcManager.applyWebIfcConfig({
    COORDINATE_TO_ORIGIN: true,
    USE_FAST_BOOLS: false,
  });



  await ifc_loader.ifcManager.useWebWorkers(
      true,
      "/ifc_worker/IFCWorker.js"
  );

 
  console.log("here")
  ifc_loader.load('/bimModel/RAC_basic_sample_project.ifc', function (model) {
    console.log("or here")
    scene.add(model);
    // this.update_render()
    renderer.render(scene, camera);


  })


},
update_render() {
  renderer.render(scene, camera);

},

},it work.and no red in browser,but in browser

--   | We're sorry but ifcthreevue doesn't work properly without JavaScript enabled. Please enable it to continue.   | `

@Runasia Runasia closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2023
@Runasia Runasia reopened this May 12, 2023
@Runasia Runasia closed this as completed May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants