Skip to content

Commit

Permalink
3.3.3-es6-beta-02 version
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Nov 16, 2021
1 parent fccd194 commit 3bf97f3
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 28,471 deletions.
2,124 changes: 1 addition & 2,123 deletions aframe/build/aframe-ar-location-only.js

Large diffs are not rendered by default.

6,748 changes: 1 addition & 6,747 deletions aframe/build/aframe-ar-nft.js

Large diffs are not rendered by default.

5,917 changes: 1 addition & 5,916 deletions aframe/build/aframe-ar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aframe/examples/marker-based/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<script src="https://aframe.io/releases/1.0.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/ES6/aframe/build/aframe-ar.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/dev/aframe/build/aframe-ar.js"></script>
<body style="margin : 0px; overflow: hidden;">
<a-scene embedded arjs>
<a-marker preset="hiro">
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ar-js-org/ar.js",
"version": "3.3.3-es6-beta-01",
"version": "3.3.3-es6-beta-02",
"description": "Efficient Augmented Reality for the Web",
"main": "./aframe/build/aframe-ar.js",
"scripts": {
Expand Down Expand Up @@ -51,8 +51,8 @@
},
"homepage": "https://github.com/AR-js-org/AR.js/",
"devDependencies": {
"webpack": "^5.4.0",
"webpack-cli": "^4.5.0",
"webpack": "^5.64.1",
"webpack-cli": "^4.9.1",
"worker-loader": "^3.0.8"
},
"dependencies": {
Expand Down
4,026 changes: 1 addition & 4,025 deletions three.js/build/ar-nft.js

Large diffs are not rendered by default.

3,614 changes: 1 addition & 3,613 deletions three.js/build/ar-threex-nft.js

Large diffs are not rendered by default.

2,811 changes: 1 addition & 2,810 deletions three.js/build/ar-threex.js

Large diffs are not rendered by default.

3,223 changes: 1 addition & 3,222 deletions three.js/build/ar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion three.js/src/threex/arjs-context-nft.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Context.prototype.removeEventListener = THREE.EventDispatcher.prototype.removeEv

// default to github page
Context.baseURL = 'https://ar-js-org.github.io/AR.js/three.js/'
Context.REVISION = '3.3.3-es6-beta-01';
Context.REVISION = '3.3.3-es6-beta-02';

/**
* Create a default camera for this trackingBackend
Expand Down
2 changes: 1 addition & 1 deletion three.js/src/threex/arjs-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Context.prototype.removeEventListener = THREE.EventDispatcher.prototype.removeEv

// default to github page
Context.baseURL = 'https://ar-js-org.github.io/AR.js/three.js/'
Context.REVISION = '3.3.3-es6-beta-01'
Context.REVISION = '3.3.3-es6-beta-02'
/**
* Create a default camera for this trackingBackend
* @param {string} trackingBackend - the tracking to user
Expand Down
18 changes: 9 additions & 9 deletions three.js/src/threex/arjs-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,37 +347,37 @@ Source.prototype.hasMobileTorch = function () {
*/
Source.prototype.toggleMobileTorch = function () {
// sanity check
console.assert(this.hasMobileTorch() === true)
console.assert(this.hasMobileTorch() === true);

var stream = arToolkitSource.domElement.srcObject
var stream = arToolkitSource.domElement.srcObject;
if (stream instanceof MediaStream === false) {
if (!document.getElementById('error-popup')) {
var errorPopup = document.createElement('div');
errorPopup.innerHTML = 'enabling mobile torch is available only on webcam'
errorPopup.innerHTML = 'enabling mobile torch is available only on webcam';
errorPopup.setAttribute('id', 'error-popup');
document.body.appendChild(errorPopup);
}
return
return;
}

if (this._currentTorchStatus === undefined) {
this._currentTorchStatus = false
this._currentTorchStatus = false;
}

var videoTrack = stream.getVideoTracks()[0];
var capabilities = videoTrack.getCapabilities()
var capabilities = videoTrack.getCapabilities();

if (!capabilities.torch) {
if (!document.getElementById('error-popup')) {
var errorPopup = document.createElement('div');
errorPopup.innerHTML = 'no mobile torch is available on your camera'
errorPopup.innerHTML = 'no mobile torch is available on your camera';
errorPopup.setAttribute('id', 'error-popup');
document.body.appendChild(errorPopup);
}
return
return;
}

this._currentTorchStatus = this._currentTorchStatus === false ? true : false
this._currentTorchStatus = this._currentTorchStatus === false ? true : false;
videoTrack.applyConstraints({
advanced: [{
torch: this._currentTorchStatus
Expand Down

0 comments on commit 3bf97f3

Please sign in to comment.