Skip to content

Commit 8b8e062

Browse files
committed
Last commit before release 3.4.6
- solve conflicts and rebuild libs for safety
2 parents 1be43bd + e79e21f commit 8b8e062

File tree

140 files changed

+2347
-3333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+2347
-3333
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions"
14+
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"

.github/workflows/CI.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,31 @@ on:
66
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
77
jobs:
88

9-
tests:
10-
strategy:
11-
matrix:
12-
node:
13-
- 18.x
9+
check-and-test:
1410

1511
runs-on: ubuntu-20.04
16-
name: Node.js ${{ matrix.node }}
1712
steps:
18-
- uses: actions/checkout@v3
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
1915

20-
- name: Use Node.js ${{ matrix.node }}
21-
uses: actions/setup-node@v3
16+
- name: Use Node.js from .nvmrc
17+
uses: actions/setup-node@v4
2218
with:
23-
node-version: ${{ matrix.node }}
24-
- uses: actions/cache@v3
19+
node-version-file: ".nvmrc"
20+
21+
- name: Get npm cache directory
22+
id: npm-cache-dir
23+
shell: bash
24+
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
25+
26+
- uses: actions/cache@v4
27+
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
2528
with:
26-
path: ~/.npm
29+
path: ${{ steps.npm-cache-dir.outputs.dir }}
2730
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2831
restore-keys: |
2932
${{ runner.os }}-node-
33+
3034
- name: Npm update
3135
run: npm update
3236
- name: Npm install

.github/workflows/build.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,28 @@ name: Build AR.js libraries
77
on: push
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
13-
strategy:
14-
matrix:
15-
node-version: [18.x]
10+
check-and-test:
11+
runs-on: ubuntu-20.04
1612
steps:
17-
- uses: actions/checkout@v3
18-
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v3
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
ssh-key: ${{ secrets.DEPLOY_KEY }}
17+
18+
- name: Use Node.js from .nvmrc
19+
uses: actions/setup-node@v4
2020
with:
21-
node-version: ${{ matrix.node-version }}
22-
- uses: actions/cache@v3
21+
node-version-file: ".nvmrc"
22+
23+
- name: Get npm cache directory
24+
id: npm-cache-dir
25+
shell: bash
26+
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
27+
28+
- uses: actions/cache@v4
29+
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
2330
with:
24-
path: ~/.npm
31+
path: ${{ steps.npm-cache-dir.outputs.dir }}
2532
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2633
restore-keys: |
2734
${{ runner.os }}-node-
@@ -36,7 +43,7 @@ jobs:
3643
echo ${{ steps.vars.outputs.tag }}
3744
- run: npm update
3845
- run: npm install
39-
- uses: actions/upload-artifact@v3
46+
- uses: actions/upload-artifact@v4
4047
with:
4148
name: build
4249
path: |
@@ -52,13 +59,16 @@ jobs:
5259
message: new build files from action
5360
add: '["aframe/build", "three.js/build"]'
5461
- name: Release
55-
uses: softprops/action-gh-release@v1
62+
uses: softprops/action-gh-release@v2
5663
if: startsWith(github.ref, 'refs/tags/')
5764
with:
5865
files: |
5966
aframe/build/aframe-ar.js
6067
aframe/build/aframe-ar-nft.js
6168
aframe/build/aframe-ar-location-only.js
6269
three.js/build/ar.js
70+
three.js/build/ar.module.js
6371
three.js/build/ar-threex.js
72+
three.js/build/ar-threex.module.js
6473
three.js/build/ar-threex-location-only.js
74+
three.js/build/ar-threex-location-only.module.js

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.15.0
1+
v20.18.0

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ node_modules/**
44
test/**
55
aframe/examples/**
66
aframe/build/*.js
7+
aframe/build/*.mjs
78
aframe/src/component-anchor.js
89
aframe/src/component-anchor-nft.js
910
aframe/src/system-arjs.js
1011
aframe/src/system-arjs-nft.js
1112
aframe/src/location-based/stylesheets/*.css
1213
three.js/examples/**
1314
three.js/build/*.js
15+
three.js/build/*.mjs
1416
three.js/src/location-based/README.md
1517
*.md
1618
webpack.config.js

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 3.4.6
2+
- Upgraded Three.js and Aframe version to 0.164.0 and 1.6.0 respectively. importmap is now used to import Three.js (see three.js examples) #615 #625
3+
- Simplified location based examples #615.
4+
- Updated `artoolkit5-js` to 0.3.1.
5+
- Improved `CI` and `build` gitHub action scripts. Upgraded node version in .nvmrc file (v20.18.0).
6+
- Updated dependencies and devDependencies in package.json.
7+
18
# 3.4.5
29
- Fix for MathUtils issue see #523 #532
310

README.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Please import the one you need for your project, not both:
6262
You can also import a specific version replacing `master` keyword with version tag:
6363

6464
```html
65-
<script src="https://raw.githack.com/AR-js-org/AR.js/3.4.5/aframe/build/aframe-ar-nft.js">
65+
<script src="https://raw.githack.com/AR-js-org/AR.js/3.4.6/aframe/build/aframe-ar-nft.js">
6666
```
6767
6868
## Get started
@@ -77,7 +77,7 @@ Please follow these simple steps:
7777
- Scan [this picture](https://raw.githubusercontent.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex-image-big.jpeg) to see content through the camera.
7878
7979
```html
80-
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1.3.0/dist/aframe-master.min.js"></script>
80+
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1.6.0/dist/aframe-master.min.js"></script>
8181
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>
8282

8383
<style>
@@ -149,8 +149,8 @@ Please follow these simple steps:
149149
<meta charset="utf-8" />
150150
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
151151
<title>GeoAR.js demo</title>
152-
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
153-
<script src="https://unpkg.com/aframe-look-at-component@0.8.0/dist/aframe-look-at-component.min.js"></script>
152+
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
153+
<script src="https://unpkg.com/aframe-look-at-component@1.0.0/dist/aframe-look-at-component.min.js"></script>
154154
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>
155155
</head>
156156

@@ -183,7 +183,7 @@ Please follow this simple steps:
183183
```html
184184
<!DOCTYPE html>
185185
<html>
186-
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
186+
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
187187
<!-- we import arjs version without NFT but with marker + location based support -->
188188
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
189189
<body style="margin : 0px; overflow: hidden;">
@@ -221,6 +221,31 @@ npm install @ar-js-org/ar.js
221221
yarn add @ar-js-org/ar.js
222222
```
223223
For some examples read this [issue](https://github.com/AR-js-org/AR.js/issues/234).
224+
### New Import Syntax for `ar-threex.mjs` and `ar.mjs`
225+
226+
With the latest updates (3.4.6), `three.js` can now be imported using the ES module syntax.
227+
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:
228+
229+
```html
230+
// Example importing ar-threex.mjs
231+
<script type="importmap">
232+
{
233+
"imports": {
234+
"three": "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js",
235+
"threex": "./path/to/ar-threex.mjs",
236+
}
237+
}
238+
</script>
239+
240+
<script type="module">
241+
import * as THREE from 'three';
242+
import { ArToolkitSource, ArToolkitContext, ArMarkerControls } from 'threex'
243+
244+
// Your AR.js code here
245+
</script>
246+
```
247+
Read the examples included in this repository for more information, but basically the only change is the import syntax.
248+
224249
## Troubleshooting, feature requests, community
225250

226251
**You can find a lot of help on the old [AR.js repositories issues](https://github.com/jeromeetienne/AR.js/issues). Please search on open/closed issues, you may find interesting stuff.**

aframe/build/aframe-ar-location-only.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aframe/build/aframe-ar-location-only.mjs

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)