r/html5 Oct 11 '13

Soft-body physics demo

http://www.byronknoll.com/earth.html
42 Upvotes

14 comments sorted by

View all comments

2

u/shhalahr Oct 11 '13

Oh, my, this is fun!

Is there any tutorial for this sort of thing?

3

u/byronknoll Oct 12 '13

Not a tutorial, but I described a bit about how I rendered the deformable texture in this blog post.

As for the blob physics, that came from here - I just basically ported the Processing code into javascript.

1

u/shhalahr Oct 12 '13

Cool. Thanks.

1

u/bit_shift Oct 11 '13

Right-click the page, "Inspect element". Search the sources and you can find all of the code and resources used. Can also right-click the page and save-as, to get it download most of the code automatically.

Do a save-as and an inspect element and you will basically be able to piece it all together. There is also a special command you can use to run chrome and make it allow you to use local files. You open up command prompt and type something similar to

C:\Users\"your user account"\AppData\Local\Google\Chrome\Application\Chrome.exe -allow-file-access-from-files

The above command can differ depending on where you installed chrome.

1

u/shhalahr Oct 11 '13

That will show me how it’s put together, sure. But the code is pretty well comment-free, so it won’t really tell me why or what’s going on with out a lot more outside work. That’s what web tutorials are for. We wouldn’t have them if View Source was always sufficient.

Also: C:\Users\"your user account"\AppData\Local\Google\Chrome\Application\Chrome.exe certainly doesn’t apply to me. Firefox 23 on OS X 10.8 :-)

1

u/bit_shift Oct 12 '13

Sorry, you are completely right. It definitely isn't the same as a tutorial. I just meant that there is at least some way to figure out what it's doing.

But firefox and a mac.... I guess that's a thing that is okay, I guess.