Hacker News new | past | comments | ask | show | jobs | submit | rustystump's comments login

I tested this on safari and chrome + mobile but not the fox as I rarely use it. I know that ff is more common in the dev world so on the next toy I will be sure to give things a whirl there too.

For ref, I didn't test this on windows, linux, or android nor the browser combos within.



i love gp. this one almost didn't fit on it because I wanted to serve a small db file to the client rather pay for remote. Luckily I was able to keep it under their pretty generous file limit.

https://github.com/dgerrells/liftme

https://dgerrells.github.io/liftme/


Fantastic work. You have many other hidden gems on your site I'd recommend people read too.


nothing to see here...


I'm honored


Done. Let me know if it works.


Sorry for the late reply. I just tried and it works perfectly! Thank you so much!


I was thinking SDFs and the Bill stuff at time of writing. Read my mind.

Have to add work by Evan Wallace here too as he is a legend.

https://madebyevan.com/shaders/fast-rounded-rectangle-shadow... https://madebyevan.com/webgl-path-tracing/


<3


Was confused because everything moved in 2 seconds per frame on M2 Firefox.

Switched to Chrome - suddenly everything is butter smooth.

Congrats on an article very well done!


I dig this. I use mdx which I like but it doesn't play well with nextjs which I don't like.

Is there a way to try this out outside of mdxish.com? How would library imports work?


Absolutely!

In the repo I included a video where I do exactly that - you can either run a local live server that keeps the output html up to date, or you can do a one-off conversion (a command for each).

To import a whole script / library, you can either include it in `scripts` in the configuration at the top, or use a script tag like `<script src="mylib.js"></script>` or similar.

To import specific things from a script with exports you just:

    ```javascript
    // @run type="module"
    import { foo } from "./foo.js";
    console.log(foo);
    ```
The @run comment accepts any number of attributes after `// @run` which will be set on the script node.

or you can always eject and use inline html if needed.

    <script type="module">
        import { foo } from "./foo.js";
        console.log(foo);
    </script>
The drawback is markdown editors, previews, etc. tend to play much more nicely with markdown code blocks.

If you decide (or need to) use `type="module"` each script / block is isolated apart from `window`.


awesome thanks!


Awesome! I am impressed you dug that deep into the code.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: