Commit ea0bcda1 authored by amandaghassaei's avatar amandaghassaei

check for webp support

parent dde10206
......@@ -915,6 +915,7 @@
<li><a href="https://www.npmjs.com/package/path-data-polyfill" target="_blank">path-data-polyfill</a> helps with SVG parsing</li>
<li><a href="https://github.com/edemaine/fold" target="_blank">FOLD</a> is used as the internal data structure, and methods from the FOLD api are used for SVG parsing</li>
<li>Arbitrary polygonal faces of imported geometry are triangulated using the <a target="_blank" href="https://github.com/mapbox/earcut">Earcut Library</a></li>
<li>GIF and WebM video export uses <a target="_blank" href="https://github.com/spite/ccapture.js/">CCapture</a></li>
<li><a target="_blank" href="https://jquery.com/">jQuery</a>, <a target="_blank" href="http://getbootstrap.com/">Bootstrap</a>, and the
<a target="_blank" href="http://designmodo.github.io/Flat-UI/">Flat UI theme</a> used to build the GUI</li>
</ul>
......@@ -1318,7 +1319,7 @@
</button>
<p><b>SVG IMPORT SETTINGS</b><br/><br/>
Vertex merge tolerance (px) : &nbsp;&nbsp;<input id="vertTol" value="" placeholder="" class="float form-control" type="text">
<div class="smallTxt">Vertices within this px tolerance in the SVG will be merged into one.</div>
<div class="smallTxt">Vertices within this px tolerance in the SVG will be merged into one. It is recommended to keep this number above zero.</div>
</p>
</div>
<div class="modal-footer">
......
......@@ -200,15 +200,34 @@ function initControls(globals){
updateCanvasDimensions();
});
setLink("#createVideo", function(){
//timeLimit: s of video to limit
globals.shouldScaleCanvas = true;
$("#screenCaptureModal .gif").hide();
$("#screenCaptureModal .video").show();
$("#screenCaptureModal").modal("show");
$("#screenRecordFilename").val(globals.filename);
globals.screenRecordFilename = globals.filename;
globals.threeView.onWindowResize();
updateCanvasDimensions();
var hasWebP = false;
(function() {
var img = new Image();
img.onload = function() {
hasWebP = !!(img.height > 0 && img.width > 0);
if (hasWebP){
//timeLimit: s of video to limit
globals.shouldScaleCanvas = true;
$("#screenCaptureModal .gif").hide();
$("#screenCaptureModal .video").show();
$("#screenCaptureModal").modal("show");
$("#screenRecordFilename").val(globals.filename);
globals.screenRecordFilename = globals.filename;
globals.threeView.onWindowResize();
updateCanvasDimensions();
} else {
globals.warn("Video export not supported by this browser, please try again " +
"with the latest version of Google Chrome.");
}
};
img.onerror = function() {
globals.warn("Video export not supported by this browser, please try again " +
"with the latest version of Google Chrome.");
};
img.src = 'http://www.gstatic.com/webp/gallery/1.webp';
})();
});
$("#screenCaptureModal").on('hidden.bs.modal', function (){
if (globals.capturer) return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment