Skip to content

Commit

Permalink
mention to ar-threex-location-only.mjs lib in the readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Dec 20, 2024
1 parent db21fce commit 1504e41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,23 +224,22 @@ For some examples read this [issue](https://github.com/AR-js-org/AR.js/issues/23
### New Import Syntax for `ar-threex.mjs` and `ar.mjs`

With the latest updates (3.4.6), `three.js` can now be imported using the ES module syntax.
To align with this standard, `ar-threex.mjs` and `ar.mjs` should also be imported in the same way using an import map. Here is an example of how to import these modules in your project:
To align with this standard, `ar-threex.mjs`,`ar.mjs` and `ar-threex-location-only.mjs` should also be imported in the same way using an import map. Here is an example of how to import these modules in your project:

```html
// Example importing ar-threex.mjs
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js",
"threex": "./path/to/ar-threex.mjs",
"arjs": "./path/to/ar.mjs",
}
}
</script>

<script type="module">
import * as THREE from 'three';
import { ArToolkitSource, ArToolkitContext, ArMarkerControls } from 'threex'
import { Context, Profile, Session, Anchor, HitTesting, Utils, SessionDebugUI, AnchorDebugUI } from 'arjs'
// Your AR.js code here
</script>
Expand Down

0 comments on commit 1504e41

Please sign in to comment.