threejs-worldgen
    Preparing search index...

    Class BirdFlocks

    Bird flocks streamed around the camera over the biomes each species likes (gulls over coasts, crows over forests and fields, swallows over meadows, vultures over savanna), flying in a height band above the ground, with wing flapping and gliding in the vertex shader.

    Hierarchy (View Summary)

    Index
    camera: Camera

    Camera the tiles follow.

    frame: LocalFrame

    The frame groups live in (the world itself on flat worlds).

    input: Partial<T> = {}

    Input so far (merged by set).

    object: Group<Object3DEventMap> = ...

    Root object (placed in the current frame).

    salt: 45525 = 0xb1d5

    Separates this kind's spawns from other kinds with the same seed.

    Resolved settings. Change them with set() / reset().

    stats: FaunaStats = ...

    Live counters, refreshed by update().

    time: number = 0

    Seconds simulated.

    views: Map<string, SpeciesView> = ...

    Per-species meshes.

    world: World

    The world.

    • Advances member i's animation (motion, 4 floats) and returns its roll (bank) angle.

      Parameters

      Returns number

    • Sets member i's scale (xyz into scale) and look (4 into look) from rand.

      Parameters

      • sp: BirdSpecies
      • r: () => number
      • scale: Float32Array
      • look: Float32Array
      • i: number

      Returns void

    • Moves the floating origin. Same as set({ origin }).

      Parameters

      • origin: readonly number[]

      Returns this

    • Streams tiles around the camera, spawns within the time budget, steps the flocks at a fixed rate and writes the instances. Called automatically when a scene was given; otherwise once per frame.

      Parameters

      • delta: number = ...

        Seconds since the last frame; measured if omitted.

      • budget: number = ...

        Milliseconds for spawning this frame. Defaults to settings.buildBudget.

      Returns void