// Wick VCam Beta v0.02
// (optional) set this value to true if you want black bars to
// render if the vcam is a different aspect ratio than the project
this.showBlackBorders = true;
// Save original size of the vcam
this.origBounds = this.origBounds || {
width: this.bounds.width,
height: this.bounds.height,
}
// Hide vcam outline and show black borders (if enabled)
this.gotoAndStop(this.showBlackBorders ? 2 : 3);
// Hide the projects black bars if needed (the vcam will render its own)
this.project.renderBlackBars = false;// Adjust pan and zoom so that only what is inside the vcam is visible
var w = 0;
var h = 0;
w = this.project.view.canvasDimensions.width;
h = this.project.view.canvasDimensions.height;
var wr = w / this.origBounds.width/this.scaleX;
var hr = h / this.origBounds.height/this.scaleY;
this.project.zoom = Math.min(wr, hr);
this.project.pan.x = -(this.x - project.width/2);
this.project.pan.y = -(this.y - project.height/2);
this.project.rotation = -this.rotation;