In various part of the code we can found var _this = this because otherwise the this object is unvailable, because the use of nested functions example in ArToolkitContext in the init function:
and then after:
|
function done() { |
|
// dispatch event |
|
_this.dispatchEvent({ |
|
type: "initialized", |
|
}); |
|
|
|
_this.initialized = true; |
|
|
|
onCompleted && onCompleted(); |
|
} |
maybe we can rewrite these functions?
In various part of the code we can found
var _this = thisbecause otherwise thethisobject is unvailable, because the use of nested functions example in ArToolkitContext in the init function:AR.js-threejs/src/ArToolkitContext.ts
Line 138 in 9c8e08b
and then after:
AR.js-threejs/src/ArToolkitContext.ts
Lines 144 to 153 in 9c8e08b
maybe we can rewrite these functions?