Skip to content

Commit

Permalink
Examples: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Mar 27, 2019
1 parent 0311294 commit 2d54d1c
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions examples/webgl_loader_svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@

window.addEventListener( 'resize', onWindowResize, false );

document.body.addEventListener( 'dblclick', function ( event ) {

var group = scene.children[ 1 ];
group.traverse( function ( child ) {

if ( child.material ) child.material.wireframe = ! child.material.wireframe;

} );

} );

guiData = {
currentURL: 'models/svg/tiger.svg',
drawFillShapes: true,
Expand All @@ -108,9 +97,7 @@

function createGUI() {

if ( gui ) {
gui.destroy();
}
if ( gui ) gui.destroy();

gui = new dat.GUI( { width: 350 } );

Expand Down Expand Up @@ -184,7 +171,7 @@
var material = new THREE.MeshBasicMaterial( {
color: new THREE.Color().setStyle( fillColor ),
opacity: path.userData.style.fillOpacity,
transparent: path.userData.style.fillOpacity !== 1,
transparent: path.userData.style.fillOpacity < 1,
side: THREE.DoubleSide,
depthWrite: false,
wireframe: guiData.fillShapesWireframe
Expand Down Expand Up @@ -212,7 +199,7 @@
var material = new THREE.MeshBasicMaterial( {
color: new THREE.Color().setStyle( strokeColor ),
opacity: path.userData.style.strokeOpacity,
transparent: path.userData.style.strokeOpacity !== 1,
transparent: path.userData.style.strokeOpacity < 1,
side: THREE.DoubleSide,
depthWrite: false,
wireframe: guiData.strokesWireframe
Expand Down

0 comments on commit 2d54d1c

Please sign in to comment.