Cadice: Vramana: just use recursion: callOnNthCall = n, f = .args = n === 0? f.args : callOnNthCalln – 1, f
Tongate: What is the opposite of the some array method? to return early if value is false
Zukoski: For loop! http://jsbin.com/qapilofesa/1/edit?js,console
Stuchlik: What would be a sensible approach to stop something glueing / jittery into the bottom of the screen due to gravity and velocity? Here’s a video http://sendvid.com/9x7024xw , go straight to 20 seconds as I had to wait for the thing to happen.
Laughery: Baxx, you want it to just stop moving when the speed is slow?
Kuchel: Or just the vertical movement?
Stuchlik: Schaetzle: I was thinking that the vertical movement should stop – then maybe I can apply friction for the vx stuff. I tried to set p.vy to 0 if it was beneath a certain value, but it didn’t seem to work
Stuchlik: I thought maybe there was a common practice to something like this that I was unaware of
Hermida: That’s what I would have recommended :/
Mccament: Maybe look for a math, physics, or game dev channel
Stuchlik: Oh, well, Im happy I thought of a potential recommendation ha, i’ll bank that for now :
Stuchlik: I probably implemented it wrong ; I’ll have another look
Stuchlik: I’ve changed the edge detection a bit – I’ve set it to that if the ball exceeds the wdth / height etc the position is reset rather than just reversing the velocity, this seems to be better
Fosso: Did you also set p.y to 0?
Stuchlik: If p.x width – p.radius {
Stuchlik: P.x = width – p.radius;
Klahr: If it’s on the ground and has no velocity it should rest
Stuchlik: Sorry to block comment there – thats the makeup of the edge detection at the mo though
Stuchlik: Applied to the four sides
Stuchlik: I’m not following that
Hervert: At least for the bottom edge detection
Stuchlik: Sorry this was just for the first if which is exceeding width of screen, It would have made sense for me to post the one for the bottom if, but the logic is the same just – if p.y height – radius
Stuchlik: Thanks i’m doing something else now – just incase any help is offered on the previous thing
Videtto: Http://jsfiddle.net/Lq8900fk/18/ anyone have an idea why the array change doesn’t bubble up through the notifier?
Crawhorn: Sadtaco, I’d try SO for a question like that
Berney: Can’t remember the email for my SO account. lmao
Glymph: Baxx: do you want it to be realistic or no?
Pinales: If you want it to be realistic, you want to decrease the velocity by some drag coefficient
Dohan: Http://stackoverflow.com/questions/32514719/how-to-get-an-array-observe-change-to-notify-through-object-observes-listener anyone have an idea why the array change doesn’t bubble up through the notifier?
Scouten: Anyone know how to bind vega to the dom?
Limoges: If i say someObject.someFunc = function { } is there a way to make this inside of someFunc always refer to someObject?
Devalcourt: Dash: Yeah how would I do that in this case though. someObject.someFunc = function {}.bindthis ?
Longtin: Off topic: is there a politics/law channel on chat?
Jeffress: CustomerSupport: all of them
Jeffress: CustomerSupport: i especially recommend #python and #ubuntu
Perschall: Usually. when I looking for a channel about X, I tend to try #X and ##X
Alme: Try it, you might be lucky
Dafonseca: Http://stackoverflow.com/questions/32514719/how-to-get-an-array-observe-change-to-notify-through-object-observes-listener anyone have an idea why the array change doesn’t bubble up through the notifier?
Desue: Nvm it was working fine. Lol. :
Beatley: Er wait nvm looking at wrong hting
Yochum: I see the problem. The Object notifier doesn’t like the “type” that the Array change supplies.