Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntf examples when size is fullscreen, fps drops very low #98

Open
albjeremias opened this issue May 7, 2020 · 5 comments
Open

ntf examples when size is fullscreen, fps drops very low #98

albjeremias opened this issue May 7, 2020 · 5 comments

Comments

@albjeremias
Copy link

albjeremias commented May 7, 2020

When the container variable is not resized to fit the resolution of the webcam video, then the fps drop to very low, you can just comment this 2 lines:

container.style.width = sw + "px";
container.style.height = sh + "px";

I also changed the lines in css of the size of the canvas where everything is draw, and it affected the fps!

width: 100%;
height: 100%;

to:

  width: 800px;
  height: 800px;

I also need a better understand of the canvas_process and the pscale and sscale and why the projection matrix is being multiplied by this ratio.. looks so complicated the way its done.. is this ratioW, ratioH just the ratio between the size of the image of the camera, and the output of the canvas?

@albjeremias
Copy link
Author

Ok, let me bump this... with another question.. what is ratioW and ratioH ? it seems that this values are calculated in a very "hardcoded" way.. with 4/3 ratios and with 320

thanks in advance :)

@kalwalt
Copy link

kalwalt commented May 19, 2020

@albjeremias You should read carefully this PR kalwalt#3 in particular see this comment kalwalt#3 (comment) and the main PR with all discussion kalwalt#1, Plus i think you will found other useful infos in other PR's in my repository. Hope that this will help you...

@albjeremias
Copy link
Author

albjeremias commented May 20, 2020

it also affects this: kalwalt#39 if i find more stuff.. i will edit this reply. it seems to be solved on arjs... i can see the nft tracking in fullscreen..

https://github.com/AR-js-org/AR.js/blob/master/three.js/src/threex/threex-armarkercontrols-nft-start.js#L287

@misdake
Copy link

misdake commented May 21, 2020

ox, oy, pscale & sscale:

1

ratioW & ratioH:

2

@albjeremias
Copy link
Author

thats so cool! <3 thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants