AR-js-org / AR.js

Image tracking, Location Based AR, Marker tracking. All on the Web.
MIT License
5.3k stars 909 forks source link

Include THREEx import in gps-new-camera, to allow use of ES6 modules #484

Closed nickw1 closed 1 year ago

nickw1 commented 1 year ago

⚠️ All PRs have to be done versus 'dev' branch, so be aware of that, or we'll close your issue ⚠️

What kind of change does this PR introduce?

Adds a statement to import THREEx into the gps-new-camera A-Frame component. This means that ES6 modules can be used to develop an application making use of gps-new-camera, without having to include three.js location-based build in the HTML page.

Can it be referenced to an Issue? If so what is the issue # ?

How can we test it?

Try out any of the gps-new-camera examples with this new build, but with AR.js imported as a module rather than linked to from the HTML, e.g. (EDITED, A-Frame is already included in the build bundle by the looks of it so doesn't need to be imported)

// Not needed import 'aframe';
import '@ar-js-org/ar.js/aframe/build/aframe-ar.js';

Summary

See above.

Does this PR introduce a breaking change?

No

Please TEST your PR before proposing it. Specify here what device you have used for tests, version of OS and version of Browser

Chrome on desktop (Linux) and on Android (Pixel 3)

Other information

nickw1 commented 1 year ago

Closing due to conflicts in build files, will be easier to make the changes directly to dev