// The site's own share image (public/og/site.jpg), in the style of the home page: a dark void, the Impossible A // drawn whole in blue and white particles (as in the film outros), the "AI Resource" wordmark with its PRO badge, and the // hero headline in light Funnel Display. Text stays clear of the top and bottom 60px, which the 1200 x 630 crop trims. import { H, W } from "./base.mjs"; // The mark's three faces in its 64 x 64 viewBox, each with the particle colours it's drawn in (blues and whites only) const FACES = [ { d: "M3 49.94 L7.14 57.11 L56.86 57.11 L36.14 21.24 L32 28.41 L44.43 49.94Z", z: 0, colors: ["#46AAE9", "#5DB6EE", "#46AAE9"], edge: "#7CC4F2" }, { d: "M56.86 57.11 L61 49.94 L36.14 6.89 L15.43 42.76 L23.71 42.76 L36.14 21.24Z", z: 0, colors: ["#1F6599", "#2A7FB8", "#1F6599"], edge: "#3A86E8" }, { d: "M36.14 6.89 L27.86 6.89 L3 49.94 L44.43 49.94 L40.29 42.76 L15.43 42.76Z", z: 0, colors: ["#FFFFFF", "#E4F2FC", "#FFFFFF"], edge: "#FFFFFF" }, ]; const solidMark = (size) => `${FACES.map((f, i) => ``).join("")}`; // Runs inside the page: samples each face of the mark, flat and in register, so it reads as one solid logo const PARTICLES = /* js */ ` (() => { const c = document.getElementById("amark"), g = c.getContext("2d"); c.width = ${W}; c.height = ${H}; let h = 2166136261; for (const ch of "airesourcepro-site") h = Math.imul(h ^ ch.charCodeAt(0), 16777619); const r = () => { h ^= h << 13; h ^= h >>> 17; h ^= h << 5; return ((h >>> 0) % 100000) / 100000; }; const gauss = () => (r() + r() + r() - 1.5) / 1.5; // Loose dust across the whole frame, densest around the mark for (let i = 0; i < 1400; i++) { const near = r() < .55, x = near ? 1250 + gauss() * 480 : r() * ${W}, y = near ? 480 + gauss() * 380 : r() * ${H}; g.globalAlpha = .08 + Math.pow(r(), 2) * .5; g.fillStyle = r() < .7 ? "#bfe3fa" : "#46aae9"; const s = .8 + Math.pow(r(), 3) * 2; g.fillRect(x, y, s, s); } const CX = 1262, CY = 476, S = 10.2, YAW = 0, PITCH = 0, F = 150; const probe = document.createElement("canvas").getContext("2d"); const project = (x, y, z) => { x -= 32; y -= 32; const x1 = x * Math.cos(YAW) + z * Math.sin(YAW), z1 = -x * Math.sin(YAW) + z * Math.cos(YAW); const y1 = y * Math.cos(PITCH) - z1 * Math.sin(PITCH), z2 = y * Math.sin(PITCH) + z1 * Math.cos(PITCH); const k = F / (F - z2); return [CX + x1 * k * S, CY + y1 * k * S, k]; }; const pts = []; FACES.forEach((f) => { const path = new Path2D(f.d); // fill: random points inside the face, with a little depth so the mark reads as a solid, not a decal for (let n = 0; n < 9000; ) { const x = 3 + r() * 58, y = 6.5 + r() * 51; if (!probe.isPointInPath(path, x, y)) continue; n++; pts.push([x, y, f.z + gauss() * .3, f.colors[(r() * 3) | 0], .45 + r() * .5, .75 + Math.pow(r(), 3) * 1.6]); } // edges: denser, brighter points so the shape stays crisp at thumbnail size const v = f.d.match(/[\\d.]+ [\\d.]+/g).map((p) => p.split(" ").map(Number)); v.forEach((a, i) => { const b = v[(i + 1) % v.length], len = Math.hypot(b[0] - a[0], b[1] - a[1]); for (let t = 0; t < len * 26; t++) { const u = r(); pts.push([a[0] + (b[0] - a[0]) * u + gauss() * .1, a[1] + (b[1] - a[1]) * u + gauss() * .1, f.z + gauss() * .4, f.edge, .45 + r() * .35, .9 + r() * .7]); } }); }); // Draw back to front, additively, so overlaps glow const out = pts.map(([x, y, z, col, a, s]) => { const [px, py, k] = project(x, y, z); return [px, py, k, col, a, s * k]; }).sort((p, q) => p[2] - q[2]); g.globalCompositeOperation = "lighter"; const glow = g.createRadialGradient(CX, CY + 20, 20, CX, CY + 20, 430); glow.addColorStop(0, "rgba(70,170,233,.26)"); glow.addColorStop(1, "rgba(70,170,233,0)"); g.globalAlpha = 1; g.fillStyle = glow; g.fillRect(0, 0, ${W}, ${H}); for (const [x, y, k, col, a, s] of out) { g.globalAlpha = a; g.fillStyle = col; g.beginPath(); g.arc(x, y, s, 0, 6.2832); g.fill(); } // a few larger outlined triangles, the site's particle motif g.lineWidth = 1.4; for (let i = 0; i < 46; i++) { const x = 1250 + gauss() * 520, y = 470 + gauss() * 400, s = 3 + Math.pow(r(), 3) * 9, rot = r() * 6.28; g.globalAlpha = .25 + r() * .45; g.strokeStyle = ["#46AAE9", "#7CC4F2", "#BFE3FA"][(r() * 3) | 0]; g.beginPath(); for (let q = 0; q < 3; q++) { const t = rot + q * 2.0944; q ? g.lineTo(x + Math.cos(t) * s, y + Math.sin(t) * s) : g.moveTo(x + Math.cos(t) * s, y + Math.sin(t) * s); } g.closePath(); g.stroke(); } })();`; export function siteScene() { return { plain: true, glows: [ { x: 1250, y: 476, w: 1000, h: 760, c: "rgba(58,134,232,.20)" }, { x: 260, y: 820, w: 900, h: 420, c: "rgba(70,170,233,.10)" }, ], body: `
${solidMark(62)}AI ResourcePRO
Learn AI by
building with it.
Claude Code and Codex best practices, computer-use agents, and open-weight models on your own GPU.
Free tutorials and videos
airesourcepro.com
`, }; }