From 6d0c832f6f5a5876f1d19b6a9f3298ed1b8ea1e2 Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Fri, 1 Oct 2021 21:48:13 +1000 Subject: [PATCH] Add glitch to homepage (#542) --- app/web/package.json | 3 ++- app/web/src/components/EditorMenu/helpers.ts | 2 ++ app/web/src/components/Hero/AssetWithGooey.tsx | 9 +++++++++ app/yarn.lock | 13 +++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/app/web/package.json b/app/web/package.json index 0d7a885..77c1843 100644 --- a/app/web/package.json +++ b/app/web/package.json @@ -19,6 +19,7 @@ "@monaco-editor/react": "^4.0.11", "@react-three/drei": "^7.3.1", "@react-three/fiber": "^7.0.5", + "@react-three/postprocessing": "^2.0.5", "@redwoodjs/auth": "^0.36.4", "@redwoodjs/forms": "^0.36.4", "@redwoodjs/router": "^0.36.4", @@ -61,4 +62,4 @@ "raw-loader": "^4.0.2", "tailwindcss": "^2.2.7" } -} \ No newline at end of file +} diff --git a/app/web/src/components/EditorMenu/helpers.ts b/app/web/src/components/EditorMenu/helpers.ts index f20eaa1..c31864a 100644 --- a/app/web/src/components/EditorMenu/helpers.ts +++ b/app/web/src/components/EditorMenu/helpers.ts @@ -3,6 +3,7 @@ import { fileSave } from 'browser-fs-access' import { MeshBasicMaterial, Mesh, Scene } from 'three' import { STLExporter } from 'three/examples/jsm/exporters/STLExporter' import { requestRender, State } from 'src/helpers/hooks/useIdeState' +import { toast } from '@redwoodjs/web/toast' export const PullTitleFromFirstLine = (code = '') => { const firstLine = code.split('\n').filter(identity)[0] || '' @@ -53,6 +54,7 @@ export const makeStlDownloadHandler = extensions: ['.stl'], }) } + toast("CadHub is a work in process and We're still working out kinks with the STL download.") if (geometry) { if ( type === 'geometry' && diff --git a/app/web/src/components/Hero/AssetWithGooey.tsx b/app/web/src/components/Hero/AssetWithGooey.tsx index 3b861cd..f075a1f 100644 --- a/app/web/src/components/Hero/AssetWithGooey.tsx +++ b/app/web/src/components/Hero/AssetWithGooey.tsx @@ -5,6 +5,7 @@ import { STLLoader } from 'three/examples/jsm/loaders/STLLoader' import { useEdgeSplit } from 'src/helpers/hooks/useEdgeSplit' import texture from 'src/components/IdeViewer/dullFrontLitMetal.png' import { useTexture, MeshDistortMaterial, Sphere } from '@react-three/drei' +import { Glitch, EffectComposer } from "@react-three/postprocessing"; const thresholdAngle = 10 export default function AssetWithGooey({ @@ -38,6 +39,14 @@ export default function AssetWithGooey({ }) return ( + + +