Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Support card at launch: a full-window card over a bronze sculpt rendered in SculptForge, with the Supporter, Insider (most popular) and Studio memberships and a one-time gift, each opening its Stripe checkout; first start, each update and at most weekly, never mid-session or in tests; I'm already a supporter and Preferences > Support; donate page first screen redesigned to match (light and dark)

islandmeded35c6dc4fdd
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2c9fad51..4ed6a6bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,14 @@ All notable changes to SculptForge are listed here. The format follows
boundary). **Polygroup borders** also masks where polygroups meet (ZBrush: Mask by polygroup border), **Soft**
fades the mask inwards; one undo step. A closed mesh masks nothing and the status bar says it has no open edges
(`mask_border rings=2 polygroups=true soft=true`).
+- The support card at launch: a full-window card over a bronze sculpt rendered in SculptForge, with the Supporter
+ ($5 / month), Insider ($20 / month, "Insiders will get each release about two weeks early, starting with
+ SculptForge 1.0.") and Studio ($250 / month) memberships and a one-time gift, each opening its Stripe checkout in
+ the browser. It shows only while starting: the first time, after each update (with a link to What's New), and
+ otherwise at most once every 7 days; never mid-session, in tests, renders, demos or CI (`SF_NO_SUPPORT_CARD=1`
+ also turns it off). Maybe later, Esc or a click outside closes it; "I'm already a supporter" hides it for good
+ (stored in project.json; there are no accounts). Preferences > Support turns it off. Its picture is decoded on a
+ worker thread only when it shows. The donate page's first screen is redesigned to match (light and dark).
- Radial (pie) menus (#45): up to 8 menus of up to 8 items, each item any action the command palette (F3) finds
(brushes, tools, commands, toggles). Hold a menu's key, flick toward an item and let go to run it; tap the key and
the pie stays open for a click. A menu can also open from a mouse button (middle, back, forward) or a pen side
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f3a3307..fc345040 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -221,7 +221,8 @@ if(SCULPTFORGE_BUILD_APP)
fontSemiBold ${CMAKE_CURRENT_SOURCE_DIR}/assets/fonts/Inter-SemiBold.ttf
fontLucide ${CMAKE_CURRENT_SOURCE_DIR}/assets/fonts/lucide.ttf
appIcon ${CMAKE_CURRENT_SOURCE_DIR}/assets/branding/sculptforge-256.png
- supporters ${CMAKE_CURRENT_SOURCE_DIR}/docs/supporters.txt) # Help > About (never empty: it starts with comments)
+ supporters ${CMAKE_CURRENT_SOURCE_DIR}/docs/supporters.txt # Help > About (never empty: it starts with comments)
+ supportCard ${CMAKE_CURRENT_SOURCE_DIR}/assets/branding/support-card.jpg) # the support card's picture (decoded only when it shows)
include(cmake/EmbedGuide.cmake)
embed_guide(${CMAKE_CURRENT_BINARY_DIR}/EmbeddedGuide.cpp ${CMAKE_CURRENT_SOURCE_DIR}/docs/guide)
add_executable(sculptforge
@@ -279,6 +280,7 @@ if(SCULPTFORGE_BUILD_APP)
src/app/PanelProject.cpp
src/app/PanelSubTools.cpp
src/app/PanelSupport.cpp
+ src/app/PanelSupportCard.cpp
src/app/PanelExtract.cpp
src/app/PanelTimeline.cpp
src/app/ProofMode.cpp
diff --git a/assets/branding/support-card.jpg b/assets/branding/support-card.jpg
new file mode 100644
index 00000000..9739fcbe
Binary files /dev/null and b/assets/branding/support-card.jpg differ
diff --git a/docs/guide/welcome.md b/docs/guide/welcome.md
index 3c91e9ba..e782d93b 100644
--- a/docs/guide/welcome.md
+++ b/docs/guide/welcome.md
@@ -18,8 +18,10 @@ the GPL covers the program, not your models.
SculptForge stays free and works the same for everyone. If it helps your work, **Help > Support SculptForge...**
opens [sculptforge.app/donate.html](https://sculptforge.app/donate.html) in your browser, where you can become a
member. That is all it does: the app has no payment code, no account and no licence check. Supporters are thanked
-by name in **Help > About**. After about ten hours of sculpting, SculptForge shows one small note about this along
-the bottom of the canvas, once, and never again after you close it.
+by name in **Help > About**. While SculptForge starts (the first time, after an update, and at most once a week
+otherwise) a card shows the memberships; **I'm already a supporter** hides it for good and **Preferences > Support**
+turns it off. After about ten hours of sculpting, SculptForge also shows one small note about this along the bottom
+of the canvas, once, and never again after you close it.
## What you can do with it
diff --git a/docs/guide/whats-new.md b/docs/guide/whats-new.md
index 54f2300c..bccf4e0a 100644
--- a/docs/guide/whats-new.md
+++ b/docs/guide/whats-new.md
@@ -27,8 +27,14 @@ chapter opens by itself the first time you start a new version; you can always f
### Become an Insider
-SculptForge stays free for everyone. Insiders will get each release about two weeks early, starting with SculptForge 1.0. **Help > Support SculptForge**
-opens the page to join.
+SculptForge stays free for everyone. Insiders will get each release about two weeks early, starting with
+SculptForge 1.0. **Help > Support SculptForge** opens the page to join.
+
+When SculptForge starts for the first time, after an update, and otherwise at most once a week, a card shows the
+ways to support it: **Supporter**, **Insider** and **Studio** memberships and a one-time gift, each opening its
+checkout page in your browser. **Maybe later**, <kbd>Esc</kbd> or a click outside closes it; **I'm already a
+supporter** hides it for good, and **Preferences > Support** turns it off. It never shows while you work, and
+nothing about you is sent anywhere.
## Version 0.10.3
diff --git a/src/app/App.cpp b/src/app/App.cpp
index f74e101a..d262d16a 100644
--- a/src/app/App.cpp
+++ b/src/app/App.cpp
@@ -246,6 +246,15 @@ bool App::init(const AppOptions& options) {
fontIcons_ = io.Fonts->AddFontFromMemoryTTF(const_cast<unsigned char*>(assets::fontLucide), int(assets::fontLucide_size),
20.0f * scale, &big, kIconRanges);
}
+ { // The support card's display sizes (PanelSupportCard.cpp): Latin only, so the atlas grows by a few glyphs.
+ static const ImWchar kCardRanges[] = {0x0020, 0x00FF, 0x2014, 0x2014, 0x2019, 0x2019, 0x2026, 0x2026, 0};
+ fontCardTitle_ = io.Fonts->AddFontFromMemoryTTF(const_cast<unsigned char*>(assets::fontSemiBold),
+ int(assets::fontSemiBold_size), 40.0f * scale, &fontConfig, kCardRanges);
+ fontCardHead_ = io.Fonts->AddFontFromMemoryTTF(const_cast<unsigned char*>(assets::fontSemiBold),
+ int(assets::fontSemiBold_size), 21.0f * scale, &fontConfig, kCardRanges);
+ fontCardBody_ = io.Fonts->AddFontFromMemoryTTF(const_cast<unsigned char*>(assets::fontRegular),
+ int(assets::fontRegular_size), 16.5f * scale, &fontConfig, kCardRanges);
+ }
addHelpFonts(scale); // Ctrl-help titles (Inter SemiBold) and the console (ProggyClean)
guide_.addFonts(scale); // User Guide headings
if (recording) {
@@ -632,7 +641,8 @@ bool App::backgroundBusy() const {
auto running = [](const auto& f) { return f.valid() && f.wait_for(std::chrono::seconds(0)) != std::future_status::ready; };
return running(pendingBrush_) || running(pendingGenerator_) || running(pendingModels_) || running(pendingUnreal_) ||
running(pendingComfyCheck_) || galleryBusy() || thumbs_.busy() || libraryScanner_.busy() || autoUv_ ||
- bakeBusy() || qremesh_ || voxelRemesh_ || updateJob_ || splatTrainBusy() || sculptableBusy() || phoneBusy();
+ bakeBusy() || qremesh_ || voxelRemesh_ || updateJob_ || splatTrainBusy() || sculptableBusy() || phoneBusy() ||
+ supportCardLoading();
}
void App::redrawIn(double seconds) {
@@ -1048,6 +1058,7 @@ void App::handleEvent(const SDL_Event& event) {
if (strayMouseMotion(event)) return; // neither the canvas nor the UI follows a driver's stray mouse events
SDL_Event e = event;
mapPenPosition(e); // a tablet in mouse mode moves the cursor relatively (#54), for the canvas and the UI
+ if (supportCardEvent(e)) return; // the support card at launch takes clicks and keys while open
if (radialMouseEvent(e)) return; // clicks on an open radial menu, and the buttons that open one (RadialMenu.cpp)
ImGui_ImplSDL3_ProcessEvent(&e);
const ImGuiIO& io = ImGui::GetIO();
@@ -2078,6 +2089,7 @@ void App::drawUi() {
drawSupportUi(); // the first-run welcome, the one support reminder (PanelSupport.cpp)
guide_.draw(*this); // Help > User Guide
drawHelpConsoleUi(); // console, command palette, Controls (F1), Ctrl-hover help: last, on top
+ drawSupportCard(); // the support card at launch, over everything (PanelSupportCard.cpp)
}
void App::drawLayersContents() {
diff --git a/src/app/App.h b/src/app/App.h
index 26dbbbc3..f3864060 100644
--- a/src/app/App.h
+++ b/src/app/App.h
@@ -330,8 +330,10 @@ private:
bool lastCommandOk_ = true; // result of the last runCommand (UI tests check it)
bool showHelp_ = false;
bool showAbout_ = false;
- // Supporting SculptForge (Support.h): the app only ever opens kSupportUrl in the browser; nothing else changes.
+ // Supporting SculptForge (Support.h): the app only ever opens the donate page or its Stripe checkout links in the
+ // browser; nothing else changes.
void openSupportPage();
+ void openSupportLink(const char* url); // one of the Support.h links (UI tests: the status bar only)
void drawSupportUi(); // the first-run welcome and the one reminder note
void drawSupportersSection(); // Help > About: the names from docs/supporters.txt, as plain text
bool showWelcome_ = false; // the first start (no project.json yet), or Help > Welcome
@@ -339,6 +341,22 @@ private:
bool supportReminderDone_ = false; // the reminder was shown (or turned off) once: never again (project.json)
bool supportReminderOpen_ = false;
int supportPageRequests_ = 0; // UI tests: how often the page was asked for (only opened when interactive)
+ // The support card at launch (PanelSupportCard.cpp): decided once while starting, never mid-session.
+ struct SupportCard; // its animation state and the background picture (loaded on a worker thread)
+ struct SupportCardDelete { void operator()(SupportCard* c) const; }; // (defined where SupportCard is)
+ std::unique_ptr<SupportCard, SupportCardDelete> supportCard_;
+ SupportCardPrefs supportCardPrefs_; // project.json
+ SupportCardReason supportCardReason_ = SupportCardReason::None;
+ bool supportCardTestMode() const; // tests, renders, demos, benchmarks, CI: never
+ void launchSupportCard(bool firstRun, int64_t now, bool testMode); // shows it if supportCardDue
+ void showSupportCard(SupportCardReason reason); // (also Preferences > Support > Show it now)
+ void closeSupportCard(bool supporter);
+ bool supportCardOpen() const;
+ bool supportCardLoading() const; // its picture still decoding (backgroundBusy)
+ bool supportCardEvent(const SDL_Event& e); // input while it's open goes to it, not the canvas or shortcuts
+ void drawSupportCard();
+ void drawSupportPrefs(); // Preferences > Support
+ bool welcomeAfterCard_ = false; // the first-run welcome waits until the card closes
// Results from asynchronous native file dialogs (called off the main thread).
struct PendingFile {
@@ -1102,6 +1120,7 @@ private:
void pollAlphaFile();
ShellGeometry shell_; // this frame's regions (drawShell)
ImFont* fontSmall_ = nullptr, *fontTiny_ = nullptr, *fontIcons_ = nullptr, *fontBold_ = nullptr;
+ ImFont* fontCardTitle_ = nullptr, *fontCardHead_ = nullptr, *fontCardBody_ = nullptr; // the support card (Latin only)
std::string dropdown_; // palette open as a drop-down ("" = none)
float dropdownX_ = 0.0f;
bool openDropdown_ = false;
diff --git a/src/app/Palettes.cpp b/src/app/Palettes.cpp
index a9f645a3..624cd1eb 100644
--- a/src/app/Palettes.cpp
+++ b/src/app/Palettes.cpp
@@ -472,6 +472,10 @@ void App::drawPalette_Preferences() {
tray::Section section;
drawUpdatesSection();
}
+ if (subpalette("preferences.support", "Support")) {
+ tray::Section section;
+ drawSupportPrefs(); // the support card at launch (PanelSupportCard.cpp)
+ }
if (subpalette("preferences.autosave", "Autosave")) {
tray::Section section;
ImGui::SetNextItemWidth(-1);
diff --git a/src/app/PanelProject.cpp b/src/app/PanelProject.cpp
index a779a94c..86ffacdd 100644
--- a/src/app/PanelProject.cpp
+++ b/src/app/PanelProject.cpp
@@ -89,7 +89,8 @@ void App::initProject() {
std::ifstream f(fsPath(prefDir_ + "project.json"), std::ios::binary);
Json prefs;
std::string err;
- if (f && Json::parse(std::string(std::istreambuf_iterator<char>(f), {}), prefs, err)) {
+ const bool hadPrefs = f && Json::parse(std::string(std::istreambuf_iterator<char>(f), {}), prefs, err);
+ if (hadPrefs) {
for (const auto& p : prefs["recent_files"].items())
if (p.isString()) recentFiles_.push_back(p.asString());
autosaveMinutes_ = std::clamp(int(prefs["autosave_minutes"].asNumber(autosaveMinutes_)), 0, 120);
@@ -101,11 +102,20 @@ void App::initProject() {
if (prefs["update_skipped"].isString()) updateSkipped_ = prefs["update_skipped"].asString();
sculptSeconds_ = addSculptTime(prefs["sculpt_seconds"].asNumber(0.0), 0.0);
supportReminderDone_ = prefs["support_reminder_done"].asBool(false);
+ supportCardPrefs_.enabled = prefs["support_card"].asBool(true);
+ supportCardPrefs_.supporter = prefs["supporter"].asBool(false);
+ supportCardPrefs_.shownAt = int64_t(prefs["support_card_shown_at"].asNumber(0));
+ if (prefs["support_card_version"].isString()) supportCardPrefs_.shownVersion = prefs["support_card_version"].asString();
} else {
showWelcome_ = options_.uiTest.empty() && options_.demo.empty(); // the first start: no prefs yet
}
recentFiles_ = pruneRecentFiles(std::move(recentFiles_), fileExists);
saveProjectPrefs(); // records this version, so What's New shows once
+ // The support card: decided here, while starting, and never again this session (Support.h). Its picture is
+ // decoded on a worker thread only if it shows.
+ launchSupportCard(!hadPrefs,
+ std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count(),
+ supportCardTestMode());
#if SF_UPDATE_CHECK
const int64_t now = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count();
@@ -142,6 +152,10 @@ void App::saveProjectPrefs() {
if (!updateSkipped_.empty()) prefs.set("update_skipped", updateSkipped_);
prefs.set("sculpt_seconds", std::floor(sculptSeconds_)); // for the one support reminder (Support.h); stays here
prefs.set("support_reminder_done", supportReminderDone_);
+ prefs.set("support_card", supportCardPrefs_.enabled); // the support card at launch (Support.h)
+ prefs.set("supporter", supportCardPrefs_.supporter);
+ prefs.set("support_card_shown_at", double(supportCardPrefs_.shownAt));
+ if (!supportCardPrefs_.shownVersion.empty()) prefs.set("support_card_version", supportCardPrefs_.shownVersion);
std::ofstream(fsPath(prefDir_ + "project.json"), std::ios::binary | std::ios::trunc) << prefs.dump(true);
}
diff --git a/src/app/PanelSupportCard.cpp b/src/app/PanelSupportCard.cpp
new file mode 100644
index 00000000..e9b9dcd5
--- /dev/null
+++ b/src/app/PanelSupportCard.cpp
@@ -0,0 +1,612 @@
+// SculptForge - open source digital sculpting
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+// The support card at launch: a full-window card over the app with a bronze sculpt render (rendered by SculptForge
+// itself, assets/branding/support-card.jpg), the three memberships and a one-time gift. When it may show is decided
+// once while starting (supportCardDue in Support.h): the first start, the first start of each new version, then at
+// most once a week; never mid-session, never for a supporter, never in tests, renders, demos or CI. Every button only
+// opens one of the fixed links in Support.h in the browser. The picture is decoded on a worker thread the first time
+// the card shows, so starting is no slower; the card fades in over a plain backdrop and the picture follows.
+#include "app/App.h"
+#include "app/Theme.h"
+#include "app/Ui.h"
+#include "render/GL.h"
+
+#include <imgui.h>
+#include <imgui_internal.h>
+#include <imgui_impl_sdl3.h>
+
+#include <algorithm>
+#include <chrono>
+#include <cmath>
+#include <cstdlib>
+#include <future>
+
+namespace sf {
+
+namespace assets {
+extern const unsigned char supportCard[]; // assets/branding/support-card.jpg (CMakeLists.txt)
+extern const unsigned long long supportCard_size;
+} // namespace assets
+
+struct App::SupportCard {
+ SupportCardReason reason = SupportCardReason::None;
+ double openedAt = 0.0; // seconds (ImGui clock)
+ std::future<Image> picture; // decoded and graded on a worker thread
+ GLuint texture = 0;
+ float pictureAspect = 16.0f / 9.0f;
+ double pictureAt = -1.0; // when the texture became ready (it fades in)
+ ImVec2 parallax{0.0f, 0.0f}; // follows the pointer, eased
+ float hover[3] = {0.0f, 0.0f, 0.0f}; // tier cards lifted under the pointer, eased
+ bool closing = false;
+ double closingAt = 0.0;
+ bool supporterOnClose = false;
+
+ ~SupportCard() {
+ if (texture) gl::DeleteTextures(1, &texture);
+ if (picture.valid()) picture.wait();
+ }
+};
+
+void App::SupportCardDelete::operator()(SupportCard* c) const { delete c; }
+
+namespace {
+
+// ImGui's clock: real time in the app, the scripted time in UI tests (so their screenshots show the card settled).
+double nowSeconds() { return ImGui::GetTime(); }
+
+float clamp01(float x) { return std::clamp(x, 0.0f, 1.0f); }
+float easeOut(float x) { // cubic
+ x = 1.0f - clamp01(x);
+ return 1.0f - x * x * x;
+}
+float easeInOut(float x) {
+ x = clamp01(x);
+ return x * x * (3.0f - 2.0f * x);
+}
+float lerp(float a, float b, float t) { return a + (b - a) * t; }
+
+ImU32 col(unsigned hex, float alpha) {
+ return IM_COL32((hex >> 16) & 0xff, (hex >> 8) & 0xff, hex & 0xff, int(std::clamp(alpha, 0.0f, 1.0f) * 255.0f + 0.5f));
+}
+
+// The picture with the darkening for the text baked in (left third and the lower part, under the tier cards), so the
+// card draws it as one rounded image.
+Image loadPicture() {
+ Image img;
+ std::string error;
+ if (!Image::decode(assets::supportCard, size_t(assets::supportCard_size), img, error)) return {};
+ const int w = img.width, h = img.height;
+ for (int y = 0; y < h; ++y) {
+ const float v = (float(y) + 0.5f) / float(h);
+ const float bottom = 0.92f * easeInOut((v - 0.42f) / 0.5f);
+ for (int x = 0; x < w; ++x) {
+ const float u = (float(x) + 0.5f) / float(w);
+ const float left = 0.86f * std::pow(1.0f - easeInOut(u / 0.62f), 1.3f);
+ const float dark = 1.0f - (1.0f - left) * (1.0f - bottom);
+ uint8_t* p = &img.rgba[(size_t(y) * size_t(w) + size_t(x)) * 4];
+ static constexpr float kInk[3] = {12.0f, 12.0f, 15.0f};
+ for (int c = 0; c < 3; ++c) p[c] = uint8_t(lerp(float(p[c]), kInk[c], dark) + 0.5f);
+ }
+ }
+ return img;
+}
+
+GLuint uploadPicture(const Image& img) {
+ GLuint tex = 0;
+ gl::GenTextures(1, &tex);
+ gl::BindTexture(GL_TEXTURE_2D, tex);
+ gl::PixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ gl::TexImage2D(GL_TEXTURE_2D, 0, GLint(GL_RGBA8), img.width, img.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.rgba.data());
+ gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GLint(GL_LINEAR));
+ gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GLint(GL_LINEAR));
+ gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GLint(GL_CLAMP_TO_EDGE));
+ gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GLint(GL_CLAMP_TO_EDGE));
+ gl::BindTexture(GL_TEXTURE_2D, 0);
+ return tex;
+}
+
+// Text drawn straight to the draw list, also logged so UI tests can find it (expect_text).
+struct Painter {
+ ImDrawList* dl;
+ float k; // logical pixels to screen pixels (UI scale x fit x the opening zoom)
+
+ ImVec2 measure(ImFont* f, float px, const char* s, float wrap = 0.0f) const {
+ return f->CalcTextSizeA(px * k, FLT_MAX, wrap, s);
+ }
+ ImVec2 text(ImFont* f, float px, ImVec2 at, ImU32 c, const char* s, float wrap = 0.0f) const {
+ dl->AddText(f, px * k, at, c, s, nullptr, wrap);
+ ImGui::LogText("%s\n", s);
+ return measure(f, px, s, wrap);
+ }
+ // Small capitals with letter spacing (the eyebrow and the badge).
+ float spaced(ImFont* f, float px, ImVec2 at, ImU32 c, const char* s, float spacing, bool draw = true) const {
+ float x = at.x;
+ char one[2] = {0, 0};
+ for (const char* p = s; *p; ++p) {
+ one[0] = *p;
+ if (draw) dl->AddText(f, px * k, ImVec2(x, at.y), c, one);
+ x += f->CalcTextSizeA(px * k, FLT_MAX, 0.0f, one).x + spacing * k;
+ }
+ if (draw) ImGui::LogText("%s\n", s);
+ return x - at.x - spacing * k;
+ }
+};
+
+// A soft shadow / glow: rounded rectangles growing outwards, fading.
+void glow(ImDrawList* dl, ImVec2 a, ImVec2 b, float rounding, float spread, unsigned hex, float alpha, int layers = 10) {
+ for (int i = layers; i >= 1; --i) {
+ const float t = float(i) / float(layers), g = spread * t;
+ dl->AddRectFilled(ImVec2(a.x - g, a.y - g), ImVec2(b.x + g, b.y + g), col(hex, alpha * (1.0f - t) * (1.0f - t) * 0.5f),
+ rounding + g);
+ }
+}
+
+// A light sweeping across the picture: a soft diagonal band, faded towards the card's edges so it stays inside the
+// rounded corners.
+void lightSweep(ImDrawList* dl, ImVec2 a, ImVec2 b, float rounding, float x, float width, float alpha) {
+ if (alpha <= 0.002f) return;
+ const ImVec2 dir = ImVec2(0.34f, 1.0f); // leaning right going down
+ const float len = std::sqrt(dir.x * dir.x + dir.y * dir.y);
+ const ImVec2 d(dir.x / len, dir.y / len), n(d.y, -d.x);
+ const float h = (b.y - a.y) / d.y; // the band's length across the card
+ const ImVec2 top(x - d.x * h * 0.5f, a.y + (b.y - a.y) * 0.5f - h * 0.5f);
+ constexpr int kSteps = 28;
+ auto edgeFade = [&](ImVec2 p) {
+ const float e = std::min({p.x - a.x, b.x - p.x, p.y - a.y, b.y - p.y});
+ return clamp01((e - rounding * 0.4f) / (rounding * 2.0f));
+ };
+ const ImVec2 uv = ImGui::GetFontTexUvWhitePixel();
+ dl->PrimReserve(kSteps * 12, (kSteps + 1) * 3);
+ const ImDrawIdx base = ImDrawIdx(dl->_VtxCurrentIdx);
+ for (int i = 0; i <= kSteps; ++i) {
+ const float t = float(i) / float(kSteps);
+ const ImVec2 c(top.x + d.x * h * t, top.y + d.y * h * t);
+ const float fall = std::sin(t * 3.14159265f); // brightest in the middle of the card
+ const ImVec2 pts[3] = {ImVec2(c.x - n.x * width, c.y - n.y * width), c, ImVec2(c.x + n.x * width, c.y + n.y * width)};
+ for (int j = 0; j < 3; ++j) {
+ const float aj = j == 1 ? alpha * fall * edgeFade(pts[j]) : 0.0f;
+ dl->PrimWriteVtx(pts[j], uv, col(0xfff3e2, aj));
+ }
+ }
+ for (int i = 0; i < kSteps; ++i)
+ for (int j = 0; j < 2; ++j) {
+ const ImDrawIdx v0 = ImDrawIdx(base + i * 3 + j), v1 = ImDrawIdx(v0 + 1), v2 = ImDrawIdx(v0 + 3), v3 = ImDrawIdx(v0 + 4);
+ dl->PrimWriteIdx(v0), dl->PrimWriteIdx(v1), dl->PrimWriteIdx(v3);
+ dl->PrimWriteIdx(v0), dl->PrimWriteIdx(v3), dl->PrimWriteIdx(v2);
+ }
+}
+
+struct Tier {
+ const char* name;
+ const char* price;
+ const char* per;
+ const char* perks;
+ const char* cta;
+ const char* id; // the button's ImGui label (UI tests click it)
+ const char* url;
+};
+
+} // namespace
+
+bool App::supportCardTestMode() const {
+ return !interactive() || !options_.uiTest.empty() || !options_.demo.empty() || !options_.script.empty() ||
+ options_.measureIdle > 0.0f || options_.measureStroke > 0.0f || options_.benchmark ||
+ !options_.timelapsePath.empty() || std::getenv("SF_NO_SUPPORT_CARD") || std::getenv("CI");
+}
+
+bool App::supportCardOpen() const { return supportCard_ && !supportCard_->closing; }
+
+bool App::supportCardLoading() const { return supportCard_ && !supportCard_->texture && supportCard_->picture.valid(); }
+
+void App::launchSupportCard(bool firstRun, int64_t now, bool testMode) {
+ supportCardReason_ = supportCardDue(supportCardPrefs_, firstRun, SCULPTFORGE_VERSION, now, testMode);
+ if (supportCardReason_ == SupportCardReason::None) return;
+ supportCardPrefs_.shownAt = now;
+ supportCardPrefs_.shownVersion = SCULPTFORGE_VERSION;
+ saveProjectPrefs(); // (recorded before it shows: a crash can't bring it back at once)
+ if (showWelcome_) { // the first-run welcome follows the card
+ showWelcome_ = false;
+ welcomeAfterCard_ = true;
+ }
+ showSupportCard(supportCardReason_);
+}
+
+void App::showSupportCard(SupportCardReason reason) {
+ supportCard_.reset(new SupportCard);
+ supportCard_->reason = reason;
+ supportCard_->openedAt = nowSeconds();
+ supportCard_->picture = std::async(std::launch::async, loadPicture);
+ redrawIn(0.0);
+}
+
+void App::closeSupportCard(bool supporter) {
+ if (!supportCard_ || supportCard_->closing) return;
+ supportCard_->closing = true;
+ supportCard_->closingAt = nowSeconds();
+ if (supporter) {
+ supportCardPrefs_.supporter = true;
+ saveProjectPrefs();
+ status_ = "Thank you for supporting SculptForge! The support card won't show again (Preferences > Support).";
+ }
+ if (welcomeAfterCard_) {
+ welcomeAfterCard_ = false;
+ showWelcome_ = true;
+ }
+ redrawIn(0.0);
+}
+
+void App::openSupportLink(const char* url) {
+ ++supportPageRequests_;
+ if (!interactive()) { // UI tests, renders and demos never start a browser
+ status_ = std::string("Support SculptForge: ") + url;
+ return;
+ }
+ status_ = SDL_OpenURL(url) ? std::string("Opened the Stripe checkout in your browser")
+ : std::string("Couldn't open ") + url + ": " + SDL_GetError();
+}
+
+bool App::supportCardEvent(const SDL_Event& event) {
+ if (!supportCard_) return false;
+ switch (event.type) {
+ case SDL_EVENT_KEY_DOWN:
+ case SDL_EVENT_MOUSE_BUTTON_DOWN:
+ case SDL_EVENT_MOUSE_WHEEL:
+ case SDL_EVENT_PEN_DOWN:
+ case SDL_EVENT_PEN_BUTTON_DOWN:
+ case SDL_EVENT_FINGER_DOWN: {
+ SDL_Event e = event;
+ ImGui_ImplSDL3_ProcessEvent(&e); // the card's buttons only: no stroke, shortcut or camera move underneath
+ return true;
+ }
+ default:
+ return false;
+ }
+}
+
+void App::drawSupportCard() {
+ if (!supportCard_) return;
+ SupportCard& card = *supportCard_;
+ const double now = nowSeconds();
+ const float t = float(now - card.openedAt);
+ const ImGuiIO& io = ImGui::GetIO();
+ const float dt = std::clamp(io.DeltaTime, 0.0f, 0.1f);
+
+ // Fade in (and out when closing). A modal pop-up: above every panel and pop-up, and nothing under it takes input.
+ constexpr const char* kPopup = "##support_card";
+ float shown = easeOut(t / 0.45f);
+ bool finished = false;
+ if (card.closing) {
+ const float c = float(now - card.closingAt) / 0.22f;
+ finished = c >= 1.0f;
+ shown *= 1.0f - easeInOut(c);
+ }
+ if (finished) {
+ if (ImGui::IsPopupOpen(kPopup)) {
+ ImGui::SetNextWindowSize(ImVec2(1, 1));
+ if (ImGui::BeginPopupModal(kPopup, nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground)) {
+ ImGui::CloseCurrentPopup();
+ ImGui::EndPopup();
+ }
+ }
+ supportCard_.reset();
+ redrawIn(0.0);
+ return;
+ }
+ if (!ImGui::IsPopupOpen(kPopup)) ImGui::OpenPopup(kPopup);
+ redrawIn(0.0); // animated while open (60 fps with vsync); nothing is drawn for it once closed
+
+ // The picture: decoded off the main thread, uploaded here once ready.
+ if (!card.texture && card.picture.valid() && card.picture.wait_for(std::chrono::seconds(0)) == std::future_status::ready) {
+ const Image img = card.picture.get();
+ if (!img.empty()) {
+ card.texture = uploadPicture(img);
+ card.pictureAspect = img.aspect();
+ card.pictureAt = now;
+ }
+ }
+
+ const float s = uiScale_;
+ const ImVec2 view = io.DisplaySize;
+ // Logical size 1100 x 680, fitted to the window; a slight zoom while opening.
+ const float fit = std::min({1.0f, (view.x - 40.0f * s) / (1100.0f * s), (view.y - 40.0f * s) / (680.0f * s)});
+ const float zoom = card.closing ? lerp(0.985f, 1.0f, shown) : lerp(0.955f, 1.0f, easeOut(t / 0.6f));
+ const float k = s * std::max(fit, 0.45f) * zoom;
+ const ImVec2 size(1100.0f * k, 680.0f * k);
+ const float rise = (1.0f - easeOut(t / 0.6f)) * 16.0f * s;
+ const ImVec2 a(std::floor((view.x - size.x) * 0.5f), std::floor((view.y - size.y) * 0.5f + rise));
+ const ImVec2 b(a.x + size.x, a.y + size.y);
+ const float radius = 20.0f * k;
+
+ ImGui::SetNextWindowPos(ImVec2(0, 0));
+ ImGui::SetNextWindowSize(view);
+ ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
+ ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
+ ImGui::PushStyleColor(ImGuiCol_ModalWindowDimBg, ImVec4(0, 0, 0, 0)); // (dimmed below, with the fade)
+ const ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings |
+ ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoScrollWithMouse;
+ const bool began = ImGui::BeginPopupModal(kPopup, nullptr, flags);
+ ImGui::PopStyleColor();
+ ImGui::PopStyleVar(2);
+ if (!began) return;
+ ImDrawList* dl = ImGui::GetWindowDrawList();
+ Painter paint{dl, k};
+ ImFont* titleFont = fontCardTitle_ ? fontCardTitle_ : ImGui::GetFont();
+ ImFont* headFont = fontCardHead_ ? fontCardHead_ : boldFont();
+ ImFont* bodyFont = fontCardBody_ ? fontCardBody_ : ImGui::GetFont();
+ ImFont* boldUi = boldFont() ? boldFont() : ImGui::GetFont();
+ const float A = shown; // overall opacity
+
+ // The app dimmed behind it, with a warm light from the card.
+ dl->AddRectFilled(ImVec2(0, 0), view, col(0x060608, 0.84f * A));
+ glow(dl, a, b, radius, 120.0f * k, 0xf0882e, 0.035f * A, 16);
+ glow(dl, ImVec2(a.x, a.y + 18.0f * k), ImVec2(b.x, b.y + 18.0f * k), radius, 40.0f * k, 0x000000, 0.9f * A, 10);
+ dl->AddRectFilled(a, b, col(0x0e0e11, A), radius);
+
+ // The picture: covers the card, a little larger so the pointer can move it (parallax), fading in once decoded.
+ const ImVec2 mouse = io.MousePos;
+ ImVec2 target(0.0f, 0.0f);
+ if (ImGui::IsMousePosValid(&mouse)) {
+ target.x = std::clamp((mouse.x - (a.x + b.x) * 0.5f) / (size.x * 0.5f), -1.0f, 1.0f);
+ target.y = std::clamp((mouse.y - (a.y + b.y) * 0.5f) / (size.y * 0.5f), -1.0f, 1.0f);
+ }
+ const float follow = 1.0f - std::exp(-dt * 4.0f);
+ card.parallax.x = lerp(card.parallax.x, target.x, follow);
+ card.parallax.y = lerp(card.parallax.y, target.y, follow);
+ if (card.texture) {
+ const float fade = easeOut(float(now - card.pictureAt) / 0.7f) * A;
+ const float cardAspect = size.x / size.y;
+ float uw = 1.0f, vh = 1.0f; // the part of the picture that covers the card
+ if (cardAspect > card.pictureAspect) vh = card.pictureAspect / cardAspect;
+ else uw = cardAspect / card.pictureAspect;
+ const float margin = 0.94f, drift = 0.025f; // 6 % to spare for the parallax; a slow drift as it opens
+ const float settle = 1.0f + drift * (1.0f - easeOut(float(now - card.pictureAt) / 2.4f));
+ uw *= margin / settle;
+ vh *= margin / settle;
+ const float cu = 0.5f - card.parallax.x * (1.0f - margin) * 0.45f + (1.0f - uw) * 0.06f; // a little right
+ const float cv = 0.5f - card.parallax.y * (1.0f - margin) * 0.45f - (1.0f - vh) * 0.2f; // a little up
+ dl->AddImageRounded(ImTextureID(uintptr_t(card.texture)), a, b, ImVec2(cu - uw * 0.5f, cv - vh * 0.5f),
+ ImVec2(cu + uw * 0.5f, cv + vh * 0.5f), col(0xffffff, fade), radius);
+ }
+ // A light passing over the sculpt now and then (every 7 s, the first soon after opening).
+ {
+ const float period = 7.0f, run = 1.9f;
+ const float since = t - 0.7f;
+ const float phase = since >= 0.0f ? std::fmod(since, period) : -1.0f;
+ if (phase >= 0.0f && phase < run) {
+ const float u = easeInOut(phase / run);
+ lightSweep(dl, a, b, radius, lerp(a.x + size.x * 0.25f, b.x + size.x * 0.1f, u), 150.0f * k,
+ 0.10f * A * std::sin(u * 3.14159265f));
+ }
+ }
+ // A hairline edge, brighter along the top.
+ dl->AddRect(a, b, col(0xffffff, 0.08f * A), radius, 0, std::max(1.0f, k));
+ dl->AddLine(ImVec2(a.x + radius, a.y + 0.5f), ImVec2(b.x - radius, a.y + 0.5f), col(0xffffff, 0.10f * A), std::max(1.0f, k));
+
+ const float pad = 48.0f * k;
+ float y = a.y + 46.0f * k;
+ const float colW = size.x * 0.50f;
+ // Updated: a chip that leads to What's New (open behind the card).
+ if (supportCard_->reason == SupportCardReason::Updated) {
+ const std::string chip = std::string("SculptForge ") + SCULPTFORGE_VERSION + " " + "\xc2\xb7" + " What's new";
+ const ImVec2 ts = paint.measure(boldUi, 13.0f, chip.c_str());
+ const ImVec2 c0(a.x + pad, y), c1(c0.x + ts.x + 26.0f * k, y + 28.0f * k);
+ ImGui::SetCursorScreenPos(c0);
+ ImGui::InvisibleButton("What's new##card.whatsnew", ImVec2(c1.x - c0.x, c1.y - c0.y));
+ const bool hot = ImGui::IsItemHovered();
+ if (ImGui::IsItemClicked()) {
+ guide_.open("whats-new.md");
+ closeSupportCard(false);
+ }
+ dl->AddRectFilled(c0, c1, col(0xffffff, (hot ? 0.12f : 0.07f) * A), 14.0f * k);
+ dl->AddRect(c0, c1, col(0xffffff, 0.12f * A), 14.0f * k);
+ paint.text(boldUi, 13.0f, ImVec2(c0.x + 13.0f * k, c0.y + (28.0f * k - ts.y) * 0.5f), col(0xf2f2f2, A), chip.c_str());
+ y += 44.0f * k;
+ }
+ paint.spaced(boldUi, 12.5f, ImVec2(a.x + pad, y), col(0xffb06a, A), "SUPPORT SCULPTFORGE", 2.2f);
+ y += 30.0f * k;
+ y += paint.text(titleFont, 40.0f, ImVec2(a.x + pad, y), col(0xffffff, A), "Free for everyone,").y;
+ // The second line in the accent, with a soft glow.
+ {
+ const char* line = "kept going by you.";
+ for (int i = 0; i < 6; ++i) {
+ const float ang = float(i) * 1.0472f, r = 3.0f * k;
+ dl->AddText(titleFont, 40.0f * k, ImVec2(a.x + pad + std::cos(ang) * r, y + std::sin(ang) * r),
+ col(0xf0882e, 0.07f * A), line);
+ }
+ y += paint.text(titleFont, 40.0f, ImVec2(a.x + pad, y), col(0xff9a45, A), line).y;
+ }
+ y += 16.0f * k;
+ y += paint.text(bodyFont, 16.5f, ImVec2(a.x + pad, y), col(0xc9c9d0, A),
+ "SculptForge has no ads, no accounts and no telemetry, and every feature stays free for "
+ "everyone. Memberships pay for code signing, test hardware and development time.",
+ colW - pad)
+ .y;
+ y += 14.0f * k;
+ // The Insider promise, worded exactly as on the website.
+ {
+ const float dot = 4.0f * k;
+ const ImVec2 at(a.x + pad, y);
+ const ImVec2 ts = paint.measure(bodyFont, 16.5f, kInsiderNote, colW - pad - 18.0f * k);
+ dl->AddCircleFilled(ImVec2(at.x + dot, at.y + 11.0f * k), dot, col(0xff9a45, A));
+ dl->AddCircle(ImVec2(at.x + dot, at.y + 11.0f * k), dot * 2.2f, col(0xff9a45, 0.35f * A), 0, std::max(1.0f, k));
+ paint.text(bodyFont, 16.5f, ImVec2(at.x + 18.0f * k, at.y), col(0xf2e6da, A), kInsiderNote,
+ colW - pad - 18.0f * k);
+ (void)ts;
+ }
+
+ // Close (top right).
+ {
+ const float d = 34.0f * k;
+ const ImVec2 c0(b.x - 18.0f * k - d, a.y + 18.0f * k);
+ ImGui::SetCursorScreenPos(c0);
+ ImGui::InvisibleButton("Close##card.close", ImVec2(d, d));
+ const bool hot = ImGui::IsItemHovered();
+ if (ImGui::IsItemClicked()) closeSupportCard(false);
+ const ImVec2 c(c0.x + d * 0.5f, c0.y + d * 0.5f);
+ dl->AddCircleFilled(c, d * 0.5f, col(0x000000, (hot ? 0.55f : 0.35f) * A));
+ dl->AddCircle(c, d * 0.5f, col(0xffffff, (hot ? 0.30f : 0.14f) * A), 0, std::max(1.0f, k));
+ const float x = 6.0f * k;
+ dl->AddLine(ImVec2(c.x - x, c.y - x), ImVec2(c.x + x, c.y + x), col(0xffffff, (hot ? 1.0f : 0.75f) * A), 1.6f * k);
+ dl->AddLine(ImVec2(c.x - x, c.y + x), ImVec2(c.x + x, c.y - x), col(0xffffff, (hot ? 1.0f : 0.75f) * A), 1.6f * k);
+ }
+
+ // The three memberships.
+ static const Tier kTiers[3] = {
+ {"Supporter", "$5", "/ month", "Your name in the app's Supporters list and on the website, if you like.",
+ "Support monthly", "Support monthly##card.supporter", kSupportUrlSupporter},
+ {"Insider", "$20", "/ month",
+ "Each release about two weeks early, starting with SculptForge 1.0. A monthly vote on what gets built "
+ "next, and the monthly Supporter Pack of brushes, alphas and VDMs.",
+ "Become an Insider", "Become an Insider##card.insider", kSupportUrlInsider},
+ {"Studio", "$250", "/ month",
+ "Your logo on the website and README, Insider access for up to 10 artists and priority triage of your "
+ "pipeline bugs.",
+ "Studio membership", "Studio membership##card.studio", kSupportUrlStudio},
+ };
+ const float gap = 18.0f * k, footer = 58.0f * k, tierH = 262.0f * k;
+ const float tierW = (size.x - pad * 2.0f - gap * 2.0f) / 3.0f;
+ const float tierTop = b.y - footer - tierH;
+ const char* clicked = nullptr;
+ for (int i = 0; i < 3; ++i) {
+ const Tier& tier = kTiers[i];
+ const bool featured = i == 1;
+ const float appear = easeOut((t - 0.16f - 0.08f * float(i)) / 0.55f) * A;
+ const float lift = card.hover[i] * 4.0f * k + (featured ? 10.0f * k : 0.0f);
+ const ImVec2 p0(a.x + pad + float(i) * (tierW + gap), tierTop - lift + (1.0f - appear) * 22.0f * k);
+ const ImVec2 p1(p0.x + tierW, p0.y + tierH);
+ const float r = 16.0f * k;
+ if (featured) { // a slow breathing glow
+ const float breathe = 0.75f + 0.25f * std::sin(t * 2.0f);
+ glow(dl, p0, p1, r, 26.0f * k, 0xf0882e, 0.55f * breathe * appear, 12);
+ } else {
+ glow(dl, ImVec2(p0.x, p0.y + 8.0f * k), ImVec2(p1.x, p1.y + 8.0f * k), r, 18.0f * k, 0x000000, 0.6f * appear, 6);
+ }
+ { // glass over the picture; the featured card warmer towards the top
+ const int v0 = dl->VtxBuffer.Size;
+ dl->AddRectFilled(p0, p1, col(0xffffff, 0.92f * appear), r);
+ ImGui::ShadeVertsLinearColorGradientKeepAlpha(dl, v0, dl->VtxBuffer.Size, p0, ImVec2(p0.x, p1.y),
+ featured ? col(0x2a1d12, 1.0f) : col(0x1a1a1f, 1.0f),
+ featured ? col(0x141215, 1.0f) : col(0x111114, 1.0f));
+ }
+ const float edge = featured ? 0.95f : 0.10f + 0.10f * card.hover[i];
+ dl->AddRect(p0, p1, featured ? col(0xf6994d, edge * appear) : col(0xffffff, edge * appear), r, 0,
+ (featured ? 1.6f : 1.0f) * k);
+
+ ImGui::SetCursorScreenPos(p0);
+ ImGui::InvisibleButton((std::string("##card.tier") + char('0' + i)).c_str(), ImVec2(tierW, tierH - 64.0f * k));
+ const bool cardHot = ImGui::IsItemHovered();
+
+ const float ix = p0.x + 24.0f * k;
+ float ty = p0.y + 24.0f * k;
+ if (featured) { // the badge, on the card's top edge
+ const float bw = paint.spaced(boldUi, 11.0f, ImVec2(0, 0), 0, "MOST POPULAR", 1.6f, false) + 24.0f * k;
+ const ImVec2 b0(p0.x + (tierW - bw) * 0.5f, p0.y - 12.0f * k), b1(b0.x + bw, b0.y + 24.0f * k);
+ glow(dl, b0, b1, 12.0f * k, 10.0f * k, 0xf0882e, 0.6f * appear, 6);
+ dl->AddRectFilled(b0, b1, col(0xf6994d, appear), 12.0f * k);
+ const float th = 11.0f * k;
+ paint.spaced(boldUi, 11.0f, ImVec2(b0.x + 12.0f * k, b0.y + (24.0f * k - th) * 0.5f - 0.5f * k),
+ col(0x1a0d04, appear), "MOST POPULAR", 1.6f);
+ }
+ paint.text(headFont, 21.0f, ImVec2(ix, ty), col(0xffffff, appear), tier.name);
+ ty += 34.0f * k;
+ const ImVec2 ps = paint.text(titleFont, 40.0f, ImVec2(ix, ty), col(0xffffff, appear), tier.price);
+ const ImVec2 pe = paint.measure(bodyFont, 16.5f, tier.per);
+ paint.text(bodyFont, 16.5f, ImVec2(ix + ps.x + 6.0f * k, ty + ps.y - pe.y - 6.0f * k), col(0x9a9aa3, appear), tier.per);
+ ty += ps.y + 8.0f * k;
+ paint.text(ImGui::GetFont(), 14.5f, ImVec2(ix, ty), col(featured ? 0xd9d0c6 : 0xa9a9b2, appear), tier.perks,
+ tierW - 48.0f * k);
+
+ // The one button, along the bottom.
+ const ImVec2 c0(ix, p1.y - 24.0f * k - 44.0f * k), c1(p1.x - 24.0f * k, p1.y - 24.0f * k);
+ ImGui::SetCursorScreenPos(c0);
+ ImGui::InvisibleButton(tier.id, ImVec2(c1.x - c0.x, c1.y - c0.y));
+ const bool hot = ImGui::IsItemHovered(), held = ImGui::IsItemActive();
+ if (ImGui::IsItemClicked()) clicked = tier.url;
+ const float target = (cardHot || hot) ? 1.0f : 0.0f;
+ card.hover[i] = lerp(card.hover[i], target, 1.0f - std::exp(-dt * 12.0f));
+ if (featured) {
+ glow(dl, c0, c1, 22.0f * k, 12.0f * k, 0xf0882e, (hot ? 0.9f : 0.5f) * appear, 6);
+ const int v0 = dl->VtxBuffer.Size;
+ dl->AddRectFilled(c0, c1, col(0xffffff, appear), 22.0f * k);
+ ImGui::ShadeVertsLinearColorGradientKeepAlpha(dl, v0, dl->VtxBuffer.Size, c0, ImVec2(c0.x, c1.y),
+ col(held ? 0xf08a3a : hot ? 0xffb877 : 0xffa95e, 1.0f),
+ col(held ? 0xd0661f : hot ? 0xf08632 : 0xe8782c, 1.0f));
+ } else {
+ dl->AddRectFilled(c0, c1, col(0xffffff, (held ? 0.16f : hot ? 0.11f : 0.05f) * appear), 22.0f * k);
+ dl->AddRect(c0, c1, col(0xffffff, (hot ? 0.40f : 0.20f) * appear), 22.0f * k, 0, std::max(1.0f, k));
+ }
+ const ImVec2 ls = paint.measure(boldUi, 15.0f, tier.cta);
+ paint.text(boldUi, 15.0f, ImVec2(std::floor((c0.x + c1.x - ls.x) * 0.5f), std::floor((c0.y + c1.y - ls.y) * 0.5f)),
+ col(featured ? 0x1a0d04 : 0xf2f2f2, appear), tier.cta);
+ }
+
+ // Footer: a one-time gift, "I'm already a supporter" and "Maybe later".
+ const float fy = b.y - footer * 0.5f;
+ const float fa = easeOut((t - 0.45f) / 0.5f) * A;
+ auto link = [&](const char* label, const char* id, ImVec2 at, unsigned hex, bool underline) {
+ const ImVec2 ts = paint.measure(bodyFont, 15.0f, label);
+ ImGui::SetCursorScreenPos(ImVec2(at.x - 4.0f * k, at.y - 6.0f * k));
+ ImGui::InvisibleButton(id, ImVec2(ts.x + 8.0f * k, ts.y + 12.0f * k));
+ const bool hot = ImGui::IsItemHovered();
+ paint.text(bodyFont, 15.0f, at, col(hot ? 0xffffff : hex, fa), label);
+ if (underline || hot)
+ dl->AddLine(ImVec2(at.x, at.y + ts.y), ImVec2(at.x + ts.x, at.y + ts.y), col(hot ? 0xffffff : hex, 0.55f * fa), std::max(1.0f, k));
+ return ImGui::IsItemClicked();
+ };
+ {
+ const char* lead = "Prefer a one-time gift?";
+ const ImVec2 ls = paint.measure(bodyFont, 15.0f, lead);
+ const float ly = std::floor(fy - ls.y * 0.5f);
+ paint.text(bodyFont, 15.0f, ImVec2(a.x + pad, ly), col(0x9a9aa3, fa), lead);
+ if (link("Give once", "Give once##card.once", ImVec2(a.x + pad + ls.x + 8.0f * k, ly), 0xffb06a, true))
+ clicked = kSupportUrlOnce;
+ }
+ bool later = false, supporter = false;
+ {
+ const char* label = "Maybe later";
+ const ImVec2 ls = paint.measure(boldUi, 15.0f, label);
+ const ImVec2 c1(b.x - pad, fy + 19.0f * k), c0(c1.x - ls.x - 44.0f * k, fy - 19.0f * k);
+ ImGui::SetCursorScreenPos(c0);
+ ImGui::InvisibleButton("Maybe later##card.later", ImVec2(c1.x - c0.x, c1.y - c0.y));
+ const bool hot = ImGui::IsItemHovered();
+ later = ImGui::IsItemClicked();
+ dl->AddRectFilled(c0, c1, col(0xffffff, (hot ? 0.12f : 0.06f) * fa), 19.0f * k);
+ dl->AddRect(c0, c1, col(0xffffff, (hot ? 0.35f : 0.18f) * fa), 19.0f * k, 0, std::max(1.0f, k));
+ paint.text(boldUi, 15.0f, ImVec2(std::floor(c0.x + 22.0f * k), std::floor(fy - ls.y * 0.5f)), col(0xf2f2f2, fa), label);
+ const char* already = "I'm already a supporter";
+ const ImVec2 as = paint.measure(bodyFont, 15.0f, already);
+ supporter = link(already, "I'm already a supporter##card.supporter_already",
+ ImVec2(c0.x - 24.0f * k - as.x, std::floor(fy - as.y * 0.5f)), 0x9a9aa3, false);
+ }
+
+ // Esc, or a click outside the card: Maybe later.
+ const bool outside = ImGui::IsMouseClicked(ImGuiMouseButton_Left) && ImGui::IsWindowHovered() &&
+ !ImRect(a, b).Contains(io.MousePos) && t > 0.3f;
+ if (!card.closing) {
+ if (clicked) {
+ openSupportLink(clicked);
+ closeSupportCard(false);
+ } else if (supporter) {
+ closeSupportCard(true);
+ } else if (later || outside || ImGui::IsKeyPressed(ImGuiKey_Escape, false)) {
+ closeSupportCard(false);
+ }
+ }
+ ImGui::EndPopup();
+}
+
+void App::drawSupportPrefs() {
+ if (ImGui::Checkbox("Show the support card at launch", &supportCardPrefs_.enabled)) saveProjectPrefs();
+ ui::HelpText("Show the support card at launch", nullptr,
+ "A card with the memberships that support SculptForge, shown while it starts: the first time, after "
+ "each update, and at most once a week otherwise. Never while you work.",
+ "Preferences > Support");
+ if (ImGui::Checkbox("I'm a supporter", &supportCardPrefs_.supporter)) saveProjectPrefs();
+ ui::HelpText("I'm a supporter", nullptr,
+ "Thank you! The support card never shows. Kept on this computer only: SculptForge has no accounts.",
+ "Preferences > Support");
+ if (ImGui::Button("Show the support card", ImVec2(-1, 0))) showSupportCard(SupportCardReason::Weekly);
+}
+
+} // namespace sf
diff --git a/src/app/Support.h b/src/app/Support.h
index 005c8636..e65cef98 100644
--- a/src/app/Support.h
+++ b/src/app/Support.h
@@ -2,9 +2,10 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
// Supporting SculptForge (memberships on the website; the app stays free and behaves the same for everyone). The
-// app only ever opens kSupportUrl in the browser: no payment code, no network, no tracking, no licence checks.
-// Pure helpers, unit tested: the supporters list compiled in from docs/supporters.txt (shown as plain text in
-// Help > About) and when the one optional reminder may show.
+// app only ever opens the fixed links below in the browser (the donate page and its four Stripe checkout pages): no
+// payment code, no network, no tracking, no licence checks. Pure helpers, unit tested: the supporters list compiled
+// in from docs/supporters.txt (shown as plain text in Help > About), when the one optional reminder may show, and
+// when the support card may show at launch.
#pragma once
#include <algorithm>
@@ -17,7 +18,13 @@
namespace sf {
inline constexpr const char* kSupportUrl = "https://sculptforge.app/donate.html";
-// What Insider members get, early access starts with 1.0 (Tony, 2026-11-01).
+// The same Stripe checkout links as website/donate.html (tests/test_support.cpp checks they match).
+inline constexpr const char* kSupportUrlSupporter = "https://buy.stripe.com/aFacN5h1t6L8cP14ad4F201"; // $5 / month
+inline constexpr const char* kSupportUrlInsider = "https://buy.stripe.com/dRmdR94eH4D06qD9ux4F202"; // $20 / month
+inline constexpr const char* kSupportUrlStudio = "https://buy.stripe.com/9B63cv8uXb1og1dfSV4F203"; // $250 / month
+inline constexpr const char* kSupportUrlOnce = "https://buy.stripe.com/4gM7sL8uXc5s4iv5eh4F200"; // one-time gift
+// What Insider members get; early access starts with 1.0. Worded the same in the app, on the donate page and in
+// What's New (tests/test_support.cpp checks the donate page).
inline constexpr const char* kInsiderNote =
"Insiders will get each release about two weeks early, starting with SculptForge 1.0.";
@@ -101,4 +108,31 @@ inline bool supportReminderDue(double sculptSeconds, double sessionSeconds, bool
sessionSeconds >= kSupportReminderSessionSeconds;
}
+// --- The support card at launch (PanelSupportCard.cpp) ---
+// Shown only while the app starts, never mid-session: on the first start after install, on the first start of each
+// new version, and otherwise at most once every seven days. Never once "I'm already a supporter" was chosen or it was
+// turned off in Preferences > Support, and never in tests, renders, demos, benchmarks or CI (testMode).
+inline constexpr int64_t kSupportCardIntervalSeconds = 7 * 24 * 3600;
+
+struct SupportCardPrefs {
+ bool enabled = true; // Preferences > Support > Show the support card at launch
+ bool supporter = false; // "I'm already a supporter": never again
+ int64_t shownAt = 0; // seconds since 1970 when it last showed (0: never)
+ std::string shownVersion; // the version it last showed in ("" before 0.10.4)
+};
+
+enum class SupportCardReason { None, FirstRun, Updated, Weekly };
+
+inline SupportCardReason supportCardDue(const SupportCardPrefs& p, bool firstRun, std::string_view version, int64_t now,
+ bool testMode) {
+ if (testMode || !p.enabled || p.supporter) return SupportCardReason::None;
+ if (firstRun) return SupportCardReason::FirstRun;
+ if (p.shownVersion != version) return SupportCardReason::Updated;
+ const int64_t since = now - p.shownAt;
+ // (a clock set far back counts as due, so a damaged value can't hide it for good, nor show it every start)
+ if (p.shownAt <= 0 || since >= kSupportCardIntervalSeconds || since <= -kSupportCardIntervalSeconds)
+ return SupportCardReason::Weekly;
+ return SupportCardReason::None;
+}
+
} // namespace sf
diff --git a/src/app/UiTest.cpp b/src/app/UiTest.cpp
index 6ff4529e..78df0db8 100644
--- a/src/app/UiTest.cpp
+++ b/src/app/UiTest.cpp
@@ -556,6 +556,9 @@ double Demo::query(const std::string& name, bool& known) const {
if (name == "subtools") return double(doc.subtoolCount());
if (name == "support_requests") return double(app_.supportPageRequests_); // Support SculptForge clicks
if (name == "welcome_open") return app_.showWelcome_ ? 1.0 : 0.0;
+ if (name == "support_card_open") return app_.supportCardOpen() ? 1.0 : 0.0; // the support card at launch
+ if (name == "supporter") return app_.supportCardPrefs_.supporter ? 1.0 : 0.0;
+ if (name == "support_card_enabled") return app_.supportCardPrefs_.enabled ? 1.0 : 0.0;
if (name == "subtool_thumbnails") { // SubTool panel thumbnails rendered (#43)
double n = 0.0;
for (const auto& [id, tex] : app_.subtoolThumbs_) n += tex ? 1.0 : 0.0;
@@ -1360,6 +1363,28 @@ bool Demo::parseStep(int line, const std::vector<std::string>& w, std::string& e
}
}
});
+ } else if (verb == "support_card") {
+ // The launch decision for the support card (Support.h), as a start would make it: `first_run`, `updated` (a
+ // new version since it last showed), `days=N` (the clock N days after it last showed) and `test_mode` (how
+ // every UI test, render and CI run starts: never shown).
+ bool firstRun = false, updated = false, testMode = false;
+ double days = 0.0;
+ for (size_t i = 1; i < w.size(); ++i) {
+ if (w[i] == "first_run") firstRun = true;
+ else if (w[i] == "updated") updated = true;
+ else if (w[i] == "test_mode") testMode = true;
+ else if (w[i].rfind("days=", 0) == 0) days = std::atof(w[i].c_str() + 5);
+ else {
+ error = "support_card: unknown option '" + w[i] + "'";
+ return false;
+ }
+ }
+ run([this, firstRun, updated, testMode, days] {
+ SupportCardPrefs& p = app_.supportCardPrefs_;
+ if (updated) p.shownVersion = "0.0.0";
+ const int64_t base = p.shownAt > 0 ? p.shownAt : int64_t(1'800'000'000);
+ app_.launchSupportCard(firstRun, base + int64_t(days * 86400.0), testMode);
+ });
} else if (verb == "wait") {
if (!need(1)) return false;
wait(num(1, 0));
diff --git a/tests/test_support.cpp b/tests/test_support.cpp
index 87c2a684..f8f14c20 100644
--- a/tests/test_support.cpp
+++ b/tests/test_support.cpp
@@ -7,6 +7,8 @@
#include "app/Support.h"
+#include <fstream>
+#include <iterator>
#include <string>
using namespace sf;
@@ -63,3 +65,39 @@ TEST(support_reminder_timing) {
CHECK(supportReminderDue(ten, session, false, false));
CHECK(supportReminderDue(ten * 3.0, session * 6.0, false, false));
}
+
+TEST(support_card_links_match_the_website) {
+ // The card opens the same four Stripe checkout pages as the donate page (never links of its own).
+ std::ifstream f(std::string(SF_TEST_DATA_DIR) + "/../../website/donate.html", std::ios::binary);
+ CHECK(f.good());
+ const std::string page{std::istreambuf_iterator<char>(f), {}};
+ for (const char* url : {kSupportUrlSupporter, kSupportUrlInsider, kSupportUrlStudio, kSupportUrlOnce}) {
+ CHECK(std::string(url).rfind("https://buy.stripe.com/", 0) == 0);
+ CHECK(page.find(std::string("href=\"") + url + "\"") != std::string::npos);
+ }
+ CHECK(page.find(kInsiderNote) != std::string::npos); // the same honest wording on both
+}
+
+TEST(support_card_timing) {
+ const int64_t day = 24 * 3600, now = 1'800'000'000;
+ SupportCardPrefs p;
+ // The first start after install, then the first start of each new version.
+ CHECK(supportCardDue(p, true, "0.10.4", now, false) == SupportCardReason::FirstRun);
+ CHECK(supportCardDue(p, false, "0.10.4", now, false) == SupportCardReason::Updated); // from a version before it
+ p.shownVersion = "0.10.4";
+ p.shownAt = now;
+ CHECK(supportCardDue(p, false, "0.10.4", now + 60, false) == SupportCardReason::None);
+ CHECK(supportCardDue(p, false, "0.10.4", now + 6 * day, false) == SupportCardReason::None); // at most once a week
+ CHECK(supportCardDue(p, false, "0.10.4", now + 7 * day, false) == SupportCardReason::Weekly);
+ CHECK(supportCardDue(p, false, "0.10.5", now + day, false) == SupportCardReason::Updated);
+ CHECK(supportCardDue(p, false, "0.10.4", now - 30 * day, false) == SupportCardReason::Weekly); // clock set back
+ CHECK(supportCardDue(p, false, "0.10.4", now - day, false) == SupportCardReason::None);
+ // Never in tests, renders or CI; never once turned off; never for a supporter.
+ CHECK(supportCardDue(p, true, "0.10.5", now + 30 * day, true) == SupportCardReason::None);
+ SupportCardPrefs off = p;
+ off.enabled = false;
+ CHECK(supportCardDue(off, true, "0.10.5", now + 30 * day, false) == SupportCardReason::None);
+ SupportCardPrefs member = p;
+ member.supporter = true;
+ CHECK(supportCardDue(member, true, "0.10.5", now + 30 * day, false) == SupportCardReason::None);
+}
diff --git a/tests/ui/support_card.sfui b/tests/ui/support_card.sfui
new file mode 100644
index 00000000..61e43e05
--- /dev/null
+++ b/tests/ui/support_card.sfui
@@ -0,0 +1,82 @@
+# The support card at launch (Support.h, PanelSupportCard.cpp): shown on the first start, after an update and at
+# most once a week; never for a supporter, never in tests. Its buttons only ask for the fixed Stripe links (UI tests
+# never start a browser).
+run new_sphere subdivisions=3
+# A UI test is a test-mode start: no card.
+expect_value support_card_open == 0
+support_card first_run test_mode
+expect_value support_card_open == 0
+
+# The first start after install.
+support_card first_run
+expect_value support_card_open == 1
+wait_idle
+wait 1.2
+expect_text Free for everyone,
+expect_text Insiders will get each release about two weeks early, starting with SculptForge 1.0.
+expect_text MOST POPULAR
+expect_text $20
+shot first_run
+# Clicks on the card never reach the canvas or the shortcuts underneath; a tier opens its Stripe checkout.
+click "Become an Insider##card.insider"
+expect_value support_requests == 1
+expect_status https://buy.stripe.com/dRmdR94eH4D06qD9ux4F202
+wait 0.4
+expect_value support_card_open == 0
+
+# At most once a week: not three days later, then again after seven.
+support_card days=3
+expect_value support_card_open == 0
+support_card days=7
+expect_value support_card_open == 1
+wait 0.8
+click "Give once##card.once"
+expect_value support_requests == 2
+expect_status https://buy.stripe.com/4gM7sL8uXc5s4iv5eh4F200
+wait 0.4
+
+# The first start of a new version, with a way to What's New; Esc closes it.
+support_card updated
+expect_value support_card_open == 1
+wait_idle
+wait 1.2
+expect_text What's new
+shot updated
+key Escape
+wait 0.4
+expect_value support_card_open == 0
+expect_value support_requests == 2
+
+# Maybe later.
+support_card days=8
+expect_value support_card_open == 1
+wait 0.8
+click "Maybe later##card.later"
+wait 0.4
+expect_value support_card_open == 0
+
+# Preferences > Support: turned off, it doesn't show.
+click "Preferences##palette.preferences"
+click "Support##preferences.support"
+click "Show the support card at launch"
+expect_value support_card_enabled == 0
+support_card days=30
+expect_value support_card_open == 0
+click "Show the support card at launch"
+expect_value support_card_enabled == 1
+
+# "I'm already a supporter" hides it for good, after updates too.
+support_card days=30
+expect_value support_card_open == 1
+wait 0.8
+click "I'm already a supporter##card.supporter_already"
+wait 0.4
+expect_value support_card_open == 0
+expect_value supporter == 1
+support_card days=30
+expect_value support_card_open == 0
+support_card updated
+expect_value support_card_open == 0
+support_card first_run
+expect_value support_card_open == 0
+expect_value support_requests == 2
diff --git a/website/donate.html b/website/donate.html
index 760a4c4e..2302103c 100644
--- a/website/donate.html
+++ b/website/donate.html
@@ -5,8 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Support SculptForge</title>
<meta name="description" content="SculptForge is free and open source. Memberships from $5 a month (Insiders will get each release about two weeks early, starting with SculptForge 1.0) pay for code signing, test hardware and development time.">
- <meta name="theme-color" content="#111114">
- <meta name="color-scheme" content="dark">
+ <meta name="theme-color" content="#111114" media="(prefers-color-scheme: dark)">
+ <meta name="theme-color" content="#f6f5f3" media="(prefers-color-scheme: light)">
+ <meta name="color-scheme" content="dark light">
<link rel="icon" type="image/svg+xml" href="img/favicon.svg?v=2">
<link rel="icon" type="image/png" href="img/favicon-64.png?v=2">
<link rel="apple-touch-icon" href="img/icon-256.png?v=2">
@@ -18,26 +19,136 @@
<link rel="canonical" href="https://sculptforge.app/donate.html">
<meta name="twitter:card" content="summary_large_image">
<link rel="stylesheet" href="style.css?v=18">
+ <link rel="preload" as="image" type="image/webp" fetchpriority="high" media="(min-width: 621px)"
+ imagesrcset="media/support-hero-1280.webp 1280w, media/support-hero-1920.webp 1920w" imagesizes="100vw">
<style>
- .tiers .card { display: flex; flex-direction: column; gap: 10px; }
- .donate-hero .lede { margin-bottom: 26px; }
- .tiers .card h3 { margin: 0; font-size: 1.25rem; }
- .tiers .price { color: #fff; font-size: 2.2rem; font-weight: 700; line-height: 1.1; margin: 0; }
- .tiers .price span { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
- .tiers .card.featured { border-color: #f6994d; box-shadow: 0 0 0 1px rgba(246, 153, 77, 0.35), 0 10px 40px rgba(246, 153, 77, 0.12); }
- .tiers .badge { align-self: flex-start; color: #1a0d04; background: #f6994d; font-size: 0.75rem; font-weight: 700;
- padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
- .tiers .card p:last-child { margin-top: auto; padding-top: 8px; }
- .tiers + .fine { margin-top: 18px; }
+ /* The first screen: a stage with a bronze sculpt rendered in SculptForge, and the memberships rising onto it.
+ The stage is always dark (it's a render); the rest of the page follows the system's light or dark setting. */
+ .donate-page { --tier-bg: rgba(19, 19, 23, 0.88); --tier-border: rgba(255, 255, 255, 0.09); --tier-text: #a9a9b2;
+ --tier-title: #fff; --tier-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
+ .stage { position: relative; isolation: isolate; overflow: hidden; background: #0c0c0f; color: #ececf1;
+ min-height: min(66vh, 640px); display: flex; align-items: flex-start; padding: 56px 0 190px; }
+ .stage-art { position: absolute; inset: -3%; z-index: -2; transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.03);
+ transition: transform 0.6s cubic-bezier(.2, .7, .2, 1); animation: stage-in 1.6s cubic-bezier(.2, .7, .2, 1) both; }
+ .stage-art img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%; }
+ @keyframes stage-in { from { opacity: 0; scale: 1.05; } to { opacity: 1; scale: 1; } }
+ /* Darkening for the words on the left and the cards below. */
+ .stage::before { content: ""; position: absolute; inset: 0; z-index: -1;
+ background: linear-gradient(90deg, rgba(12, 12, 15, 0.94) 0%, rgba(12, 12, 15, 0.72) 38%, rgba(12, 12, 15, 0) 66%),
+ linear-gradient(180deg, rgba(15, 15, 18, 0) 52%, #0f0f12 100%); }
+ /* A light passing over the sculpt now and then. */
+ .stage::after { content: ""; position: absolute; inset: -20% -40%; z-index: -1; pointer-events: none;
+ background: linear-gradient(105deg, transparent 42%, rgba(255, 243, 226, 0.09) 50%, transparent 58%);
+ transform: translateX(-60%); animation: sweep 7s cubic-bezier(.45, 0, .25, 1) 0.9s infinite; }
+ @keyframes sweep { 0% { transform: translateX(-60%); } 28%, 100% { transform: translateX(60%); } }
+ .stage .wrap { width: 100%; }
+ .stage-copy { max-width: 560px; animation: rise 0.8s cubic-bezier(.2, .7, .2, 1) both; }
+ .stage .eyebrow { letter-spacing: 0.22em; font-size: 0.78rem; color: #ffb06a; }
+ .stage h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); line-height: 1.05; margin: 0.35em 0 0.45em; color: #fff; }
+ .stage h1 .accent { display: block; }
+ .stage .lede { color: #cfcfd6; margin-bottom: 18px; }
+ .promise { display: flex; gap: 12px; align-items: flex-start; color: #f2e6da; font-size: 1.05rem; margin: 0; max-width: 34em; }
+ .promise::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 0.55em; border-radius: 50%; background: #ff9a45;
+ box-shadow: 0 0 0 5px rgba(255, 154, 69, 0.18); }
+ .stage .thanks { background: rgba(242, 140, 60, 0.12); border: 1px solid rgba(242, 140, 60, 0.4); border-radius: 12px;
+ padding: 12px 16px; color: #f2e6da; }
+
+ .tiers-wrap { position: relative; z-index: 1; margin-top: -170px; padding-bottom: 24px; }
+ .tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
+ .tier { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px 26px 26px; border-radius: 18px;
+ background: var(--tier-bg); border: 1px solid var(--tier-border); box-shadow: var(--tier-shadow);
+ -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
+ animation: rise 0.7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(0.15s + var(--i, 0) * 0.08s);
+ transition: translate 0.25s cubic-bezier(.2, .7, .2, 1), border-color 0.25s; }
+ .tier:hover { translate: 0 -4px; border-color: rgba(255, 255, 255, 0.2); }
+ .tier h2 { margin: 0; font-size: 1.3rem; color: var(--tier-title); }
+ .tier .price { margin: 0; color: var(--tier-title); font-size: 2.7rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
+ .tier .price span { color: var(--tier-text); font-size: 1rem; font-weight: 500; letter-spacing: 0; margin-left: 6px; }
+ .tier p { color: var(--tier-text); font-size: 0.95rem; margin: 0; }
+ .tier p strong { color: var(--tier-title); font-weight: 600; }
+ .tier .cta { margin-top: auto; padding-top: 10px; }
+ .tier .btn { display: block; text-align: center; padding: 13px 20px; background: rgba(255, 255, 255, 0.05);
+ border-color: rgba(255, 255, 255, 0.2); color: var(--tier-title); transition: background 0.2s, border-color 0.2s; }
+ .tier .btn:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.4); }
+ .tier.featured { --tier-bg: linear-gradient(180deg, rgba(42, 29, 18, 0.94), rgba(20, 18, 21, 0.94));
+ border: 1.5px solid #f6994d; margin-top: -12px; margin-bottom: 12px;
+ box-shadow: 0 0 0 1px rgba(246, 153, 77, 0.25), 0 0 46px rgba(240, 136, 46, 0.30), var(--tier-shadow); }
+ .tier.featured::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
+ box-shadow: 0 0 60px rgba(240, 136, 46, 0.35); animation: breathe 3.2s ease-in-out infinite; }
+ .tier.featured:hover { border-color: #ffb06a; }
+ .tier.featured p { color: #d9d0c6; }
+ .tier.featured .price { color: var(--tier-title); }
+ .tier.featured .btn { background: linear-gradient(180deg, #ffa95e, #e8782c); border-color: transparent; color: #1a0d04;
+ box-shadow: 0 8px 26px rgba(240, 136, 46, 0.35); }
+ .tier.featured .btn:hover { filter: brightness(1.07); }
+ .badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); margin: 0; padding: 4px 13px;
+ border-radius: 999px; background: #f6994d; color: #1a0d04 !important; font-size: 0.7rem !important; font-weight: 700;
+ letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 0 18px rgba(240, 136, 46, 0.5); }
+ .tier .btn:focus-visible, .gift .btn:focus-visible { outline: 2px solid #ffb06a; outline-offset: 3px; }
+ .gift { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 26px 0 0;
+ padding: 18px 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel);
+ animation: rise 0.7s cubic-bezier(.2, .7, .2, 1) 0.5s both; }
+ .gift p { margin: 0; color: var(--muted); }
+ .gift strong { color: var(--text); }
+ .donate-fine { margin-top: 18px; }
+ @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
+ @keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
+
+ @media (max-width: 900px) {
+ .stage { min-height: 0; padding: 48px 0 150px; }
+ .stage::before { background: linear-gradient(90deg, rgba(12, 12, 15, 0.94) 0%, rgba(12, 12, 15, 0.62) 72%, rgba(12, 12, 15, 0.3) 100%),
+ linear-gradient(180deg, rgba(12, 12, 15, 0) 50%, rgba(12, 12, 15, 1) 100%); }
+ .tiers-wrap { margin-top: -110px; }
+ .tiers { grid-template-columns: 1fr; gap: 26px; max-width: 520px; margin: 0 auto; }
+ .tier.featured { order: -1; margin: 0; }
+ }
@media (max-width: 620px) {
- .grid.tiers { display: grid; grid-template-columns: 1fr; overflow: visible; margin: 0; padding: 0; }
- .tiers .card { flex: none; }
+ .stage { padding: 0 0 36px; }
+ .tiers-wrap { margin-top: 0; padding-top: 22px; }
+ .stage-art { inset: 0; height: 108vw; }
+ .stage-art img { object-position: 50% 0; }
+ .stage-copy { padding-top: 78vw; } /* the lion first, the words under it */
+ .stage::before { background: linear-gradient(180deg, rgba(12, 12, 15, 0) 40vw, rgba(12, 12, 15, 0.85) 82vw, #0c0c0f 106vw); }
+ .stage h1 { font-size: 2.3rem; }
+ .gift { padding: 16px; }
+ .gift .btn { width: 100%; text-align: center; }
+ }
+ @media (prefers-reduced-motion: reduce) {
+ .stage-art, .stage-copy, .tier, .gift, .tier.featured::after { animation: none; }
+ .stage::after { display: none; }
+ .stage-art, .tier, .tier .btn { transition: none; }
+ }
+ /* Light: the stage stays a dark render; the cards and the page around them turn light. */
+ @media (prefers-color-scheme: light) {
+ :root { color-scheme: light; }
+ .donate-page { --bg: #f6f5f3; --bg-alt: #efede9; --panel: #ffffff; --border: #e2dfda; --text: #1c1c21; --muted: #5d5d66;
+ --accent-2: #b8561a; --tier-bg: rgba(255, 255, 255, 0.97); --tier-border: #e2dfda; --tier-text: #55555e;
+ --tier-title: #16161a; --tier-shadow: 0 24px 50px rgba(20, 16, 12, 0.16); }
+ .donate-page .nav { background: rgba(246, 245, 243, 0.86); }
+ .donate-page .nav nav a { color: #55555e; }
+ .donate-page .brand, .donate-page .nav nav a.gh { color: var(--text); }
+ .donate-page .nav nav a.nav-support { color: #b8561a; border-color: rgba(184, 86, 26, 0.5); }
+ .donate-page .nav nav a.nav-support:hover { color: #fff; background: #c8621f; }
+ .donate-page .nav-toggle span { background: var(--text); }
+ .donate-page a { color: #a84d14; }
+ .donate-page .stage a { color: #ffb06a; }
+ .donate-page code { background: #ebe8e3; }
+ .tier .btn { background: #f4f2ef; border-color: #d8d4ce; }
+ .tier .btn:hover { background: #ebe7e1; border-color: #bdb7ae; }
+ .tier:hover { border-color: #cfc9c1; }
+ .tier.featured { --tier-bg: linear-gradient(180deg, #fff1e3, #ffffff 60%);
+ box-shadow: 0 0 0 1px rgba(246, 153, 77, 0.25), 0 0 40px rgba(240, 136, 46, 0.22), var(--tier-shadow); }
+ .tier.featured::after { box-shadow: 0 0 50px rgba(240, 136, 46, 0.25); }
+ .tier.featured p { color: #4d4239; }
+ .tier.featured .price { color: var(--tier-title); }
+ .gift .btn { background: #f4f2ef; border-color: #d8d4ce; color: var(--text); }
+ .donate-page .footer { background: var(--bg-alt); }
}
</style>
<script src="motion.js?v=10" defer></script>
<script data-goatcounter="https://sculptforge.goatcounter.com/count" async src="https://gc.zgo.at/count.js"></script>
</head>
-<body>
+<body class="donate-page">
<div class="scroll-progress" aria-hidden="true"></div>
<header class="nav">
<div class="wrap nav-inner">
@@ -55,50 +166,68 @@
</header>
<main id="top">
- <section class="hero donate-hero">
+ <section class="stage" aria-labelledby="support-title">
+ <div class="stage-art" aria-hidden="true">
+ <picture>
+ <source type="image/webp" media="(max-width: 620px)" srcset="media/support-hero-mobile.webp">
+ <source media="(max-width: 620px)" srcset="media/support-hero-mobile.jpg">
+ <source type="image/webp" srcset="media/support-hero-1280.webp 1280w, media/support-hero-1920.webp 1920w" sizes="100vw">
+ <img src="media/support-hero-1920.jpg" srcset="media/support-hero-1280.jpg 1280w, media/support-hero-1920.jpg 1920w"
+ sizes="100vw" width="1920" height="1080" alt="" fetchpriority="high">
+ </picture>
+ </div>
+ <div class="wrap">
+ <div class="stage-copy">
+ <p class="eyebrow">Support SculptForge</p>
+ <h1 id="support-title">Free for everyone, <span class="accent">kept going by you.</span></h1>
+ <p class="thanks" id="thanks" hidden><strong>Thank you!</strong> Your support means a lot. Check your
+ email for the receipt; Insider invites go out within a couple of days.</p>
+ <p class="lede">Every feature stays free, with no ads, no accounts and no telemetry. Memberships pay for code
+ signing, test hardware and development time.</p>
+ <p class="promise">Insiders will get each release about two weeks early, starting with SculptForge 1.0.</p>
+ </div>
+ </div>
+ </section>
+
+ <section class="tiers-wrap" aria-label="Memberships">
<div class="wrap">
- <p class="eyebrow">Support SculptForge</p>
- <h1>Free for everyone, <span class="accent">kept going by you</span></h1>
- <p class="lede thanks" id="thanks" hidden><strong>Thank you!</strong> Your support means a lot. Check your
- email for the receipt; Insider invites go out within a couple of days.</p>
- <p class="lede">Every feature stays free, with no ads, no accounts and no telemetry. Members make it grow
- faster. Insiders will get each release about two weeks early, starting with SculptForge 1.0.</p>
- <div class="grid tiers">
- <article class="card">
- <h3>Supporter</h3><p class="price">$5<span>/month</span></p>
+ <div class="tiers">
+ <article class="tier" style="--i: 0">
+ <h2>Supporter</h2><p class="price">$5<span>/ month</span></p>
<p>Your name in the app's <strong>Supporters</strong> list and on this site (optional, any name you
choose).</p>
- <p><a class="btn" href="https://buy.stripe.com/aFacN5h1t6L8cP14ad4F201" rel="noopener">Support monthly</a></p>
+ <p class="cta"><a class="btn" href="https://buy.stripe.com/aFacN5h1t6L8cP14ad4F201" rel="noopener">Support monthly</a></p>
</article>
- <article class="card featured">
- <p class="badge">Recommended</p><h3>Insider</h3><p class="price">$20<span>/month</span></p>
- <p><strong>Each release about two weeks before everyone else, starting with SculptForge 1.0</strong>, built and tested by the same
- release pipeline as public builds. A <strong>monthly vote</strong> on what gets built next, the monthly
- <strong>Supporter Pack</strong> of brushes, alphas and VDMs, and your name in the credits.</p>
- <p><a class="btn primary" href="https://buy.stripe.com/dRmdR94eH4D06qD9ux4F202" rel="noopener">Become an Insider</a></p>
+ <article class="tier featured" style="--i: 1">
+ <p class="badge">Most popular</p>
+ <h2>Insider</h2><p class="price">$20<span>/ month</span></p>
+ <p><strong>Each release about two weeks early, starting with SculptForge 1.0</strong>, built and tested by
+ the same release pipeline as public builds. A <strong>monthly vote</strong> on what gets built next, the
+ monthly <strong>Supporter Pack</strong> of brushes, alphas and VDMs, and your name in the credits.</p>
+ <p class="cta"><a class="btn" href="https://buy.stripe.com/dRmdR94eH4D06qD9ux4F202" rel="noopener">Become an Insider</a></p>
</article>
- <article class="card">
- <h3>Studio</h3><p class="price">$250<span>/month</span></p>
+ <article class="tier" style="--i: 2">
+ <h2>Studio</h2><p class="price">$250<span>/ month</span></p>
<p>Your <strong>logo</strong> on this site and the project README, <strong>Insider access for up to 10
artists</strong>, and <strong>priority triage</strong> of your pipeline bugs. Custom features and
integration work are quoted separately: <a href="mailto:[email protected]">[email protected]</a>.</p>
- <p><a class="btn" href="https://buy.stripe.com/9B63cv8uXb1og1dfSV4F203" rel="noopener">Studio membership</a></p>
- </article>
- <article class="card">
- <h3>One-time</h3><p class="price">Any<span> amount</span></p>
- <p>Not a fan of subscriptions? A single contribution of any size (from $5) helps just as much.</p>
- <p><a class="btn" href="https://buy.stripe.com/4gM7sL8uXc5s4iv5eh4F200" rel="noopener">Give once</a></p>
+ <p class="cta"><a class="btn" href="https://buy.stripe.com/9B63cv8uXb1og1dfSV4F203" rel="noopener">Studio membership</a></p>
</article>
</div>
- <p class="fine">Insider builds will be shared through a private GitHub repository: give your GitHub username at
- checkout and you'll get an invite before SculptForge 1.0, when early access starts. Supporter Packs become free for everyone after three months, and every
- Insider release becomes the public release about two weeks later. <a href="https://billing.stripe.com/p/login/4gM7sL8uXc5s4iv5eh4F200" rel="noopener">Manage or cancel your membership</a>.</p>
+ <div class="gift">
+ <p><strong>Not a fan of subscriptions?</strong> A single contribution of any size (from $5) helps just as much.</p>
+ <a class="btn" href="https://buy.stripe.com/4gM7sL8uXc5s4iv5eh4F200" rel="noopener">Give once</a>
+ </div>
+ <p class="fine donate-fine">Insider builds will be shared through a private GitHub repository: give your
+ GitHub username at checkout and you'll get an invite before SculptForge 1.0, when early access starts. Supporter Packs become free for everyone after three months,
+ and each Insider release becomes the public release about two weeks later.
+ <a href="https://billing.stripe.com/p/login/4gM7sL8uXc5s4iv5eh4F200" rel="noopener">Manage or cancel your
+ membership</a>.</p>
<p class="fine">Payments are handled by Stripe (cards, Apple Pay, Google Pay); SculptForge never sees your
card details. Cancel a membership anytime. Not a tax-deductible charitable donation.</p>
</div>
</section>
-
<section class="section alt">
<div class="wrap">
<h2>What your support pays for</h2>
@@ -145,6 +274,19 @@
Visits are counted anonymously with <a href="https://www.goatcounter.com/">GoatCounter</a>.</p>
</div>
</footer>
- <script>if (new URLSearchParams(location.search).has('thanks')) document.getElementById('thanks').hidden = false;</script>
+ <script>
+ if (new URLSearchParams(location.search).has('thanks')) document.getElementById('thanks').hidden = false;
+ // The sculpt drifts a little with the pointer (not with "reduce motion", not on touch screens).
+ (() => {
+ const stage = document.querySelector('.stage'), art = document.querySelector('.stage-art');
+ if (!stage || !art || matchMedia('(prefers-reduced-motion: reduce), (hover: none)').matches) return;
+ stage.addEventListener('pointermove', (e) => {
+ const r = stage.getBoundingClientRect();
+ art.style.setProperty('--px', `${((e.clientX - r.left) / r.width - 0.5) * -14}px`);
+ art.style.setProperty('--py', `${((e.clientY - r.top) / r.height - 0.5) * -10}px`);
+ });
+ stage.addEventListener('pointerleave', () => { art.style.setProperty('--px', '0px'); art.style.setProperty('--py', '0px'); });
+ })();
+ </script>
</body>
</html>
diff --git a/website/media/support-hero-1280.jpg b/website/media/support-hero-1280.jpg
new file mode 100644
index 00000000..1803256b
Binary files /dev/null and b/website/media/support-hero-1280.jpg differ
diff --git a/website/media/support-hero-1280.webp b/website/media/support-hero-1280.webp
new file mode 100644
index 00000000..313c9031
Binary files /dev/null and b/website/media/support-hero-1280.webp differ
diff --git a/website/media/support-hero-1920.jpg b/website/media/support-hero-1920.jpg
new file mode 100644
index 00000000..9739fcbe
Binary files /dev/null and b/website/media/support-hero-1920.jpg differ
diff --git a/website/media/support-hero-1920.webp b/website/media/support-hero-1920.webp
new file mode 100644
index 00000000..5b5b67c8
Binary files /dev/null and b/website/media/support-hero-1920.webp differ
diff --git a/website/media/support-hero-mobile.jpg b/website/media/support-hero-mobile.jpg
new file mode 100644
index 00000000..7f47d38e
Binary files /dev/null and b/website/media/support-hero-mobile.jpg differ
diff --git a/website/media/support-hero-mobile.webp b/website/media/support-hero-mobile.webp
new file mode 100644
index 00000000..a25a83a2
Binary files /dev/null and b/website/media/support-hero-mobile.webp differ