# Wolfram Physics in Vanilla Processing

**URL:** https://discourse.processing.org/t/wolfram-physics-in-vanilla-processing/25153
**Category:** Gallery
**Created:** [November 3, 2020, 10:41am UTC](https://discourse.processing.org/t/wolfram-physics-in-vanilla-processing/25153 "2020-11-03T10:41:54Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [November 6, 2020, 4:35pm UTC](https://discourse.processing.org/t/wolfram-physics-in-vanilla-processing/25153/9 "2020-11-06T16:35:11Z")

</div>

> [@noel](#):
>
> I am curious about who created the [support.](https://support.glitch.com/t/language-support-on-glitch-a-list/5466)

It’s a very interesting read about Glitch’s backend (server-side) containerized language features.

However my hosted sketch “Blob Growth” runs 100% on the frontend (client-side).

In order to run it on the Processing’s IDE (PDE) only file “Blob\_Growth.pde” is needed:  
[Blob-Growth-Java.Glitch.me/Blob\_Growth.pde](http://Blob-Growth-Java.Glitch.me/Blob_Growth.pde)

For browser-running we need 3 more files though.

The “index.html” as its entry point:

```auto
<script defer 
  src=https://cdn.JsDelivr.net/gh/hapticdata/toxiclibsjs/build/toxiclibs.min.js>
</script>

<script defer src=ToxicLib_Imports.js></script>
<script defer src=ArrayList_Shims.js></script>

<script defer src=https://Unpkg.com/processing-js></script>
<canvas data-processing-sources=Blob_Growth.pde></canvas>

```

“ToxicLib\_Imports.js” which copies the required “ToxicLibs.js” classes to the global context, so they’re available to direct usage by the sketch “Blob\_Growth.pde”:  
[Blob-Growth-Java.Glitch.me/ToxicLib\_Imports.js](http://Blob-Growth-Java.Glitch.me/ToxicLib_Imports.js)

And the shim hack file “ArrayList\_Shims.js”, which makes it possible for JS arrays to use most of the Java ArrayList’s methods:

> <https://gist.github.com/GoToLoop/a74c5780667f2610097cfc007e53a559>

That is necessary b/c the Java version of “ToxicLibs” store particles on ArrayList containers, while the JS version goes w/ vanilla JS Array containers.

And neither versions feature getters & setters to access their containers via indices.

The reason why we’re able to deploy “.pde” files on the web as 100% client-side apps is b/c “Processing.js” (Pjs) is not only a JS library but also a simple Java Mode to JS transpiler in 1 file!

We can find more about its inception on the article below:  
[https://JohnResig.com/blog/processingjs/](https://JohnResig.com/blog/processingjs/)

---

_[View the full topic](https://discourse.processing.org/t/wolfram-physics-in-vanilla-processing/25153)._
