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

import AR.js classes in a <script type="module"> #535

Open
kalwalt opened this issue Apr 4, 2023 · 0 comments
Open

import AR.js classes in a <script type="module"> #535

kalwalt opened this issue Apr 4, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request ES6 module AR.js as a ES6 module

Comments

@kalwalt
Copy link
Member

kalwalt commented Apr 4, 2023

Do you want to request a feature or report a bug?
New feature to import AR.js classes in a <script type="module">.

What is the current behavior?
If you try to import AR.js classes in module tag an error will appear in the developer console, with no interaction. Example code:

<script type="module">
import { ArToolkitContext, ArToolkitSource } from "./three.js/build/ar-threex.js"
/// your code
</script>

If the current behavior is a bug, please provide the steps to reproduce.

Please mention other relevant information such as the browser version, Operating System and Device Name

What is the expected behavior?

If this is a feature request, what is motivation or use case for changing the behavior?
Starting from Three r151 It will possible to load three.js library only as a module, so if we want to use this version we need this kind of feature.
It is possible to use an experimental webpack entry and with no efforts we wiill have this nice feature.

@kalwalt kalwalt added enhancement New feature or request ES6 module AR.js as a ES6 module labels Apr 4, 2023
@kalwalt kalwalt self-assigned this Apr 4, 2023
@kalwalt kalwalt pinned this issue Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ES6 module AR.js as a ES6 module
Projects
None yet
Development

No branches or pull requests

1 participant