threex-artoolkitcontext.js 15.0 KB
Newer Older
J
Jerome Etienne 已提交
1
var ARjs = ARjs || {}
J
Jerome Etienne 已提交
2 3
var THREEx = THREEx || {}

J
Jerome Etienne 已提交
4
ARjs.Context = THREEx.ArToolkitContext = function(parameters){
J
Jerome Etienne 已提交
5
	var _this = this
J
Jerome Etienne 已提交
6

J
Jerome Etienne 已提交
7
	_this._updatedAt = null
J
Jerome Etienne 已提交
8

J
Jerome Etienne 已提交
9 10
	// handle default parameters
	this.parameters = {
J
Jerome Etienne 已提交
11
		// AR backend - ['artoolkit', 'aruco', 'tango']
J
Jerome Etienne 已提交
12
		trackingBackend: 'artoolkit',
J
Jerome Etienne 已提交
13
		// debug - true if one should display artoolkit debug canvas, false otherwise
J
Jerome Etienne 已提交
14
		debug: false,
J
Jerome Etienne 已提交
15
		// the mode of detection - ['color', 'color_and_matrix', 'mono', 'mono_and_matrix']
J
Jerome Etienne 已提交
16
		detectionMode: 'mono',
J
Jerome Etienne 已提交
17
		// type of matrix code - valid iif detectionMode end with 'matrix' - [3x3, 3x3_HAMMING63, 3x3_PARITY65, 4x4, 4x4_BCH_13_9_3, 4x4_BCH_13_5_5]
J
Jerome Etienne 已提交
18
		matrixCodeType: '3x3',
J
Jerome Etienne 已提交
19

J
Jerome Etienne 已提交
20
		// url of the camera parameters
J
Jerome Etienne 已提交
21
		cameraParametersUrl: ARjs.Context.baseURL + 'parameters/camera_para.dat',
J
Jerome Etienne 已提交
22 23

		// tune the maximum rate of pose detection in the source image
J
Jerome Etienne 已提交
24
		maxDetectionRate: 60,
J
Jerome Etienne 已提交
25
		// resolution of at which we detect pose in the source image
J
Jerome Etienne 已提交
26 27
		canvasWidth: 640,
		canvasHeight: 480,
J
Jerome Etienne 已提交
28 29 30 31

		// the patternRatio inside the artoolkit marker - artoolkit only
		patternRatio: 0.5,

J
Jerome Etienne 已提交
32
		// enable image smoothing or not for canvas copy - default to true
J
Jerome Etienne 已提交
33
		// https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled
J
Jerome Etienne 已提交
34
		imageSmoothingEnabled : false,
J
Jerome Etienne 已提交
35
	}
J
Jerome Etienne 已提交
36
	// parameters sanity check
J
Jerome Etienne 已提交
37
	console.assert(['artoolkit', 'aruco', 'tango'].indexOf(this.parameters.trackingBackend) !== -1, 'invalid parameter trackingBackend', this.parameters.trackingBackend)
J
Jerome Etienne 已提交
38
	console.assert(['color', 'color_and_matrix', 'mono', 'mono_and_matrix'].indexOf(this.parameters.detectionMode) !== -1, 'invalid parameter detectionMode', this.parameters.detectionMode)
J
Jerome Etienne 已提交
39

J
Jerome Etienne 已提交
40
        this.arController = null;
J
Jerome Etienne 已提交
41
        this.arucoContext = null;
J
Jerome Etienne 已提交
42

J
Jerome Etienne 已提交
43 44
	_this.initialized = false

J
Jerome Etienne 已提交
45

J
Jerome Etienne 已提交
46
	this._arMarkersControls = []
J
Jerome Etienne 已提交
47

J
Jerome Etienne 已提交
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
	//////////////////////////////////////////////////////////////////////////////
	//		setParameters
	//////////////////////////////////////////////////////////////////////////////
	setParameters(parameters)
	function setParameters(parameters){
		if( parameters === undefined )	return
		for( var key in parameters ){
			var newValue = parameters[ key ]

			if( newValue === undefined ){
				console.warn( "THREEx.ArToolkitContext: '" + key + "' parameter is undefined." )
				continue
			}

			var currentValue = _this.parameters[ key ]

			if( currentValue === undefined ){
				console.warn( "THREEx.ArToolkitContext: '" + key + "' is not a property of this material." )
				continue
			}

			_this.parameters[ key ] = newValue
		}
	}
J
Jerome Etienne 已提交
72 73
}

