aboutsummaryrefslogtreecommitdiffstats
path: root/root/$mmm/plugins/gltf/converts: text$lua -> table.lua
blob: 5a7869f0f9886d3fb93c1e391a67c6f617a28814 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local dom = require('mmm.dom')
return {
  {
    inp = 'URL -> model/gltf-binary',
    out = 'mmm/dom',
    cost = 1,
    transform = function(self, href)
      return dom['model-viewer']({
        src = href,
        ['auto-rotate'] = true,
        ['camera-controls'] = true,
        ['camera-orbit'] = "548.2deg 117deg 282.4m"
      })
    end
  }
}