import { Sprite as PixiSprite } from 'pixi.js'; import { ShadowSilhouette } from './shadowSilhouette'; type ReactiveValue = T | (() => T); type PointLike = { x: number; y: number; }; type ColorInput = string | number; export type ShadowLight = { x: number; y: number; z?: number; radius?: number; intensity?: number; shadowWeight?: number; enabled?: boolean; }; export type ShadowLightInput = { x: ReactiveValue; y: ReactiveValue; z?: ReactiveValue; radius?: ReactiveValue; intensity?: ReactiveValue; shadowWeight?: ReactiveValue; enabled?: ReactiveValue; }; export type AmbientShadowLight = { x: number; y: number; z?: number; intensity?: number; shadowWeight?: number; length?: number; enabled?: boolean; }; export type AmbientShadowLightInput = { x: ReactiveValue; y: ReactiveValue; z?: ReactiveValue; intensity?: ReactiveValue; shadowWeight?: ReactiveValue; length?: ReactiveValue; enabled?: ReactiveValue; }; export type ShadowCasterOptions = { enabled?: ReactiveValue; height?: ReactiveValue; footOffset?: ReactiveValue; footAnchor?: ReactiveValue; alpha?: ReactiveValue; blur?: ReactiveValue; gradientPower?: ReactiveValue; hardness?: ReactiveValue; minLength?: ReactiveValue; maxLength?: ReactiveValue; contactAlpha?: ReactiveValue; contactScale?: ReactiveValue; anchorX?: ReactiveValue; /** * Ground foreshortening of the projected shadow (`1` = seen from straight above, * `0.6` = RPG 3/4 view). Default: `0.7` */ perspective?: ReactiveValue; /** Project the real sprite silhouette (`true`) or a soft blob (`false`). Default: `true` */ silhouette?: ReactiveValue; }; /** * - `multi`: one shadow per nearby light (up to `maxShadows`), each fading with its light * - `strongest`: a single shadow from the dominant light * - `blend2`: a single shadow averaging the two dominant lights */ export type ShadowMode = "multi" | "strongest" | "blend2"; export type SpriteShadowsProps = { lights?: ReactiveValue>; sources?: ReactiveValue>; ambientLight?: ReactiveValue; minInfluence?: ReactiveValue; falloffPower?: ReactiveValue; mode?: ReactiveValue; /** Maximum shadows per caster in `multi` mode. Default: `3` */ maxShadows?: ReactiveValue; updateHz?: ReactiveValue; scanHz?: ReactiveValue; cullToViewport?: ReactiveValue; shadowColor?: ReactiveValue; /** * Opacity of the whole shadow layer. Shadows are merged before this opacity is applied, * so overlapping shadows never get darker than a single one. Default: `0.5` */ opacity?: ReactiveValue; /** zIndex of the shadow layer. Default: just below the lowest caster. */ layerZIndex?: ReactiveValue; }; /** * Lays the silhouette on the ground: its height follows the shadow direction * (foreshortened by `perspective`) and its width stays perpendicular to it. * Exported for custom shadow rendering and tests. */ export declare const applyShadowTransform: (sprite: PixiSprite, silhouette: ShadowSilhouette, footX: number, footY: number, pxToParentX: number, dirX: number, dirY: number, length: number, perspective: number) => void; /** * SpriteShadows preset * * Adds RPG-style ground shadows for sprites tagged with `shadowCaster`. * The real silhouette of each sprite is projected on the ground, away from each nearby light, * with a penumbra that softens toward the tip and a contact shadow under the feet. * * Usage: * - Add `` in your scene (preferably inside `Viewport`). * - Add `shadowCaster` on any sprite that should cast a shadow. */ export declare function SpriteShadows(options?: SpriteShadowsProps): import('../../core/dist/index.d.ts').Element | Promise>; export {}; //# sourceMappingURL=SpriteShadows.d.ts.map