Skip to content

feat: image mode obstacle driven by luminance (obstacleStrength prop) #13

@jayf0x

Description

@jayf0x

Goal

Currently the image obstacle texture is created as brightness(effect) blur(8px) where effect defaults to 0brightness(0) = solid black = no obstacle. Most <FluidImage> users never see obstacle behaviour.

Proposed API

```tsx
// new prop: 0 = no obstacle (current default), 1 = full luminance-based obstacle

```

Bright image regions mildly deflect fluid at 0.5, creating natural interaction between image content and simulation.

Acceptance criteria

  • obstacleStrength prop added to FluidBaseProps / globals.d.ts
  • Prop controls how much image luminance contributes to the physics obstacle
  • Default 0 — identical to current behaviour
  • obstacleStrength={1} produces visible fluid deflection at bright image regions
  • Tests updated

Files likely touched: src/globals.d.ts, src/core/textures.ts, src/core/config.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:coreConfig, props, API surfaceeffort:3Medium — half to full daytype:featureNew capability or prop

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions