Most active commenters

    Show HN: Boing

    (boing.greg.technology)
    193 points gregsadetsky | 38 comments | | HN request time: 0.664s | source | bottom
    1. satvikpendem ◴[] No.46093644[source]
    Very fun and nostalgic. The head of the boinger doesn't seem to exactly follow the cursor/finger however, at least on mobile, it always arcs.
    2. prodigycorp ◴[] No.46093742[source]
    i love this. it reminds me of simpler times when we’d have iphone apps/games that would explore a single mechanic and implement it really well.
    3. ethmarks ◴[] No.46093800[source]
    I noticed that the boing sound gets deeper and lower with smaller-magnitude boings. Is the boing audio generated procedurally/realistically in response to the physics of the boing, or is just playing a premade boing sound effect that's dynamically pitch shifted?
    replies(1): >>46093938 #
    4. catapart ◴[] No.46093871[source]
    fantasitic
    5. junon ◴[] No.46093925[source]
    Love this. Had to cheat, naturally.

        setInterval(()=>{const canvas=document.getElementById('canvas');const startX=266;const startY=198;const rect=canvas.getBoundingClientRect();const startClientX=rect.left+startX;const startClientY=rect.top+startY;let endClientX,endClientY,distance;do{endClientX=Math.random()*window.innerWidth;endClientY=Math.random()*window.innerHeight;const dx=endClientX-startClientX;const dy=endClientY-startClientY;distance=Math.sqrt(dx*dx+dy*dy)}while(distance<25);const dispatchMouseEvent=(type,target,clientX,clientY)=>{const event=new MouseEvent(type,{view:window,bubbles:true,cancelable:true,clientX:clientX,clientY:clientY,screenX:clientX+window.screenX,screenY:clientY+window.screenY,buttons:type==='mouseup'?0:1,button:0});target.dispatchEvent(event)};dispatchMouseEvent('mousedown',canvas,startClientX,startClientY);setTimeout(()=>{dispatchMouseEvent('mousemove',window,endClientX,endClientY);setTimeout(()=>{dispatchMouseEvent('mouseup',window,endClientX,endClientY)},1);},1);},1);
    replies(3): >>46094346 #>>46094456 #>>46094585 #
    6. cr125rider ◴[] No.46093928[source]
    Oh random Flash apps, how I miss you
    replies(1): >>46094579 #
    7. junon ◴[] No.46093938[source]
    The original is pretty low, it appears to be sped up. Check the network panel.
    8. supareya ◴[] No.46093951[source]
    Hi
    9. modeless ◴[] No.46093969[source]
    I would love to see an accurately simulated version of this, à la https://www.engine-sim.parts/
    10. karanveer ◴[] No.46094055[source]
    so satisfying.
    11. ____tom____ ◴[] No.46094069[source]
    There seems to be a minor bug. When I switch tabs and come back, sometimes the spring is moving. Some times a small amount, and other times it appears to be streched to the max, and extending off the top and bottom of the screen, until it calms down.

    Safari, Mac.

    replies(1): >>46094135 #
    12. qwertytyyuu ◴[] No.46094089[source]
    As a phone user, I hate you, I hate how good this is. That counter is just mocking me.
    13. bitcrshr ◴[] No.46094111[source]
    I needed this. Thank you.
    14. mg ◴[] No.46094135[source]
    I just wanted to write about a similar observation when using it in FireFox on Linux:

    When wiggle the spring, keep the mouse inside the white area until it is at rest, press CTRL+u to see the source code, move the mouse to close the source code tab and close it - for some magical reason the spring is moving again for a little bit.

    15. johnwheeler ◴[] No.46094239[source]
    Most excellent.
    16. TheAceOfHearts ◴[] No.46094243[source]
    Any consideration on sharing the unminified code? I was a bit curious to read through the code and it seems like such a shame to keep it obfuscated. From a quick perusal, it seems like the bulk of the code comes from howler.js (a sound library), and the core functionality is conveniently implemented below the mobile template.
    replies(2): >>46094464 #>>46094608 #
    17. thenthenthen ◴[] No.46094288[source]
    Can we add accelerometer support? :D
    18. Quizzical4230 ◴[] No.46094303[source]
    Love this! It's highly addictive. (No guilt)
    19. dfex ◴[] No.46094308[source]
    Finally!

    Time to recreate the classic: https://www.youtube.com/shorts/pTgJaJYHIAs

    20. 29athrowaway ◴[] No.46094312[source]
    I noticed that the sound changes depending on how you interact with it. Neat
    21. rezmason ◴[] No.46094314[source]
    There goes my evening.
    22. abhinavsns ◴[] No.46094335[source]
    There seems to be a bug. If I catch it mid boing, the sound doesn't stop.
    23. jesse__ ◴[] No.46094344[source]
    boingboingboing
    24. jesse__ ◴[] No.46094346[source]
    take my upvote. That's hilarious
    25. sam-cop-vimes ◴[] No.46094365[source]
    I wasn't hearing the sound initially so I thought it wasn't working in Firefox. Put the sound all the way up and boinged again. Made me jump out of my seat. Hilarious :-)
    26. cons0le ◴[] No.46094421[source]
    Finally something I actually want to pay for!! Give us a premium tier with exclusive boingers plz
    27. gnarlouse ◴[] No.46094432[source]
    Is this physics based audio?
    28. ngkw ◴[] No.46094456[source]
    I love this.
    29. sixtyj ◴[] No.46094464[source]
    Online unminifier doesn’t work? E.g. https://www.unminify2.com/
    30. ◴[] No.46094466[source]
    31. aetherspawn ◴[] No.46094557[source]
    The sound is not physics based, the boing sound keeps going if you grab the head, likewise sometimes the sound ends before the vibration finishes.
    32. OuterVale ◴[] No.46094564[source]
    This is the natural thing to make with this tool: https://youtube.com/watch?v=5VGLPP70Xtw
    33. ramnik10 ◴[] No.46094569[source]
    I liked it, would love to code it
    34. victorbuilds ◴[] No.46094579[source]
    Recreated a kids version on Codorex:

    https://codorex.com/shared/Ko4qJfnIKEjxDwqN2NAGueqWxYJFiz1F

    35. meesles ◴[] No.46094585[source]
    BoingBoingBoingBoingBoing
    36. coffeecoders ◴[] No.46094608[source]
    Looks like a simple exponential drag/sprint-return simulation using requestAnimationFrame.

    Here is AI's implementation. https://jsfiddle.net/z0or7d2y/1/

    37. coffeecoders ◴[] No.46094630[source]
    Funny thing: this feels "realistic" because it’s not perfect physics. A perfectly simulated Hooke's law spring actually looks fake and too stiff. But if you let the animation wobble a bit more and slow down the damping, our brain reads it as weight and squishiness.

    It’s basically controlled sloppiness.