1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

setup(), draw() should work for non-animations

Posted by Stu on Sep 07, 2009

If I put
speed() in setup() then draw() is never called.

Also, it would be nice to be able to use
setup()
draw()

For non animations and have it work, like shoebot


 
Posted by Stefan on Sep 07, 2009

speed() should be called outside of setup.

This is how it works:
- first nodebox runs the entire script
- speed() triggers a command so it knows we're dealing with animation, a flag is set for this

If the speed flag is set:
- setup() routine gets called once
- draw() routine gets called at interval time depending on the given speed

Also, I'm not sure why you would want this for non-animations, what purpose would there be?

KR,
Stefan



Posted by Tom De Smedt on Sep 08, 2009

We could fix that for the purpose of getting shoebot and nodebox on the level - but that means changes in the more esoteric parts of the nodebox core, and there are other important things to do as well right now.

Stu, if you feel this is an important issue you are welcome to provide us with a patch, otherwise it will have to wait for a little while.

Best,
Tom