3d Text - What Am I Missing?

Discussion in 'ShapeJS' started by CustomBrandShop, Feb 26, 2019.

Tags:
  1. I'm having trouble creating simple 3D text, this seems like it should work to me, can anyone help? Also, are there any other fonts that are working aside from Helvetica Round? Thanks in advance if anyone has insight.

    function main(args) {
    var s = 26 * MM;
    var vs = 0.5*MM;
    //Create Text
    var text = new Text(text,"HelveticaRounded LT Std Bd",s,s,s,vs);
    var bounds = new Bounds(-s, s, -s, s, -s, s);
    var scene = new Scene(text,bounds,vs);
    scene.setName("Text");
    return scene;
    }
     
  2. If anyone cares, I was revisiting this, still can't get it to work, but I do believe I need to add "" around the word "text" in the first argument for creating the new Text. But still no luck, do I really need to create a text 2d and map it to a new Image?
     
  3. To answer my own question (since I think I may be the only one still talking on this forum :)
    It would appear to be a yes, this works:

    function main(args) {
    var s = 26 * MM;
    var vs = 0.01*MM;

    //Create Text2D
    var text = new Text2D("Text","HelveticaRounded LT Std Bd",vs);

    //Make it 3D by creating a new Image3D item and then calling on the Text2D object
    var text3D = new Image3D(text,15*MM,10*MM,1*MM,vs);

    var bounds = new Bounds(-s, s, -s, s, -s, s);
    var scene = new Scene(text3D,bounds,vs);
    scene.setName("Text");
    return scene;
    }