-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first test with new ARnft-threejs and three.js v169
- Loading branch information
Showing
5 changed files
with
244 additions
and
243 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -15,11 +15,22 @@ | |
🖼 Marker Image | ||
</a> | ||
|
||
<script src="js/third_party/three.js/three.min.js"></script> | ||
<script src="js/ARnftThreejs.js"></script> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js", | ||
"three/addons/": "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/", | ||
"arnft-threejs": "./js/ARnftThreejs.module.js" | ||
} | ||
} | ||
</script> | ||
<script src="../dist/ARnft.js"></script> | ||
|
||
<script> | ||
<script type="module"> | ||
import * as THREE from 'three' | ||
import ARnftThreejs from 'arnft-threejs' | ||
const { SceneRendererTJS, NFTaddTJS } = ARnftThreejs; | ||
|
||
let width = 640; | ||
let height = 480; | ||
ARnft.ARnft.init(width, height, [["examples/DataNFT/pinball"]], [['pinball']], 'config.json', true) | ||
|
@@ -56,11 +67,11 @@ | |
} | ||
} | ||
|
||
let sceneThreejs = new ARnftThreejs.SceneRendererTJS(config, canvas, nft.uuid, | ||
let sceneThreejs = new SceneRendererTJS(config, canvas, nft.uuid, | ||
true); | ||
sceneThreejs.initRenderer(); | ||
|
||
let nftAddTJS = new ARnftThreejs.NFTaddTJS(nft.uuid); | ||
let nftAddTJS = new NFTaddTJS(nft.uuid); | ||
nftAddTJS.add(cube, 'pinball', false); | ||
|
||
const tick = () => { | ||
|
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
Oops, something went wrong.