Lurker News

Comments (277) 139 threads

Earlier comments
modeless#
Reminds me of the classic "powers of 10" video: https://youtu.be/0fKBhvDjuy0. Someone ought to remake that but as a gaussian splat reconstruction, so you can freely move the camera as well as zoom.
hermitcrab1 reply#
Great job.

I did a side project that helps with comparisons, but in a rather different way (e.g. how many African elephants does something weigh). Not as slick as this site, but someone might find it useful:
http://howmanyelephants.co.uk/

mncharity1 reply#
Nice. Two quick UI thoughts. Upon loading, perhaps start with some unit selected, and a default amount 1, so there's immediate content to be seen? And to extend the experience, maybe add a "dice roll" button, so users can "see more neat things" click-click-click without the cognitive overhead of pathing the option space
hermitcrab#
That is a possibility, thanks.
p1nkpineapple#
Absolutely loved that the intensity of the music is synced with the swiping. Fantastic job as always!
kayge1 reply#
If anyone wants to set this up to auto-run all the way to the right and then all the way back to the left, here is a vibe-coded (sorry) browser console script. Makes a great "screen-saver" if you kick off the script and then put your browser in full screen mode :)

    (function() {
        let direction = 'right'; // Start by going right
        let intervalId;

        function getCurrentAnimalName() {
            const animalDiv = document.querySelector('.animal-name');
            return animalDiv ? animalDiv.textContent.trim() : '';
        }

        function pressKey(keyCode) {
            const event = new KeyboardEvent('keydown', {
                key: keyCode === 37 ? 'ArrowLeft' : 'ArrowRight',
                keyCode: keyCode,
                code: keyCode === 37 ? 'ArrowLeft' : 'ArrowRight',
                which: keyCode,
                bubbles: true
            });
            document.dispatchEvent(event);
        }

        function autoScroll() {
            const currentName = getCurrentAnimalName();

            if (direction === 'right') {
                pressKey(39); // Right arrow

                if (currentName === 'Pando Clone') {
                    console.log('Reached Pando Clone, switching to left');
                    direction = 'left';
                }
            } else {
                pressKey(37); // Left arrow

                if (currentName === 'DNA') {
                    console.log('Reached DNA, switching to right');
                    direction = 'right';
                }
            }
        }

        // Start the interval
        intervalId = setInterval(autoScroll, 3000);

        // Log start message and provide stop function
        console.log('Auto-scroll started! To stop, call: stopAutoScroll()');

        // Expose stop function globally
        window.stopAutoScroll = function() {
            clearInterval(intervalId);
            console.log('Auto-scroll stopped');
        };
    })();
ekipan1 reply#
Cannot stand robot code. Thanks for the genuinely cool thing though. I hope you don't mind me rewriting, if only for my own satisfaction.

  {
    const s = window.scroller = {}
    const press = (key, code) => () =>
      document.dispatchEvent(new KeyboardEvent('keydown', {
        key: key, keyCode: code,
        which: key, code: code, bubbles: true
      }));
    const step = () => {
      const div = document.querySelector('.animal-name')
      const name = div?.textContent.trim()
      if (name === 'Pando Clone') s.dir = s.left
      if (name === 'DNA') s.dir = s.right
      s.dir()
    }
    s.left = press(37, 'ArrowLeft')
    s.right = s.dir = press(39, 'ArrowRight')
    s.start = (ms) => s.ival = setInterval(step, ms)
    s.stop = () => clearInterval(s.ival)
  }
  scroller.start(5000)
kayge1 reply#
I don't mind at all, your rewrite looks much more elegant. Thanks!
ekipan#
You could try posting both at the LLM and ask it to explain the stuff I changed, if you're interested in learning more Javascript. Assuming you aren't already deep in the JS trenches and only vibed bc you couldn't be bothered.

Load more comments