charlieroberts / atom-marching

An Atom plugin for marching.js
MIT License
0 stars 0 forks source link

Marching.js in Atom

Marching.js is a JavaScript library for compiling raymarchers that run on the GPU, and for experimenting with volumetric rendering / constructive solid geometry. This plugin enables it to run in Atom; no browser required.

Running Atom-Marching

  1. Install the charlieroberts/atom-marching package from Atom, basically pointing to this repo. If you search the package manager you'll find an older version... ignore it and just type charlieroberts/atom-marching into the text input field to install directly from this repo.
  2. Restart atom or hit ctrl+alt+command+l to reload all packages.
  3. To start marching.js, select packages > atom-marching > toggle or use the keyboard shortcut ctrl+alt+m
  4. Create and save a file with a .js extension in Atom
  5. Type march( Sphere() ).render() in your new file to test
  6. Select your code, then use ctrl+enter to run it
  7. Use alt+enter to run a block of code, delimited by blank lines
  8. ctrl+. will clear the current scene
  9. For examples, tutorials, and documentation, see the online marching.js playground (Chrome / Firefox).

Error: webgl not supported

Try running atom from the command line as follows: atom --ignore-gpu-blacklist

Error: error opening audio input: DOMException: Could not start audio source

This error can happen in Linux when you're using Pipewire. Try setting the profile of you main audio device to "Pro Audio".

Credits

Code for this plugin adapted from: