MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / render

Function render

plugins/Sidebar/media_globe/all.js:456–470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

454 }
455
456 function render() {
457 zoom(curZoomSpeed);
458
459 rotation.x += (target.x - rotation.x) * 0.1;
460 rotation.y += (target.y - rotation.y) * 0.1;
461 distance += (distanceTarget - distance) * 0.3;
462
463 camera.position.x = distance * Math.sin(rotation.x) * Math.cos(rotation.y);
464 camera.position.y = distance * Math.sin(rotation.y);
465 camera.position.z = distance * Math.cos(rotation.x) * Math.cos(rotation.y);
466
467 camera.lookAt(mesh.position);
468
469 renderer.render(scene, camera);
470 }
471
472 function unload() {
473 running = false

Callers 1

animateFunction · 0.70

Calls 2

renderMethod · 0.80
zoomFunction · 0.70

Tested by

no test coverage detected