diff options
| author | Chaoshuai Lyu <chaoshuai@anthropic.com> | 2026-11-20 17:17:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-20 17:17:51 -0800 |
| commit | 73c8cf3ea7e296057b467990f2f5d61b4c922260 (patch) | |
| tree | b96ff4fad7dc52de0b537c688828b79e4cf33d95 /plugins/theme-examples/hooks/themes.ts | |
| parent | d586c3f10a8c2366179bf46b097b4f652622ffc6 (diff) | |
Squash merge of 1 commit
Diffstat (limited to 'plugins/theme-examples/hooks/themes.ts')
| -rw-r--r-- | plugins/theme-examples/hooks/themes.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/theme-examples/hooks/themes.ts b/plugins/theme-examples/hooks/themes.ts index e5a77e1c..6fb359a9 100644 --- a/plugins/theme-examples/hooks/themes.ts +++ b/plugins/theme-examples/hooks/themes.ts @@ -23,6 +23,8 @@ import { rippleTankSvg } from './scenes/ripple-tank/still' import { seaSparkleSvg } from './scenes/sea-sparkle/still' import { semicolonySvg } from './scenes/semicolony/still' import { starChartSvg } from './scenes/star-chart/still' +import { FALLING_SAND_SOUND, KOI_POND_SOUND } from './sounds' +import type { Sound } from './sounds' /** The scenes a shader plays over. Each name is a folder under ./scenes, which holds the shader and its still. */ export type ShaderScene = @@ -53,16 +55,18 @@ export type Theme = { shader?: ShaderScene /** Set where the picture is dark, or pale, whatever the window: a show's bursts are then bright, or deep, in both. */ ground?: Theme['window'] + /** The theme's sound, where it has one (see ./sounds). */ + sound?: Sound } /** What a scene's two entries share: both of its rows below spread one of these, so they cannot differ. */ -type Picture = Required<Pick<Theme, 'scene' | 'shader'>> & Pick<Theme, 'ground'> +type Picture = Required<Pick<Theme, 'scene' | 'shader'>> & Pick<Theme, 'ground' | 'sound'> const DUCK_POND: Picture = { scene: duckPondSvg, shader: 'duck-pond' } -const FALLING_SAND: Picture = { scene: fallingSandSvg, shader: 'falling-sand' } +const FALLING_SAND: Picture = { scene: fallingSandSvg, shader: 'falling-sand', sound: FALLING_SAND_SOUND } const FIELD_LINES: Picture = { scene: fieldLinesSvg, shader: 'field-lines' } const GARDEN_BEETLES: Picture = { scene: gardenBeetlesSvg, shader: 'garden-beetles' } -const KOI_POND: Picture = { scene: koiPondSvg, shader: 'koi-pond', ground: 'dark' } +const KOI_POND: Picture = { scene: koiPondSvg, shader: 'koi-pond', ground: 'dark', sound: KOI_POND_SOUND } const RIPPLE_TANK: Picture = { scene: rippleTankSvg, shader: 'ripple-tank' } const SEA_SPARKLE: Picture = { scene: seaSparkleSvg, shader: 'sea-sparkle' } const SEMICOLONY: Picture = { scene: semicolonySvg, shader: 'semicolony' } |
