|
|
@ -180,7 +180,7 @@ function test2() { |
|
|
refreshCount() |
|
|
refreshCount() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function isLabelInView(label, frustum, cameraPosition, maxDistance = 65) { |
|
|
function isLabelInView(label, frustum) { |
|
|
const pos = new THREE.Vector3() |
|
|
const pos = new THREE.Vector3() |
|
|
label.getWorldPosition(pos) |
|
|
label.getWorldPosition(pos) |
|
|
|
|
|
|
|
|
@ -208,7 +208,6 @@ function getLabelPixelSize(fontSize, cameraZoom) { |
|
|
|
|
|
|
|
|
function shouldShowLabel(label, minPixelSize = 700) { |
|
|
function shouldShowLabel(label, minPixelSize = 700) { |
|
|
const pixelSize = getLabelPixelSize(label.fontSize, camera.zoom) |
|
|
const pixelSize = getLabelPixelSize(label.fontSize, camera.zoom) |
|
|
console.log(`pixel size: ${pixelSize}`) |
|
|
|
|
|
return pixelSize >= minPixelSize |
|
|
return pixelSize >= minPixelSize |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|