Commit 169d2f72 authored by amandaghassaei's avatar amandaghassaei

video scale

parent 9af7e032
......@@ -452,6 +452,10 @@ a.seeMore.closed>.fui-triangle-down{
transform: rotate(45deg);
}
#screenCaptureModal .modal-content{
background: rgba(255,255,255,0.9);
}
#recordStatus{
position: absolute;
bottom:20px;
......
......@@ -196,11 +196,17 @@ function initControls(globals){
setLink("#createVideo", function(){
//quality 0-63
//timeLimit: 30
globals.shouldScaleCanvas = true;
$("#screenCaptureModal").modal("show");
$("#screenRecordFilename").val(globals.filename);
globals.screenRecordFilename = globals.filename;
globals.threeView.onWindowResize();
updateCanvasDimensions();
});
$("#screenCaptureModal").on('hidden.bs.modal', function (){
globals.shouldScaleCanvas = false;
globals.threeView.onWindowResize();
});
setInput("#capturerFPS", globals.capturerFPS, function(val){
globals.capturerFPS = val;
}, 0, 60);
......@@ -209,6 +215,7 @@ function initControls(globals){
}, 0, 63);
setInput("#capturerScale", globals.capturerScale, function(val){
globals.capturerScale = val;
globals.threeView.onWindowResize();
updateCanvasDimensions();
}, 1);
function updateCanvasDimensions(){
......@@ -232,6 +239,7 @@ function initControls(globals){
quality: globals.capturerQuality
});
$("#recordStatus").show();
globals.shouldScaleCanvas = false;
globals.capturer.start();
});
......@@ -240,6 +248,8 @@ function initControls(globals){
globals.capturer.stop();
globals.capturer.save();
globals.capturer = null;
globals.shouldScaleCanvas = false;
globals.threeView.onWindowResize();
$("#recordStatus").hide();
});
......
......@@ -89,7 +89,8 @@ function initGlobals(){
capturerQuality: 63,
capturerFPS: 60,
capturerScale: 1,
capturerFrames: 0
capturerFrames: 0,
shouldScaleCanvas: false
};
function setCreasePercent(percent){
......
......@@ -152,7 +152,9 @@ function initThreeView(globals) {
// camera.bottom = -window.innerHeight / 2;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
var scale = 1;
if (globals.shouldScaleCanvas) scale = globals.capturerScale;
renderer.setSize(scale*window.innerWidth, scale*window.innerHeight);
controls.handleResize();
}
......@@ -201,7 +203,6 @@ function initThreeView(globals) {
scene.background.setStyle( "#" + globals.backgroundColor);
}
return {
sceneAddModel: sceneAddModel,
sceneClearModel: sceneClearModel,
......
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