aboutsummaryrefslogtreecommitdiffstats
path: root/root/$mmm/plugins/gltf
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-03-28 13:58:08 +0000
committers-ol <s+removethis@s-ol.nu>2022-03-28 14:24:26 +0000
commit269d9986c12e277eb6fd5241f34c027c439f84ae (patch)
tree748f965272ada1293b5d5f12420f9f7cb069c0fa /root/$mmm/plugins/gltf
parentmove layout into user content (diff)
downloadmmm-269d9986c12e277eb6fd5241f34c027c439f84ae.tar.gz
mmm-269d9986c12e277eb6fd5241f34c027c439f84ae.zip
fix plugins in example root
Diffstat (limited to 'root/$mmm/plugins/gltf')
-rw-r--r--root/$mmm/plugins/gltf/converts: text$lua -> table.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/root/$mmm/plugins/gltf/converts: text$lua -> table.lua b/root/$mmm/plugins/gltf/converts: text$lua -> table.lua
new file mode 100644
index 0000000..5a7869f
--- /dev/null
+++ b/root/$mmm/plugins/gltf/converts: text$lua -> table.lua
@@ -0,0 +1,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
+ }
+}