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

Function render

plugins/Sidebar/media_globe/globe.js:367–381  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

365 }
366
367 function render() {
368 zoom(curZoomSpeed);
369
370 rotation.x += (target.x - rotation.x) * 0.1;
371 rotation.y += (target.y - rotation.y) * 0.1;
372 distance += (distanceTarget - distance) * 0.3;
373
374 camera.position.x = distance * Math.sin(rotation.x) * Math.cos(rotation.y);
375 camera.position.y = distance * Math.sin(rotation.y);
376 camera.position.z = distance * Math.cos(rotation.x) * Math.cos(rotation.y);
377
378 camera.lookAt(mesh.position);
379
380 renderer.render(scene, camera);
381 }
382
383 function unload() {
384 running = false

Callers 1

animateFunction · 0.70

Calls 2

renderMethod · 0.80
zoomFunction · 0.70

Tested by

no test coverage detected