diff --git a/demo/src/3d/3d.js b/demo/src/3d/3d.js new file mode 100644 index 00000000..e560ebed --- /dev/null +++ b/demo/src/3d/3d.js @@ -0,0 +1,26 @@ +const copy = require('copy-to-clipboard'); +const createViewer = require('../../..'); +const { svgElementToSvgImageContent } = require('../../../util'); + +document.addEventListener('keypress', function (event) { + if (event.keyCode === 99) { + // the c key + const svg = document.querySelector('svg'); + const content = svgElementToSvgImageContent(svg); + copy(content); + } +}); + +createViewer({ + width: 0.4, + height: 0.4, + followMouse: true, + followMotion: true, +}); + +createViewer({ + width: 0.4, + height: 0.4, + followMouse: true, + followMotion: true, +}); diff --git a/demo/src/3d/index.html b/demo/src/3d/index.html new file mode 100644 index 00000000..661c1480 --- /dev/null +++ b/demo/src/3d/index.html @@ -0,0 +1,31 @@ + + + + + --- + + + + + +
+ + + diff --git a/demo/src/index.html b/demo/src/index.html index 6166a61a..e68d649c 100644 --- a/demo/src/index.html +++ b/demo/src/index.html @@ -16,6 +16,7 @@
  • fade
  • beta
  • flask
  • +
  • 3d glasses