From 07659d38db58fd0a9b0d30e31b9f5ddeb8342d55 Mon Sep 17 00:00:00 2001 From: Harsh Mahajan Date: Thu, 2 Apr 2026 17:42:46 +0530 Subject: [PATCH 1/2] chore: remove promo --- src/lib/components/promos/imagine.svelte | 41 ---------------- src/lib/components/promos/imagine.svg | 61 ------------------------ src/routes/(console)/bottomAlerts.ts | 55 +-------------------- 3 files changed, 1 insertion(+), 156 deletions(-) delete mode 100644 src/lib/components/promos/imagine.svelte delete mode 100644 src/lib/components/promos/imagine.svg diff --git a/src/lib/components/promos/imagine.svelte b/src/lib/components/promos/imagine.svelte deleted file mode 100644 index ff316b51a6..0000000000 --- a/src/lib/components/promos/imagine.svelte +++ /dev/null @@ -1,41 +0,0 @@ - - -
-
- - - -
- - -
- - diff --git a/src/lib/components/promos/imagine.svg b/src/lib/components/promos/imagine.svg deleted file mode 100644 index 58e33f62c3..0000000000 --- a/src/lib/components/promos/imagine.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/routes/(console)/bottomAlerts.ts b/src/routes/(console)/bottomAlerts.ts index 1d0d860457..1ec0a224b1 100644 --- a/src/routes/(console)/bottomAlerts.ts +++ b/src/routes/(console)/bottomAlerts.ts @@ -1,59 +1,6 @@ -import { isCloud } from '$lib/system'; import { isSameDay } from '$lib/helpers/date'; -import Imagine from '$lib/components/promos/imagine.svelte'; -import { - type BottomModalAlertItem, - setMobileSingleAlertLayout, - showBottomModalAlert -} from '$lib/stores/bottom-alerts'; -const SHOW_IMAGINE_PROMO = true; - -const listOfPromotions: BottomModalAlertItem[] = []; - -if (isCloud && SHOW_IMAGINE_PROMO) { - const imaginePromo: BottomModalAlertItem = { - id: 'modal:imagine.dev', - backgroundComponent: Imagine, - title: 'Introducing Imagine', - message: 'The most complete AI builder to date', - importance: 8, - scope: 'everywhere', - plan: 'free', - cta: { - text: 'Try it now', - color: { - light: '#FFFFFF', - dark: '#000000' - }, - background: { - light: '#000000', - dark: '#FFFFFF' - }, - backgroundHover: { - light: '#333333', - dark: '#CCCCCC' - }, - link: () => 'https://imagine.dev', - external: true, - hideOnClick: true - }, - show: true - }; - - listOfPromotions.push(imaginePromo); -} - -export function addBottomModalAlerts() { - listOfPromotions.forEach((promotion) => showBottomModalAlert(promotion)); - - // only for imagine! - if (listOfPromotions.length > 0) { - const imaginePromo = listOfPromotions[0]; - const { cta, title, message } = imaginePromo; - setMobileSingleAlertLayout({ enabled: true, cta, title, message }); - } -} +export function addBottomModalAlerts() {} // use this for time based promo handling // noinspection JSUnusedGlobalSymbols From 2b17b80c6658589a4a58476e581ae7e2ded6406c Mon Sep 17 00:00:00 2001 From: Harsh Mahajan Date: Thu, 2 Apr 2026 17:45:08 +0530 Subject: [PATCH 2/2] remove shaders --- src/lib/components/promos/shader.svelte | 109 ------------ .../promos/threlte/shaders/noise.glsl | 166 ------------------ 2 files changed, 275 deletions(-) delete mode 100644 src/lib/components/promos/shader.svelte delete mode 100644 src/lib/components/promos/threlte/shaders/noise.glsl diff --git a/src/lib/components/promos/shader.svelte b/src/lib/components/promos/shader.svelte deleted file mode 100644 index 2f8ee715bf..0000000000 --- a/src/lib/components/promos/shader.svelte +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - diff --git a/src/lib/components/promos/threlte/shaders/noise.glsl b/src/lib/components/promos/threlte/shaders/noise.glsl deleted file mode 100644 index dea577c656..0000000000 --- a/src/lib/components/promos/threlte/shaders/noise.glsl +++ /dev/null @@ -1,166 +0,0 @@ -// -// psrddnoise3.glsl -// -// Authors: Stefan Gustavson (stefan.gustavson@gmail.com) -// and Ian McEwan (ijm567@gmail.com) -// Version 2021-12-02, published under the MIT license (see below) -// -// Copyright (c) 2021 Stefan Gustavson and Ian McEwan. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// - -vec4 permute(vec4 i) { - vec4 im = mod(i, 289.0); - return mod(((im*34.0)+10.0)*im, 289.0); -} - -float psrddnoise(vec3 x, vec3 period, float alpha, out vec3 gradient, - out vec3 dg, out vec3 dg2) -{ - const mat3 M = mat3(0.0, 1.0, 1.0, - 1.0, 0.0, 1.0, - 1.0, 1.0, 0.0); - - const mat3 Mi = mat3(-0.5, 0.5, 0.5, - 0.5,-0.5, 0.5, - 0.5, 0.5,-0.5); - - vec3 uvw; - uvw = M * x; - - vec3 i0 = floor(uvw); - vec3 f0 = fract(uvw); - - vec3 g_ = step(f0.xyx, f0.yzz); - vec3 l_ = 1.0 - g_; - vec3 g = vec3(l_.z, g_.xy); - vec3 l = vec3(l_.xy, g_.z); - vec3 o1 = min( g, l ); - vec3 o2 = max( g, l ); - - vec3 i1 = i0 + o1; - vec3 i2 = i0 + o2; - vec3 i3 = i0 + vec3(1.0); - - vec3 v0, v1, v2, v3; - - v0 = Mi * i0; - v1 = Mi * i1; - v2 = Mi * i2; - v3 = Mi * i3; - - vec3 x0 = x - v0; - vec3 x1 = x - v1; - vec3 x2 = x - v2; - vec3 x3 = x - v3; - - if(any(greaterThan(period, vec3(0.0)))) { - vec4 vx = vec4(v0.x, v1.x, v2.x, v3.x); - vec4 vy = vec4(v0.y, v1.y, v2.y, v3.y); - vec4 vz = vec4(v0.z, v1.z, v2.z, v3.z); - if(period.x > 0.0) vx = mod(vx, period.x); - if(period.y > 0.0) vy = mod(vy, period.y); - if(period.z > 0.0) vz = mod(vz, period.z); - i0 = M * vec3(vx.x, vy.x, vz.x); - i1 = M * vec3(vx.y, vy.y, vz.y); - i2 = M * vec3(vx.z, vy.z, vz.z); - i3 = M * vec3(vx.w, vy.w, vz.w); - i0 = floor(i0 + 0.5); - i1 = floor(i1 + 0.5); - i2 = floor(i2 + 0.5); - i3 = floor(i3 + 0.5); - } - - vec4 hash = permute( permute( permute( - vec4(i0.z, i1.z, i2.z, i3.z )) - + vec4(i0.y, i1.y, i2.y, i3.y )) - + vec4(i0.x, i1.x, i2.x, i3.x )); - - vec4 theta = hash * 3.883222077; - vec4 sz = hash * -0.006920415 + 0.996539792; - vec4 psi = hash * 0.108705628 ; - - vec4 Ct = cos(theta); - vec4 St = sin(theta); - vec4 sz_prime = sqrt( 1.0 - sz*sz ); - - vec4 gx, gy, gz; - - if(alpha != 0.0) { - vec4 Sp = sin(psi); - vec4 Cp = cos(psi); - - vec4 px = Ct * sz_prime; - vec4 py = St * sz_prime; - vec4 pz = sz; - - vec4 Ctp = St*Sp - Ct*Cp; - vec4 qx = mix( Ctp*St, Sp, sz); - vec4 qy = mix(-Ctp*Ct, Cp, sz); - vec4 qz = -(py*Cp + px*Sp); - - vec4 Sa = vec4(sin(alpha)); - vec4 Ca = vec4(cos(alpha)); - - gx = Ca * px + Sa * qx; - gy = Ca * py + Sa * qy; - gz = Ca * pz + Sa * qz; - } - else { - gx = Ct * sz_prime; - gy = St * sz_prime; - gz = sz; - } - - vec3 g0 = vec3(gx.x, gy.x, gz.x); - vec3 g1 = vec3(gx.y, gy.y, gz.y); - vec3 g2 = vec3(gx.z, gy.z, gz.z); - vec3 g3 = vec3(gx.w, gy.w, gz.w); - - vec4 w = 0.5 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)); - w = max(w, 0.0); - vec4 w2 = w * w; - vec4 w3 = w2 * w; - - vec4 gdotx = vec4(dot(g0,x0), dot(g1,x1), dot(g2,x2), dot(g3,x3)); - - float n = dot(w3, gdotx); - - vec4 dw = -6.0 * w2 * gdotx; - vec3 dn0 = w3.x * g0 + dw.x * x0; - vec3 dn1 = w3.y * g1 + dw.y * x1; - vec3 dn2 = w3.z * g2 + dw.z * x2; - vec3 dn3 = w3.w * g3 + dw.w * x3; - gradient = 39.5 * (dn0 + dn1 + dn2 + dn3); - - vec4 dw2 = 24.0 * w * gdotx; - vec3 dga0 = dw2.x * x0 * x0 - 6.0 * w2.x * (gdotx.x + 2.0 * g0 * x0); - vec3 dga1 = dw2.y * x1 * x1 - 6.0 * w2.y * (gdotx.y + 2.0 * g1 * x1); - vec3 dga2 = dw2.z * x2 * x2 - 6.0 * w2.z * (gdotx.z + 2.0 * g2 * x2); - vec3 dga3 = dw2.w * x3 * x3 - 6.0 * w2.w * (gdotx.w + 2.0 * g3 * x3); - dg = 35.0 * (dga0 + dga1 + dga2 + dga3); - vec3 dgb0 = dw2.x * x0 * x0.yzx - 6.0 * w2.x * (g0 * x0.yzx + g0.yzx * x0); - vec3 dgb1 = dw2.y * x1 * x1.yzx - 6.0 * w2.y * (g1 * x1.yzx + g1.yzx * x1); - vec3 dgb2 = dw2.z * x2 * x2.yzx - 6.0 * w2.z * (g2 * x2.yzx + g2.yzx * x2); - vec3 dgb3 = dw2.w * x3 * x3.yzx - 6.0 * w2.w * (g3 * x3.yzx + g3.yzx * x3); - dg2 = 39.5 * (dgb0 + dgb1 + dgb2 + dgb3); - - return 39.5 * n; -}