diff --git a/three.js/build/ar.js b/three.js/build/ar.js
index 8dda28190f407df17fe5e4b1c3664aae8ca53678..7c7d8d613d6509e356d4316ada2da499b5ce8ecd 100644
--- a/three.js/build/ar.js
+++ b/three.js/build/ar.js
@@ -5327,7 +5327,7 @@ ARjs.Context.prototype._initArtoolkit = function(onCompleted){
// init controller
var arController = new ARController(_this.parameters.canvasWidth, _this.parameters.canvasHeight, cameraParameters);
_this.arController = arController
-
+
// honor this.parameters.imageSmoothingEnabled
arController.ctx.mozImageSmoothingEnabled = _this.parameters.imageSmoothingEnabled;
arController.ctx.webkitImageSmoothingEnabled = _this.parameters.imageSmoothingEnabled;
@@ -5391,15 +5391,11 @@ ARjs.Context.prototype.getProjectionMatrix = function(srcElement){
// FIXME rename this function to say it is artoolkit specific - getArtoolkitProjectMatrix
// keep a backward compatibility with a console.warn
-
- if( this.parameters.trackingBackend === 'aruco' ){
- console.assert(false, 'dont call this function with aruco')
- }else if( this.parameters.trackingBackend === 'artoolkit' ){
- console.assert(this.arController, 'arController MUST be initialized to call this function')
- // get projectionMatrixArr from artoolkit
- var projectionMatrixArr = this.arController.getCameraMatrix();
- var projectionMatrix = new THREE.Matrix4().fromArray(projectionMatrixArr)
- }else console.assert(false)
+ console.assert( this.parameters.trackingBackend === 'artoolkit' )
+ console.assert(this.arController, 'arController MUST be initialized to call this function')
+ // get projectionMatrixArr from artoolkit
+ var projectionMatrixArr = this.arController.getCameraMatrix();
+ var projectionMatrix = new THREE.Matrix4().fromArray(projectionMatrixArr)
// apply context._axisTransformMatrix - change artoolkit axis to match usual webgl one
projectionMatrix.multiply(this._artoolkitProjectionAxisTransformMatrix)
diff --git a/three.js/examples/dev.html b/three.js/examples/dev.html
index 7160dc6a4ca08a849a7fa8440b3c8ed11feaf17a..6b5671b663538a9521693dba61b2533f1764f22d 100644
--- a/three.js/examples/dev.html
+++ b/three.js/examples/dev.html
@@ -122,7 +122,7 @@
arToolkitContext.update( arToolkitSource.domElement )
})
-
+
////////////////////////////////////////////////////////////////////////////////
// Create a ArMarkerControls
diff --git a/three.js/examples/test-runner.html b/three.js/examples/test-runner.html
index 42288e0836dc464613d03a9cda277212b6c41cfb..2d62de6fdb8fe48050dc967b3477fabdd291aa23 100644
--- a/three.js/examples/test-runner.html
+++ b/three.js/examples/test-runner.html
@@ -1,211 +1,188 @@
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/three.js/src/threex/threex-artoolkitcontext.js b/three.js/src/threex/threex-artoolkitcontext.js
index eedb86dfcdcd51ca492252edae77f71a845e712b..6e794cbfdbb37a84f81916928b03ed58ddb20b57 100644
--- a/three.js/src/threex/threex-artoolkitcontext.js
+++ b/three.js/src/threex/threex-artoolkitcontext.js
@@ -195,7 +195,7 @@ ARjs.Context.prototype._initArtoolkit = function(onCompleted){
// init controller
var arController = new ARController(_this.parameters.canvasWidth, _this.parameters.canvasHeight, cameraParameters);
_this.arController = arController
-
+
// honor this.parameters.imageSmoothingEnabled
arController.ctx.mozImageSmoothingEnabled = _this.parameters.imageSmoothingEnabled;
arController.ctx.webkitImageSmoothingEnabled = _this.parameters.imageSmoothingEnabled;
@@ -259,15 +259,11 @@ ARjs.Context.prototype.getProjectionMatrix = function(srcElement){
// FIXME rename this function to say it is artoolkit specific - getArtoolkitProjectMatrix
// keep a backward compatibility with a console.warn
-
- if( this.parameters.trackingBackend === 'aruco' ){
- console.assert(false, 'dont call this function with aruco')
- }else if( this.parameters.trackingBackend === 'artoolkit' ){
- console.assert(this.arController, 'arController MUST be initialized to call this function')
- // get projectionMatrixArr from artoolkit
- var projectionMatrixArr = this.arController.getCameraMatrix();
- var projectionMatrix = new THREE.Matrix4().fromArray(projectionMatrixArr)
- }else console.assert(false)
+ console.assert( this.parameters.trackingBackend === 'artoolkit' )
+ console.assert(this.arController, 'arController MUST be initialized to call this function')
+ // get projectionMatrixArr from artoolkit
+ var projectionMatrixArr = this.arController.getCameraMatrix();
+ var projectionMatrix = new THREE.Matrix4().fromArray(projectionMatrixArr)
// apply context._axisTransformMatrix - change artoolkit axis to match usual webgl one
projectionMatrix.multiply(this._artoolkitProjectionAxisTransformMatrix)
diff --git a/three.js/src/threex/threex-artoolkitsource.js b/three.js/src/threex/threex-artoolkitsource.js
index b3ca5d364eacfde1164faa0c3dab8053f942d857..36a0f9a0586a0b2b50cc19e821aa71ade3056645 100644
--- a/three.js/src/threex/threex-artoolkitsource.js
+++ b/three.js/src/threex/threex-artoolkitsource.js
@@ -289,11 +289,14 @@ ARjs.Source.prototype.toggleMobileTorch = function(){
// handle resize
////////////////////////////////////////////////////////////////////////////////
-ARjs.Source.prototype.onResizeElement = function(mirrorDomElements){
+ARjs.Source.prototype.onResizeElement = function(){
var _this = this
var screenWidth = window.innerWidth
var screenHeight = window.innerHeight
+ // sanity check
+ console.assert( arguments.length === 0 )
+
// compute sourceWidth, sourceHeight
if( this.domElement.nodeName === "IMG" ){
var sourceWidth = this.domElement.naturalWidth
@@ -330,21 +333,6 @@ ARjs.Source.prototype.onResizeElement = function(mirrorDomElements){
this.domElement.style.width = screenWidth+'px'
this.domElement.style.marginLeft = '0px'
}
-
-
- if( arguments.length !== 0 ){
- debugger
- console.warn('use bad signature for arToolkitSource.copyElementSizeTo')
- }
- // honor default parameters
- // if( mirrorDomElements !== undefined ) console.warn('still use the old resize. fix it')
- if( mirrorDomElements === undefined ) mirrorDomElements = []
- if( mirrorDomElements instanceof Array === false ) mirrorDomElements = [mirrorDomElements]
-
- // Mirror _this.domElement.style to mirrorDomElements
- mirrorDomElements.forEach(function(domElement){
- _this.copyElementSizeTo(domElement)
- })
}
ARjs.Source.prototype.copyElementSizeTo = function(otherElement){
diff --git a/three.js/vendor/jsartoolkit5/js/artoolkit.api.js b/three.js/vendor/jsartoolkit5/js/artoolkit.api.js
index 21af06fbcdf6d73f69221647575ed4130cdd35d6..136cb81df6518c3ac75588c7edf0d53db089042d 100644
--- a/three.js/vendor/jsartoolkit5/js/artoolkit.api.js
+++ b/three.js/vendor/jsartoolkit5/js/artoolkit.api.js
@@ -981,16 +981,19 @@
}
- if (this.orientation === 'portrait') {
- this.ctx.save();
- this.ctx.translate(this.canvas.width, 0);
- this.ctx.rotate(Math.PI/2);
- this.ctx.drawImage(image, 0, 0, this.canvas.height, this.canvas.width); // draw video
- this.ctx.restore();
- } else {
- this.ctx.drawImage(image, 0, 0, this.canvas.width, this.canvas.height); // draw video
- }
-
+ // if (this.orientation === 'portrait') {
+ // this.ctx.save();
+ // this.ctx.translate(this.canvas.width, 0);
+ // this.ctx.rotate(Math.PI/2);
+ // this.ctx.drawImage(image, 0, 0, this.canvas.height, this.canvas.width); // draw video
+ // this.ctx.restore();
+ // } else {
+ // debugger
+ // this.ctx.drawImage(image, 0, 0, this.canvas.width, this.canvas.height); // draw video
+ // }
+
+
+ this.ctx.drawImage(image, 0, 0, this.canvas.width, this.canvas.height); // draw video
var imageData = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height);
var data = imageData.data;