Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Keep the sparkler wire inside the carved viewBox
aivsomkarf298a18280de
diff --git a/scripts/mascot-bodies/carved-bodies.test.mjs b/scripts/mascot-bodies/carved-bodies.test.mjsindex 7af26ede8b..34c3b6369f 100644--- a/scripts/mascot-bodies/carved-bodies.test.mjs+++ b/scripts/mascot-bodies/carved-bodies.test.mjs@@ -57,16 +57,13 @@ describe("carved catalog", () => {}});- it("keeps every drawing inside its 240-unit square, with room for the viewBox margin", () => {+ it("keeps every point inside the viewBox, curve handles included, as the phones' path bounds check", () => {for (const id of CARVED_BODY_IDS) {- for (const part of CARVED_BODIES[id].parts) {- for (const line of flatten(part.d)) {- for (const [x, y] of line) {- expect(x, id).toBeGreaterThan(-14);- expect(x, id).toBeLessThan(254);- expect(y, id).toBeGreaterThan(-14);- expect(y, id).toBeLessThan(254);- }+ const body = CARVED_BODIES[id];+ for (const d of [body.clip, ...body.parts.map((part) => part.d)]) {+ for (const n of d.match(/-?\d+(?:\.\d+)?/g).map(Number)) {+ expect(n, id).toBeGreaterThanOrEqual(-14);+ expect(n, id).toBeLessThanOrEqual(254);}}}diff --git a/scripts/mascot-bodies/diwali.ts b/scripts/mascot-bodies/diwali.tsindex db3180aca7..e101217807 100644--- a/scripts/mascot-bodies/diwali.ts+++ b/scripts/mascot-bodies/diwali.ts@@ -79,7 +79,7 @@ const sparklerRays = union(...around(12, (a, i) => {return polyStroke([[x0, y0, 5.5], [x1, y1, 2]])}, TAU / 24))const sparklerTwinkles = union(twinkle(28, 34, 12), twinkle(214, 58, 10), twinkle(36, 170, 9))-const sparklerWire = polyStroke([[120, 160, 4.5], [120, 250, 4]])+const sparklerWire = polyStroke([[120, 160, 4.5], [120, 246, 4]])const bomb = circle(120, 148, 86)const bombCollar = grow(polygon([[134, 44], [166, 60], [156, 80], [124, 64]]), 4)diff --git a/shared/carved-bodies.ts b/shared/carved-bodies.tsindex a058f45a1e..4bbd5ab892 100644--- a/shared/carved-bodies.ts+++ b/shared/carved-bodies.ts@@ -235,7 +235,7 @@ export const CARVED_BODIES: Record<CarvedBodyId, CarvedBody> = {eyes: {cx: 120, cy: 104, dx: 24, w: 21, h: 40, round: 36, ink: "#0d0a10", mouth: true, mouthInk: "#0d0a10", mouthY: null},clip: "M112.5 46.46 C104.13 47.48 95.94 50.21 88.67 54.5 C41.85 82.12 50.89 153.23 103.5 167.76 C111.29 169.91 119.48 170.52 127.5 169.54 C135.87 168.52 144.06 165.79 151.33 161.5 C198.15 133.88 189.11 62.77 136.5 48.24 C128.71 46.09 120.52 45.48 112.5 46.46 Z",parts: [- { fill: "#8d8d8d", d: "M118 155.97 C116.82 156.76 116.29 157.12 115.76 158.5 C114.8 160.99 115.56 171.69 115.58 175 C115.69 194.5 115.8 214 115.91 233.5 C115.93 236.7 115.32 249.36 116.29 251.5 C117.04 253.14 118.68 254.2 120.5 253.97 C122.15 253.76 123.41 252.57 123.87 251 C124.68 248.25 124.08 235.28 124.1 231.5 C124.21 211.5 124.32 191.5 124.44 171.5 C124.46 167.4 126.07 157.51 121.5 155.76 C120.5 155.38 118.93 155.35 118 155.97 Z" },+ { fill: "#8d8d8d", d: "M118 155.97 C116.82 156.76 116.29 157.12 115.76 158.5 C114.81 160.99 115.57 171.69 115.59 175 C115.69 193 115.8 211 115.9 229 C115.92 232.52 115.37 244.42 116.13 247 C116.59 248.57 117.85 249.76 119.5 249.97 C121.12 250.17 122.71 249.35 123.5 247.93 C124.83 245.56 124.07 233.41 124.09 230 C124.21 210.5 124.32 191 124.43 171.5 C124.46 167.4 126.07 157.51 121.5 155.76 C120.5 155.38 118.93 155.35 118 155.97 Z" },{ fill: "#ffc93c", d: "M147.5 0 C146.05 0.87 144.26 7.21 143.57 9 C140.94 15.9 136.25 26.33 134.42 33 C133.53 36.24 135.58 39.61 139 40.05 C142.95 40.55 144.77 37.34 145.31 34 C146.75 25 148.2 16 149.64 7 C149.95 5.1 151.62 0.75 149 -0.18 C148.53 -0.35 147.93 -0.26 147.5 0 Z M94.5 13.38 C92.16 14.23 93.48 18.71 93.64 20.5 C93.94 23.84 94.18 34.58 95.39 37 C96.66 39.55 99.86 40.85 102.5 39.64 C104.51 38.73 105.89 36.74 105.83 34.5 C105.76 31.79 100.69 22.52 99.29 19.5 C98.53 17.87 97.1 12.44 94.5 13.38 Z M41.5 28.35 C40.38 28.74 39.99 29.99 40.38 31 C41.12 32.94 46.85 39.07 48.5 41.09 C51.67 44.99 59.38 55.53 62.5 58.27 C64.68 60.19 67.81 60.25 70 58.29 C72.05 56.45 72.31 53.19 70.69 51 C68.79 48.44 54.22 37.41 50.64 34.5 C49.04 33.21 43.34 27.71 41.5 28.35 Z M187 38.33 C184.94 39.36 171.17 48.97 169.73 50.5 C167.74 52.61 167.81 55.87 169.71 58 C171.53 60.03 174.83 60.34 177 58.69 C179.44 56.83 183.98 49.1 186 46.23 C187.07 44.7 189.49 42.34 189.84 40.5 C190.15 38.9 188.41 37.61 187 38.33 Z M223.5 77.96 C214 79.48 204.5 81.01 195 82.53 C191.31 83.13 186.95 84.74 188.04 89.5 C188.69 92.38 191.59 94.32 194.5 93.72 C198.75 92.85 213.38 86.57 218.5 84.62 C220.15 83.99 226.55 82.04 227.5 81.09 C227.91 80.67 228.24 80.09 228.25 79.5 C228.28 76.78 224.99 77.72 223.5 77.96 Z M26.5 81.31 C24.17 82.43 25.59 84.32 27 85.2 C29.32 86.65 44.47 93.77 46.5 93.83 C48.74 93.89 50.73 92.5 51.64 90.5 C52.78 88.01 51.68 84.74 49.21 83.5 C46.33 82.05 37.59 82.09 34 81.77 C32.52 81.64 27.68 80.74 26.5 81.31 Z M45 122.42 C42.46 123.12 39.96 124.34 37.5 125.28 C31.5 127.57 25.5 129.86 19.5 132.15 C17.81 132.79 10.94 134.51 11.82 137 C12.81 139.78 18.45 137.73 20.5 137.4 C24.9 136.69 46.6 133.83 49 132.61 C54.91 129.6 51.29 120.7 45 122.42 Z M192 122.35 C187.44 123.62 186.34 130.26 190.79 132.5 C193.45 133.84 203.95 134.05 207.5 134.36 C209 134.49 212.11 135.36 213.5 134.69 C215.83 133.57 214.41 131.68 213 130.8 C210.51 129.24 197.79 123.33 195 122.43 C194.01 122.12 193.01 122.08 192 122.35 Z M65 156.39 C61.08 157.74 54.77 168.67 52.09 172.5 C51.16 173.81 48.32 177.47 52 177.88 C53.42 178.04 55.47 175.94 56.5 175.21 C59.62 173.02 70.36 166.61 71.47 163.5 C72.79 159.79 69.07 154.98 65 156.39 Z M172.5 156.38 C168.57 157.72 166.8 162.16 169.73 165.5 C172.49 168.64 185.23 178.14 189.36 181.5 C190.96 182.79 196.66 188.29 198.5 187.65 C202.13 186.38 196.6 181.18 195.5 179.82 C190.5 173.68 185.5 167.53 180.5 161.38 C178.6 159.04 176.17 155.13 172.5 156.38 Z M99.5 175.97 C95.51 176.61 94.98 180.2 94.45 183.5 C93.25 191 92.04 198.5 90.84 206 C90.49 208.17 88.38 215.25 91 216.18 C93.52 217.07 95.2 210.22 95.85 208.5 C98.14 202.5 100.43 196.5 102.72 190.5 C103.66 188.04 104.88 185.54 105.58 183 C106.62 179.22 103.52 175.33 99.5 175.97 Z M139 175.95 C136.26 176.26 134.1 178.75 134.17 181.5 C134.25 184.35 139.9 194.76 141.41 198 C142.1 199.48 143.1 203.49 145.5 202.62 C147.84 201.77 146.52 197.29 146.36 195.5 C146.06 192.16 145.82 181.42 144.61 179 C143.57 176.9 141.32 175.69 139 175.95 Z" },{ fill: "#ffc93c", d: "M28 21.4 C26.98 21.73 26.13 29.17 25.16 30.5 C23.82 32.35 16.86 32.6 16.5 33.28 C15.35 35.45 23.22 35.91 24.5 36.84 C26.35 38.18 26.6 45.14 27.28 45.5 C29.45 46.65 29.91 38.78 30.84 37.5 C32.18 35.65 39.14 35.4 39.5 34.72 C40.75 32.35 31.89 32.57 30.54 30 C29.05 27.18 29.25 21 28 21.4 Z M214 47.4 C212.36 48.56 212.92 53.31 211.55 55 C210.23 56.63 204.14 56.93 204 57.4 C203.47 59.25 209.92 59.58 211 60.45 C212.63 61.77 212.93 67.86 213.4 68 C215.25 68.53 215.58 62.08 216.45 61 C217.77 59.37 223.86 59.07 224 58.6 C224.53 56.75 218.08 56.42 217 55.55 C214.88 53.83 215.6 50.27 214.6 48 C214.49 47.74 214.23 47.24 214 47.4 Z M36 160.4 C34.09 161.75 35.38 166.17 33 167.91 C31.7 168.86 27.13 168.95 27 169.4 C26.48 171.21 32.67 171.3 33.91 173 C34.86 174.3 34.95 178.87 35.4 179 C37.23 179.53 37.36 174.39 37.84 173.5 C39.09 171.14 44.92 170.87 45 170.6 C45.52 168.79 39.33 168.7 38.09 167 C36.9 165.37 37.38 162.79 36.6 161 C36.49 160.74 36.23 160.24 36 160.4 Z" },{ fill: "body", d: "M112.5 46.46 C104.13 47.48 95.94 50.21 88.67 54.5 C41.85 82.12 50.89 153.23 103.5 167.76 C111.29 169.91 119.48 170.52 127.5 169.54 C135.87 168.52 144.06 165.79 151.33 161.5 C198.15 133.88 189.11 62.77 136.5 48.24 C128.71 46.09 120.52 45.48 112.5 46.46 Z" },