Skip to content

Commit

Permalink
Last commit before release 3.4.6
Browse files Browse the repository at this point in the history
- solve conflicts and rebuild libs for safety
  • Loading branch information
kalwalt committed Dec 22, 2024
2 parents 1be43bd + e79e21f commit 8b8e062
Show file tree
Hide file tree
Showing 140 changed files with 2,347 additions and 3,333 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
directory: "/"
schedule:
interval: "weekly"
28 changes: 16 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,31 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

tests:
strategy:
matrix:
node:
- 18.x
check-and-test:

runs-on: ubuntu-20.04
name: Node.js ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v3
node-version-file: ".nvmrc"

- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ~/.npm
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Npm update
run: npm update
- name: Npm install
Expand Down
38 changes: 24 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,28 @@ name: Build AR.js libraries
on: push

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
check-and-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}

- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v3
node-version-file: ".nvmrc"

- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ~/.npm
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
Expand All @@ -36,7 +43,7 @@ jobs:
echo ${{ steps.vars.outputs.tag }}
- run: npm update
- run: npm install
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: build
path: |
Expand All @@ -52,13 +59,16 @@ jobs:
message: new build files from action
add: '["aframe/build", "three.js/build"]'
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
aframe/build/aframe-ar.js
aframe/build/aframe-ar-nft.js
aframe/build/aframe-ar-location-only.js
three.js/build/ar.js
three.js/build/ar.module.js
three.js/build/ar-threex.js
three.js/build/ar-threex.module.js
three.js/build/ar-threex-location-only.js
three.js/build/ar-threex-location-only.module.js
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.15.0
v20.18.0
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ node_modules/**
test/**
aframe/examples/**
aframe/build/*.js
aframe/build/*.mjs
aframe/src/component-anchor.js
aframe/src/component-anchor-nft.js
aframe/src/system-arjs.js
aframe/src/system-arjs-nft.js
aframe/src/location-based/stylesheets/*.css
three.js/examples/**
three.js/build/*.js
three.js/build/*.mjs
three.js/src/location-based/README.md
*.md
webpack.config.js
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 3.4.6
- 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
- Simplified location based examples #615.
- Updated `artoolkit5-js` to 0.3.1.
- Improved `CI` and `build` gitHub action scripts. Upgraded node version in .nvmrc file (v20.18.0).
- Updated dependencies and devDependencies in package.json.

# 3.4.5
- Fix for MathUtils issue see #523 #532

Expand Down
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Please import the one you need for your project, not both:
You can also import a specific version replacing `master` keyword with version tag:

```html
<script src="https://raw.githack.com/AR-js-org/AR.js/3.4.5/aframe/build/aframe-ar-nft.js">
<script src="https://raw.githack.com/AR-js-org/AR.js/3.4.6/aframe/build/aframe-ar-nft.js">
```
## Get started
Expand All @@ -77,7 +77,7 @@ Please follow these simple steps:
- 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.
```html
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1.3.0/dist/aframe-master.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1.6.0/dist/aframe-master.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>

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

Expand Down Expand Up @@ -183,7 +183,7 @@ Please follow this simple steps:
```html
<!DOCTYPE html>
<html>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
<!-- we import arjs version without NFT but with marker + location based support -->
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
<body style="margin : 0px; overflow: hidden;">
Expand Down Expand Up @@ -221,6 +221,31 @@ npm install @ar-js-org/ar.js
yarn add @ar-js-org/ar.js
```
For some examples read this [issue](https://github.com/AR-js-org/AR.js/issues/234).
### 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`,`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",
}
}
</script>

<script type="module">
import * as THREE from 'three';
import { ArToolkitSource, ArToolkitContext, ArMarkerControls } from 'threex'
// Your AR.js code here
</script>
```
Read the examples included in this repository for more information, but basically the only change is the import syntax.

## Troubleshooting, feature requests, community

**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.**
Expand Down
2 changes: 1 addition & 1 deletion aframe/build/aframe-ar-location-only.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions aframe/build/aframe-ar-location-only.mjs

Large diffs are not rendered by default.

Loading

0 comments on commit 8b8e062

Please sign in to comment.