jeromeetienne / threex.geometricglow

a three.js extension to make any object glow at geometric level
http://jeromeetienne.github.io/threex.geometricglow/examples/geometricglowmesh.html
219 stars 38 forks source link

Applying threex.geometric effects to THREE.TextGeometry object #7

Closed w9914420 closed 7 years ago

w9914420 commented 7 years ago

I have been able to import your library into my work flow and it works as expected. I have recently been playing around with THREE.TextGeometry(text, params) to see if it is possible to do so however it does not seem to work on textgeometry objects

I wonder if it is at all possible, if so could you provide a short example.

Many tnxs

w9914420 commented 7 years ago

hello

I have managed to apply the dilate plugin to THREE.TextGeometry() object

screen shot 2017-03-28 at 16 54 34

I wonder if it is possible to smooth the object further please see my code:

    var geoclone = one.geometry.clone();

    //need these to make it work
    geoclone.mergeVertices();
    //geoclone.computeCentroids();
    geoclone.computeVertexNormals();
    geoclone.computeFaceNormals();

    //the threex dilate effect
    THREEx.dilateGeometry(geoclone, 0.25);
    geoclone.mergeVertices();

    //create new material and add to a new mesh to create the halo effect
    var testMat     = new THREE.MeshNormalMaterial({color:0x222222});
    var meshHalo    = new THREE.Mesh(geoclone, testMat );
    this.scene.add( meshHalo );

Any advice most welcomed

w9914420 commented 7 years ago

Hello again

Just to inform you that I managed to come up with a solution that works really well, I just increased the 'bevel-segments' of the text geometry which helped to smooth the object. so now I am able to do this.

screen shot 2017-03-30 at 00 05 27

screen shot 2017-03-30 at 00 02 54

Thank you for such a great three.js extension ;)