Skip to content

Commit c89b5b4

Browse files
authored
feat!: v3 (#209)
1 parent 7289c15 commit c89b5b4

32 files changed

+2590
-2596
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [3.0.0-next.0](https://github.com/Tresjs/post-processing/compare/2.4.0...3.0.0-next.0) (2025-06-24)
4+
5+
### Features
6+
7+
* adapt code and playgrounds to latest changes on ecosystem ([#207](https://github.com/Tresjs/post-processing/issues/207)) ([39ad650](https://github.com/Tresjs/post-processing/commit/39ad650786d565cbaafb300cabfa51978c0fb73d)), closes [#208](https://github.com/Tresjs/post-processing/issues/208)
8+
9+
### Bug Fixes
10+
11+
* update import paths for post-processing components in documentation ([#206](https://github.com/Tresjs/post-processing/issues/206)) ([7289c15](https://github.com/Tresjs/post-processing/commit/7289c152b81ea9e386f7d4621e55fc61292b505f))
12+
313
## [2.4.0](https://github.com/Tresjs/post-processing/compare/2.3.1...2.4.0) (2025-05-26)
414

515
### Features
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<script setup lang="ts">
22
import { useGLTF } from '@tresjs/cientos'
3+
import type { TresObject } from '@tresjs/core'
4+
import { computed, shallowRef } from 'vue'
35
4-
const { nodes }
5-
= await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/blender-cube.glb', { draco: true })
6-
const model = nodes.Cube
6+
const { nodes } = useGLTF(
7+
'https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/blender-cube.glb',
8+
{ draco: true },
9+
)
710
8-
model.traverse((child) => {
9-
if (child.isMesh) {
10-
child.castShadow = true
11-
}
12-
})
11+
const modelRef = shallowRef<TresObject | null>(null)
12+
13+
const model = computed(() => nodes.value?.BlenderCube)
1314
</script>
1415

1516
<template>
16-
<primitive :object="model" />
17+
<primitive v-if="model" ref="modelRef" :object="model" />
1718
</template>
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
<script setup lang="ts">
22
import { useGLTF } from '@tresjs/cientos'
3+
import { Mesh } from 'three'
4+
import { watch } from 'vue'
35
4-
const { scene: model }
5-
= await useGLTF('https://vazxmixjsiawhamofees.supabase.co/storage/v1/object/public/models/duck/model.gltf', { draco: true })
6+
const { state }
7+
= useGLTF('https://vazxmixjsiawhamofees.supabase.co/storage/v1/object/public/models/duck/model.gltf', { draco: true })
8+
9+
watch(state, (model) => {
10+
model.scene.traverse((child) => {
11+
if (child instanceof Mesh) {
12+
child.castShadow = true
13+
}
14+
})
15+
})
616
</script>
717

818
<template>
9-
<primitive :object="model" />
19+
<primitive v-if="state" :object="state.scene" />
1020
</template>

docs/.vitepress/theme/components/pmdrs/DepthOfFieldDemo.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,13 @@ const effectParams = ref({
4040
:position="[-5, 0.5, -10]"
4141
:scale="0.5"
4242
>
43-
<Suspense>
44-
<Ducky />
45-
</Suspense>
43+
<Ducky />
4644
</TresGroup>
4745
<TresGroup
4846
:position="[0, 0.5, 0]"
4947
:scale="0.5"
5048
>
51-
<Suspense>
52-
<BlenderCube />
53-
</Suspense>
49+
<BlenderCube />
5450
</TresGroup>
5551
<TresAmbientLight />
5652
<TresDirectionalLight

docs/.vitepress/theme/components/pmdrs/DotScreenDemo.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const { angle, scale, blendFunction } = useControls({
3030
},
3131
})
3232
33-
const { scene } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/suzanne/suzanne.glb', { draco: true })
33+
const { state } = useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/suzanne/suzanne.glb', { draco: true })
3434
</script>
3535

3636
<template>
@@ -44,7 +44,15 @@ const { scene } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets
4444
/>
4545
<OrbitControls />
4646

47-
<primitive :scale="2" :rotation-x="Math.PI / -5" :rotation-y="Math.PI" :position-y=".25" :position-z="0.5" :object="scene" />
47+
<primitive
48+
v-if="state"
49+
:scale="2"
50+
:rotation-x="Math.PI / -5"
51+
:rotation-y="Math.PI"
52+
:position-y=".25"
53+
:position-z="0.5"
54+
:object="state.scene"
55+
/>
4856

4957
<ContactShadows
5058
:opacity="1"

docs/.vitepress/theme/components/pmdrs/KuwaharaDemo.vue

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const glComposer = {
1818
multisampling: 4,
1919
}
2020
21-
const { scene: scenePlantJar } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/kuwahara-effect/plant-jar/plant-jar.glb', { draco: true })
22-
const { scene: sceneWatermelon } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/kuwahara-effect/watermelon/watermelon_fruit.glb', { draco: true })
21+
const { state: scenePlantJar } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/kuwahara-effect/plant-jar/plant-jar.glb', { draco: true })
22+
const { state: sceneWatermelon } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/kuwahara-effect/watermelon/watermelon_fruit.glb', { draco: true })
2323
2424
const effectProps = reactive({
2525
blendFunction: BlendFunction.NORMAL,
@@ -51,8 +51,19 @@ watch(enabled, () => {
5151

5252
<TresDirectionalLight />
5353

54-
<primitive :position-x="-3" :position-y="-3.5" :scale="5" :object="scenePlantJar" />
55-
<primitive :position-x="4" :scale="20" :object="sceneWatermelon" />
54+
<primitive
55+
v-if="scenePlantJar"
56+
:position-x="-3"
57+
:position-y="-3.5"
58+
:scale="5"
59+
:object="scenePlantJar.scene"
60+
/>
61+
<primitive
62+
v-if="sceneWatermelon"
63+
:position-x="4"
64+
:scale="20"
65+
:object="sceneWatermelon.scene"
66+
/>
5667

5768
<ContactShadows
5869
:opacity=".25"

docs/.vitepress/theme/components/pmdrs/VignetteDemo.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ const { effectComposer } = useRouteDisposal()
2626
<TresCanvas v-bind="gl">
2727
<TresPerspectiveCamera :position="[3, 3, 3]" />
2828
<OrbitControls />
29-
<Suspense>
30-
<BlenderCube />
31-
</Suspense>
29+
<BlenderCube />
3230
<EffectComposerPmndrs ref="effectComposer">
3331
<DepthOfFieldPmndrs :focus-distance="0" :focal-length="0.02" :bokeh-scale="2" />
3432
<VignettePmndrs :darkness="0.9" :offset="0.3" />

docs/components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// @ts-nocheck
33
// Generated by unplugin-vue-components
44
// Read more: https://github.com/vuejs/core/pull/3399
5+
// biome-ignore lint: disable
56
export {}
67

78
/* prettier-ignore */

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"preview": "vitepress preview"
1010
},
1111
"dependencies": {
12-
"@tresjs/cientos": "^4.1.0",
13-
"@tresjs/core": "^4.3.2",
12+
"@tresjs/cientos": "5.0.0-next.2",
13+
"@tresjs/core": "5.0.0-next.3",
1414
"@tresjs/post-processing": "workspace:^",
1515
"gsap": "^3.12.7"
1616
},

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tresjs/post-processing",
33
"type": "module",
4-
"version": "2.4.0",
4+
"version": "3.0.0-next.0",
55
"packageManager": "pnpm@10.6.3",
66
"description": "Post-processing library for TresJS",
77
"author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
@@ -52,7 +52,7 @@
5252
"docs:preview": "vitepress preview"
5353
},
5454
"peerDependencies": {
55-
"@tresjs/core": ">=4.0",
55+
"@tresjs/core": ">=5.0",
5656
"three": ">=0.169",
5757
"vue": ">=3.4"
5858
},
@@ -62,7 +62,7 @@
6262
},
6363
"devDependencies": {
6464
"@release-it/conventional-changelog": "^10.0.0",
65-
"@tresjs/core": "^4.3.2",
65+
"@tresjs/core": "5.0.0-next.6",
6666
"@tresjs/eslint-config": "^1.4.0",
6767
"@tresjs/leches": "https://pkg.pr.new/@tresjs/leches@9ad0cd3",
6868
"@types/three": "^0.172.0",

0 commit comments

Comments
 (0)