We are about to switch to a new forum software. Until then we have removed the registration on this forum.
displayWidth and displayHeight are not allowed in Js? I tried pageX and pageY but no success... which parameters correspond to size of the window of browser?
Processing.JS (PJS) still uses the old Processing 1.5.1's screenWidth & screenHeight.
Although they don't mention that in the reference page: X(
It is not allowing me to use any kind of variable in the size()
I get this message :
If i ignore that msg and continue my page looks like this :
What should i do if i want to publish it such that it fits into all displays! I didn't get you @GoToLoop
I'm not knowledgeable enough in JS to pull that out but I know we'd need document.getElementById(""):
Read PJS' generated ".html" file and spot the id name used in the <canvas> tag there.
Gonna pass! :-S Let the user adjust his monitor! ~X(
Just stick w/ 800x600. It's pretty enough! :-\"
Will do! thanks anyway!
Later by perusing the ".html" source from: http://studio.processingtogether.com/sp/pad/export/ro.9Ql2E8JBC54LJ/latest
I've found out that its <canvas> tag doesn't define any pre-dimension properties:
Apart from the id, it's all empty! :O)
Perhaps that's the reason why it auto-adapts to the sketch's size()? :-?
Also its <script> tag got this strange property inside: data-processing-target="targetcanvas"
Which coincidentally matches the <canvas>'s id: "targetcanvas"! B-)
Maybe that's also an important configuration step for the whole thing to work out... :-B
I guess it's worth a try changing JS Mode's generated ".html" file to follow that model. ;;)