attempt fix

beta.r3js.org
-=yb4f310 2018-05-06 20:53:21 +02:00
parent 2004fcc1b7
commit 08a448ae4b
2 changed files with 11 additions and 8 deletions

View File

@ -40,12 +40,12 @@ R3.API.AR = function(
this.video = video;
if (R3.Utils.UndefinedOrNull(pathCamera)) {
pathCamera = 'Data/camera_para.dat';
pathCamera = 'data/camera_para.dat';
}
this.pathCamera = pathCamera;
if (R3.Utils.UndefinedOrNull(pathMarker)) {
pathMarker = 'Data/patt.hiro';
pathMarker = 'data/patt.hiro';
}
this.pathMarker = pathMarker;

View File

@ -186,7 +186,10 @@ R3.AR.prototype.createInstance = function() {
this.arToolkitContext = new THREEx.ArToolkitContext(
{
cameraParametersUrl: this.pathCamera,
detectionMode: 'mono'
detectionMode: 'mono',
maxDetectionRate: 30,
canvasWidth: 80*3,
canvasHeight: 60*3
}
);
@ -349,11 +352,11 @@ R3.AR.prototype.resize = function() {
this.arToolkitSource.onResizeElement();
// if (this.arToolkitContext.arController !== null){
// this.arToolkitSource.copyElementSizeTo(
// this.arToolkitContext.arController.canvas
// )
// }
if (this.arToolkitContext.arController !== null){
this.arToolkitSource.copyElementSizeTo(
this.arToolkitContext.arController.canvas
)
}
}