From fcff21bb78214790041cfc189c5c0c18a88b6d9e Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 21 Sep 2019 15:34:39 +0200 Subject: add btrktrl, parallax_panels --- mmm/dom/init.server.moon | 6 + mmm/mmmfs/browser.moon | 241 --------------------- mmm/mmmfs/conversion.moon | 31 ++- .../parallax_panels/description: text$plain | 1 + .../parallax_panels/picture/URL -> twitter$tweet | 1 + root/experiments/parallax_panels/text$markdown.md | 16 ++ .../parallax_panels/viewer/demo/video$mp4.mp4 | Bin 0 -> 8699675 bytes root/experiments/parallax_panels/viewer/link: URL | 1 + root/projects/btrktrl/$order | 13 ++ root/projects/btrktrl/description: text$plain | 1 + .../btrktrl/knobs_all/description: text$plain | 1 + root/projects/btrktrl/knobs_all/image$jpeg.jpg | Bin 0 -> 2462470 bytes .../btrktrl/knobs_testing/description: text$plain | 1 + root/projects/btrktrl/knobs_testing/image$jpeg.jpg | Bin 0 -> 2266946 bytes .../pcb_dev_configuration/description: text$plain | 1 + .../btrktrl/pcb_dev_configuration/video$mp4.mp4 | Bin 0 -> 7002917 bytes .../pcb_dev_encoder/description: text$plain | 1 + .../projects/btrktrl/pcb_dev_encoder/video$mp4.mp4 | Bin 0 -> 3094492 bytes root/projects/btrktrl/pcb_glamour/image$jpeg.jpg | Bin 0 -> 935947 bytes .../btrktrl/pcb_glamour_close/image$jpeg.jpg | Bin 0 -> 331299 bytes .../btrktrl/pcb_glamour_connector/image$jpeg.jpg | Bin 0 -> 320858 bytes .../btrktrl/pcb_glamour_far/image$jpeg.jpg | Bin 0 -> 681312 bytes .../btrktrl/pcb_glamour_top/image$jpeg.jpg | Bin 0 -> 448678 bytes .../btrktrl/pcb_osc/description: text$plain | 1 + root/projects/btrktrl/pcb_osc/video$mp4.mp4 | Bin 0 -> 8287372 bytes .../btrktrl/proto_encoder/description: text$plain | 1 + root/projects/btrktrl/proto_encoder/video$mp4.mp4 | Bin 0 -> 3362613 bytes .../btrktrl/proto_rgb/description: text$plain | 1 + root/projects/btrktrl/proto_rgb/video$mp4.mp4 | Bin 0 -> 1247898 bytes .../btrktrl/proto_spi/description: text$plain | 1 + root/projects/btrktrl/proto_spi/image$jpeg.jpg | Bin 0 -> 2441610 bytes .../btrktrl/text$moonscript -> fn -> mmm$dom.moon | 62 ++++++ scss/_content.scss | 5 +- 33 files changed, 142 insertions(+), 244 deletions(-) delete mode 100644 mmm/mmmfs/browser.moon create mode 100644 root/experiments/parallax_panels/description: text$plain create mode 100644 root/experiments/parallax_panels/picture/URL -> twitter$tweet create mode 100644 root/experiments/parallax_panels/text$markdown.md create mode 100755 root/experiments/parallax_panels/viewer/demo/video$mp4.mp4 create mode 100644 root/experiments/parallax_panels/viewer/link: URL create mode 100644 root/projects/btrktrl/$order create mode 100644 root/projects/btrktrl/description: text$plain create mode 100644 root/projects/btrktrl/knobs_all/description: text$plain create mode 100644 root/projects/btrktrl/knobs_all/image$jpeg.jpg create mode 100644 root/projects/btrktrl/knobs_testing/description: text$plain create mode 100644 root/projects/btrktrl/knobs_testing/image$jpeg.jpg create mode 100644 root/projects/btrktrl/pcb_dev_configuration/description: text$plain create mode 100644 root/projects/btrktrl/pcb_dev_configuration/video$mp4.mp4 create mode 100644 root/projects/btrktrl/pcb_dev_encoder/description: text$plain create mode 100644 root/projects/btrktrl/pcb_dev_encoder/video$mp4.mp4 create mode 100644 root/projects/btrktrl/pcb_glamour/image$jpeg.jpg create mode 100644 root/projects/btrktrl/pcb_glamour_close/image$jpeg.jpg create mode 100644 root/projects/btrktrl/pcb_glamour_connector/image$jpeg.jpg create mode 100644 root/projects/btrktrl/pcb_glamour_far/image$jpeg.jpg create mode 100644 root/projects/btrktrl/pcb_glamour_top/image$jpeg.jpg create mode 100644 root/projects/btrktrl/pcb_osc/description: text$plain create mode 100644 root/projects/btrktrl/pcb_osc/video$mp4.mp4 create mode 100644 root/projects/btrktrl/proto_encoder/description: text$plain create mode 100644 root/projects/btrktrl/proto_encoder/video$mp4.mp4 create mode 100644 root/projects/btrktrl/proto_rgb/description: text$plain create mode 100644 root/projects/btrktrl/proto_rgb/video$mp4.mp4 create mode 100644 root/projects/btrktrl/proto_spi/description: text$plain create mode 100644 root/projects/btrktrl/proto_spi/image$jpeg.jpg create mode 100644 root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon diff --git a/mmm/dom/init.server.moon b/mmm/dom/init.server.moon index fedd109..2ddce33 100644 --- a/mmm/dom/init.server.moon +++ b/mmm/dom/init.server.moon @@ -27,6 +27,12 @@ element = (element) -> (...) -> if #children == 0 children = attributes + for i,v in ipairs children + if 'string' != type v + print v + error "wrong type: #{type v}" + children[i] = '' unless v + if void_tags[element] assert #children == 0, "void tag #{element} cannot have children!" b .. ">" diff --git a/mmm/mmmfs/browser.moon b/mmm/mmmfs/browser.moon deleted file mode 100644 index 379537e..0000000 --- a/mmm/mmmfs/browser.moon +++ /dev/null @@ -1,241 +0,0 @@ -require = relative ..., 1 -import Key from require '.fileder' -import converts, get_conversions, apply_conversions from require '.conversion' -import ReactiveVar, get_or_create, text, elements from require 'mmm.component' -import pre, div, nav, span, button, a, select, option from elements -import languages from require 'mmm.highlighting' - -keep = (var) -> - last = var\get! - var\map (val) -> - last = val or last - last - -code_cast = (lang) -> - { - inp: "text/#{lang}.*", - out: 'mmm/dom', - transform: (val) -> languages[lang] val - } - -casts = { - code_cast 'javascript', - code_cast 'moonscript', - code_cast 'lua', - code_cast 'markdown', - code_cast 'html', - { - inp: 'text/plain' - out: 'mmm/dom' - transform: (val) -> text val - } -} - -for convert in *converts - table.insert casts, convert - -class Browser - new: (@root, path='', rehydrate=false) => - -- root fileder - assert @root, 'root fileder is nil' - - -- active path - @path = ReactiveVar path - - -- update URL bar - if MODE == 'CLIENT' - logo = document\querySelector 'header h1 > svg' - spin = -> - logo.classList\add 'spin' - logo.parentElement.offsetWidth - logo.classList\remove 'spin' - @path\subscribe (path) -> - document.body.classList\add 'loading' - spin! - - return if @skip - vis_path = path .. (if '/' == path\sub -1 then '' else '/') - window.history\pushState path, '', vis_path - - window.onpopstate = (_, event) -> - if event.state - @skip = true - @path\set event.state - @skip = nil - - -- active fileder - -- (re)set every time @path changes - @active = @path\map @root\walk - - -- currently active facet - -- (re)set to default when @active changes - @facet = @active\map (fileder) -> - return unless fileder - last = @facet and @facet\get! - Key if last then last.type else 'mmm/dom' - - -- whether inspect tab is active - @inspect = ReactiveVar (MODE == 'CLIENT' and window.location.search\match '[?&]inspect') - - -- retrieve or create the wrapper and main elements - main = get_or_create 'div', 'browser-root', class: 'main view' - - -- prepend the navbar - if MODE == 'SERVER' - main\append nav { id: 'browser-navbar', span 'please stand by... interactivity loading :)' } - else - main\prepend with get_or_create 'nav', 'browser-navbar' - .node.innerHTML = '' - \append span 'path: ', @path\map (path) -> with div class: 'path', style: { display: 'inline-block' } - path_segment = (name, href) -> - a name, :href, onclick: (_, e) -> - e\preventDefault! - @navigate href - - href = '' - path = path\match '^/(.*)' - - \append path_segment 'root', '' - - while path - name, rest = path\match '^([%w%-_%.]+)/(.*)' - if not name - name = path - - path = rest - href = "#{href}/#{name}" - - \append '/' - \append path_segment name, href - - \append span 'view facet:', style: { 'margin-right': '0' } - \append @active\map (fileder) -> - onchange = (_, e) -> - { :type } = @facet\get! - @facet\set Key name: e.target.value, :type - - current = @facet\get! - current = current and current.name - with select :onchange, disabled: not fileder - has_main = fileder and fileder\find current.name, '.*' - \append option '(main)', value: '', disabled: not has_main, selected: current == '' - if fileder - for i, value in ipairs fileder\get_facets! - continue if value == '' - \append option value, :value, selected: value == current - \append @inspect\map (enabled) -> - if not enabled - button 'inspect', onclick: (_, e) -> @inspect\set true - - @error = ReactiveVar! - main\append with get_or_create 'div', 'browser-error', class: @error\map (e) -> if e then 'error-wrap' else 'error-wrap empty' - \append (span "an error occured while rendering this view:"), (rehydrate and .node.firstChild) - \append @error - - -- append or patch #browser-content - main\append with get_or_create 'div', 'browser-content', class: 'content' - content = ReactiveVar if rehydrate then .node.lastChild else @get_content @facet\get! - \append keep content - if MODE == 'CLIENT' - @facet\subscribe (p) -> - window\setTimeout (-> content\set @get_content p), 150 - - if rehydrate - -- force one rerender to set onclick handlers etc - @facet\set @facet\get! - - inspector = @inspect\map (enabled) -> if enabled then @get_inspector! - - -- export mmm/component interface - wrapper = get_or_create 'div', 'browser-wrapper', main, inspector, class: 'browser' - @node = wrapper.node - @render = wrapper\render - - err_and_trace = (err) -> err, debug.traceback! - default_convert = (key) => @get key.name, 'mmm/dom' - - -- render #browser-content - get_content: (prop, err=@error, convert=default_convert) => - clear_error = -> - err\set! if MODE == 'CLIENT' - disp_error = (msg) -> - if MODE == 'CLIENT' - err\set pre msg - warn "ERROR rendering content: #{msg}" - nil - - active = @active\get! - - return disp_error "fileder not found!" unless active - return disp_error "facet not found!" unless prop - - ok, res, trace = xpcall convert, err_and_trace, active, prop - - document.body.classList\remove 'loading' if MODE == 'CLIENT' - - if ok and res - clear_error! - res - elseif ok - div "[no conversion path to #{prop.type}]" - elseif res and res.match and res\match '%[nossr%]$' - div "[this page could not be pre-rendered on the server]" - else - if trace - res = "#{res}\n#{trace}" - disp_error res - - get_inspector: => - -- active facet in inspect tab - -- (re)set to match when @facet changes - @inspect_prop = @facet\map (prop) -> - active = @active\get! - key = active and active\find prop - key = key.original if key and key.original - key - - @inspect_err = ReactiveVar! - - with div class: 'view inspector' - \append nav { - span 'inspector' - @inspect_prop\map (current) -> - current = current and current\tostring! - fileder = @active\get! - - onchange = (_, e) -> - return if e.target.value == '' - { :name } = @facet\get! - @inspect_prop\set Key e.target.value - - with select :onchange - \append option '(none)', value: '', disabled: true, selected: not value - if fileder - for key, _ in pairs fileder.facets - value = key\tostring! - \append option value, :value, selected: value == current - @inspect\map (enabled) -> - if enabled - button 'close', onclick: (_, e) -> @inspect\set false - } - \append with div class: @inspect_err\map (e) -> if e then 'error-wrap' else 'error-wrap empty' - \append span "an error occured while rendering this view:" - \append @inspect_err - \append with pre class: 'content' - \append keep @inspect_prop\map (prop, old) -> - @get_content prop, @inspect_err, (prop) => - value, key = @get prop - assert key, "couldn't @get #{prop}" - - conversions = get_conversions 'mmm/dom', key.type, casts - assert conversions, "cannot cast '#{key.type}'" - apply_conversions conversions, value, @, prop - - default_convert = (key) => @get key.name, 'mmm/dom' - - navigate: (new) => - @path\set new - -{ - :Browser -} diff --git a/mmm/mmmfs/conversion.moon b/mmm/mmmfs/conversion.moon index a37ee0b..dc301eb 100644 --- a/mmm/mmmfs/conversion.moon +++ b/mmm/mmmfs/conversion.moon @@ -1,5 +1,5 @@ import div, code, img, video, blockquote, a, span, source, iframe from require 'mmm.dom' -import find_fileder, embed from (require 'mmm.mmmfs.util') require 'mmm.dom' +import find_fileder, link_to, embed from (require 'mmm.mmmfs.util') require 'mmm.dom' import tohtml from require 'mmm.component' -- fix JS null values @@ -42,7 +42,24 @@ converts = { out: 'mmm/dom', transform: if MODE == 'SERVER' (html, fileder) -> - html\gsub '', (attrs) -> + html = html\gsub '(.-)', (attrs, text) -> + text = nil if #text == 0 + path = '' + while attrs and attrs != '' + key, val, _attrs = attrs\match '^(%w+)="([^"]-)"%s*(.*)' + if not key + key, _attrs = attrs\match '^(%w+)%s*(.*)$' + val = true + + attrs = _attrs + + switch key + when 'path' then path = val + else warn "unkown attribute '#{key}=\"#{val}\"' in " + + link_to path, text, fileder + + html = html\gsub '', (attrs) -> path, facet = '', '' opts = {} while attrs and attrs != '' @@ -60,6 +77,8 @@ converts = { else warn "unkown attribute '#{key}=\"#{val}\"' in " embed path, facet, fileder, opts + + html else (html, fileder) -> parent = with document\createElement 'div' @@ -75,6 +94,14 @@ converts = { element\replaceWith embed path or '', facet or '', fileder, { :nolink } + embeds = \getElementsByTagName 'mmm-link' + embeds = [embeds[i] for i=0, embeds.length - 1] + for element in *embeds + text = js_fix element.innerText + path = js_fix element\getAttribute 'path' + + element\replaceWith link_to path or '', text, fileder + assert 1 == parent.childElementCount, "text/html with more than one child!" parent.firstElementChild }, diff --git a/root/experiments/parallax_panels/description: text$plain b/root/experiments/parallax_panels/description: text$plain new file mode 100644 index 0000000..0eed9db --- /dev/null +++ b/root/experiments/parallax_panels/description: text$plain @@ -0,0 +1 @@ +A Parallax SVG Viewer, for Prototyping (Eurorack) Panels diff --git a/root/experiments/parallax_panels/picture/URL -> twitter$tweet b/root/experiments/parallax_panels/picture/URL -> twitter$tweet new file mode 100644 index 0000000..8d5bce2 --- /dev/null +++ b/root/experiments/parallax_panels/picture/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1141006444793405440 diff --git a/root/experiments/parallax_panels/text$markdown.md b/root/experiments/parallax_panels/text$markdown.md new file mode 100644 index 0000000..7453762 --- /dev/null +++ b/root/experiments/parallax_panels/text$markdown.md @@ -0,0 +1,16 @@ +parallax-panels +=============== + +I'm prototyping an aesthetic for (eurorack) panels that relies on multiple layers of parallax visuals for dramatic effect. + + + +parallax-viewer +=============== + +I built a little SVG viewer that stacks the layers and lets you view them in parallax. +You can find it here. + +And here's a little demonstration: + + diff --git a/root/experiments/parallax_panels/viewer/demo/video$mp4.mp4 b/root/experiments/parallax_panels/viewer/demo/video$mp4.mp4 new file mode 100755 index 0000000..f3600cc Binary files /dev/null and b/root/experiments/parallax_panels/viewer/demo/video$mp4.mp4 differ diff --git a/root/experiments/parallax_panels/viewer/link: URL b/root/experiments/parallax_panels/viewer/link: URL new file mode 100644 index 0000000..f1bc92e --- /dev/null +++ b/root/experiments/parallax_panels/viewer/link: URL @@ -0,0 +1 @@ +https://codepen.io/s-ol/full/rExrey diff --git a/root/projects/btrktrl/$order b/root/projects/btrktrl/$order new file mode 100644 index 0000000..0520d1b --- /dev/null +++ b/root/projects/btrktrl/$order @@ -0,0 +1,13 @@ +proto_rgb +proto_encoder +proto_spi +knobs_all +knobs_testing +pcb_glamour_close +pcb_glamour_far +pcb_glamour_top +pcb_glamour +pcb_glamour_connector +pcb_dev_configuration +pcb_dev_encoder +pcb_osc diff --git a/root/projects/btrktrl/description: text$plain b/root/projects/btrktrl/description: text$plain new file mode 100644 index 0000000..d7e3402 --- /dev/null +++ b/root/projects/btrktrl/description: text$plain @@ -0,0 +1 @@ +a FPGA-based modular MIDI/OSC control surface diff --git a/root/projects/btrktrl/knobs_all/description: text$plain b/root/projects/btrktrl/knobs_all/description: text$plain new file mode 100644 index 0000000..1a43de0 --- /dev/null +++ b/root/projects/btrktrl/knobs_all/description: text$plain @@ -0,0 +1 @@ +sampling machined aluminum knobs from chinese supplier diff --git a/root/projects/btrktrl/knobs_all/image$jpeg.jpg b/root/projects/btrktrl/knobs_all/image$jpeg.jpg new file mode 100644 index 0000000..c523f8f Binary files /dev/null and b/root/projects/btrktrl/knobs_all/image$jpeg.jpg differ diff --git a/root/projects/btrktrl/knobs_testing/description: text$plain b/root/projects/btrktrl/knobs_testing/description: text$plain new file mode 100644 index 0000000..9588122 --- /dev/null +++ b/root/projects/btrktrl/knobs_testing/description: text$plain @@ -0,0 +1 @@ +testing different knob spacings diff --git a/root/projects/btrktrl/knobs_testing/image$jpeg.jpg b/root/projects/btrktrl/knobs_testing/image$jpeg.jpg new file mode 100644 index 0000000..09ea47d Binary files /dev/null and b/root/projects/btrktrl/knobs_testing/image$jpeg.jpg differ diff --git a/root/projects/btrktrl/pcb_dev_configuration/description: text$plain b/root/projects/btrktrl/pcb_dev_configuration/description: text$plain new file mode 100644 index 0000000..b15f4f0 --- /dev/null +++ b/root/projects/btrktrl/pcb_dev_configuration/description: text$plain @@ -0,0 +1 @@ +configuring the FPGA on the custom PCB via an arduino for the first time diff --git a/root/projects/btrktrl/pcb_dev_configuration/video$mp4.mp4 b/root/projects/btrktrl/pcb_dev_configuration/video$mp4.mp4 new file mode 100644 index 0000000..c8113cd Binary files /dev/null and b/root/projects/btrktrl/pcb_dev_configuration/video$mp4.mp4 differ diff --git a/root/projects/btrktrl/pcb_dev_encoder/description: text$plain b/root/projects/btrktrl/pcb_dev_encoder/description: text$plain new file mode 100644 index 0000000..530be5a --- /dev/null +++ b/root/projects/btrktrl/pcb_dev_encoder/description: text$plain @@ -0,0 +1 @@ +encoder & capacitive sensing working on the custom PCB diff --git a/root/projects/btrktrl/pcb_dev_encoder/video$mp4.mp4 b/root/projects/btrktrl/pcb_dev_encoder/video$mp4.mp4 new file mode 100644 index 0000000..fa41799 Binary files /dev/null and b/root/projects/btrktrl/pcb_dev_encoder/video$mp4.mp4 differ diff --git a/root/projects/btrktrl/pcb_glamour/image$jpeg.jpg b/root/projects/btrktrl/pcb_glamour/image$jpeg.jpg new file mode 100644 index 0000000..5864822 Binary files /dev/null and b/root/projects/btrktrl/pcb_glamour/image$jpeg.jpg differ diff --git a/root/projects/btrktrl/pcb_glamour_close/image$jpeg.jpg b/root/projects/btrktrl/pcb_glamour_close/image$jpeg.jpg new file mode 100644 index 0000000..5d572aa Binary files /dev/null and b/root/projects/btrktrl/pcb_glamour_close/image$jpeg.jpg differ diff --git a/root/projects/btrktrl/pcb_glamour_connector/image$jpeg.jpg b/root/projects/btrktrl/pcb_glamour_connector/image$jpeg.jpg new file mode 100644 index 0000000..6503f84 Binary files /dev/null and b/root/projects/btrktrl/pcb_glamour_connector/image$jpeg.jpg differ diff --git a/root/projects/btrktrl/pcb_glamour_far/image$jpeg.jpg b/root/projects/btrktrl/pcb_glamour_far/image$jpeg.jpg new file mode 100644 index 0000000..661f4fe Binary files /dev/null and b/root/projects/btrktrl/pcb_glamour_far/image$jpeg.jpg differ diff --git a/root/projects/btrktrl/pcb_glamour_top/image$jpeg.jpg b/root/projects/btrktrl/pcb_glamour_top/image$jpeg.jpg new file mode 100644 index 0000000..bbefc13 Binary files /dev/null and b/root/projects/btrktrl/pcb_glamour_top/image$jpeg.jpg differ diff --git a/root/projects/btrktrl/pcb_osc/description: text$plain b/root/projects/btrktrl/pcb_osc/description: text$plain new file mode 100644 index 0000000..2f0df00 --- /dev/null +++ b/root/projects/btrktrl/pcb_osc/description: text$plain @@ -0,0 +1 @@ +a browser application talking to the encoders through a websocket/serial OSC bridge (nodejs) diff --git a/root/projects/btrktrl/pcb_osc/video$mp4.mp4 b/root/projects/btrktrl/pcb_osc/video$mp4.mp4 new file mode 100644 index 0000000..3562d43 Binary files /dev/null and b/root/projects/btrktrl/pcb_osc/video$mp4.mp4 differ diff --git a/root/projects/btrktrl/proto_encoder/description: text$plain b/root/projects/btrktrl/proto_encoder/description: text$plain new file mode 100644 index 0000000..e0f620b --- /dev/null +++ b/root/projects/btrktrl/proto_encoder/description: text$plain @@ -0,0 +1 @@ +getting the encoder and capacitive sensing working on the prototype diff --git a/root/projects/btrktrl/proto_encoder/video$mp4.mp4 b/root/projects/btrktrl/proto_encoder/video$mp4.mp4 new file mode 100644 index 0000000..acb32c8 Binary files /dev/null and b/root/projects/btrktrl/proto_encoder/video$mp4.mp4 differ diff --git a/root/projects/btrktrl/proto_rgb/description: text$plain b/root/projects/btrktrl/proto_rgb/description: text$plain new file mode 100644 index 0000000..43b7f69 --- /dev/null +++ b/root/projects/btrktrl/proto_rgb/description: text$plain @@ -0,0 +1 @@ +driving WS2812 RGB LEDs on the prototype board diff --git a/root/projects/btrktrl/proto_rgb/video$mp4.mp4 b/root/projects/btrktrl/proto_rgb/video$mp4.mp4 new file mode 100644 index 0000000..8e06fcc Binary files /dev/null and b/root/projects/btrktrl/proto_rgb/video$mp4.mp4 differ diff --git a/root/projects/btrktrl/proto_spi/description: text$plain b/root/projects/btrktrl/proto_spi/description: text$plain new file mode 100644 index 0000000..c38b56e --- /dev/null +++ b/root/projects/btrktrl/proto_spi/description: text$plain @@ -0,0 +1 @@ +developing and debugging the SPI protocol diff --git a/root/projects/btrktrl/proto_spi/image$jpeg.jpg b/root/projects/btrktrl/proto_spi/image$jpeg.jpg new file mode 100644 index 0000000..c89341c Binary files /dev/null and b/root/projects/btrktrl/proto_spi/image$jpeg.jpg differ diff --git a/root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon b/root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon new file mode 100644 index 0000000..f7d8f9c --- /dev/null +++ b/root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon @@ -0,0 +1,62 @@ +import div, h3, p, a from require 'mmm.dom' +import link_to from (require 'mmm.mmmfs.util') require 'mmm.dom' + +=> + text = (...) -> + div with for text in *{...} + p text + .style = { 'max-width': '900px' } + + filtered_block = (pattern) -> + div with for child in *@children + continue unless (child\gett 'name: alpha')\match pattern + + div { + style: { + display: 'inline-block' + width: '500px' + margin: '0.5em' + padding: '0.4em 1em' + background: 'var(--gray-bright)' + } + div (link_to child), style: { 'margin-bottom': '0.2em' } + child\gett 'mmm/dom' + (child\get 'description: mmm/dom') + } + + .style = { + display: 'flex' + 'flex-wrap': 'wrap' + 'align-items': 'flex-start' + margin: '-0.5em' + } + + div { + h3 @gett 'name: alpha' + text "For this project I am builiding a modular, FPGA powered MIDI/OSC Control Surface.", + "The setup consists of an arduino MCU as a master controller, that communicates to the PC over + SLIP-encoded Serial OSC messages. The controller talks to daughterboards over SPI. + Each daugherboard contains a rotary encoder, 8 RGB LEDs and does capacitive sensing on the knob.", + "This was the first time I worked with an FPGA, and the first time I designed my own PCBs as well. + The FPGA I used is an ICE40UP5k, it was targeted using the icestorm open toolchain and Verilog. + I started by prototyping using an UPduino v2 Prototyping board (orange), and my failed rev1 PCBs (green). + On the FPGAs I implemented capacitive sensing, the SPI slave and control logic before moving on." + + filtered_block '^proto_' + + text "Once I got everything working there I designed my custom boards with the FPGA integrated directly, + including power conditioning and configuration. + There is also a busboard that manages SPI addressing / multiplexing as well as latching the power state + for each daughterboard, so that they can be started and configured individually." + + filtered_block '^pcb_glamour' + filtered_block '^pcb_dev' + + text "The daughterboards and controller communicate over a custom SPI protocol I designed. + The controller configures the daughterboards on boot or request from the PC. + It sends and receives OSC messages over SLIP-encoded Serial. + On the PC a small nodejs application relays the OSC messages over UDP or WebSocket, + so that native and web applications can consume them and interact with the control surface." + + filtered_block '^pcb_osc' + } diff --git a/scss/_content.scss b/scss/_content.scss index e4345ef..0bfc1e8 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -4,7 +4,10 @@ height: inherit; } - .markdown, .markdown > p, .markdown > p > a { + .markdown, + .markdown > p, + .markdown > p > a, + .markdown > a { > img, > video { display: block; max-width: 100%; -- cgit v1.2.3 From e92f660074d8a72da29d557ef7fd9b808a594e7f Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 21 Sep 2019 16:37:22 +0200 Subject: small fixes --- .dockerignore | 2 ++ tup.config | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 9414382..8736c81 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,3 @@ Dockerfile +$bundle.lua +.bundle.lua diff --git a/tup.config b/tup.config index 7010858..54e707c 100644 --- a/tup.config +++ b/tup.config @@ -1,2 +1,2 @@ CONFIG_FENGARI_VERSION=v0.1.4 -CONFIG_SASS_ARGS=-m auto +CONFIG_SASS_ARGS=-mauto -- cgit v1.2.3 From b929b5862aff307bf4bc2f2cf8fca6038d882f3e Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 21 Sep 2019 16:37:49 +0200 Subject: add jam facet to all games --- root/games/IYNX/jam: text$markdown+span | 1 + root/games/lorem_ipsum/jam: text$plain | 1 + root/games/two_shooting_stars/jam: text$markdown+span | 1 + 3 files changed, 3 insertions(+) create mode 100644 root/games/IYNX/jam: text$markdown+span create mode 100644 root/games/lorem_ipsum/jam: text$plain create mode 100644 root/games/two_shooting_stars/jam: text$markdown+span diff --git a/root/games/IYNX/jam: text$markdown+span b/root/games/IYNX/jam: text$markdown+span new file mode 100644 index 0000000..a95a990 --- /dev/null +++ b/root/games/IYNX/jam: text$markdown+span @@ -0,0 +1 @@ +semester project diff --git a/root/games/lorem_ipsum/jam: text$plain b/root/games/lorem_ipsum/jam: text$plain new file mode 100644 index 0000000..06967b6 --- /dev/null +++ b/root/games/lorem_ipsum/jam: text$plain @@ -0,0 +1 @@ +GamesForChange diff --git a/root/games/two_shooting_stars/jam: text$markdown+span b/root/games/two_shooting_stars/jam: text$markdown+span new file mode 100644 index 0000000..a95a990 --- /dev/null +++ b/root/games/two_shooting_stars/jam: text$markdown+span @@ -0,0 +1 @@ +semester project -- cgit v1.2.3 From 4b52ff0a33ee2315148017180f070978f2faa73e Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 21 Sep 2019 16:39:24 +0200 Subject: add .tup to dockerignore --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 8736c81..5603375 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ +.tup Dockerfile $bundle.lua .bundle.lua -- cgit v1.2.3 From 379c43f442c84fd46ffd0c97fead1895386387b2 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 21 Sep 2019 16:47:10 +0200 Subject: put brack browser. oops? --- mmm/mmmfs/browser.moon | 241 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 mmm/mmmfs/browser.moon diff --git a/mmm/mmmfs/browser.moon b/mmm/mmmfs/browser.moon new file mode 100644 index 0000000..c25062d --- /dev/null +++ b/mmm/mmmfs/browser.moon @@ -0,0 +1,241 @@ +require = relative ..., 1 +import Key from require '.fileder' +import converts, get_conversions, apply_conversions from require '.conversion' +import ReactiveVar, get_or_create, text, elements from require 'mmm.component' +import pre, div, nav, span, button, a, select, option from elements +import languages from require 'mmm.highlighting' + +keep = (var) -> + last = var\get! + var\map (val) -> + last = val or last + last + +code_cast = (lang) -> + { + inp: "text/#{lang}.*", + out: 'mmm/dom', + transform: (val) -> languages[lang] val + } + +casts = { + code_cast 'javascript', + code_cast 'moonscript', + code_cast 'lua', + code_cast 'markdown', + code_cast 'html', + { + inp: 'text/plain' + out: 'mmm/dom' + transform: (val) -> text val + } +} + +for convert in *converts + table.insert casts, convert + +class Browser + new: (@root, path='', rehydrate=false) => + -- root fileder + assert @root, 'root fileder is nil' + + -- active path + @path = ReactiveVar path + + -- update URL bar + if MODE == 'CLIENT' + logo = document\querySelector 'header h1 > svg' + spin = -> + logo.classList\add 'spin' + logo.parentElement.offsetWidth + logo.classList\remove 'spin' + @path\subscribe (path) -> + document.body.classList\add 'loading' + spin! + + return if @skip + vis_path = path .. (if '/' == path\sub -1 then '' else '/') + window.history\pushState path, '', vis_path + + window.onpopstate = (_, event) -> + if event.state + @skip = true + @path\set event.state + @skip = nil + + -- active fileder + -- (re)set every time @path changes + @active = @path\map @root\walk + + -- currently active facet + -- (re)set to default when @active changes + @facet = @active\map (fileder) -> + return unless fileder + last = @facet and @facet\get! + Key if last then last.type else 'mmm/dom' + + -- whether inspect tab is active + @inspect = ReactiveVar (MODE == 'CLIENT' and window.location.search\match '[?&]inspect') + + -- retrieve or create the wrapper and main elements + main = get_or_create 'div', 'browser-root', class: 'main view' + + -- prepend the navbar + if MODE == 'SERVER' + main\append nav { id: 'browser-navbar', span 'please stand by... interactivity loading :)' } + else + main\prepend with get_or_create 'nav', 'browser-navbar' + .node.innerHTML = '' + \append span 'path: ', @path\map (path) -> with div class: 'path', style: { display: 'inline-block' } + path_segment = (name, href) -> + a name, :href, onclick: (_, e) -> + e\preventDefault! + @navigate href + + href = '' + path = path\match '^/(.*)' + + \append path_segment 'root', '' + + while path + name, rest = path\match '^([%w%-_%.]+)/(.*)' + if not name + name = path + + path = rest + href = "#{href}/#{name}" + + \append '/' + \append path_segment name, href + + \append span 'view facet:', style: { 'margin-right': '0' } + \append @active\map (fileder) -> + onchange = (_, e) -> + { :type } = @facet\get! + @facet\set Key name: e.target.value, :type + + current = @facet\get! + current = current and current.name + with select :onchange, disabled: not fileder + has_main = fileder and fileder\find current.name, '.*' + \append option '(main)', value: '', disabled: not has_main, selected: current == '' + if fileder + for i, value in ipairs fileder\get_facets! + continue if value == '' + \append option value, :value, selected: value == current + \append @inspect\map (enabled) -> + if not enabled + button 'inspect', onclick: (_, e) -> @inspect\set true + + @error = ReactiveVar! + main\append with get_or_create 'div', 'browser-error', class: @error\map (e) -> if e then 'error-wrap' else 'error-wrap empty' + \append (span "an error occured while rendering this view:"), (rehydrate and .node.firstChild) + \append @error + + -- append or patch #browser-content + main\append with get_or_create 'div', 'browser-content', class: 'content' + content = ReactiveVar if rehydrate then .node.lastChild else @get_content @facet\get! + \append keep content + if MODE == 'CLIENT' + @facet\subscribe (p) -> + window\setTimeout (-> content\set @get_content p), 150 + + if rehydrate + -- force one rerender to set onclick handlers etc + @facet\set @facet\get! + + inspector = @inspect\map (enabled) -> if enabled then @get_inspector! + + -- export mmm/component interface + wrapper = get_or_create 'div', 'browser-wrapper', main, inspector, class: 'browser' + @node = wrapper.node + @render = wrapper\render + + err_and_trace = (err) -> "#{err} #{debug.traceback!}" + default_convert = (key) => @get key.name, 'mmm/dom' + + -- render #browser-content + get_content: (prop, err=@error, convert=default_convert) => + clear_error = -> + err\set! if MODE == 'CLIENT' + disp_error = (msg) -> + if MODE == 'CLIENT' + err\set pre msg + warn "ERROR rendering content: #{msg}" + nil + + active = @active\get! + + return disp_error "fileder not found!" unless active + return disp_error "facet not found!" unless prop + + ok, res, trace = xpcall convert, err_and_trace, active, prop + + document.body.classList\remove 'loading' if MODE == 'CLIENT' + + if ok and res + clear_error! + res + elseif ok + div "[no conversion path to #{prop.type}]" + elseif res and res.match and res\match '%[nossr%]$' + div "[this page could not be pre-rendered on the server]" + else + if trace + res = "#{res}\n#{trace}" + disp_error res + + get_inspector: => + -- active facet in inspect tab + -- (re)set to match when @facet changes + @inspect_prop = @facet\map (prop) -> + active = @active\get! + key = active and active\find prop + key = key.original if key and key.original + key + + @inspect_err = ReactiveVar! + + with div class: 'view inspector' + \append nav { + span 'inspector' + @inspect_prop\map (current) -> + current = current and current\tostring! + fileder = @active\get! + + onchange = (_, e) -> + return if e.target.value == '' + { :name } = @facet\get! + @inspect_prop\set Key e.target.value + + with select :onchange + \append option '(none)', value: '', disabled: true, selected: not value + if fileder + for key, _ in pairs fileder.facets + value = key\tostring! + \append option value, :value, selected: value == current + @inspect\map (enabled) -> + if enabled + button 'close', onclick: (_, e) -> @inspect\set false + } + \append with div class: @inspect_err\map (e) -> if e then 'error-wrap' else 'error-wrap empty' + \append span "an error occured while rendering this view:" + \append @inspect_err + \append with pre class: 'content' + \append keep @inspect_prop\map (prop, old) -> + @get_content prop, @inspect_err, (prop) => + value, key = @get prop + assert key, "couldn't @get #{prop}" + + conversions = get_conversions 'mmm/dom', key.type, casts + assert conversions, "cannot cast '#{key.type}'" + apply_conversions conversions, value, @, prop + + default_convert = (key) => @get key.name, 'mmm/dom' + + navigate: (new) => + @path\set new + +{ + :Browser +} -- cgit v1.2.3 From 53ae76389b2b914d06737ee51a54282501c32780 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 21 Sep 2019 17:58:08 +0200 Subject: add desc, inline to mmm-embed --- mmm/mmmfs/conversion.moon | 11 +++++++++-- mmm/mmmfs/util.moon | 11 +++++++++++ scss/_content.scss | 21 +++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/mmm/mmmfs/conversion.moon b/mmm/mmmfs/conversion.moon index dc301eb..f6ca8c0 100644 --- a/mmm/mmmfs/conversion.moon +++ b/mmm/mmmfs/conversion.moon @@ -59,9 +59,12 @@ converts = { link_to path, text, fileder - html = html\gsub '', (attrs) -> + html = html\gsub '(.-)', (attrs, desc) -> path, facet = '', '' opts = {} + if #desc != 0 + opts.desc = desc + while attrs and attrs != '' key, val, _attrs = attrs\match '^(%w+)="([^"]-)"%s*(.*)' if not key @@ -74,6 +77,7 @@ converts = { when 'path' then path = val when 'facet' then facet = val when 'nolink' then opts.nolink = true + when 'inline' then opts.inline = true else warn "unkown attribute '#{key}=\"#{val}\"' in " embed path, facet, fileder, opts @@ -91,8 +95,10 @@ converts = { path = js_fix element\getAttribute 'path' facet = js_fix element\getAttribute 'facet' nolink = js_fix element\getAttribute 'nolink' + inline = js_fix element\getAttribute 'inline' + desc = js_fix element.innerText - element\replaceWith embed path or '', facet or '', fileder, { :nolink } + element\replaceWith embed path or '', facet or '', fileder, { :nolink, :inline, :desc } embeds = \getElementsByTagName 'mmm-link' embeds = [embeds[i] for i=0, embeds.length - 1] @@ -159,6 +165,7 @@ converts = { height: 315 frameborder: 0 allowfullscreen: true + frameBorder: 0 src: "//www.youtube.com/embed/#{id}" } }, diff --git a/mmm/mmmfs/util.moon b/mmm/mmmfs/util.moon index 68a970a..5c25ed3 100644 --- a/mmm/mmmfs/util.moon +++ b/mmm/mmmfs/util.moon @@ -50,6 +50,17 @@ merge = (orig={}, extra) -> padding: '1em', } + klass = 'embed' + klass ..= ' desc' if opts.desc + klass ..= ' inline' if opts.inline + + node = div { + class: klass + node + if opts.desc + div opts.desc, class: 'description' + } + return node if opts.nolink link_to fileder, node, nil, opts.attr diff --git a/scss/_content.scss b/scss/_content.scss index 0bfc1e8..543d6be 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -18,6 +18,27 @@ } } + .embed { + width: inherit; + height: inherit; + + .description { + text-align: center; + } + + &.inline { + display: inline-block; + } + + &.desc { + display: inline-block; + background: var(--gray-dark); + color: var(--gray-bright); + padding: 0.5em; + margin: 0.2em; + } + } + pre > code { @include left-border; border-color: $gray-dark; -- cgit v1.2.3 From adb50cbadb0cbd44b9e3722333cf3e4f9974546a Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 21 Sep 2019 17:58:16 +0200 Subject: add IYNX docs page --- root/games/IYNX/boot_sequence/URL -> twitter$tweet | 1 + root/games/IYNX/cryptex/URL -> twitter$tweet | 1 + root/games/IYNX/link: URL | 1 - root/games/IYNX/pictures/a/image$jpeg.jpg | Bin 0 -> 34593 bytes root/games/IYNX/pictures/b/image$jpeg.jpg | Bin 0 -> 34862 bytes root/games/IYNX/pictures/c/image$jpeg.jpg | Bin 0 -> 76107 bytes root/games/IYNX/pictures/d/image$jpeg.jpg | Bin 0 -> 73873 bytes .../pictures/text$moonscript -> fn -> mmm$dom.moon | 17 ++++++ root/games/IYNX/pictures/ui_menu/image$jpeg.jpg | Bin 0 -> 24812 bytes root/games/IYNX/pictures/ui_sample/image$jpeg.jpg | Bin 0 -> 52894 bytes root/games/IYNX/pin_pad/URL -> twitter$tweet | 1 + root/games/IYNX/teaser/URL -> youtube$video | 1 + root/games/IYNX/text$markdown.md | 66 +++++++++++++++++++++ root/games/IYNX/ui_demo/URL -> twitter$tweet | 1 + 14 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 root/games/IYNX/boot_sequence/URL -> twitter$tweet create mode 100644 root/games/IYNX/cryptex/URL -> twitter$tweet delete mode 100644 root/games/IYNX/link: URL create mode 100644 root/games/IYNX/pictures/a/image$jpeg.jpg create mode 100644 root/games/IYNX/pictures/b/image$jpeg.jpg create mode 100644 root/games/IYNX/pictures/c/image$jpeg.jpg create mode 100644 root/games/IYNX/pictures/d/image$jpeg.jpg create mode 100644 root/games/IYNX/pictures/text$moonscript -> fn -> mmm$dom.moon create mode 100644 root/games/IYNX/pictures/ui_menu/image$jpeg.jpg create mode 100644 root/games/IYNX/pictures/ui_sample/image$jpeg.jpg create mode 100644 root/games/IYNX/pin_pad/URL -> twitter$tweet create mode 100644 root/games/IYNX/teaser/URL -> youtube$video create mode 100644 root/games/IYNX/text$markdown.md create mode 100644 root/games/IYNX/ui_demo/URL -> twitter$tweet diff --git a/root/games/IYNX/boot_sequence/URL -> twitter$tweet b/root/games/IYNX/boot_sequence/URL -> twitter$tweet new file mode 100644 index 0000000..77b85f6 --- /dev/null +++ b/root/games/IYNX/boot_sequence/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/817332363273310209 diff --git a/root/games/IYNX/cryptex/URL -> twitter$tweet b/root/games/IYNX/cryptex/URL -> twitter$tweet new file mode 100644 index 0000000..4d7974b --- /dev/null +++ b/root/games/IYNX/cryptex/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/825476278732148736 diff --git a/root/games/IYNX/link: URL b/root/games/IYNX/link: URL deleted file mode 100644 index 1210035..0000000 --- a/root/games/IYNX/link: URL +++ /dev/null @@ -1 +0,0 @@ -http://www.colognegamelab.de/studentprojects/iynx-20162017/ diff --git a/root/games/IYNX/pictures/a/image$jpeg.jpg b/root/games/IYNX/pictures/a/image$jpeg.jpg new file mode 100644 index 0000000..286c406 Binary files /dev/null and b/root/games/IYNX/pictures/a/image$jpeg.jpg differ diff --git a/root/games/IYNX/pictures/b/image$jpeg.jpg b/root/games/IYNX/pictures/b/image$jpeg.jpg new file mode 100644 index 0000000..48190c0 Binary files /dev/null and b/root/games/IYNX/pictures/b/image$jpeg.jpg differ diff --git a/root/games/IYNX/pictures/c/image$jpeg.jpg b/root/games/IYNX/pictures/c/image$jpeg.jpg new file mode 100644 index 0000000..2eb5db7 Binary files /dev/null and b/root/games/IYNX/pictures/c/image$jpeg.jpg differ diff --git a/root/games/IYNX/pictures/d/image$jpeg.jpg b/root/games/IYNX/pictures/d/image$jpeg.jpg new file mode 100644 index 0000000..3a00dae Binary files /dev/null and b/root/games/IYNX/pictures/d/image$jpeg.jpg differ diff --git a/root/games/IYNX/pictures/text$moonscript -> fn -> mmm$dom.moon b/root/games/IYNX/pictures/text$moonscript -> fn -> mmm$dom.moon new file mode 100644 index 0000000..dfa03eb --- /dev/null +++ b/root/games/IYNX/pictures/text$moonscript -> fn -> mmm$dom.moon @@ -0,0 +1,17 @@ +import div from require 'mmm.dom' +import embed from (require 'mmm.mmmfs.util') require 'mmm.dom' + +=> + images = for child in *@children + embed child, nil, nil, attr: { + style: { + height: '15em' + margin: '0 .5em' + } + } + + div with images + .style = { + display: 'flex' + overflow: 'auto hidden' + } diff --git a/root/games/IYNX/pictures/ui_menu/image$jpeg.jpg b/root/games/IYNX/pictures/ui_menu/image$jpeg.jpg new file mode 100644 index 0000000..6372f3f Binary files /dev/null and b/root/games/IYNX/pictures/ui_menu/image$jpeg.jpg differ diff --git a/root/games/IYNX/pictures/ui_sample/image$jpeg.jpg b/root/games/IYNX/pictures/ui_sample/image$jpeg.jpg new file mode 100644 index 0000000..b8fa2cb Binary files /dev/null and b/root/games/IYNX/pictures/ui_sample/image$jpeg.jpg differ diff --git a/root/games/IYNX/pin_pad/URL -> twitter$tweet b/root/games/IYNX/pin_pad/URL -> twitter$tweet new file mode 100644 index 0000000..73a2ad6 --- /dev/null +++ b/root/games/IYNX/pin_pad/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/818230279269679104 diff --git a/root/games/IYNX/teaser/URL -> youtube$video b/root/games/IYNX/teaser/URL -> youtube$video new file mode 100644 index 0000000..078b3e9 --- /dev/null +++ b/root/games/IYNX/teaser/URL -> youtube$video @@ -0,0 +1 @@ +https://www.youtube.com/watch?v=i7D_9P2semQ diff --git a/root/games/IYNX/text$markdown.md b/root/games/IYNX/text$markdown.md new file mode 100644 index 0000000..cfd7944 --- /dev/null +++ b/root/games/IYNX/text$markdown.md @@ -0,0 +1,66 @@ +IYNX +==== + + +An engaging, tangible and physical electronic puzzle where a mysterious device is found with no indication of its purpose, +and alongside it is a personality chip owned by a man named John. +The device looks tampered with, as if someone has tried to sabotage or access what it contains. +Who’s John and what’s inside? + +You only need to figure a way in to find out. + + + a project teaser + + +Concept +------- +IYNX is a physical object in the form of a cube, surrounded by mechanical and digital puzzles. +The Player is given the object with no explanation and encouraged to experiment. +The game consists of a set of puzzles, each unlocking new content accessible from the screen, slowly fleshing a narrative around them. + +As the player progresses and solves the game puzzle by puzzle, +it becomes increasingly clear that the AI that is 'trapped' in the cube is malicious and highly manipulative. +Lore that can be pieced together by attentive players suggests +that the cube has been built especially to contain the AI in an electronic prison of sorts. +It is continuously hinted at, and finally revealed, that every puzzle solved was in fact a security +mechanism the player disabled, following the AIs suggestions and instructions. +At the end of the game the AI escapes by uploading itself into the internet. +Initially the player is lead to believe that he is impersonating the original user of the AI, +but it turns out that the AI knew this since the beginning and used the player's curiosity to its own advantage. + +Technical Realisation +--------------------- +The cube is powered by a Raspberry Pi 3 and two Arduino Micros. +The Arduinos are connected as Serial devices. + +The Raspberry Pi is connected to a Touchscreen Panel as well as USB Speakers. +It runs a custom electron app that interfaces with the Serial ports, +plays back video and audio files and displays a futuristic OS that lets you browse a filesystem. + + + the User Interface was built using react and electron + + +The game consists of several smaller puzzle components that are arranged to form a story as a whole, +through which the player is guided by the 'AI' that posseses the artifact. + + +
+ + a fake boot sequence for a component of the cube + + + a pinpad that grants access to the higher systems of the cube + + + an early prototype of the Cryptex puzzle that marks the end of the game + +
+ +Credits +------- +- Trent Davies: Puzzle and Narrative Design +- Sol Bekic: Programming and Electronics +- Dominique Bodden: Art and Physical Construction +- Ilke Karademir: Puzzle and Graphic Design diff --git a/root/games/IYNX/ui_demo/URL -> twitter$tweet b/root/games/IYNX/ui_demo/URL -> twitter$tweet new file mode 100644 index 0000000..9ea54e1 --- /dev/null +++ b/root/games/IYNX/ui_demo/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/825864142116491264 -- cgit v1.2.3 From 2e713ec43e0ca07042f26002e4afef7f1a5528f9 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 22 Sep 2019 15:52:38 +0200 Subject: add VJmidiKit --- root/projects/VJmidiKit/boxy/URL -> twitter$tweet | 1 + .../VJmidiKit/boxy_dnb/URL -> twitter$tweet | 1 + .../VJmidiKit/boxy_visualist/URL -> twitter$tweet | 1 + .../dancing_pineapple/URL -> twitter$tweet | 1 + root/projects/VJmidiKit/jam/URL -> youtube$video | 1 + .../VJmidiKit/kaleidoscope/URL -> twitter$tweet | 1 + root/projects/VJmidiKit/link: URL -> youtube$video | 1 - .../VJmidiKit/pillars/URL -> twitter$tweet | 1 + .../VJmidiKit/pineapple/URL -> twitter$tweet | 1 + .../projects/VJmidiKit/stills/URL -> twitter$tweet | 1 + root/projects/VJmidiKit/text$markdown.md | 31 ++++++++++++++++++++++ .../projects/VJmidiKit/tomcat/URL -> twitter$tweet | 1 + .../VJmidiKit/tomcat_tunnel/URL -> twitter$tweet | 1 + scss/_content.scss | 3 +-- 14 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 root/projects/VJmidiKit/boxy/URL -> twitter$tweet create mode 100644 root/projects/VJmidiKit/boxy_dnb/URL -> twitter$tweet create mode 100644 root/projects/VJmidiKit/boxy_visualist/URL -> twitter$tweet create mode 100644 root/projects/VJmidiKit/dancing_pineapple/URL -> twitter$tweet create mode 100644 root/projects/VJmidiKit/jam/URL -> youtube$video create mode 100644 root/projects/VJmidiKit/kaleidoscope/URL -> twitter$tweet delete mode 100644 root/projects/VJmidiKit/link: URL -> youtube$video create mode 100644 root/projects/VJmidiKit/pillars/URL -> twitter$tweet create mode 100644 root/projects/VJmidiKit/pineapple/URL -> twitter$tweet create mode 100644 root/projects/VJmidiKit/stills/URL -> twitter$tweet create mode 100644 root/projects/VJmidiKit/text$markdown.md create mode 100644 root/projects/VJmidiKit/tomcat/URL -> twitter$tweet create mode 100644 root/projects/VJmidiKit/tomcat_tunnel/URL -> twitter$tweet diff --git a/root/projects/VJmidiKit/boxy/URL -> twitter$tweet b/root/projects/VJmidiKit/boxy/URL -> twitter$tweet new file mode 100644 index 0000000..5521568 --- /dev/null +++ b/root/projects/VJmidiKit/boxy/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1171136990118649857 diff --git a/root/projects/VJmidiKit/boxy_dnb/URL -> twitter$tweet b/root/projects/VJmidiKit/boxy_dnb/URL -> twitter$tweet new file mode 100644 index 0000000..41a8326 --- /dev/null +++ b/root/projects/VJmidiKit/boxy_dnb/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1171137508991787008 diff --git a/root/projects/VJmidiKit/boxy_visualist/URL -> twitter$tweet b/root/projects/VJmidiKit/boxy_visualist/URL -> twitter$tweet new file mode 100644 index 0000000..a5dfd73 --- /dev/null +++ b/root/projects/VJmidiKit/boxy_visualist/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1171137921858056192 diff --git a/root/projects/VJmidiKit/dancing_pineapple/URL -> twitter$tweet b/root/projects/VJmidiKit/dancing_pineapple/URL -> twitter$tweet new file mode 100644 index 0000000..09625ee --- /dev/null +++ b/root/projects/VJmidiKit/dancing_pineapple/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1009523556001173506 diff --git a/root/projects/VJmidiKit/jam/URL -> youtube$video b/root/projects/VJmidiKit/jam/URL -> youtube$video new file mode 100644 index 0000000..5c8dd95 --- /dev/null +++ b/root/projects/VJmidiKit/jam/URL -> youtube$video @@ -0,0 +1 @@ +https://www.youtube.com/watch?v=QiMCIsrlNIQ diff --git a/root/projects/VJmidiKit/kaleidoscope/URL -> twitter$tweet b/root/projects/VJmidiKit/kaleidoscope/URL -> twitter$tweet new file mode 100644 index 0000000..2152177 --- /dev/null +++ b/root/projects/VJmidiKit/kaleidoscope/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1050731951689101313 diff --git a/root/projects/VJmidiKit/link: URL -> youtube$video b/root/projects/VJmidiKit/link: URL -> youtube$video deleted file mode 100644 index 5c8dd95..0000000 --- a/root/projects/VJmidiKit/link: URL -> youtube$video +++ /dev/null @@ -1 +0,0 @@ -https://www.youtube.com/watch?v=QiMCIsrlNIQ diff --git a/root/projects/VJmidiKit/pillars/URL -> twitter$tweet b/root/projects/VJmidiKit/pillars/URL -> twitter$tweet new file mode 100644 index 0000000..1a3435a --- /dev/null +++ b/root/projects/VJmidiKit/pillars/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1050771730384343041 diff --git a/root/projects/VJmidiKit/pineapple/URL -> twitter$tweet b/root/projects/VJmidiKit/pineapple/URL -> twitter$tweet new file mode 100644 index 0000000..9f8b953 --- /dev/null +++ b/root/projects/VJmidiKit/pineapple/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1010276414321512448 diff --git a/root/projects/VJmidiKit/stills/URL -> twitter$tweet b/root/projects/VJmidiKit/stills/URL -> twitter$tweet new file mode 100644 index 0000000..0ea3752 --- /dev/null +++ b/root/projects/VJmidiKit/stills/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1044844729878413312 diff --git a/root/projects/VJmidiKit/text$markdown.md b/root/projects/VJmidiKit/text$markdown.md new file mode 100644 index 0000000..7767e93 --- /dev/null +++ b/root/projects/VJmidiKit/text$markdown.md @@ -0,0 +1,31 @@ +VJmidiKit +========= + +VJmidiKit is a tool for VJing using livecoded (raymarching) shaders and connecting shaders to MIDI signals +from live music and controllers for music reactivity. +The interactions between MIDI signals and shader variables can be programmed in many different ways using a visual block language. + +VJmidiKit is a C++ application built on top of [openFrameworks][of], [Dear Imgui][imgui], [RtMidi][rtmidi] and [yaml-cpp][yaml]. +The Shaders in the following media are all written in GLSL by me, using the excellent [hg\_sdf][hgsdf] library. + +If you are interested in trying VJmidiKit for yourself, feel free to message me. +You can find my email address at the top, and social media at the bottom of this website. + +
+ + + + + + + + + + +
+ +[of]: https://openframeworks.cc/ +[imgui]: https://github.com/ocornut/imgui +[rtmidi]: https://github.com/thestk/rtmidi +[yaml]: https://github.com/jbeder/yaml-cpp +[hgsdf]: http://mercury.sexy/hg_sdf/ diff --git a/root/projects/VJmidiKit/tomcat/URL -> twitter$tweet b/root/projects/VJmidiKit/tomcat/URL -> twitter$tweet new file mode 100644 index 0000000..a7a08f3 --- /dev/null +++ b/root/projects/VJmidiKit/tomcat/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1006220929519816708 diff --git a/root/projects/VJmidiKit/tomcat_tunnel/URL -> twitter$tweet b/root/projects/VJmidiKit/tomcat_tunnel/URL -> twitter$tweet new file mode 100644 index 0000000..48497c4 --- /dev/null +++ b/root/projects/VJmidiKit/tomcat_tunnel/URL -> twitter$tweet @@ -0,0 +1 @@ +https://twitter.com/S0lll0s/status/1006217163240280080 diff --git a/scss/_content.scss b/scss/_content.scss index 543d6be..708685f 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -32,10 +32,9 @@ &.desc { display: inline-block; - background: var(--gray-dark); - color: var(--gray-bright); padding: 0.5em; margin: 0.2em; + background: $gray-bright; } } -- cgit v1.2.3 From 0ffcbffa8c84540c4e8bbec747a578e353fb844c Mon Sep 17 00:00:00 2001 From: s-ol Date: Wed, 25 Sep 2019 10:05:33 +0200 Subject: minor readme fix --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a1dd4ba..35cccd4 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,13 @@ What? ----- This repo is roughly split into three parts: -- `mmm.dom`, `mmm.component`: polymorphic Lua/Moonscript modules web development. +- `mmm.dom`, `mmm.component`: polymorphic Lua/Moonscript modules for web development. \[[code: `mmm`](mmm) - [docs](https://mmm.s-ol.nu/meta)\] - `mmmfs`: the CMS/FS powering [mmm.s-ol.nu](https://mmm.s-ol.nu). \[[code: `mmm/mmmfs`](mmm/mmmfs) - [article](https://mmm.s-ol.nu/articles/mmmfs)\] - the page contents: includes my portfolio, blog, experiments... - authored using a mix of Moonscript, Markdown and HTML, thanks to the power of `mmmfs`. - \[[data: `root`](root), but you might want to read a bit about mmmfs before you jump in. + authored using a mix of Moonscript, Markdown and HTML, thanks to the power of `mmmfs`. + \[[data: `root`](root), but you might want to read a bit about mmmfs before you jump in.] Building & Viewing ------------------ -- cgit v1.2.3 From 72849237ec3dae55b4ee9e4a94416572647fe2ea Mon Sep 17 00:00:00 2001 From: s-ol Date: Wed, 25 Sep 2019 10:14:38 +0200 Subject: fix browser error traceback --- mmm/mmmfs/browser.moon | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mmm/mmmfs/browser.moon b/mmm/mmmfs/browser.moon index c25062d..47b4ea4 100644 --- a/mmm/mmmfs/browser.moon +++ b/mmm/mmmfs/browser.moon @@ -151,7 +151,7 @@ class Browser @node = wrapper.node @render = wrapper\render - err_and_trace = (err) -> "#{err} #{debug.traceback!}" + err_and_trace = (msg) -> { :msg, trace: debug.traceback! } default_convert = (key) => @get key.name, 'mmm/dom' -- render #browser-content @@ -169,7 +169,7 @@ class Browser return disp_error "fileder not found!" unless active return disp_error "facet not found!" unless prop - ok, res, trace = xpcall convert, err_and_trace, active, prop + ok, res = xpcall convert, err_and_trace, active, prop document.body.classList\remove 'loading' if MODE == 'CLIENT' @@ -178,11 +178,10 @@ class Browser res elseif ok div "[no conversion path to #{prop.type}]" - elseif res and res.match and res\match '%[nossr%]$' + elseif res and res.msg.match and res.msg\match '%[nossr%]$' div "[this page could not be pre-rendered on the server]" else - if trace - res = "#{res}\n#{trace}" + res = "#{res.msg}\n#{res.trace}" disp_error res get_inspector: => -- cgit v1.2.3 From 0a8fd1fb6d2813b3256a0f6dedca4a85b1dba13e Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 27 Sep 2019 23:03:43 +0200 Subject: sticky footer --- scss/_footer.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scss/_footer.scss b/scss/_footer.scss index 466139c..3cc3f5a 100644 --- a/scss/_footer.scss +++ b/scss/_footer.scss @@ -2,6 +2,9 @@ footer { display: flex; padding: 1rem 2rem; + position: sticky; + bottom: 0; + color: $gray-bright; background: $gray-dark; -- cgit v1.2.3 From 15a375a356667ff0d7c3b3c5cde337cdbf55854a Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 27 Sep 2019 23:11:10 +0200 Subject: add knob pics to btrktrl article --- root/projects/btrktrl/$order | 13 ------------- root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon | 7 +++++++ 2 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 root/projects/btrktrl/$order diff --git a/root/projects/btrktrl/$order b/root/projects/btrktrl/$order deleted file mode 100644 index 0520d1b..0000000 --- a/root/projects/btrktrl/$order +++ /dev/null @@ -1,13 +0,0 @@ -proto_rgb -proto_encoder -proto_spi -knobs_all -knobs_testing -pcb_glamour_close -pcb_glamour_far -pcb_glamour_top -pcb_glamour -pcb_glamour_connector -pcb_dev_configuration -pcb_dev_encoder -pcb_osc diff --git a/root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon b/root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon index f7d8f9c..4d12d25 100644 --- a/root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon +++ b/root/projects/btrktrl/text$moonscript -> fn -> mmm$dom.moon @@ -52,6 +52,13 @@ import link_to from (require 'mmm.mmmfs.util') require 'mmm.dom' filtered_block '^pcb_glamour' filtered_block '^pcb_dev' + text "I also contacted some suppliers of machined aluminum knobs online and ordered a some samples from one of them.", + "I selected only knobs that are made made from solid aluminum and that use a set-screw for fastening to make sure + that the aluminum and the encoder would make electrical contact through the set-screw, which is required for the + capacitive sensing to work (at leas the way I implemented it)." + + filtered_block '^knobs' + text "The daughterboards and controller communicate over a custom SPI protocol I designed. The controller configures the daughterboards on boot or request from the PC. It sends and receives OSC messages over SLIP-encoded Serial. -- cgit v1.2.3 From 3d5e4867a48ca786ff1892fb00c11ea37b9faa1c Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 28 Sep 2019 14:27:42 +0200 Subject: cast for URL --- mmm/mmmfs/browser.moon | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mmm/mmmfs/browser.moon b/mmm/mmmfs/browser.moon index 47b4ea4..a57e8b9 100644 --- a/mmm/mmmfs/browser.moon +++ b/mmm/mmmfs/browser.moon @@ -28,7 +28,12 @@ casts = { inp: 'text/plain' out: 'mmm/dom' transform: (val) -> text val - } + }, + { + inp: 'URL.*' + out: 'mmm/dom' + transform: (href) -> span a href, :href + }, } for convert in *converts @@ -58,7 +63,7 @@ class Browser window.history\pushState path, '', vis_path window.onpopstate = (_, event) -> - if event.state + if event.state and not event.state == js.null @skip = true @path\set event.state @skip = nil -- cgit v1.2.3