J
Jerome Etienne 已提交
74
Object.assign( ARjs.Context.prototype, THREE.EventDispatcher.prototype );
J
Jerome Etienne 已提交
75

J
Jerome Etienne 已提交
76
// ARjs.Context.baseURL = '../'
J
Jerome Etienne 已提交
77
// default to github page
J
Jerome Etienne 已提交
78
ARjs.Context.baseURL = 'https://jeromeetienne.github.io/AR.js/three.js/'
N
nicolocarpignoli 已提交
79
ARjs.Context.REVISION = '1.7.1';
J
Jerome Etienne 已提交
80

81 82 83 84 85
/**
 * Create a default camera for this trackingBackend
 * @param {string} trackingBackend - the tracking to user
 * @return {THREE.Camera} the created camera
 */
J
Jerome Etienne 已提交
86
ARjs.Context.createDefaultCamera = function( trackingBackend ){
87
	console.assert(false, 'use ARjs.Utils.createDefaultCamera instead')
88 89 90 91 92 93 94 95 96 97 98 99
	// Create a camera
	if( trackingBackend === 'artoolkit' ){
		var camera = new THREE.Camera();
	}else if( trackingBackend === 'aruco' ){
		var camera = new THREE.PerspectiveCamera(42, renderer.domElement.width / renderer.domElement.height, 0.01, 100);
	}else if( trackingBackend === 'tango' ){
		var camera = new THREE.PerspectiveCamera(42, renderer.domElement.width / renderer.domElement.height, 0.01, 100);
	}else console.assert(false)
	return camera
}


J
Jerome Etienne 已提交
100
//////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
101
//		init functions
J
Jerome Etienne 已提交
102
//////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
103
ARjs.Context.prototype.init = function(onCompleted){
J
Jerome Etienne 已提交
104
	var _this = this
J
Jerome Etienne 已提交
105
	if( this.parameters.trackingBackend === 'artoolkit' ){
J
Jerome Etienne 已提交
106
		this._initArtoolkit(done)
J
Jerome Etienne 已提交
107
	}else if( this.parameters.trackingBackend === 'aruco' ){
J
Jerome Etienne 已提交
108
		this._initAruco(done)
J
Jerome Etienne 已提交
109
	}else if( this.parameters.trackingBackend === 'tango' ){
J
Jerome Etienne 已提交
110
		this._initTango(done)
J
Jerome Etienne 已提交
111
	}else console.assert(false)
J
Jerome Etienne 已提交
112
	return
J
Jerome Etienne 已提交
113

J
Jerome Etienne 已提交
114 115 116 117 118 119
	function done(){
		// dispatch event
		_this.dispatchEvent({
			type: 'initialized'
		});

J
Jerome Etienne 已提交
120
		_this.initialized = true
J
Jerome Etienne 已提交
121

J
Jerome Etienne 已提交
122 123 124
		onCompleted && onCompleted()
	}

J
Jerome Etienne 已提交
125
}
J
Jerome Etienne 已提交
126 127 128
////////////////////////////////////////////////////////////////////////////////
//          update function
////////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
129
ARjs.Context.prototype.update = function(srcElement){
J
Jerome Etienne 已提交
130 131

	// be sure arController is fully initialized
J
Jerome Etienne 已提交
132
        if(this.parameters.trackingBackend === 'artoolkit' && this.arController === null) return false;
J
Jerome Etienne 已提交
133 134 135 136 137 138 139

	// honor this.parameters.maxDetectionRate
	var present = performance.now()
	if( this._updatedAt !== null && present - this._updatedAt < 1000/this.parameters.maxDetectionRate ){
		return false
	}
	this._updatedAt = present
J
Jerome Etienne 已提交
140

J
Jerome Etienne 已提交
141 142 143 144 145 146
	// mark all markers to invisible before processing this frame
	this._arMarkersControls.forEach(function(markerControls){
		markerControls.object3d.visible = false
	})

	// process this frame
J
Jerome Etienne 已提交
147
	if(this.parameters.trackingBackend === 'artoolkit'){
J
Jerome Etienne 已提交
148
		this._updateArtoolkit(srcElement)
J
Jerome Etienne 已提交
149
	}else if( this.parameters.trackingBackend === 'aruco' ){
J
Jerome Etienne 已提交
150
		this._updateAruco(srcElement)
J
Jerome Etienne 已提交
151
	}else if( this.parameters.trackingBackend === 'tango' ){
J
Jerome Etienne 已提交
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
		this._updateTango(srcElement)
	}else{
		console.assert(false)
	}

	// dispatch event
	this.dispatchEvent({
		type: 'sourceProcessed'
	});


	// return true as we processed the frame
	return true;
}

