用过三维造型建模软件的童鞋们肯定指导拉伸(挤压)这个指令(操作),away3d4..0也提供了这样一个类,其构造函数调用格式如下:
LinearExtrude(material:MaterialBase = null, vectors:Vector.<Vector3D> = null, axis:String, offset:Number = 10, subdivision:uint = 3, coverAll:Boolean = false, thickness:Number = 0, thicknessSubdivision:uint = 3, materials:MultipleMaterials = null, centerMesh:Boolean = false, closePath:Boolean = false, ignoreSides:String, flip:Boolean = false)
参数表:(原文貌似有点错位,做了些修改,望指正)
Parameters
material:MaterialBase (default = null )
| |
vectors:Vector.<Vector3D> (default = null ) — [optional] | |
axis:String (default = NaN ) — [optional]String. The axis to elevate along: X_AXIS, Y_AXIS or Z_AXIS. Default is LinearExtrusion.Y_AXIS. | |
offset:Number (default = 10 ) — [optional] Number. The elevation offset along the defined axis. | |
subdivision:uint (default = 3 ) — [optional] uint. The subdivision of the geometry between 2 vector3D. Default is 3. | |
coverAll:Boolean (default = false ) — [optional] Boolean. The way the uv mapping is spreaded across the shape. True covers an entire side of the geometry while false covers per segments. Default is false. | |
thickness:Number (default = 0 ) — [optional] Number. If the shape must simulate a thickness. Default is 0. | |
thicknessSubdivision:uint (default = 3 ) — [optional]uint. If thickness is higher than 0. Defines the subdivision of the thickness (top, left, right, bottom). Default is 3; | |
materials:MultipleMaterials (default = null ) — [optional]MultipleMaterials. Allows multiple material support when thickness is set higher to 1. Default is null. properties as MaterialBase are: bottom, top, left, right, front and back. | |
centerMesh:Boolean (default = false ) — [optional] Boolean. If the geometry needs to be recentered in its own object space. If the position after generation is set to 0,0,0, the object would be centered in worldspace. Default is false. | |
closePath:Boolean (default = false ) — [optional] Boolean. Defines if the last entered vector needs to be linked with the first one to form a closed shape. Default is false. | |
ignoreSides:String — [optional] String. To prevent the generation of sides if thickness is set higher than 0. To avoid the bottom ignoreSides = "bottom", avoiding both top and bottom: ignoreSides = "bottom, top". Strings options: bottom, top, left, right, front and back. Default is "". | |
flip:Boolean (default = false )[optional] Boolean. If the faces must be reversed depending on Vector3D's orientation. Default is false. |