Giter Site home page Giter Site logo

livecoder.net's Introduction

LiveCoder.net  =  A simple browser environment
                  for coding live javascript

Language Extensions

  vars._        A place to put persistent data
  once._        A place to put functions that run once
  always._      A place to put functions that run continuously

  cached(f)(-)  Caches value of f applied to JSON'able arguments
                (useful for expensive tasks like audio synthesis)

  clear()       Clears vars, once, always, cache, setTimeouts, canvas

  using(url)    Loads & caches a remote script (useful for libraries)

Coding Tools

  help(-)       Looks inside any object/function (great for hacking :)

  print(-),     Print messages to log area
  error(-)

  assert(-,-)   assert(value,message) throws an error if value is false
                (see help(assert) for details & other assertions)

  TODO(-)       TODO(message) is a placeholder for unfinished code

Graphics - using HTML5 canvas

  draw          A 2D canvas context (see examples)

  mouseX,       Current mouse coordinates in pixels
  mouseY

Audio - using HTML5 audio

  play(-)       Plays a uri from encodeWav/tone/noise/speech or the web

  encodeWav(-)  Encodes an array of [-1,1]-valued samples to a wav uri

  tone(-),      Synthesize sound and encode to wav uri
  noise(-)      (see examples or try help(-) for details)

  sampleRate,   Constants in kHz (all time units are ms or kHz)
  middleC

Speech - using espeak/speak.js

  using('speech.js'); // load speech library first

  say(text)     Speaks text out loud

  speech(text)  Synthesizes voice and encodes to a wav uri

Keyboard Shortcuts

  F1            Show language help              F1
  F2            Show keyboard shortcuts         F2

  Ctrl-C        Reset state, same as clear()    Cmd-C
  Escape        Pause/continue compiling        Escape
                (useful for atomic edits)

  Ctrl-F        Start searching                 Cmd-F
  Ctrl-G        Find next                       Cmd-G
  Shift-Ctrl-G  Find previous                   Shift-Cmd-G
  Shift-Ctrl-F  Replace                         Cmd-Option-F
  Shift-Ctrl-R  Replace all                     Shift-Cmd-Option-F

  Ctrl-Space    Autocomplete                    Cmd-Space

  Ctrl-S        Save code locally               Cmd-S
  Ctrl-O        Open local gallery              Cmd-O

livecoder.net's People

Contributors

fritzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

livecoder.net's Issues

Select, move, click causes code region to jump

Select some code region, move it to another place (drag & drop), and click on the code region.
This causes the code region to jump in Chrome. I'm using Chrome dev v21.

Firefox seemed to work fine.

screenshot

Long update functions

If you accidentally type something that causes the update functions to take too much time it becomes very hard to clear the active code, due to automatic saving and slow responsiveness. It might be a good idea to set some time-limit to the functions, if they run over the time, then stop running them.

Select, move, click causes code region to jump

Select some code region, move it to another place (drag & drop), and click on the code region.
This causes the code region to jump in Chrome. I'm using Chrome dev v21.

Firefox seemed to work fine.

screenshot

Audio induces browser crash in chrome/linux

Kassen writes:

Both rhythmical examples, the "simple" and the "Markov" one crash my
browser after -say- 20 seconds or so. I was testing with Chromium and
am running Linux. I could give you more specs or run tests if you tell
me what you need. Chromium said "Oh, Snap".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.