From a0b177d91a2345b21a3368eeb460488923f1efb0 Mon Sep 17 00:00:00 2001 From: Tino Koch <17991193+Tinoooo@users.noreply.github.com> Date: Mon, 26 Jun 2023 14:57:37 +0200 Subject: [PATCH] bugfix: 29 effectcomposer does not correctly react to canvas resizing (#30) * feat: outline effect is now to a .vue file * docs: docs for outline effect * chore: replaced composer injection key by symbol * bugfix: fixed #29 * chore: imported utility function from core * chore: removed debug code * chore: fixed effect by adding computeds * chore: added more checks on condition * feat: 23 refactor effects to vue files (#28) * feat: outline effect is now to a .vue file * docs: docs for outline effect * chore: replaced composer injection key by symbol --------- Co-authored-by: Tino Koch * fix: compute localCamera (#31) --------- Co-authored-by: Tino Koch Co-authored-by: Alvaro Saburido --- playground/src/pages/glitch.vue | 5 +++++ playground/src/pages/outline.vue | 14 +++++++------- playground/src/router.ts | 5 +++++ pnpm-lock.yaml | 4 ++++ src/core/EffectComposer.vue | 32 +++++++++++++++----------------- src/core/effects/Outline.vue | 17 +++++------------ stats.html | 20 +++++++++++++++++++- 7 files changed, 60 insertions(+), 37 deletions(-) create mode 100644 playground/src/pages/glitch.vue diff --git a/playground/src/pages/glitch.vue b/playground/src/pages/glitch.vue new file mode 100644 index 00000000..892cdb2e --- /dev/null +++ b/playground/src/pages/glitch.vue @@ -0,0 +1,5 @@ + + + diff --git a/playground/src/pages/outline.vue b/playground/src/pages/outline.vue index d8001021..a9253cc5 100644 --- a/playground/src/pages/outline.vue +++ b/playground/src/pages/outline.vue @@ -1,10 +1,10 @@ + + + +d":"9b8e-1526"}],"importedBy":[{"uid":"9b8e-1782"}]},"9b8e-1798":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1725"}],"importedBy":[{"uid":"9b8e-1783"}]},"9b8e-1799":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1449"}],"importedBy":[{"uid":"9b8e-1784"}]},"9b8e-1800":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1805"}],"importedBy":[{"uid":"9b8e-1786"}]},"9b8e-1801":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1806"}],"importedBy":[{"uid":"9b8e-1787"}]},"9b8e-1802":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1807"}],"importedBy":[{"uid":"9b8e-1788"},{"uid":"9b8e-1789"},{"uid":"9b8e-1790"},{"uid":"9b8e-1791"}]},"9b8e-1803":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1808"}],"importedBy":[{"uid":"9b8e-1794"}]},"9b8e-1804":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1809"}],"importedBy":[{"uid":"9b8e-1796"}]},"9b8e-1805":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"}],"importedBy":[{"uid":"9b8e-1800"}]},"9b8e-1806":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1810"},{"uid":"9b8e-1811"},{"uid":"9b8e-1812"},{"uid":"9b8e-1813"},{"uid":"9b8e-1814"}],"importedBy":[{"uid":"9b8e-1801"}]},"9b8e-1807":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1815"}],"importedBy":[{"uid":"9b8e-1802"}]},"9b8e-1808":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1508"}],"importedBy":[{"uid":"9b8e-1803"}]},"9b8e-1809":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"}],"importedBy":[{"uid":"9b8e-1804"}]},"9b8e-1810":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1816"}],"importedBy":[{"uid":"9b8e-1806"}]},"9b8e-1811":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1817"}],"importedBy":[{"uid":"9b8e-1806"}]},"9b8e-1812":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1818"}],"importedBy":[{"uid":"9b8e-1806"}]},"9b8e-1813":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1819"}],"importedBy":[{"uid":"9b8e-1806"}]},"9b8e-1814":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1820"}],"importedBy":[{"uid":"9b8e-1806"}]},"9b8e-1815":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1821"}],"importedBy":[{"uid":"9b8e-1807"}]},"9b8e-1816":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1822"}],"importedBy":[{"uid":"9b8e-1810"}]},"9b8e-1817":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"}],"importedBy":[{"uid":"9b8e-1811"}]},"9b8e-1818":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1822"}],"importedBy":[{"uid":"9b8e-1812"}]},"9b8e-1819":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1822"}],"importedBy":[{"uid":"9b8e-1813"}]},"9b8e-1820":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1822"}],"importedBy":[{"uid":"9b8e-1814"}]},"9b8e-1821":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"}],"importedBy":[{"uid":"9b8e-1815"}]},"9b8e-1822":{"id":"\u0000/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js?commonjs-proxy","moduleParts":{},"imported":[{"uid":"9b8e-1823"}],"importedBy":[{"uid":"9b8e-1816"},{"uid":"9b8e-1818"},{"uid":"9b8e-1819"},{"uid":"9b8e-1820"}]},"9b8e-1823":{"id":"/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js","moduleParts":{},"imported":[{"uid":"9b8e-1219"},{"uid":"9b8e-1631"}],"importedBy":[{"uid":"9b8e-1822"}]}},"env":{"rollup":"3.25.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}}; const run = () => { const width = window.innerWidth;