From 3112305e8b517f1cf5497ef942e1db2cf4b25a0b Mon Sep 17 00:00:00 2001 From: Tino Koch <17991193+Tinoooo@users.noreply.github.com> Date: Thu, 7 Nov 2024 22:52:34 +0100 Subject: [PATCH] fix: 67 depth of field and outline effect (#138) * simplified dof demo * removed link * docs: better depth of field demo and docs * docs: improve outline demo on docs * chore: lint --------- Co-authored-by: Tino Koch Co-authored-by: Alvaro Saburido --- .github/workflows/actions/pnpm/action.yml | 27 ----- docs/.vitepress/config.ts | 1 - .../theme/components/BlenderCube.vue | 6 + docs/.vitepress/theme/components/Ducky.vue | 10 ++ .../components/pmdrs/DepthOfFieldDemo.vue | 106 ++++++++---------- .../theme/components/pmdrs/OutlineDemo.vue | 85 +++++--------- docs/components.d.ts | 1 + playground/components.d.ts | 1 + playground/src/components/BlenderCube.vue | 6 + playground/src/components/Ducky.vue | 16 +++ .../pages/postprocessing/depth-of-field.vue | 67 +++++++---- .../src/pages/postprocessing/outline.vue | 2 +- public/blender-cube.glb | Bin 0 -> 463328 bytes 13 files changed, 165 insertions(+), 163 deletions(-) delete mode 100644 .github/workflows/actions/pnpm/action.yml create mode 100644 docs/.vitepress/theme/components/Ducky.vue create mode 100644 playground/src/components/Ducky.vue create mode 100644 public/blender-cube.glb diff --git a/.github/workflows/actions/pnpm/action.yml b/.github/workflows/actions/pnpm/action.yml deleted file mode 100644 index 3cb61fb5..00000000 --- a/.github/workflows/actions/pnpm/action.yml +++ /dev/null @@ -1,27 +0,0 @@ -# From https://github.com/remirror/template/blob/4f8c5f5629a081217672a8cce1df085510f43913/.github/actions/pnpm/action.yml -name: 'pnpm installation' -description: 'Install and audit dependencies for pnpm' -inputs: - cache: # id of input - description: 'The location of the pnpm cache' - required: true - default: '.pnpm-store' - version: # id of input - description: 'The version to use' - required: false - default: 6.10.0 - -runs: - using: 'composite' - steps: - - name: install pnpm - run: npm install pnpm@${{ inputs.version }} -g - shell: bash - - - name: setup pnpm config - run: pnpm config set store-dir ${{ inputs.cache }} - shell: bash - - - name: install dependencies - run: pnpm install --shamefully-hoist - shell: bash diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 5fc475fb..0f57f6eb 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -38,7 +38,6 @@ export default defineConfig({ // https://vitepress.dev/reference/default-theme-config nav: [ { text: 'Guide', link: '/guide/' }, - { text: 'Examples', link: 'https://playground.tresjs.org/' }, ], sidebar: [ diff --git a/docs/.vitepress/theme/components/BlenderCube.vue b/docs/.vitepress/theme/components/BlenderCube.vue index 8c02825d..5502950e 100644 --- a/docs/.vitepress/theme/components/BlenderCube.vue +++ b/docs/.vitepress/theme/components/BlenderCube.vue @@ -4,6 +4,12 @@ import { useGLTF } from '@tresjs/cientos' const { nodes } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/blender-cube.glb', { draco: true }) const model = nodes.Cube + +model.traverse((child) => { + if (child.isMesh) { + child.castShadow = true + } +})