-
-
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.
* fix: expose effectComposer * fixed types and restructured composable a bit * cleanup * fixed linting errors --------- Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com>
- Loading branch information
1 parent
ccfa8fb
commit 4878a95
Showing
15 changed files
with
703 additions
and
471 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
docs/.vitepress/config.ts.timestamp-1700208814950-61916cb6f3fe3.mjs
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,67 @@ | ||
// .vitepress/config.ts | ||
import { defineConfig } from "file:///Users/alvarosabu/Projects/tres/post-processing/node_modules/.pnpm/vitepress@1.0.0-rc.25_@algolia+client-search@4.20.0_postcss@8.4.31_search-insights@2.10.0_typescript@5.2.2/node_modules/vitepress/dist/node/index.js"; | ||
import { resolve } from "file:///Users/alvarosabu/Projects/tres/post-processing/node_modules/.pnpm/pathe@1.1.1/node_modules/pathe/dist/index.mjs"; | ||
import { templateCompilerOptions } from "file:///Users/alvarosabu/Projects/tres/post-processing/node_modules/.pnpm/@tresjs+core@3.5.0_three@0.158.0_vue@3.3.8/node_modules/@tresjs/core/dist/tres.js"; | ||
var __vite_injected_original_dirname = "/Users/alvarosabu/Projects/tres/post-processing/docs/.vitepress"; | ||
var config_default = defineConfig({ | ||
title: "Post-processing", | ||
description: "Post-processing effects for ViteJS", | ||
head: [["link", { rel: "icon", type: "image/svg", href: "/favicon.svg" }]], | ||
themeConfig: { | ||
logo: "/logo.svg", | ||
search: { | ||
provider: "local" | ||
}, | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{ text: "Guide", link: "/guide/" }, | ||
{ text: "Examples", link: "/examples" } | ||
], | ||
sidebar: [ | ||
{ | ||
text: "Guide", | ||
items: [{ text: "Introduction", link: "/guide/" }] | ||
}, | ||
{ | ||
text: "Effects", | ||
items: [ | ||
{ text: "Bloom", link: "/guide/effects/bloom" }, | ||
{ text: "Depth of Field", link: "/guide/effects/depth-of-field" }, | ||
{ text: "Glitch", link: "/guide/effects/glitch" }, | ||
{ text: "Noise", link: "/guide/effects/noise" }, | ||
{ text: "Outline", link: "/guide/effects/outline" }, | ||
{ text: "Pixelation", link: "/guide/effects/pixelation" }, | ||
{ text: "Vignette", link: "/guide/effects/vignette" } | ||
] | ||
} | ||
], | ||
socialLinks: [ | ||
{ icon: "twitter", link: "https://twitter.com/tresjs_dev" }, | ||
{ icon: "discord", link: "https://discord.gg/UCr96AQmWn" } | ||
] | ||
}, | ||
vite: { | ||
optimizeDeps: { | ||
exclude: ["vitepress"], | ||
include: ["three"] | ||
}, | ||
server: { | ||
hmr: { | ||
overlay: false | ||
} | ||
}, | ||
resolve: { | ||
alias: { | ||
"@tresjs/post-processing": resolve(__vite_injected_original_dirname, "../../dist/tres-postprocessing.js") | ||
}, | ||
dedupe: ["three"] | ||
} | ||
}, | ||
vue: { | ||
...templateCompilerOptions | ||
} | ||
}); | ||
export { | ||
config_default as default | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLnZpdGVwcmVzcy9jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvYWx2YXJvc2FidS9Qcm9qZWN0cy90cmVzL3Bvc3QtcHJvY2Vzc2luZy9kb2NzLy52aXRlcHJlc3NcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIi9Vc2Vycy9hbHZhcm9zYWJ1L1Byb2plY3RzL3RyZXMvcG9zdC1wcm9jZXNzaW5nL2RvY3MvLnZpdGVwcmVzcy9jb25maWcud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BQ0EsU0FBUztBQUFBLE1BQ1AsT0FBTztBQUFBLFFBQ0wsMkJBQTJCLFFBQVEsa0NBQVcsbUNBQW1DO0FBQUEsTUFDbkY7QUFBQSxNQUNBLFFBQVEsQ0FBQyxPQUFPO0FBQUEsSUFDbEI7QUFBQSxFQUNGO0FBQUEsRUFDQSxLQUFLO0FBQUEsSUFDSCxHQUFHO0FBQUEsRUFDTDtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ref, watch } from 'vue' | ||
import { useRouter } from 'vitepress' | ||
import type { EffectComposer } from '@tresjs/post-processing' | ||
|
||
export function useRouteDisposal() { | ||
const router = useRouter() | ||
|
||
const effectComposer = ref<InstanceType<typeof EffectComposer> | null>(null) | ||
|
||
watch(() => router.route.data.relativePath, () => { | ||
effectComposer.value?.composer.dispose() | ||
}) | ||
|
||
return { | ||
effectComposer, | ||
} | ||
} |
Oops, something went wrong.