Difference between revisions of "Widget:3DModel"
Jump to navigation
Jump to search
imported>Elaeagnifolia m (Elaeagnifolia moved page Widget:Adventurer3DModel to Widget:3DModel without leaving a redirect) |
imported>Elaeagnifolia |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | <includeonly><div id="modelViewer"> | + | <includeonly><div id="modelViewer<!--{$secondModel}-->"> |
<a href="">Load 3D Model</a> | <a href="">Load 3D Model</a> | ||
</div></includeonly> | </div></includeonly> | ||
<script> | <script> | ||
| − | document.querySelector("#modelViewer a").addEventListener("click", function(e) { | + | document.querySelector("#modelViewer<!--{$secondModel}--> a").addEventListener("click", function(e) { |
| − | document.querySelector("#modelViewer").innerHTML = '<iframe width="400px" height="400px" src="https://poly.google.com/view/<!--{$embedSrcLink}-->/embed" frameborder="0" style="border:none;" allowvr="yes" allow="vr; xr; accelerometer; magnetometer; gyroscope; autoplay;" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel="" ></iframe>'; | + | document.querySelector("#modelViewer<!--{$secondModel}-->").innerHTML = '<iframe width="400px" height="400px" src="https://poly.google.com/view/<!--{$embedSrcLink}-->/embed" frameborder="0" style="border:none;" allowvr="yes" allow="vr; xr; accelerometer; magnetometer; gyroscope; autoplay;" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel="" ></iframe>'; |
e.preventDefault(); | e.preventDefault(); | ||
e.stopPropagation(); | e.stopPropagation(); | ||
}, false); | }, false); | ||
</script> | </script> | ||
Latest revision as of 21:41, 12 January 2019
<script>
document.querySelector("#modelViewer a").addEventListener("click", function(e) {
document.querySelector("#modelViewer").innerHTML = '<iframe width="400px" height="400px" src="https://poly.google.com/view//embed" frameborder="0" style="border:none;" allowvr="yes" allow="vr; xr; accelerometer; magnetometer; gyroscope; autoplay;" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel="" ></iframe>';
e.preventDefault();
e.stopPropagation();
}, false);
</script>