Skip to content

Commit 936ca2c

Browse files
committed
three.min.js version 150 amd updated README.md
1 parent 1605b04 commit 936ca2c

File tree

4 files changed

+46
-10
lines changed

4 files changed

+46
-10
lines changed

README.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,61 @@
22

33
Testing repository for the AR.js core module. I'm converting AR.js code to the Typescript language but providing the same classes and structures as much as possible.
44
The module export two namespaces as in the old implementation: **THREEx** and **ARjs**.
5+
The project is under development, so things could not works as expected. If you find a bug file an issue at our [issues](https://github.com/AR-js-org/AR.js-threejs/issues)
56

67
## List of classes in the namespaces
78
### THREEx:
89
- [x] ArBaseControls
910
- [x] ArClickability
1011
- [x] ArMarkerCloak
11-
- [x] ArMarkerHelper
1212
- [x] ArMarkerControls
13+
- [x] ArMarkerHelper
1314
- [x] ArSmoothedControls
1415
- [x] ArToolkitContext
1516
- [x] ArToolkitSource
1617
- [x] ArToolkitProfile
17-
- [x] ArVideoinwebgl
18-
- [x] HittestingPlane
18+
- [x] ArVideoinWebgl
19+
- [x] HitTestingPlane
1920

2021
### ARjs:
2122

22-
- [x] Source
23+
- [x] Anchor
24+
- [x] AnchorDebugUI
2325
- [x] Context
26+
- [x] HitTesting
27+
- [x] Session
28+
- [x] SessionDebugUI
29+
- [x] Source
2430
- [x] Profile
2531
- [x] Utils
2632

2733
## Examples
28-
For now, you can find two vanilla JS examples in the **examples** folder and another one in Typescript in the **example-ts** folder. More examples will be added in a near future.
34+
For now, you can find some vanilla JS examples in the **examples** folder and another one in Typescript in the **example-ts** folder. More examples will be added in a near future.
35+
36+
## Test it with Typescript
37+
38+
First, you need to add the `ar.js-threejs` package to your project:
39+
40+
`npm install @ar-js-org/ar.js-threejs`
41+
42+
then in your typescript code you can import the `THREEx` and `ARjs` namespaces:
43+
44+
```typescript
45+
import { THREEx, ARjs } from "@ar-js-org/ar.js-threejs"
46+
47+
var arToolkitSource = new THREEx.ArToolkitSource({
48+
// to read from the webcam
49+
sourceType: 'webcam',
50+
51+
sourceWidth: window.innerWidth > window.innerHeight ? 640 : 480,
52+
sourceHeight: window.innerWidth > window.innerHeight ? 480 : 640,
53+
})
54+
// other Ar.js code...
55+
```
56+
57+
After, you need a bundler (webpack, rollup..) to build the final app. look at _example-ts_ for this purpose.
58+
59+
## Feature to add
60+
61+
- [ ] NFT example
62+
- [ ] markers-area with multimarker support?

example-ts/basic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>AR.js-threejs basic example with typescript</title>
7+
<title>AR.js-threejs basic example with Typescript</title>
88
</head>
99
<body>
1010
<script src="js/three.min.js"></script>

example-ts/js/three.min.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/js/three.min.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)