Skip to content

Commit f2e68b8

Browse files
committed
Improvements to svg example.
1 parent 6322fa1 commit f2e68b8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

examples/webgl_loader_svg.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@
7676
loader.load( 'models/svg/tiger.svg', function ( paths ) {
7777

7878
var group = new THREE.Group();
79-
group.scale.multiplyScalar( 0.1 );
79+
group.scale.multiplyScalar( 0.25 );
80+
group.position.x = - 70;
81+
group.position.y = 70;
8082
group.scale.y *= -1;
8183

8284
for ( var i = 0; i < paths.length; i ++ ) {
@@ -129,6 +131,17 @@
129131

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

134+
document.body.addEventListener( 'dblclick', function ( event ) {
135+
136+
var group = scene.children[ 1 ];
137+
group.traverse( function ( child ) {
138+
139+
if ( child.material ) child.material.wireframe = !child.material.wireframe;
140+
141+
} );
142+
143+
} );
144+
132145
}
133146

134147
function onWindowResize() {

0 commit comments

Comments
 (0)