Earlier quoted context omitted.
No I really mean low level :-) Javascript is high level, but here notch is using it as a low level framebuffer.
I respectfully disagree with your use of low level, though I do understand your analogy about the pixelbuffer being like a frame buffer. But he's actually using Javascript arrays which can get passed around inside a javascript VM, and do not have a set size. Not very "low level". I spent a moment and changed the arrays to Float32Arrays which have set sizes and sit in memory without being fucked with by the VM and spe…
Notch trying jsFiddle
91–100 of 143 posts
Re: Notch trying jsFiddle
#92Re: Notch trying jsFiddle
#93Such a great example of what can be done in javascript/canvas. As it is, I was completely blown away by how little code it actually took to do that. My only gripe would be, why couldn't he have used descriptive variable names, so I can better go through and understand it? :-)
This code uses zero canvas / javascript specific functions. It is using basic trigonometric functions and is using canvas only to write RGB pixels. Canvas are much more powerful and high level than that, but this is not a good example as Notch just needed to set pixels.
Re: Notch trying jsFiddle
#94Obligatory flash port: http://wonderfl.net/c/sqL5
Re: Notch trying jsFiddle
#95Such a great example of what can be done in javascript/canvas. As it is, I was completely blown away by how little code it actually took to do that. My only gripe would be, why couldn't he have used descriptive variable names, so I can better go through and understand it? :-)
This code uses zero canvas / javascript specific functions. It is using basic trigonometric functions and is using canvas only to write RGB pixels. Canvas are much more powerful and high level than that, but this is not a good example as Notch just needed to set pixels.
Re: Notch trying jsFiddle
#96Earlier quoted context omitted.
Nice :) Shows you how fast ARM is progressing...
But only 4-5 fps on my iPad 3. Hmmmph, thought that'd be faster.
Re: Notch trying jsFiddle
#97Re: Notch trying jsFiddle
#98Earlier quoted context omitted.
No I really mean low level :-) Javascript is high level, but here notch is using it as a low level framebuffer.
I respectfully disagree with your use of low level, though I do understand your analogy about the pixelbuffer being like a frame buffer. But he's actually using Javascript arrays which can get passed around inside a javascript VM, and do not have a set size. Not very "low level". I spent a moment and changed the arrays to Float32Arrays which have set sizes and sit in memory without being fucked with by the VM and spe…
Re: Notch trying jsFiddle
#99Earlier quoted context omitted.
Thanks for the livecoding link. I assume there's some overhead in constantly checking for and applying code changes - that's probably the reason for the lower frame rate.
Good point, I hadn't thought about the fact they might be polling for changes. Might be better if livecoding used an event based model to check for updates...
Re: Notch trying jsFiddle
#100I've recorded a screencast that digs into how the programmatic texture generation works in this code: https://www.youtube.com/watch?v=WaZvDCmlERc