CraftSceneInator - simple tool for setting up a Craft scene

I’m just sharing simple little projects that save me time.

I can’t count the times I’ve written the code to set up a scene, add an OrbitViewer, and set the colors for the sky and horizon and ground.

It’s not very much code at all, but I just thought it would be nice not to have to write it anymore, so here’s a class that does it all automatically.

Optionally it shows parameter controls for adjusting the environment colors during runtime.

Hah that’s really cool!

@UberGoober - that’s very neat will add your class to my utilities library. Thanks.

@Simeon thanks!

Um hey if you can spare a second can you please please tell me if there is syntax for setting and reading the automatic variable buffers in Craft shaders?

It seems like like the lassssst piece of the puzzle for converting the old mesh shaders into craft shaders.


@Simeon - just loaded up 3.5 and tried to run CraftSceneInator() from @UberGoober. First thing I find 3.5 a little slow, and with CraftSceneInator() it throws up an initial error relating to the assert() command which carries a parameter in addition to the comment. Followed by an error relating to no Craft.scene available. Commenting out the assert line runs the code correctly. Also after restarting the Codea the speed of operation had increased and was smoother.

@Bri_G thanks for helping!!

Can you tell me how to reproduce this—I’m not getting any error?

Do I need to change my code?

@UberGoober - have you installed 3.5 yet ?

@Bri_G I ran CraftSceneInator. I get the Cameras error even though Cameras is checked as a dependency. If I comment out the assert line, it run OK. I’m on 3.5 . Not sure what it’s really supposed to do, but I don’t get any errors.

@dave1707 - good, you confirmed the dependecy issue. The slowness appeared after 3.5 installation, literally first run. After that it was fine in terms of speed. I may need to download the original again to check in case I made any changes. Thanks.

@dave1707 it just saves some steps in creating a scene with an OrbitViewer and having it not just be a black void.