Currently experimenting with TextGeometry. Successfully implemented BoxGeometry, but encountering issues with TextGeometry.
Experimenting with different material options like MeshNormalMeterial, however, still unable to resolve the issue
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
var renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.getElementById("banner").appendChild( renderer.domElement );
var loader = new THREE.FontLoader();
loader.load( 'https://raw.githubusercontent.com/mrdoob/three.js/master/examples/fonts/helvetiker_bold.typeface.json', function ( font ) {
var geometry = new THREE.TextGeometry( 'Hello three.js!', {
font: font,
size: 80,
height: 5,
curveSegments: 12,
bevelEnabled: true,
bevelThickness: 10,
bevelSize: 8,
bevelOffset: 0,
bevelSegments: 5
} );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
var txt = new THREE.Mesh( geometry, material );
scene.add( txt );
function animate() {
requestAnimationFrame( animate );
renderer.render( scene, camera );
txt.rotation.x += 0.01;
txt.rotation.y +=0.01;
}
animate();
} );
camera.position.z = 5;
No specific error message is being displayed