MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / animate

Function animate

apps/baseai.dev/src/components/home/webgl.tsx:441–453  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439 const mouse = new THREE.Vector2();
440
441 const animate = () => {
442 requestAnimationFrame(animate);
443 material.uniforms.u_time.value += 0.02;
444 material.uniforms.u_viewVector.value = camera.position;
445
446 raycaster.setFromCamera(mouse, camera);
447 const intersects = raycaster.intersectObject(sphere);
448 if (intersects.length > 0) {
449 material.uniforms.u_mouse.value = intersects[0].point;
450 }
451
452 renderer.render(scene, camera);
453 };
454
455 animate();
456

Callers 1

WebGLInitializerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected