FatLineRenderer
Direct Subclass:
As you many know, line rendering with thickness is not well-supported in WebGL implementations (mostly due to WebGL implementations on Windows defaulting to emulating OpenGL calls via ANGLE on DirectX 9). Therefore lines are rendered using triangles. This greatly blows up the memory requirements as enough information needs to be passed to expand lines in the vertex shader to a constant thickness. See below:
@todo: we should probably see if some of this overhead can be reduced with drawElementsInstanced() or by cleverly aligning strides and or offsets.
(A,B,-1) (B,A,-1) +-------------------------------------------------+ | | | (A) (B) | | +-------------------------------------------+ | | | | | +-------------------------------------------------+ (A,B,1) (B,A,1)
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
direction: * |
|
public |
|
|
public |
gl: * |
|
public |
|
|
public |
indexType: * |
|
public |
indices: * |
|
public |
matrixMap: * |
|
public |
|
|
public |
|
|
public |
programInfo: * |
|
public |
quantize: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
viewer: * |
Method Summary
Public Methods | ||
public |
finalize() |
|
public |
getVertexBuffer(): * |
|
public |
init(size: *) |
|
public |
pushVertices(a: *, b: *) |
|
public |
render(color: *, matrix: *, thickness: *) |
|
public |
renderStart(viewer: *, renderLayer: *) |
|
public |
|
Public Constructors
public constructor() source
Public Members
public defaultDirection: * source
public direction: * source
public gl: * source
public indexType: * source
public indices: * source
public matrixMap: * source
public nextVertexPosition: * source
public programInfo: * source
public quantize: * source
public setupFunctions: * source
public uniqueModelId: * source
public unquantizationMatrix: * source
public vertexPosition: * source
public viewer: * source
Public Methods
public finalize() source
public init(size: *) source
Params:
Name | Type | Attribute | Description |
size | * |
public pushVertices(a: *, b: *) source
Params:
Name | Type | Attribute | Description |
a | * | ||
b | * |
public render(color: *, matrix: *, thickness: *) source
Params:
Name | Type | Attribute | Description |
color | * | ||
matrix | * | ||
thickness | * |
public renderStart(viewer: *, renderLayer: *) source
Params:
Name | Type | Attribute | Description |
viewer | * | ||
renderLayer | * |