mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
clean up
This commit is contained in:
parent
2502e1c916
commit
14b35cf93b
1 changed files with 0 additions and 3 deletions
|
|
@ -525,14 +525,11 @@
|
|||
// render 3d scene and camera, do only on controls change
|
||||
const renderThrottled = throttle(doWorkOnRender, 200);
|
||||
function render() {
|
||||
console.log("render");
|
||||
Renderer.render(scene, camera);
|
||||
|
||||
renderThrottled();
|
||||
}
|
||||
|
||||
function doWorkOnRender() {
|
||||
console.log("doWorkOnRender");
|
||||
for (const [i, label] of labels.entries()) {
|
||||
const dist = label.position.distanceTo(camera.position);
|
||||
const isVisible = dist < 80 * label.size && dist > label.size * 6;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue