Webgl / Adapt the points renderer to use custom attributes
Now most attributes will be custom ones defined by the user of the renderer. The hit detection is broken for now and still has to be fixed. Also it is not possible anymore to give a texture to the renderer, this will have to be fixed as well.
This commit is contained in:
@@ -45,20 +45,6 @@ export const DefaultUniform = {
|
||||
OFFSET_ROTATION_MATRIX: 'u_offsetRotateMatrix'
|
||||
};
|
||||
|
||||
/**
|
||||
* Attribute names used in the default shaders: `POSITION`, `TEX_COORD`, `OPACITY`,
|
||||
* `ROTATE_WITH_VIEW`, `OFFSETS` and `COLOR`
|
||||
* @enum {string}
|
||||
*/
|
||||
export const DefaultAttrib = {
|
||||
POSITION: 'a_position',
|
||||
TEX_COORD: 'a_texCoord',
|
||||
OPACITY: 'a_opacity',
|
||||
ROTATE_WITH_VIEW: 'a_rotateWithView',
|
||||
OFFSETS: 'a_offsets',
|
||||
COLOR: 'a_color'
|
||||
};
|
||||
|
||||
/**
|
||||
* Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`
|
||||
* Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.
|
||||
@@ -860,7 +846,7 @@ class WebGLHelper extends Disposable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute a stride based on a list of attributes
|
||||
* Compute a stride in bytes based on a list of attributes
|
||||
* @param {Array<AttributeDescription>} attributes Ordered list of attributes
|
||||
* @returns {number} Stride, ie amount of values for each vertex in the vertex buffer
|
||||
* @api
|
||||
|
||||
Reference in New Issue
Block a user