Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RPD: Reactive Patch Development

RPD: Reactive Patch Development

Presented at JSKongress 2016

Ulric Wilfred

November 28, 2016
Tweet

More Decks by Ulric Wilfred

Other Decks in Programming

Transcript

  1. * SVG and HTML rendering * Very Simple API *

    Lightweight * Built using Functional Programming principles * Easy to create Toolkits * Easy to implement Rendering and define Styles * Easy to connect to other libs (Sound, Animation etc.) * Supports any async stuff w/Reactive Streams
  2. Rpd.nodetype(‘my/sum’, { inlets: { a: { type: ‘core/number’ }, b:

    { type: ‘core/number’ } }, outlet: { sum: { type: ‘core/number’ } }, process: function(inlets) { return { sum: inlets.a + inlets.b } } });
  3. Rpd.nodetype(‘my/sum’, { inlets: { a: { type: ‘core/number’ }, b:

    { type: ‘core/number’ } }, outlet: { sum: { type: ‘core/number’ } }, process: function(inlets) { return { sum: Kefir.later( 1000, inlets.a + inlets.b ); } } });
  4. Rpd.noderender(‘my/sum’, ‘svg’, { first: function(bodyElm) { … }, always: function(bodyElm,

    inlets, outlets) { bodyElm.innerText = inlets.a + inlets.b + outlets.sum; } });