webarkit / ARnft

A small javascript library for WebAR with NFT
GNU Lesser General Public License v3.0
219 stars 54 forks source link

Check if `this.video` is correct #295

Open kalwalt opened 2 years ago

kalwalt commented 2 years ago

Inside the CameraViewRenderer (getImage and image getter) there is a reference to this.video:

https://github.com/webarkit/ARnft/blob/5a669820c6ea8fe088a344492bff14592dc201d3/src/renderers/CameraViewRenderer.ts#L122 and: https://github.com/webarkit/ARnft/blob/5a669820c6ea8fe088a344492bff14592dc201d3/src/renderers/CameraViewRenderer.ts#L138

but video is not declared or defined in the class, we have only the _video member: https://github.com/webarkit/ARnft/blob/5a669820c6ea8fe088a344492bff14592dc201d3/src/renderers/CameraViewRenderer.ts#L55 We need to check the correctness of this and if this may lead to some bugs.

kalwalt commented 2 years ago

To be clear this.video is the getters defined here https://github.com/webarkit/ARnft/blob/5a669820c6ea8fe088a344492bff14592dc201d3/src/renderers/CameraViewRenderer.ts#L99-L101 I'm wondering if this make sense or not. Could we get the _video (private) directly?