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

Function animate

assets/js/3DCube.js:57–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56// Draw the scene every time the screen is refreshed
57function animate() {
58 requestAnimationFrame(animate);
59
60 // Rotate cube (Change values to change speed)
61 cube.rotation.x += 0.01;
62 cube.rotation.y += 0.01;
63
64 renderer.render(scene, camera);
65}
66
67function onWindowResize() {
68 // Camera frustum aspect ratio

Callers 1

3DCube.jsFile · 0.70

Calls 1

renderMethod · 0.80

Tested by

no test coverage detected