////////////////////////////////////////////////////////////////////////////////
//          Add/Remove markerControls
////////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
170
ARjs.Context.prototype.addMarker = function(arMarkerControls){
J
Jerome Etienne 已提交
171 172 173 174
	console.assert(arMarkerControls instanceof THREEx.ArMarkerControls)
	this._arMarkersControls.push(arMarkerControls)
}

J
Jerome Etienne 已提交
175
ARjs.Context.prototype.removeMarker = function(arMarkerControls){
J
Jerome Etienne 已提交
176 177 178 179 180 181 182 183 184 185
	console.assert(arMarkerControls instanceof THREEx.ArMarkerControls)
	// console.log('remove marker for', arMarkerControls)
	var index = this.arMarkerControlss.indexOf(artoolkitMarker);
	console.assert(index !== index )
	this._arMarkersControls.splice(index, 1)
}

//////////////////////////////////////////////////////////////////////////////
//		artoolkit specific
//////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
186
ARjs.Context.prototype._initArtoolkit = function(onCompleted){
J
Jerome Etienne 已提交
187 188
        var _this = this

189 190 191 192 193
	// set this._artoolkitProjectionAxisTransformMatrix to change artoolkit projection matrix axis to match usual webgl one
	this._artoolkitProjectionAxisTransformMatrix = new THREE.Matrix4()
	this._artoolkitProjectionAxisTransformMatrix.multiply(new THREE.Matrix4().makeRotationY(Math.PI))
	this._artoolkitProjectionAxisTransformMatrix.multiply(new THREE.Matrix4().makeRotationZ(Math.PI))

J
Jerome Etienne 已提交
194
	// get cameraParameters
J
Jerome Etienne 已提交
195
        var cameraParameters = new ARCameraParam(_this.parameters.cameraParametersUrl, function(){
J
Jerome Etienne 已提交
196
        	// init controller
J
Jerome Etienne 已提交
197
                var arController = new ARController(_this.parameters.canvasWidth, _this.parameters.canvasHeight, cameraParameters);
J
Jerome Etienne 已提交
198
                _this.arController = arController
J
Jerome Etienne 已提交
199

J
Jerome Etienne 已提交
200
		// honor this.parameters.imageSmoothingEnabled
J
Jerome Etienne 已提交
201 202 203
		arController.ctx.mozImageSmoothingEnabled = _this.parameters.imageSmoothingEnabled;
		arController.ctx.webkitImageSmoothingEnabled = _this.parameters.imageSmoothingEnabled;
		arController.ctx.msImageSmoothingEnabled = _this.parameters.imageSmoothingEnabled;
J
Jerome Etienne 已提交
204 205
		arController.ctx.imageSmoothingEnabled = _this.parameters.imageSmoothingEnabled;

J
Jerome Etienne 已提交
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
		// honor this.parameters.debug
                if( _this.parameters.debug === true ){
			arController.debugSetup();
			arController.canvas.style.position = 'absolute'
			arController.canvas.style.top = '0px'
			arController.canvas.style.opacity = '0.6'
			arController.canvas.style.pointerEvents = 'none'
			arController.canvas.style.zIndex = '-1'
		}

		// setPatternDetectionMode
		var detectionModes = {
			'color'			: artoolkit.AR_TEMPLATE_MATCHING_COLOR,
			'color_and_matrix'	: artoolkit.AR_TEMPLATE_MATCHING_COLOR_AND_MATRIX,
			'mono'			: artoolkit.AR_TEMPLATE_MATCHING_MONO,
			'mono_and_matrix'	: artoolkit.AR_TEMPLATE_MATCHING_MONO_AND_MATRIX,
		}
		var detectionMode = detectionModes[_this.parameters.detectionMode]
		console.assert(detectionMode !== undefined)
		arController.setPatternDetectionMode(detectionMode);

		// setMatrixCodeType
		var matrixCodeTypes = {
			'3x3'		: artoolkit.AR_MATRIX_CODE_3x3,
			'3x3_HAMMING63'	: artoolkit.AR_MATRIX_CODE_3x3_HAMMING63,
			'3x3_PARITY65'	: artoolkit.AR_MATRIX_CODE_3x3_PARITY65,
			'4x4'		: artoolkit.AR_MATRIX_CODE_4x4,
			'4x4_BCH_13_9_3': artoolkit.AR_MATRIX_CODE_4x4_BCH_13_9_3,
			'4x4_BCH_13_5_5': artoolkit.AR_MATRIX_CODE_4x4_BCH_13_5_5,
		}
		var matrixCodeType = matrixCodeTypes[_this.parameters.matrixCodeType]
		console.assert(matrixCodeType !== undefined)
		arController.setMatrixCodeType(matrixCodeType);
J
Jerome Etienne 已提交
239 240 241

		// set the patternRatio for artoolkit
		arController.setPattRatio(_this.parameters.patternRatio);
J
Jerome Etienne 已提交
242

243 244 245 246 247 248
		// set thresholding in artoolkit
		// this seems to be the default
		// arController.setThresholdMode(artoolkit.AR_LABELING_THRESH_MODE_MANUAL)
		// adatative consume a LOT of cpu...
		// arController.setThresholdMode(artoolkit.AR_LABELING_THRESH_MODE_AUTO_ADAPTIVE)
		// arController.setThresholdMode(artoolkit.AR_LABELING_THRESH_MODE_AUTO_OTSU)
J
Jerome Etienne 已提交
249 250

		// notify
J
Jerome Etienne 已提交
251 252
                onCompleted()
        })
J
Jerome Etienne 已提交
253 254 255
	return this
}

