diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 0f703ec8..65303184 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -54,6 +54,7 @@ export default defineConfig({ { text: 'Noise', link: '/guide/pmndrs/noise' }, { text: 'Outline', link: '/guide/pmndrs/outline' }, { text: 'Chromatic Aberration', link: '/guide/pmndrs/chromatic-aberration' }, + { text: 'Sepia', link: '/guide/pmndrs/sepia' }, { text: 'Scanline', link: '/guide/pmndrs/scanline' }, { text: 'Pixelation', link: '/guide/pmndrs/pixelation' }, { text: 'Vignette', link: '/guide/pmndrs/vignette' }, diff --git a/docs/.vitepress/theme/components/pmdrs/SepiaDemo.vue b/docs/.vitepress/theme/components/pmdrs/SepiaDemo.vue new file mode 100644 index 00000000..76b93bad --- /dev/null +++ b/docs/.vitepress/theme/components/pmdrs/SepiaDemo.vue @@ -0,0 +1,61 @@ + + + diff --git a/docs/components.d.ts b/docs/components.d.ts index c540c0c6..3ffd53f8 100644 --- a/docs/components.d.ts +++ b/docs/components.d.ts @@ -24,6 +24,7 @@ declare module 'vue' { PixelationDemo: typeof import('./.vitepress/theme/components/pmdrs/PixelationDemo.vue')['default'] PixelationThreeDemo: typeof import('./.vitepress/theme/components/three/PixelationThreeDemo.vue')['default'] ScanlineDemo: typeof import('./.vitepress/theme/components/pmdrs/ScanlineDemo.vue')['default'] + SepiaDemo: typeof import('./.vitepress/theme/components/pmdrs/SepiaDemo.vue')['default'] SMAAThreeDemo: typeof import('./.vitepress/theme/components/three/SMAAThreeDemo.vue')['default'] ToneMappingDemo: typeof import('./.vitepress/theme/components/pmdrs/ToneMappingDemo.vue')['default'] UnrealBloomThreeDemo: typeof import('./.vitepress/theme/components/three/UnrealBloomThreeDemo.vue')['default'] diff --git a/docs/guide/pmndrs/sepia.md b/docs/guide/pmndrs/sepia.md new file mode 100644 index 00000000..55fc1330 --- /dev/null +++ b/docs/guide/pmndrs/sepia.md @@ -0,0 +1,66 @@ +# Sepia + + + + + +The `Sepia` effect is part of the [`postprocessing`](https://pmndrs.github.io/postprocessing/public/docs/class/src/effects/SepiaEffect.js~SepiaEffect.html) package. It applies a sepia tone to the scene, giving it a warm, antique appearance. This effect can enhance the visual appeal of your scene by adding a vintage or stylized touch. + +## Usage + +The `` component is easy to use and provides customizable options to suit different visual styles. + +```vue{2,36-40} + + + +``` + +## Props + +| Prop | Description | Default | +| ----------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------- | +| blendFunction | Defines how the effect blends with the original scene. See the [`BlendFunction`](https://pmndrs.github.io/postprocessing/public/docs/variable/index.html#static-variable-BlendFunction) options. | `BlendFunction.NORMAL` | +| intensity | The intensity of the sepia effect. | `1.0` | + +## Further Reading +For more details, see the [Sepia documentation](https://pmndrs.github.io/postprocessing/public/docs/class/src/effects/SepiaEffect.js~SepiaEffect.html) diff --git a/playground/src/pages/postprocessing/sepia.vue b/playground/src/pages/postprocessing/sepia.vue new file mode 100644 index 00000000..1e59a8ad --- /dev/null +++ b/playground/src/pages/postprocessing/sepia.vue @@ -0,0 +1,61 @@ + + + diff --git a/playground/src/router.ts b/playground/src/router.ts index d4314e84..5e439388 100644 --- a/playground/src/router.ts +++ b/playground/src/router.ts @@ -40,6 +40,7 @@ export const postProcessingRoutes = [ makeRoute('Bloom', '🌼', false), makeRoute('Noise', '📟', false), makeRoute('Chromatic Aberration', '🌈', false), + makeRoute('Sepia', '🌅', false), makeRoute('Scanline', '📺', false), makeRoute('Vignette', '🕶️', false), makeRoute('On-demand', '🔄', false), diff --git a/src/core/pmndrs/SepiaPmndrs.vue b/src/core/pmndrs/SepiaPmndrs.vue new file mode 100644 index 00000000..aa7f527f --- /dev/null +++ b/src/core/pmndrs/SepiaPmndrs.vue @@ -0,0 +1,33 @@ + diff --git a/src/core/pmndrs/index.ts b/src/core/pmndrs/index.ts index 738cb4ec..992f5336 100644 --- a/src/core/pmndrs/index.ts +++ b/src/core/pmndrs/index.ts @@ -12,6 +12,7 @@ import VignettePmndrs, { type VignettePmndrsProps } from './VignettePmndrs.vue' import ChromaticAberrationPmndrs, { type ChromaticAberrationPmndrsProps } from './ChromaticAberration.vue' import HueSaturationPmndrs, { type HueSaturationPmndrsProps } from './HueSaturationPmndrs.vue' import ScanlinePmndrs, { type ScanlinePmndrsProps } from './ScanlinePmndrs.vue' +import SepiaPmndrs, { type SepiaPmndrsProps } from './SepiaPmndrs.vue' export { BloomPmndrs, @@ -26,6 +27,8 @@ export { ChromaticAberrationPmndrs, HueSaturationPmndrs, ScanlinePmndrs, + SepiaPmndrs, + BloomPmndrsProps, DepthOfFieldPmndrsProps, EffectComposerPmndrsProps, @@ -37,4 +40,5 @@ export { ChromaticAberrationPmndrsProps, HueSaturationPmndrsProps, ScanlinePmndrsProps, + SepiaPmndrsProps, }