-
Notifications
You must be signed in to change notification settings - Fork 946
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mention to ar-threex-location-only.mjs lib in the readme file
- Loading branch information
Showing
1 changed file
with
2 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
|