J
Jerome Etienne 已提交
256 257 258
/**
 * return the projection matrix
 */
J
Jerome Etienne 已提交
259
ARjs.Context.prototype.getProjectionMatrix = function(srcElement){
J
Jerome Etienne 已提交
260 261


J
Jerome Etienne 已提交
262 263
// FIXME rename this function to say it is artoolkit specific - getArtoolkitProjectMatrix
// keep a backward compatibility with a console.warn
J
Jerome Etienne 已提交
264

J
Jerome Etienne 已提交
265 266 267 268
	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();
J
Jerome Etienne 已提交
269 270
	var projectionMatrix = new THREE.Matrix4().fromArray(projectionMatrixArr)

J
Jerome Etienne 已提交
271
	// apply context._axisTransformMatrix - change artoolkit axis to match usual webgl one
272
	projectionMatrix.multiply(this._artoolkitProjectionAxisTransformMatrix)
J
Jerome Etienne 已提交
273

J
Jerome Etienne 已提交
274 275 276 277
	// return the result
	return projectionMatrix
}

J
Jerome Etienne 已提交
278
ARjs.Context.prototype._updateArtoolkit = function(srcElement){
J
Jerome Etienne 已提交
279 280
	this.arController.process(srcElement)
}
J
Jerome Etienne 已提交
281

