Commit d293c481 authored by Villard PierreFrederic's avatar Villard PierreFrederic
Browse files

fix buggs

parent cacc2cc2
Pipeline #5980 passed with stage
in 20 seconds
......@@ -153,7 +153,7 @@ function chaise2(){
function table(){
var cubeMaterial = new THREE.MeshLambertMaterial( { color: 0xFFFFFF, shininess: 100 } );
var cubeMaterial = new THREE.MeshLambertMaterial( { color: 0xFFFFFF} );
cube = new THREE.Mesh(new THREE.BoxGeometry( 10, 200, 10 ), cubeMaterial );
cube.position.x = -300;
cube.position.y = 100;
......@@ -189,7 +189,7 @@ function table(){
function fenetre(){
var cubeMaterial = new THREE.MeshLambertMaterial( { color: 0xFFFFFF, shininess: 100 } );
var cubeMaterial = new THREE.MeshLambertMaterial( { color: 0xFFFFFF } );
var glassMaterial = new THREE.MeshPhongMaterial( { shininess: 100, opacity: 0.1, transparent: true} );
......@@ -217,7 +217,7 @@ function fenetre(){
function murs(){
var loader = new THREE.TextureLoader();
myTexture = loader.load( 'textures/mur.jpg' );
myTexture = loader.load( 'texture/mur.jpg' );
myTexture.wrapS = myTexture.wrapT = THREE.RepeatWrapping;
myTexture.repeat.set( 1,1 );
var myPolygonMaterial = new THREE.MeshBasicMaterial( { map: myTexture } );
......@@ -288,7 +288,7 @@ function render() {
cameraControls.update(delta);
headlight.position.copy( camera.position );
spotlight.shadowBias = effectController.shadowBias;
spotlight.shadow.bias = effectController.shadowBias;
renderer.render(scene, camera);
}
......
......@@ -20,7 +20,7 @@
<script src="http://threejs.org/examples/js/libs/dat.gui.min.js">
</script>
<!-- Bibliotheques en local -->
<script src="lib/Coordinates.js"></script>
<script src="../lib/Coordinates.js"></script>
<!-- Un titre centre -->
<h1 class="centre"> TP 1 - Modelisation</h1>
<!-- Pour mettre le rendu Web GL centre -->
......
......@@ -42,8 +42,8 @@
<!-- Bibliotheques en local -->
<script src="Coordinates.js"></script>
<script src="jquery-1.8.3.min.js"></script>
<script src="../lib/Coordinates.js"></script>
<script src="../lib/jquery-1.8.3.min.js"></script>
<!-- Un titre centre -->
......
......@@ -193,5 +193,5 @@ try {
animate();
} catch (e) {
var errorReport = "Your program encountered an unrecoverable error, can not draw on canvas. Error was:<br/><br/>";
$('#container').append(errorReport + e);
}
\ No newline at end of file
$('#webGL').append(errorReport + e+'<br/><br/><br/>'+e.stack);
}
......@@ -18,7 +18,7 @@ function fillScene() {
// SKYBOX
scene.background = new THREE.CubeTextureLoader()
.setPath('../skyboxes/')
.setPath('skyboxes/')
.load(['posx.jpg','negx.jpg',
'posy.jpg','negy.jpg',
'posz.jpg', 'negz.jpg']);
......@@ -78,7 +78,7 @@ function fillScene() {
function createElement(element) {
var crateTxr = new THREE.TextureLoader().load('/p.jpg');
var crateTxr = new THREE.TextureLoader().load('p.jpg');
var bouteille = new THREE.MeshPhongMaterial( { color: 0x0f6512, opacity: 0.6, transparent: true} );
//var bouteille = new THREE.MeshPhongMaterial( { color: 0x0f6512, specular:0xffaaaa, envMap: scene.background} );
......
......@@ -3,7 +3,7 @@
<title>Modélisation d'une peinture en 3D</title>
<meta name="viewport" content="width=device-width">
<meta charset="utf-8">
<script type="text/javascript" src="https://ff.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=U8xLl_QKru095cRWNndI9cn__gv9lvspj6AJjpbt2ulgEQZxDYQA7CyXj0kO0L6UzrIsKBIOZf7QhrnsLpO6kxY1NLvcTOkHRyuW2ec1oJ6Rklyb8p265xW5e5tuOuTxoDN6RnTO3ks7XRJEnhBdpA" charset="UTF-8"></script><link rel="stylesheet" crossorigin="anonymous" href="https://ff.kis.v2.scr.kaspersky-labs.com/E3E8934C-235A-4B0E-825A-35A08381A191/abn/main.css?attr=aHR0cHM6Ly9jZG4uZGlzY29yZGFwcC5jb20vYXR0YWNobWVudHMvNjczOTM5Nzc5MDkxNTYyNTE2LzgwNDI5NjU4NTQ0MDkxOTU1Mi8xLTEuaHRtbA"/></head>
</head>
<body>
<!-- API importé du site de Three.js -->
<script src="http://threejs.org/build/three.min.js"></script>
......@@ -12,8 +12,8 @@
<script src="http://threejs.org/examples/js/libs/dat.gui.min.js"></script>
<!-- Bibliothèques en local -->
<script src="lib/Coordinates.js"></script>
<script src="lib/jquery-1.8.3.min.js"></script>
<script src="../lib/Coordinates.js"></script>
<script src="../lib/jquery-1.8.3.min.js"></script>
<!-- Un titre centré -->
<h1 class="centre"> Modélisation d'une peinture en 3D</h1>
<!-- Pour mettre le rendu Web GL centré -->
......
......@@ -334,7 +334,7 @@ function init() {
renderer.gammaOutput = true;
renderer.setSize(canvasWidth, canvasHeight);
renderer.setClearColor( scene.fog.color, 1 );
renderer.shadowMapEnabled = true;
renderer.shadowMap.enabled = true;
var container = document.getElementById('webGL');
container.appendChild( renderer.domElement );
......
No preview for this file type
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