Skip to main content

AttractorScene

Struct AttractorScene 

Source
pub struct AttractorScene { /* private fields */ }
Expand description

GPU compute-particle strange-attractor scene (ADR-0015). A storage buffer of particles is stepped through the De Jong map by a compute shader each frame, drawn as additive point-sprites into a fading trail field, and composited to the surface. Every knob is an ADR-0002 layer-2 named parameter — the attractor coefficients (a,b,c,d), the look scalars (size,hue,fade), and a beat-driven reseed — so a preset binds them to the audio bands and beat.

Implementations§

Source§

impl AttractorScene

Source

pub fn new( device: &Device, surface_format: TextureFormat, anchor: u32, ceiling: u32, trail_cap: (u32, u32), ) -> Self

Build the CPU-side seeded scatter. GPU resources are deferred to the first render (module docs). anchor is the tier’s budget at REFERENCE_PX and ceiling is the most the density law may resolve for this scene — the tier’s live ceiling on a surface, its offline one on a headless render path. The buffer is sized at ceiling; the budget starts at anchor and moves on the first Scene::set_target_size, whose trait is crate-private and so is named here rather than linked.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,