J
Jerome Etienne 已提交
282
//////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
283
//		aruco specific
J
Jerome Etienne 已提交
284
//////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
285
ARjs.Context.prototype._initAruco = function(onCompleted){
J
Jerome Etienne 已提交
286
	this.arucoContext = new THREEx.ArucoContext()
J
Jerome Etienne 已提交
287

J
Jerome Etienne 已提交
288 289 290
	// honor this.parameters.canvasWidth/.canvasHeight
	this.arucoContext.canvas.width = this.parameters.canvasWidth
	this.arucoContext.canvas.height = this.parameters.canvasHeight
J
Jerome Etienne 已提交
291

J
Jerome Etienne 已提交
292 293 294 295 296
	// honor this.parameters.imageSmoothingEnabled
	var context = this.arucoContext.canvas.getContext('2d')
	// context.mozImageSmoothingEnabled = this.parameters.imageSmoothingEnabled;
	context.webkitImageSmoothingEnabled = this.parameters.imageSmoothingEnabled;
	context.msImageSmoothingEnabled = this.parameters.imageSmoothingEnabled;
J
Jerome Etienne 已提交
297 298
	context.imageSmoothingEnabled = this.parameters.imageSmoothingEnabled;

J
Jerome Etienne 已提交
299

J
Jerome Etienne 已提交
300
	setTimeout(function(){
J
Jerome Etienne 已提交
301
		onCompleted()
J
Jerome Etienne 已提交
302
	}, 0)
J
Jerome Etienne 已提交
303 304
}

J
Jerome Etienne 已提交
305

J
Jerome Etienne 已提交
306
ARjs.Context.prototype._updateAruco = function(srcElement){
J
Jerome Etienne 已提交
307 308 309 310
	// console.log('update aruco here')
	var _this = this
	var arMarkersControls = this._arMarkersControls
        var detectedMarkers = this.arucoContext.detect(srcElement)
J
Jerome Etienne 已提交
311

J
Jerome Etienne 已提交
312 313 314
	detectedMarkers.forEach(function(detectedMarker){
		var foundControls = null
		for(var i = 0; i < arMarkersControls.length; i++){
J
Jerome Etienne 已提交
315
			console.assert( arMarkersControls[i].parameters.type === 'barcode' )
J
Jerome Etienne 已提交
316 317 318 319 320 321 322 323
			if( arMarkersControls[i].parameters.barcodeValue === detectedMarker.id ){
				foundControls = arMarkersControls[i]
				break;
			}
		}
		if( foundControls === null )	return

		var tmpObject3d = new THREE.Object3D
J
Jerome Etienne 已提交
324
                _this.arucoContext.updateObject3D(tmpObject3d, foundControls._arucoPosit, foundControls.parameters.size, detectedMarker);
J
Jerome Etienne 已提交
325 326
		tmpObject3d.updateMatrix()

J
Jerome Etienne 已提交
327
		foundControls.updateWithModelViewMatrix(tmpObject3d.matrix)
J
Jerome Etienne 已提交
328 329 330
	})
}

J
Jerome Etienne 已提交
331
//////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
332
//		tango specific
J
Jerome Etienne 已提交
333
//////////////////////////////////////////////////////////////////////////////
J
Jerome Etienne 已提交
334
ARjs.Context.prototype._initTango = function(onCompleted){
J
Jerome Etienne 已提交
335 336
	var _this = this
	// check webvr is available
J
Jerome Etienne 已提交
337
	if (navigator.getVRDisplays){
J
Jerome Etienne 已提交
338
		// do nothing
J
Jerome Etienne 已提交
339
	} else if (navigator.getVRDevices){
J
Jerome Etienne 已提交
340 341 342 343 344 345 346 347
		alert("Your browser supports WebVR but not the latest version. See <a href='http://webvr.info'>webvr.info</a> for more info.");
	} else {
		alert("Your browser does not support WebVR. See <a href='http://webvr.info'>webvr.info</a> for assistance.");
	}


	this._tangoContext = {
		vrDisplay: null,
348
		vrPointCloud: null,
J
Jerome Etienne 已提交
349 350
		frameData: new VRFrameData(),
	}
J
Jerome Etienne 已提交
351

J
Jerome Etienne 已提交
352 353

	// get vrDisplay
J
Jerome Etienne 已提交
354
	navigator.getVRDisplays().then(function (vrDisplays){
J
Jerome Etienne 已提交
355
		if( vrDisplays.length === 0 )	alert('no vrDisplays available')
356
		var vrDisplay = _this._tangoContext.vrDisplay = vrDisplays[0]
J
Jerome Etienne 已提交
357

358 359
		console.log('vrDisplays.displayName :', vrDisplay.displayName)

360 361 362 363
		// init vrPointCloud
		if( vrDisplay.displayName === "Tango VR Device" ){
                	_this._tangoContext.vrPointCloud = new THREE.WebAR.VRPointCloud(vrDisplay, true)
		}
364 365

		// NOTE it doesnt seem necessary and it fails on tango
366 367
		// var canvasElement = document.createElement('canvas')
		// document.body.appendChild(canvasElement)
J
Jerome Etienne 已提交
368
		// _this._tangoContext.requestPresent([{ source: canvasElement }]).then(function(){
369 370
		// 	console.log('vrdisplay request accepted')
		// });
371

J
Jerome Etienne 已提交
372
		onCompleted()
J
Jerome Etienne 已提交
373
	});
J
Jerome Etienne 已提交
374 375
}

