|
@@ -381,17 +381,14 @@
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public static CreateRibbon(pathArray: Vector3[][], closeArray: boolean, closePath: boolean, offset: number, sideOrientation?: number): VertexData;
|
|
|
- public static CreateRibbon(options: { pathArray?: Vector3[][], closeArray?: boolean, closePath?: boolean, offset?: number, sideOrientation?: number }): VertexData;
|
|
|
- public static CreateRibbon(options: any, closeArray?: boolean, closePath?: boolean, offset?: number, sideOrientation: number = Mesh.DEFAULTSIDE): VertexData {
|
|
|
-
|
|
|
- var pathArray = pathArray || options.pathArray;
|
|
|
- closeArray = closeArray || options.closeArray || false;
|
|
|
- closePath = closePath || options.closePath || false;
|
|
|
- var defaultOffset = Math.floor(pathArray[0].length / 2);
|
|
|
- offset = offset || options.offset || defaultOffset;
|
|
|
+ public static CreateRibbon(options: { pathArray?: Vector3[][], closeArray?: boolean, closePath?: boolean, offset?: number, sideOrientation?: number }): VertexData {
|
|
|
+ var pathArray:Vector3[][] = options.pathArray;
|
|
|
+ var closeArray: boolean = options.closeArray || false;
|
|
|
+ var closePath: boolean = options.closePath || false;
|
|
|
+ var defaultOffset: number = Math.floor(pathArray[0].length / 2);
|
|
|
+ var offset:number = options.offset || defaultOffset;
|
|
|
offset = offset > defaultOffset ? defaultOffset : Math.floor(offset); // offset max allowed : defaultOffset
|
|
|
- sideOrientation = sideOrientation || options.sideOrientation || Mesh.DEFAULTSIDE;
|
|
|
+ var sideOrientation:number = (options.sideOrientation === 0) ? 0 : options.sideOrientation || Mesh.DEFAULTSIDE;
|
|
|
|
|
|
var positions: number[] = [];
|
|
|
var indices: number[] = [];
|