ponahoum / three-usdz-loader

A basic USDZ file (Pixar Universal Scene Description) loader for ThreeJS
Other
115 stars 20 forks source link

bundles es6 compatible code into the esm directory #7

Closed benjaminknox closed 9 months ago

benjaminknox commented 1 year ago

What?

I ran into an issue when bundling this app with an es6 app, my resulting packaged source included two threejs builds, three.module.js (from my original build) and three.cjs (this one is from this library). This is caused by the current version 1.0.7.

This fixes duplicate builds by adding a separate build for es6 in the /lib/esm directory and specifying the module entrypoint.

Details

benjaminknox commented 1 year ago

@ponahoum Thank you for this code! What do you think of this PR?

Musadiqkhan-nullbrainer commented 11 months ago

@benjaminknox - I am continuously getting an error. Any idea why I am getting loading USDZ model TypeError: THREE.TextureLoader is not a constructor?