Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions pointcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,6 @@ proto.update = function(options) {
var idArray = pool.mallocUint32(vertexCount)

if(vertexCount > 0) {
var textOffset = [0,alignment[1]]

var triOffset = 0
var lineOffset = triVertexCount
var color = [0,0,0,1]
Expand Down Expand Up @@ -657,10 +655,13 @@ proto.update = function(options) {
}

//Calculate text offset
if(alignment[0] < 0) {
textOffset[0] = alignment[0] * (1+glyphBounds[1][0])
} else if(alignment[0] > 0) {
textOffset[0] = -alignment[0] * (1+glyphBounds[0][0])
var textOffset = [alignment[0], alignment[1]]
for(var j=0; j<2; ++j) {
if(alignment[j] > 0) {
textOffset[j] *= (1-glyphBounds[0][j])
} else if(alignment[j] < 0) {
textOffset[j] *= (1+glyphBounds[1][j])
}
}

//Write out inner marker
Expand Down