Skip to content

Commit 23f5081

Browse files
committed
Allow options from static initializers
1 parent 8c2039b commit 23f5081

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ARController.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,20 @@ export default class ARController {
108108
// static initializers
109109
//----------------------------------------------------------------------------
110110

111-
static async initWithDimensions(width, height, cameraParam) {
111+
static async initWithDimensions(width, height, cameraParam, options) {
112112

113113
// directly init with given width / height
114-
const controller = new ARController(width, height, cameraParam);
114+
const controller = new ARController(width, height, cameraParam, options);
115115
return await controller._initialize();
116116
}
117117

118-
static async initWithImage(image, cameraParam) {
118+
static async initWithImage(image, cameraParam, options) {
119119

120120
// get width / height from image / video
121121
const width = image.videoWidth || image.width;
122122
const height = image.videoHeight || image.height;
123123

124-
const controller = await ARController.initWithDimensions(width, height, cameraParam);
124+
const controller = await ARController.initWithDimensions(width, height, cameraParam, options);
125125
controller.image = image;
126126
return controller;
127127
}
@@ -506,8 +506,8 @@ export default class ARController {
506506
* @param {Object} event Event to dispatch.
507507
*/
508508
dispatchEvent(event) {
509-
console.log('Dispatched event');
510-
console.log(event);
509+
//console.log('Dispatched event');
510+
//console.log(event);
511511
let listeners = this.listeners[event.name];
512512
if(listeners) {
513513
for(let i = 0; i < listeners.length; i++) {

0 commit comments

Comments
 (0)