jonobr1 / two.js

A renderer agnostic two-dimensional drawing api for the web.
https://two.js.org
MIT License
8.31k stars 455 forks source link

[Output] #573

Closed halaprop closed 2 years ago

halaprop commented 2 years ago

Hi - previously, you listed my 100% twojs Lunar Lander app as one of the projects. You are welcome to continue doing so, if you wish.

Can we showcase this on the Two.js site?

To be included for the Two.js site: We need an animated gif or still image at 286 x 200 px. Please attach an image to this ticket.

Feel free to use the one you have, or this one with any trimming as you see fit... luni

Feedback Anything you'd like to share with the Two.js team? Pros, cons, suggestions, praise? I just happened by the site recently and saw a vastly improved docs browser. Great that you added that!

Thank you for sharing!

jonobr1 commented 2 years ago

Thanks for re-sharing! We currently have shuttered the "Projects" section in favor of just adding examples that have code legible / shareable. If this project's source code is creative commons or open sourced so that others can read and use it, then I'd love to add it to the examples page with an updated image (at least 512px wide).

I would at some point like to bring back the projects section though.

Glad you like the new docs! Baby steps, but progress

halaprop commented 2 years ago

Thanks for getting back, and understood. I’m perfectly fine sharing the code, but (a) I don’t know the steps to signal that formally, and (b) I’d want to make sure I’m proud of the code.

I will research (a), review / tweak code for (b), and circle back.

Thanks!

PS. It’s been awhile, but the least elegant thing I remember in the code was managing the scene transform. It would be great to have a little higher-level support there, like a virtual camera, lookAt transform, etc.

On Dec 15, 2021, at 10:27 AM, Jono Brandel @.***> wrote:

Thanks for re-sharing! We currently have shuttered the "Projects" section in favor of just adding examples that have code legible / shareable. If this project's source code is creative commons or open sourced so that others can read and use it, then I'd love to add it to the examples page with an updated image (at least 512px wide).

I would at some point like to bring back the projects section though.

Glad you like the new docs! Baby steps, but progress

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jonobr1/two.js/issues/573#issuecomment-995057751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAK6XSWODO4VRGAR4OYW6DURDMYHANCNFSM5KB4H6TQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

halaprop commented 2 years ago

Hi Jono -

Feel free to mention this on your site as you see fit. I decided to clean up the code a little before putting on a public repo and ended up changing more than I anticipated, but I’ve got a decent copy here, on github https://github.com/halaprop/luniland with an MIT license https://github.com/halaprop/luniland/blob/master/LICENSE and what I hope is a pretty clear readme. A running copy is also hosted here https://luniland.halabe.com/.

You might be interested in two things I did which I think are innovative uses of your Two.Path:

(1) The app uses paths to build the landscape, summing several Two.Paths. Each path has a regular stride in the x dimension, and random values in the y dimension. The way to get a fractal look is by giving each successive path - or “octave” - a lower amplitude (range for the random y) and a higher frequency (a smaller x stride). Using Two.Path interpolation (getPointAt()), we sum those octaves to form the final semi-natural looking terrain. You can see it in the perlinPath() function in utils.js https://github.com/halaprop/luniland/blob/master/public/utils.js.

(2) I wanted dramatic, cinematic camera tracking, so the Terrain class also creates a Two.Path for the horizon, a smooth curve drawn through every landing pad and the terrain midpoints between every landing pad. The camera zoom is based on the distance between the ship and that path. Since I need that horizon path for a given ship x value, I do a little binary search on getPointAt() until I find a point with an x value near enough to the ship’s.

Anyway, thanks again for the great package. I’m old enough to have been a little guy in the 60s and 70s when the Apollo missions we’re happening. As a teen in the 70s, I spent every quarter I could get my hands on playing this game at the arcade. I would have been thrilled to learn then that someday I could play for free whenever I wanted!

Cheers - Dan

here’s some teaser art…

On Dec 15, 2021, at 10:27 AM, Jono Brandel @.***> wrote:

Thanks for re-sharing! We currently have shuttered the "Projects" section in favor of just adding examples that have code legible / shareable. If this project's source code is creative commons or open sourced so that others can read and use it, then I'd love to add it to the examples page with an updated image (at least 512px wide).

I would at some point like to bring back the projects section though.

Glad you like the new docs! Baby steps, but progress

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jonobr1/two.js/issues/573#issuecomment-995057751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAK6XSWODO4VRGAR4OYW6DURDMYHANCNFSM5KB4H6TQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jonobr1 commented 2 years ago

This is great. Thanks for sharing a bit of the backstory. For some reason though, I don't see the teaser art. Perhaps you can't email it and need to add it directly into the thread via the Github site?

halaprop commented 2 years ago

Hi - My gif screen capturer seems to no longer work, and I don't know which of the apps out there to trust. Here's a still...

luniland

Regards

halaprop commented 2 years ago

Thanks. I posted a still. Can’t get gif capture to work — maybe due to an os update.

On Jan 27, 2022, at 6:17 PM, Jono Brandel @.***> wrote:

This is great. Thanks for sharing a bit of the backstory. For some reason though, I don't see the teaser art. Perhaps you can't email it and need to add it directly into the thread via the Github site?

— Reply to this email directly, view it on GitHub https://github.com/jonobr1/two.js/issues/573#issuecomment-1023821345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAK6XTP3VIJ7H5KUA4XNMDUYH4C5ANCNFSM5KB4H6TQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

jonobr1 commented 2 years ago

Okay, that's been added to dev. Will be published in the next couple of days. Thanks again for sharing!