import * as THREE from 'three/webgpu'; /** * Low-poly bird geometry for instanced flocking simulations. * Matches the bird model from three.js WebGPU compute birds example. * * **Structure** * - 3 triangles: body, left wing, right wing * - Total 9 vertices (3 per triangle) * * **Vertex Layout** * - Vertices 0-2: Body (center tail to head) * - Vertices 3-5: Left wing * - Vertices 6-8: Right wing * * ```js * import { BirdGeometry } from '../helpers/exampleGeometries.js'; * import { InstancedMesh, MeshStandardNodeMaterial } from 'three/webgpu'; * import { If, vertexIndex, sin } from 'three/tsl'; * * const geometry = new BirdGeometry(); * const material = new MeshStandardNodeMaterial({ color: 0x0088ff }); * * // Animate wing flapping in vertex shader * material.positionNode = Fn(() => { * const pos = positionLocal.toVar(); * // Wing vertices (4,7) flap with phase * If(vertexIndex.equal(4).or(vertexIndex.equal(7)), () => { * pos.y = sin(phaseUniform).mul(5.0); * }); * return pos; * })(); * * const birds = new InstancedMesh(geometry, material, 1000); * scene.add(birds); * ``` * * @class BirdGeometry * @extends THREE.BufferGeometry * @short Low-poly bird mesh (3 triangles) matching the Three.js boids example, ideal for instanced flocking. * @category Geometries * @tags WebGPU, WebGL * @see Boids */ /** * @param {number} [bodyLength=50] Total length from tail to head. * @param {number} [bodyBellyDrop=8] How far the belly dips on the Y axis. * @param {number} [wingSpan=40] Full wingspan across X (tip-to-tip). * @param {number} [wingChord=30] Wing depth along Z (front-to-back). * @param {number} [wingTipForward=5] Forward offset of wing tips along Z. */ declare class BirdGeometry extends THREE.BufferGeometry { /** * Create a bird geometry with 3 triangles (body + wings). */ constructor(bodyLength?: number, bodyBellyDrop?: number, wingSpan?: number, wingChord?: number, wingTipForward?: number); } export { BirdGeometry };