mrdoob/three.js — Issue #1276: Extrude shapes from the ground
Author: MathieuLoutre
Created: 2012-02-08 16:51:52+00:00
State: open

Hi!

I have been playing with Three.js and the extrude function lately. What I have done so far is draw shapes with X,Y coordinates and extrude them. But then, in 3D, the addition of the Z makes Y the up direction so the shape is drawn facing me (extruded towards Z) whereas I would like it to be drawn from the ground (X, Z) and extruded towards Y.

Is there any way to do this?

I have tried multiple things, including giving my drawing instruction in X, Y, Z or constructing shapes from Vector3 but nothing seems to work (I get errors about possible infinite loops sometimes). I have tried rotating them as well, but it changes their position somehow and they are never in the right position.

If I was able to draw them from a list of Vector3 (or Vertex), that would probably solve the problem (If I'm drawing their shapes on the ground with a Geometry containing the list of Vertex and make a Line out of it, I get the correct shape on the ground).

If you have any leads/ideas, I'd be glad to hear them. I'm fairly new to Three.js and this seems to work in obscure ways.

Cheers,

Mathieu