J
Jerome Etienne 已提交
376

J
Jerome Etienne 已提交
377
ARjs.Context.prototype._updateTango = function(srcElement){
J
Jerome Etienne 已提交
378 379 380 381
	// console.log('update aruco here')
	var _this = this
	var arMarkersControls = this._arMarkersControls
	var tangoContext= this._tangoContext
382
	var vrDisplay = this._tangoContext.vrDisplay
J
Jerome Etienne 已提交
383 384

	// check vrDisplay is already initialized
385 386 387
	if( vrDisplay === null )	return


388 389 390 391
        // Update the point cloud. Only if the point cloud will be shown the geometry is also updated.
	if( vrDisplay.displayName === "Tango VR Device" ){
	        var showPointCloud = true
		var pointsToSkip = 0
J
Jerome Etienne 已提交
392
	        _this._tangoContext.vrPointCloud.update(showPointCloud, pointsToSkip, true)
393
	}
J
Jerome Etienne 已提交
394

J
Jerome Etienne 已提交
395 396

	if( this._arMarkersControls.length === 0 )	return
J
Jerome Etienne 已提交
397 398

	// TODO here do a fake search on barcode/1001 ?
J
Jerome Etienne 已提交
399 400

	var foundControls = this._arMarkersControls[0]
J
Jerome Etienne 已提交
401

J
Jerome Etienne 已提交
402 403 404
	var frameData = this._tangoContext.frameData

	// read frameData
405
	vrDisplay.getFrameData(frameData);
J
Jerome Etienne 已提交
406

407 408 409
	if( frameData.pose.position === null )		return
	if( frameData.pose.orientation === null )	return

J
Jerome Etienne 已提交
410
	// create cameraTransformMatrix
J
Jerome Etienne 已提交
411 412
	var position = new THREE.Vector3().fromArray(frameData.pose.position)
	var quaternion = new THREE.Quaternion().fromArray(frameData.pose.orientation)
J
Jerome Etienne 已提交
413
	var scale = new THREE.Vector3(1,1,1)
J
Jerome Etienne 已提交
414 415
	var cameraTransformMatrix = new THREE.Matrix4().compose(position, quaternion, scale)
	// compute modelViewMatrix from cameraTransformMatrix
J
Jerome Etienne 已提交
416
	var modelViewMatrix = new THREE.Matrix4()
J
Jerome Etienne 已提交
417
	modelViewMatrix.getInverse( cameraTransformMatrix )
J
Jerome Etienne 已提交
418 419

	foundControls.updateWithModelViewMatrix(modelViewMatrix)
J
Jerome Etienne 已提交
420

421
	// console.log('position', position)
J
Jerome Etienne 已提交
422
	// if( position.x !== 0 ||  position.y !== 0 ||  position.z !== 0 ){
423 424 425 426 427
	// 	console.log('vrDisplay tracking')
	// }else{
	// 	console.log('vrDisplay NOT tracking')
	// }

J
Jerome Etienne 已提交
428
}