-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: sub modules for pmndrs and native components (#123)
* added EffectComposer and some debugging files * wip * added composable * cleanup * added more props to native pixelation effect * restructured playground * added glitch Effect * added glitch effect * renamed folder * added check to prevent console warning * added smaa effect * added output pass * moved injectionKey * added prop to EffectComposer * added halftone effect * added unreal bloom effect * removed obsolete computed * added on demand rendering support * lint fixes * added enabled prop to effect composer component * removed obsolete code * eslint stuff * rebuilt pnpm lock file * moved files * type fixes and removed dependency * seperated builds * fixed playground * adjusted imports in docs * adjusted more imports * added pkg pr workflow * added repository url to package.json * omitted compact option from pkg-pr-new * renamed import * adjusted vite config * added HalftoneShape enum * added invalidation on pass changes for native three effects * added invalidation on prop change for pmndrs effects * added renderer invalidation to glitch effects * removed disableRender prop * tiny readme update * auto created files update * lint fix * lint fix * docs: fixed broken docs, added new structure * docs: three glitch guide * docs: pixelation three * docs: correct glitch demo component name * docs: halftone * docs: smaa * docs: unreal bloom * added some links to threejs examples * added output pass docs * eslint ignored a console output * dependency updates * Update docs/guide/three/glitch.md Co-authored-by: Tino Koch <[email protected]> * Update docs/guide/three/glitch.md Co-authored-by: Tino Koch <[email protected]> * docs: remove redundant info --------- Co-authored-by: Alvaro Saburido <[email protected]>
- Loading branch information
1 parent
cd24a57
commit c8df59f
Showing
78 changed files
with
2,616 additions
and
2,201 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish Any Commit | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
tags: | ||
- '!**' | ||
|
||
env: | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
|
||
permissions: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "pnpm" | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build | ||
run: pnpm build | ||
- run: pnpm dlx pkg-pr-new publish --pnpm |
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 was deleted.
Oops, something went wrong.
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
4 changes: 2 additions & 2 deletions
4
...ess/theme/components/DepthOfFieldDemo.vue → ...eme/components/pmdrs/DepthOfFieldDemo.vue
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
4 changes: 2 additions & 2 deletions
4
....vitepress/theme/components/NoiseDemo.vue → ...ress/theme/components/pmdrs/NoiseDemo.vue
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
8 changes: 3 additions & 5 deletions
8
...itepress/theme/components/OutlineDemo.vue → ...ss/theme/components/pmdrs/OutlineDemo.vue
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
4 changes: 2 additions & 2 deletions
4
...press/theme/components/PixelationDemo.vue → ...theme/components/pmdrs/PixelationDemo.vue
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
52 changes: 52 additions & 0 deletions
52
docs/.vitepress/theme/components/three/GlitchThreeDemo.vue
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,52 @@ | ||
<script setup lang="ts"> | ||
import { Text3D } from '@tresjs/cientos' | ||
import { TresCanvas } from '@tresjs/core' | ||
import { EffectComposer, Glitch } from '@tresjs/post-processing/three' | ||
import { Color } from 'three' | ||
import { useRouteDisposal } from '../../composables/useRouteDisposal' | ||
const gl = { | ||
clearColor: '#121212', | ||
shadows: true, | ||
alpha: false, | ||
} | ||
// Need to dispose of the effect composer when the route changes because Vitepress doesnt unmount the components | ||
const { effectComposer } = useRouteDisposal() | ||
</script> | ||
|
||
<template> | ||
<TresCanvas v-bind="gl"> | ||
<TresPerspectiveCamera | ||
:position="[0, 1, 5]" | ||
:look-at="[0, 1, 0]" | ||
/> | ||
<Suspense> | ||
<Text3D | ||
:position="[0, 1, 0]" | ||
text="Three glitch" | ||
font="https://raw.githubusercontent.com/Tresjs/assets/main/fonts/FiraCodeRegular.json" | ||
> | ||
<TresMeshStandardMaterial | ||
color="hotpink" | ||
:emissive="new Color('hotpink')" | ||
:emissive-intensity="1.2" | ||
/> | ||
</Text3D> | ||
</Suspense> | ||
<TresGridHelper /> | ||
|
||
<TresAmbientLight :intensity="2" /> | ||
<TresDirectionalLight | ||
:position="[3, 3, 3]" | ||
:intensity="1" | ||
/> | ||
<Suspense> | ||
<EffectComposer ref="effectComposer"> | ||
<Glitch /> | ||
</EffectComposer> | ||
</Suspense> | ||
</TresCanvas> | ||
</template> |
54 changes: 54 additions & 0 deletions
54
docs/.vitepress/theme/components/three/HalftoneThreeDemo.vue
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,54 @@ | ||
<script lang="ts" setup> | ||
import { OrbitControls } from '@tresjs/cientos' | ||
import { TresCanvas } from '@tresjs/core' | ||
import { EffectComposer, Halftone } from '@tresjs/post-processing/three' | ||
import { useRouteDisposal } from '../../composables/useRouteDisposal' | ||
// Need to dispose of the effect composer when the route changes because Vitepress doesnt unmount the components | ||
const { effectComposer } = useRouteDisposal() | ||
</script> | ||
|
||
<template> | ||
<TresCanvas | ||
clear-color="#121212" | ||
:alpha="false" | ||
:shadows="true" | ||
> | ||
<TresPerspectiveCamera | ||
:position="[3, 2, 4]" | ||
:look-at="[0, 0, 0]" | ||
/> | ||
<OrbitControls /> | ||
<TresMesh | ||
:position="[1, 0.5, 1]" | ||
> | ||
<TresBoxGeometry /> | ||
<TresMeshStandardMaterial | ||
color="hotpink" | ||
/> | ||
</TresMesh> | ||
<TresMesh | ||
:position="[-1.5, 0.75, 0]" | ||
> | ||
<TresConeGeometry :args="[1, 1.5, 4, 1, false, Math.PI * 0.25]" /> | ||
<TresMeshNormalMaterial /> | ||
<TresMeshStandardMaterial | ||
color="aqua" | ||
/> | ||
</TresMesh> | ||
|
||
<TresGridHelper /> | ||
<TresAmbientLight :intensity="0.9" /> | ||
<TresDirectionalLight | ||
:position="[-10, 5, 8]" | ||
:intensity="2" | ||
/> | ||
|
||
<Suspense> | ||
<EffectComposer ref="effectComposer"> | ||
<Halftone :shape="1" :radius="4" :rotateR="Math.PI / 12" :rotateG="Math.PI / 3" :rotateB="Math.PI / 6" :scatter="0" :blending="1" :greyscale="false" /> | ||
</EffectComposer> | ||
</Suspense> | ||
</TresCanvas> | ||
</template> |
Oops, something went wrong.