Realtime Three.js Coding
21–30 of 40 posts
Re: Realtime Three.js Coding
#22Though it's currently hard to do 3D, we have similar features in the Khan Academy CS section:
However, we don't restart the code from the beginning when you change something -- you'll notice that if you change the code in the linked page, the icosahedron jumps to a new angle, whereas with the KA environment, execution continues from the current state.
Re: Realtime Three.js Coding
#23I love it. Reminds me of the Hotswap feature in Eclipse which Notch seems to use a lot for building his games. I wish there was something like that for UILayer, UIView and OpenGL in Objective-C. I know about the REPL in RubyMotion, but it's Ruby and a REPL is still not the same as having a live preview of editor changes. I really hate the fix-compile-test workflow, and especially for layers and layer animations and s…
Hotswap is great for tweaking values/logic after you've nailed down your method flow but it can have negative effects as well which aren't immediately apparent. I've seen a few hunks of code end up overly complicated as the developer hit a point where they really needed to break the code into more methods but didn't since you can't Hotswap in new methods and they didn't want to wait for the app to restart.
I don't really know how you would do this with Objective-C as its compiling to machine instructions. It would be very tricky as you don't have the luxury of a VM that explicitly supports it running your code.
Re: Realtime Three.js Coding
#24I love it. Reminds me of the Hotswap feature in Eclipse which Notch seems to use a lot for building his games. I wish there was something like that for UILayer, UIView and OpenGL in Objective-C. I know about the REPL in RubyMotion, but it's Ruby and a REPL is still not the same as having a live preview of editor changes. I really hate the fix-compile-test workflow, and especially for layers and layer animations and s…
What notch used is a step further. From what I get this page simply "refreshes" the code and starts the execution anew. Notch is actually hot-swapping code, for example the code in the update function of the game, leaving the game state intact. If he wants to test a change in the init code for example, he would need to restart the program. Either way, very cool way to play around with three.js without having to switc…
Re: Realtime Three.js Coding
#25Re: Realtime Three.js Coding
#26(Shameless self-promotion:) Though it's currently hard to do 3D, we have similar features in the Khan Academy CS section: http://www.khanacademy.org/cs However, we don't restart the code from the beginning when you change something -- you'll notice that if you change the code in the linked page, the icosahedron jumps to a new angle, whereas with the KA environment, execution continues from the current state.
Re: Realtime Three.js Coding
#27(Shameless self-promotion:) Though it's currently hard to do 3D, we have similar features in the Khan Academy CS section: http://www.khanacademy.org/cs However, we don't restart the code from the beginning when you change something -- you'll notice that if you change the code in the linked page, the icosahedron jumps to a new angle, whereas with the KA environment, execution continues from the current state.
Maybe I should change the default code to use Date.now()? ;)
With our environment, you can interact with it and it'll maintain that state as well.
Re: Realtime Three.js Coding
#28Earlier quoted context omitted.
Maybe I should change the default code to use Date.now()? ;)
That would certainly give the proper illusion. :) With our environment, you can interact with it and it'll maintain that state as well.
Re: Realtime Three.js Coding
#29Re: Realtime Three.js Coding
#30Earlier quoted context omitted.
That would certainly give the proper illusion. :) With our environment, you can interact with it and it'll maintain that state as well.
In John's post he mentions that doing hotswapping is very hard, but that hasn't been my experience so far. Can you by chance expound a bit on what makes/made it so difficult?
I'll let John write up the details in a future blog post, but mostly there are a lot of strange edge cases and problems that have to deal with maintaining closures, etc.