15. June 2014 at 21:02 #1021
Hello! Thank you for this really nice piece of software. I like that everything is in one window. It feels like one strong piece of software that can accomplish many things at once. There are few errors that I’m encountering and I can’t find a solution for it. I have old .pde sketches made in processing that display correctly in Processing but when moved to Procoding they don’t display at all. The proportions of the size of the windows doesn’t match with the preview window and when I hit refresh it doesn’t load all the objects made. It is a really simple sketch without using any java libraries… so I can’t really find the reason behind it. Also another problem that I’m encountering is that I want to translate another .pde sketch which pulls references from other .pde sketches. I have moved them to the resources windows but no luck as of anything showing… I’m aware that the ‘demos’ brought with Procoding work fine. None of my sketches come close to the complexities of the demos.15. June 2014 at 22:18 #1022
glad to hear you like Procoding.
As for the size, this is easy to answer: the one and only difference from Procoding to processing.js is that you can omit the size() when you run your sketch in Procoding and it’ll be automatically full (window) size. Usually this kind of fullscreen behavior is otherwise pretty complicated to achieve. However, when you set the size explicitly, the rendering (not the canvas view) should reflect this size.
I’m contacting you by the e-mail address you provided. If you send me the sketch you’re having troubles with, I can take a look.
By the way: If you have Processing2 installed, you can also try to “run with processing-java”. Your sketch will compile and launch in Processing. This might help to nail down the error.
Michael16. June 2014 at 14:15 #1023
Also: always look at your error messages. It already tells you everything you need to know:
"Can't find variable: loadJSONObject".
As a sidenote: processing.js needs to preload images. You can drag the image from the resource folder into your code to see how it should be done. Also see the documentation at processingjs.org
Doing this with a png image in Processing in order to run that in a browser is a bit awkward.
2. The sketch “munecorojo_ventana” has a couple of issues (e.g. setting the size twice or setting a framerate for basic mode). The main issue and the reason you’re seeing a blank page is that procoding has only limited support for processing’s basic mode, because on touch devices we want a dynamic fullscreen which adapts to screen rotations. This creates a conflict with the basic mode. So, just switch to continuous mode. In other words: use
draw(). If you wrap your code inside those two functions, the sketch runs fine.
– Always read your error messages and the console log, fix your code until the errors disappear.
– Check if you have an #import statement. That’s a Processing library which won’t work for processing.js. Remove the library and all functions using it.
– Try “Run with processing-java” from within Procoding to see if it runs natively, this also gives you a couple of extra warnings and alerts. Fix your code until all warnings disappear.
– If you did all this and it still doesn’t work in Procoding you can contact me again with a detailed error description
Hope this helps!
Michael17. June 2014 at 18:42 #1025
Thank you! I will have a look at this. I’m still learning about the whole process… so its is great that you guide me through.18. June 2014 at 22:00 #1026
pablillo jose19. June 2014 at 1:02 #1027
The topic ‘Sketches not Translating Correctly to Procoding’ is closed to new replies.