diff options
Diffstat (limited to 'root/$mmm/plugins/gltf')
| -rw-r--r-- | root/$mmm/plugins/gltf/converts: text$moonscript -> table.moon | 16 | ||||
| -rw-r--r-- | root/$mmm/plugins/gltf/scripts: text$html+frag.html | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/root/$mmm/plugins/gltf/converts: text$moonscript -> table.moon b/root/$mmm/plugins/gltf/converts: text$moonscript -> table.moon new file mode 100644 index 0000000..1036eee --- /dev/null +++ b/root/$mmm/plugins/gltf/converts: text$moonscript -> table.moon @@ -0,0 +1,16 @@ +dom = require 'mmm.dom' + +{ + { + inp: 'URL -> model/gltf-binary' + out: 'mmm/dom' + cost: 1 + transform: (href) => + dom['model-viewer'] { + src: href + 'auto-rotate': true + 'camera-controls': true + 'camera-orbit': "548.2deg 117deg 282.4m" + } + } +} diff --git a/root/$mmm/plugins/gltf/scripts: text$html+frag.html b/root/$mmm/plugins/gltf/scripts: text$html+frag.html new file mode 100644 index 0000000..d2b1e44 --- /dev/null +++ b/root/$mmm/plugins/gltf/scripts: text$html+frag.html @@ -0,0 +1,2 @@ + <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script> + <script nomodule src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js"></script> |
