made 3d viewer a little cleaner
This commit is contained in:
parent
171dcbe3a8
commit
6645c4588b
@ -38,15 +38,26 @@ test...
|
|||||||
thingiview.setObjectColor('#821543');
|
thingiview.setObjectColor('#821543');
|
||||||
thingiview.initScene();
|
thingiview.initScene();
|
||||||
thingiview.loadSTL("{{ display_media }}");
|
thingiview.loadSTL("{{ display_media }}");
|
||||||
|
thingiview.setRotation(false);
|
||||||
// note thingiview.setRotation(false) to turn off rotation...
|
|
||||||
}
|
}
|
||||||
|
window.rotate = false;
|
||||||
|
window.toggle_rotate = function () {
|
||||||
|
rotate = ! rotate;
|
||||||
|
thingiview.setRotation(rotate);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="viewer" style="width:640px;height:480px"></div>
|
<div id="viewer" style="width:640px;height:480px;padding-bottom:4px;"></div
|
||||||
|
<p>
|
||||||
<a href="{{ display_media }}">stl model</a>
|
<a class="button_action" onclick="toggle_rotate()"
|
||||||
|
title="{%- trans %}Toggle Rotate{% endtrans -%}">
|
||||||
|
{%- trans %}Toggle Rotate{% endtrans -%}
|
||||||
|
</a>
|
||||||
|
<a class="button_action" href="{{ display_media }}"
|
||||||
|
title="{%- trans %}Download{% endtrans -%}">
|
||||||
|
{%- trans %}Download{% endtrans -%}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user