MCPcopy
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / render

Function render

assets/js/3DPaint.js:59–76  ·  view source on GitHub ↗
(time)

Source from the content-addressed store, hash-verified

57 const state = { x: 0, y: 0 };
58
59 function render(time) {
60 time *= 0.001; // convert to seconds
61
62 if (resizeRendererToDisplaySize(renderer)) {
63 const canvas = renderer.domElement;
64 camera.right = canvas.clientWidth / canvas.clientHeight;
65 camera.left = -camera.right;
66 camera.updateProjectionMatrix();
67 }
68
69 base.position.set(state.x, state.y, 0);
70 base.rotation.x = time;
71 base.rotation.y = time * 1.11;
72
73 renderer.render(scene, camera);
74
75 requestAnimationFrame(render);
76 }
77 requestAnimationFrame(render);
78
79 function getCanvasRelativePosition(event) {

Callers

nothing calls this directly

Calls 2

renderMethod · 0.80

Tested by

no test coverage detected