AR.js-threejs
AR.js-threejs copied to clipboard
Removing inject `_this` object.
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:
https://github.com/AR-js-org/AR.js-threejs/blob/9c8e08bac13f921d513c91451a32fcd006a32715/src/ArToolkitContext.ts#L138
and then after:
https://github.com/AR-js-org/AR.js-threejs/blob/9c8e08bac13f921d513c91451a32fcd006a32715/src/ArToolkitContext.ts#L144-L153
maybe we can rewrite these functions?
maybe intead of using the _this variable trick we can use bind() ?