From 69abf00b24836313feaab3268017d40d1e8cf987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Carpignoli?= Date: Thu, 30 Dec 2021 08:57:15 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5e10131d..ad531b48 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ # AR.js - Augmented Reality on the Web - - - - ---- [![Build Status](https://travis-ci.org/jeromeetienne/AR.js.svg?branch=master)](https://travis-ci.org/jeromeetienne/AR.js) [![Gitter chat](https://badges.gitter.im/AR-js/Lobby.png)](https://gitter.im/AR-js/Lobby) @@ -14,7 +9,9 @@ AR.js is a lightweight library for Augmented Reality on the Web, coming with features like Image Tracking, Location-based AR and Marker tracking. -Welcome to the official repository! +30/12/21 Update: There is now also a brand new OSS Web AR JS library around, called [MindAR](https://github.com/hiukim/mind-ar-js). +If you need a great Image tracking feature (also multiple image tracking) and Face tracking, [go check it out](https://github.com/hiukim/mind-ar-js)! + As for now, AR.js is still the only library providing Marker based and Location based AR features. This project has been created by [@jeromeetienne](https://github.com/jeromeetienne), previously managed by Nicolò Carpignoli and it is now maintained by the AR.js org. @@ -24,10 +21,6 @@ Logo is courtesy of Simon Poulter . ------ -

You can get paid support and new features for AR.js. Check this link.

- ------- - ### ⚡️AR.js has now an official Documentation!⚡️ ### Check it out: [AR.js Official Documentation](https://ar-js-org.github.io/AR.js-Docs/). From 99bda004452549e8a7576b9e7afc26992aa0104e Mon Sep 17 00:00:00 2001 From: kalwalt Date: Fri, 11 Feb 2022 17:22:05 +0100 Subject: [PATCH 2/2] fix for issue #384 in master branch - fix labelingMode for White Markers - build production libs --- aframe/build/aframe-ar.js | 14 ++++++++++++++ three.js/build/ar.js | 14 ++++++++++++++ three.js/src/threex/threex-artoolkitcontext.js | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/aframe/build/aframe-ar.js b/aframe/build/aframe-ar.js index ac80e5d6..7489579f 100644 --- a/aframe/build/aframe-ar.js +++ b/aframe/build/aframe-ar.js @@ -2450,6 +2450,10 @@ ARjs.Context = THREEx.ArToolkitContext = function (parameters) { // the patternRatio inside the artoolkit marker - artoolkit only patternRatio: 0.5, + // Labeling mode for markers - ['black_region', 'white_region'] + // black_region: Black bordered markers on a white background, white_region: White bordered markers on a black background + labelingMode: 'black_region', + // enable image smoothing or not for canvas copy - default to true // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled imageSmoothingEnabled: false, @@ -2457,6 +2461,7 @@ ARjs.Context = THREEx.ArToolkitContext = function (parameters) { // parameters sanity check console.assert(['artoolkit'].indexOf(this.parameters.trackingBackend) !== -1, 'invalid parameter trackingBackend', this.parameters.trackingBackend) console.assert(['color', 'color_and_matrix', 'mono', 'mono_and_matrix'].indexOf(this.parameters.detectionMode) !== -1, 'invalid parameter detectionMode', this.parameters.detectionMode) + console.assert(["black_region", "white_region"].indexOf(this.parameters.labelingMode) !== -1, "invalid parameter labelingMode", this.parameters.labelingMode); this.arController = null; @@ -2668,6 +2673,15 @@ ARjs.Context.prototype._initArtoolkit = function (onCompleted) { // set the patternRatio for artoolkit arController.setPattRatio(_this.parameters.patternRatio); + // set the labelingMode for artoolkit + var labelingModeTypes = { + "black_region": artoolkit.AR_LABELING_BLACK_REGION, + "white_region": artoolkit.AR_LABELING_WHITE_REGION + } + var labelingModeType = labelingModeTypes[_this.parameters.labelingMode]; + console.assert(labelingModeType !== undefined); + arController.setLabelingMode(labelingModeType); + // set thresholding in artoolkit // this seems to be the default // arController.setThresholdMode(artoolkit.AR_LABELING_THRESH_MODE_MANUAL) diff --git a/three.js/build/ar.js b/three.js/build/ar.js index f1aae319..e0549ef3 100644 --- a/three.js/build/ar.js +++ b/three.js/build/ar.js @@ -2450,6 +2450,10 @@ ARjs.Context = THREEx.ArToolkitContext = function (parameters) { // the patternRatio inside the artoolkit marker - artoolkit only patternRatio: 0.5, + // Labeling mode for markers - ['black_region', 'white_region'] + // black_region: Black bordered markers on a white background, white_region: White bordered markers on a black background + labelingMode: 'black_region', + // enable image smoothing or not for canvas copy - default to true // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled imageSmoothingEnabled: false, @@ -2457,6 +2461,7 @@ ARjs.Context = THREEx.ArToolkitContext = function (parameters) { // parameters sanity check console.assert(['artoolkit'].indexOf(this.parameters.trackingBackend) !== -1, 'invalid parameter trackingBackend', this.parameters.trackingBackend) console.assert(['color', 'color_and_matrix', 'mono', 'mono_and_matrix'].indexOf(this.parameters.detectionMode) !== -1, 'invalid parameter detectionMode', this.parameters.detectionMode) + console.assert(["black_region", "white_region"].indexOf(this.parameters.labelingMode) !== -1, "invalid parameter labelingMode", this.parameters.labelingMode); this.arController = null; @@ -2668,6 +2673,15 @@ ARjs.Context.prototype._initArtoolkit = function (onCompleted) { // set the patternRatio for artoolkit arController.setPattRatio(_this.parameters.patternRatio); + // set the labelingMode for artoolkit + var labelingModeTypes = { + "black_region": artoolkit.AR_LABELING_BLACK_REGION, + "white_region": artoolkit.AR_LABELING_WHITE_REGION + } + var labelingModeType = labelingModeTypes[_this.parameters.labelingMode]; + console.assert(labelingModeType !== undefined); + arController.setLabelingMode(labelingModeType); + // set thresholding in artoolkit // this seems to be the default // arController.setThresholdMode(artoolkit.AR_LABELING_THRESH_MODE_MANUAL) diff --git a/three.js/src/threex/threex-artoolkitcontext.js b/three.js/src/threex/threex-artoolkitcontext.js index 3cdf3370..61041aae 100644 --- a/three.js/src/threex/threex-artoolkitcontext.js +++ b/three.js/src/threex/threex-artoolkitcontext.js @@ -29,6 +29,10 @@ ARjs.Context = THREEx.ArToolkitContext = function (parameters) { // the patternRatio inside the artoolkit marker - artoolkit only patternRatio: 0.5, + // Labeling mode for markers - ['black_region', 'white_region'] + // black_region: Black bordered markers on a white background, white_region: White bordered markers on a black background + labelingMode: 'black_region', + // enable image smoothing or not for canvas copy - default to true // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled imageSmoothingEnabled: false, @@ -36,6 +40,7 @@ ARjs.Context = THREEx.ArToolkitContext = function (parameters) { // parameters sanity check console.assert(['artoolkit'].indexOf(this.parameters.trackingBackend) !== -1, 'invalid parameter trackingBackend', this.parameters.trackingBackend) console.assert(['color', 'color_and_matrix', 'mono', 'mono_and_matrix'].indexOf(this.parameters.detectionMode) !== -1, 'invalid parameter detectionMode', this.parameters.detectionMode) + console.assert(["black_region", "white_region"].indexOf(this.parameters.labelingMode) !== -1, "invalid parameter labelingMode", this.parameters.labelingMode); this.arController = null; @@ -247,6 +252,15 @@ ARjs.Context.prototype._initArtoolkit = function (onCompleted) { // set the patternRatio for artoolkit arController.setPattRatio(_this.parameters.patternRatio); + // set the labelingMode for artoolkit + var labelingModeTypes = { + "black_region": artoolkit.AR_LABELING_BLACK_REGION, + "white_region": artoolkit.AR_LABELING_WHITE_REGION + } + var labelingModeType = labelingModeTypes[_this.parameters.labelingMode]; + console.assert(labelingModeType !== undefined); + arController.setLabelingMode(labelingModeType); + // set thresholding in artoolkit // this seems to be the default // arController.setThresholdMode(artoolkit.AR_LABELING_THRESH_MODE_MANUAL)