-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/65-vignette-effect
- Loading branch information
Showing
25 changed files
with
571 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,5 @@ dist-ssr | |
*.sln | ||
*.sw? | ||
docs/.vitepress/dist/ | ||
docs/.vitepress/cache/ | ||
docs/.vitepress/cache/ | ||
stats.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script setup lang="ts"> | ||
import { TresCanvas } from '@tresjs/core' | ||
import { BasicShadowMap, SRGBColorSpace, NoToneMapping } from 'three' | ||
import { EffectComposer, Noise } from '@tresjs/post-processing' | ||
import { OrbitControls } from '@tresjs/cientos' | ||
import { BlendFunction } from 'postprocessing' | ||
import '@tresjs/leches/styles' | ||
const gl = { | ||
clearColor: '#82DBC5', | ||
shadows: true, | ||
alpha: false, | ||
shadowMapType: BasicShadowMap, | ||
outputColorSpace: SRGBColorSpace, | ||
toneMapping: NoToneMapping, | ||
} | ||
</script> | ||
|
||
<template> | ||
<TresCanvas v-bind="gl"> | ||
<TresPerspectiveCamera :position="[3, 3, 3]" /> | ||
<OrbitControls /> | ||
<TresGridHelper /> | ||
<TresAmbientLight :intensity="1" /> | ||
<Suspense> | ||
<EffectComposer :depth-buffer="true"> | ||
<Noise | ||
premultiply | ||
:blend-function="BlendFunction.SCREEN" | ||
/> | ||
</EffectComposer> | ||
</Suspense> | ||
</TresCanvas> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Noise | ||
|
||
<DocsDemo> | ||
<NoiseDemo /> | ||
</DocsDemo> | ||
|
||
Noise is an effect that adds Gaussian noise to the scene. This can be used to simulate a variety of effects, such as static on a TV or film grain. | ||
|
||
## Usage | ||
|
||
```vue | ||
<script setup lang="ts"> | ||
import { BlendFunction } from 'postprocessing' | ||
import { EffectComposer, Bloom } from '@tresjs/post-processing' | ||
</script> | ||
<template> | ||
<EffectComposer> | ||
<Noise | ||
premultiply | ||
:blend-function="BlendFunction.SCREEN" | ||
/> | ||
</EffectComposer> | ||
</template> | ||
``` | ||
|
||
## Props | ||
|
||
| Prop | Description | Default | | ||
| -------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `blendFunction` | The blend function of this effect. This prop is not reactive. | [BlendFunction.SCREEN](https://github.com/pmndrs/postprocessing/blob/c3ce388be247916437a314f17748a75329d65df1/src/enums/BlendFunction.js#L40) | | ||
| `premultiply` | Indicates whether noise will be multiplied with the input colors prior to blending | `false` | | ||
|
||
|
||
## Further Reading | ||
see [postprocessing docs](https://pmndrs.github.io/postprocessing/public/docs/class/src/effects/NoiseEffect.js~NoiseEffect.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "docs", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vitepress dev", | ||
"build": "vitepress build", | ||
"preview": "vitepress preview" | ||
}, | ||
"dependencies": { | ||
"@tresjs/cientos": "^3.0.1", | ||
"@tresjs/core": "^3.2.2", | ||
"@tresjs/post-processing": "workspace:^", | ||
"gsap": "^3.11.5" | ||
}, | ||
"devDependencies": { | ||
"unocss": "^0.52.3", | ||
"unplugin-vue-components": "^0.24.1", | ||
"vite-svg-loader": "^4.0.0", | ||
"vitepress": "1.0.0-beta.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
<script setup lang="ts"></script> | ||
<script setup lang="ts"> | ||
import { watch } from 'vue' | ||
import { useRoute } from 'vue-router' | ||
const route = useRoute() | ||
function setBodyClass(routeName: string) { | ||
document.title = `Post-processing Playground - ${routeName}` | ||
document.body.className = routeName | ||
} | ||
watch([route], () => setBodyClass(route.name?.toString() ?? '')) | ||
</script> | ||
|
||
<template> | ||
<router-view /> | ||
<Suspense> | ||
<router-view /> | ||
</Suspense> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.