javascript - How can I make a linear swept face using three.js? -


how can make linear swept face?

i wrote following code.

      // profile       var pts = [         new three.vector2(0, 0),          new three.vector2(10, 0),          new three.vector2(10, 10),          new three.vector2(20, 10),          new three.vector2(20, 20),       ];       var profile = new three.shape(pts);       // path       var path = new three.linecurve3(new three.vector3(0, 0, 0), new three.vector3(30, 0, 30));       var geometry = new three.extrudegeometry(profile , { steps: 1, bevelenabled: false, extrudepath: path });       var material = new three.meshlambertmaterial({ color: 0xff8000, wireframe: false });       var mesh = new three.mesh(geometry, material);       scene.add(mesh); 

and got result

http://i.imgur.com/7ydpmk7.jpg

but not needing. hope

http://i.imgur.com/shuj6jn.jpg

what wrong?

there three.extrudegeometry this.

there several examples on the three.js examples page:


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -