Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: Improved webgl_geometry_text_stroke and webgl_geometry_text_shapes. #22834

Merged
merged 2 commits into from
Nov 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Examples: Improved webgl_geometry_text_shapes.
linbingquan committed Nov 14, 2021
commit 5eeb5e764d4e76b1d02385c4168f36f3034913f4
13 changes: 5 additions & 8 deletions examples/webgl_geometry_text_shapes.html
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@
let camera, scene, renderer;

init();
animate();

function init( ) {

@@ -57,7 +56,7 @@
side: THREE.DoubleSide
} );

const message = " Three.js\nSimple text.";
const message = ' Three.js\nSimple text.';

const shapes = font.generateShapes( message, 100 );

@@ -116,6 +115,8 @@

scene.add( lineText );

render();

} ); //end load function

renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -127,6 +128,8 @@
controls.target.set( 0, 0, 0 );
controls.update();

controls.addEventListener( 'change', render );

window.addEventListener( 'resize', onWindowResize );

} // end init
@@ -138,12 +141,6 @@

renderer.setSize( window.innerWidth, window.innerHeight );

}

function animate() {

requestAnimationFrame( animate );

render();

}