Hey, 

I've been experimenting with newtonian, I love it, but I have a simple 
question, because I'm stuck

after adding some emitters 

[#newtonian.corporum.ParticleEmitter{:position #newtonian.utils.Vector2D{:x 
23.0, :y 280.0}, :velocity #newtonian.utils.Vector2D{:x 0.0, :y 10.0}, 
:size 8, :life -1, :spread 0.09817477042468103, :emission-rate 4} 
#newtonian.corporum.ParticleEmitter{:position #newtonian.utils.Vector2D{:x 
200.0, :y 280.0}, :velocity #newtonian.utils.Vector2D{:x 0.0, :y 10.0}, 
:size 8, :life -1, :spread 0.09817477042468103, :emission-rate 4}]


I want to dynamically change them but this seems to be inaccessible as an 
atom?

I can get to individual objects like 

(get (nth @newt/emitters 0) :position)  ==>   #newtonian.utils.Vector2D{:x 
23.0, :y 280.0}


but how can I swap the atom at Vector2D?


(swap! (get (nth @newt/emitters 0) :position) :x 200)  ==> java.lang.
ClassCastException: newtonian.utils.Vector2D cannot be cast to clojure.lang.
Atom core.clj:2233 clojure.core/swap!



Thank

On Sunday, August 26, 2012 8:48:03 PM UTC+2, Carlos Torres wrote:
>
> On Sunday, August 26, 2012 8:36:37 AM UTC-4, Sam Aaron wrote:
>>
>> Truly outstanding work! 
>>
>> Things like this really make me feel warm and fuzzy inside and more than 
>> justify all the hard work that goes into libraries like Quil. 
>>
>> Please keep making beautiful things. 
>>
>> Sam 
>>
>> --- 
>> http://sam.aaron.name 
>>
>
>
> You have done a wonderful job with Quil, Emacs Live, and Overtone. It was 
> pretty straight forward to do the rendering with Quil, if I would've been 
> using something else, like a plain old BufferedImage with JPanels and 
> JFrames, 
> or something similar, probably I would've never started it. 
>
> :) Thanks
>  
>
>>
>> On 26 Aug 2012, at 04:17, meteorfox <ctorresk8...@gmail.com> wrote: 
>>
>> > I've been working in a particle system using Quil for rendering, which 
>> I'm calling Newtonian for now ;) , just to practice some of the concepts of 
>> protocols and defrecords. The project is still WIP. Any feedback will be 
>> appreciate it. 
>> > 
>> > github.com: 
>> > https://github.com/meteorfox/newtonian 
>> > 
>> > Vimeo: (Warning: Looks choppy in the video, because the frame rate I 
>> used when I recorded it) 
>> > https://vimeo.com/48222827 
>> > 
>> > Thanks! 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "Clojure" group. 
>> > To post to this group, send email to clo...@googlegroups.com 
>> > Note that posts from new members are moderated - please be patient with 
>> your first post. 
>> > To unsubscribe from this group, send email to 
>> > clojure+u...@googlegroups.com 
>> > For more options, visit this group at 
>> > http://groups.google.com/group/clojure?hl=en 
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to