Fixed size of model window, and made the background transparent
This commit is contained in:
@@ -234,7 +234,7 @@ body {
|
|||||||
|
|
||||||
#virtualObject {
|
#virtualObject {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: auto;
|
height: 100%;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ function webGLStart(){
|
|||||||
initShaders();
|
initShaders();
|
||||||
initBuffers();
|
initBuffers();
|
||||||
|
|
||||||
gl.clearColor(1.0, 1.0, 1.0, 1.0);
|
gl.clearColor(0, 0, 0, 0);
|
||||||
gl.enable(gl.DEPTH_TEST);
|
gl.enable(gl.DEPTH_TEST);
|
||||||
gl.viewport(0, 0, gl.viewportWidth, gl.viewportHeight);
|
gl.viewport(0, 0, gl.viewportWidth, gl.viewportHeight);
|
||||||
|
|
||||||
@@ -385,7 +385,7 @@ function handleMouseMove(event){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resizeCanvas() {
|
function resizeCanvas() {
|
||||||
var canvas = document.getElementById("canvas") ;
|
var canvas = document.getElementById("canvas");
|
||||||
var parent = document.getElementById("virtualObject");
|
var parent = document.getElementById("virtualObject");
|
||||||
|
|
||||||
var canvasWidth1 = canvas.width;
|
var canvasWidth1 = canvas.width;
|
||||||
|
|||||||
Reference in New Issue
Block a user