← SplineCONTENT HISTORY

Update to Spline

Snapshot Oct 24, 2026 · 13:29 UTC · version 1.2.0

Collection source: downloaded plugin package.

WHAT CHANGED

First saved snapshot

No earlier snapshot is available to establish a change.

Save Spline and check future changes in Following.

Up to 10 plugins free · no card required.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "The generateTexture contract and recipes: draw seamless repeating textures locally with canvas 2D (brick/stone walls, wood planks, roof tiles, ceramic/checker floors, pavement) — the seam-wrap rules (rng-only randomness, save/restore transforms, opaque base, one draw per feature), sizing/repeat math, and worked per-material drawing recipes. Load BEFORE writing any generateTexture call.",
  "included_files": [],
  "name": "spline-3d-texture-drawing",
  "skill_md_contents": "---\nname: spline-3d-texture-drawing\ndescription: \"The generateTexture contract and recipes: draw seamless repeating textures locally with canvas 2D (brick/stone walls, wood planks, roof tiles, ceramic/checker floors, pavement) — the seam-wrap rules (rng-only randomness, save/restore transforms, opaque base, one draw per feature), sizing/repeat math, and worked per-material drawing recipes. Load BEFORE writing any generateTexture call.\"\n---\n\n# Drawing seamless textures (generateTexture)\n\nLoad `materials-and-look` for where texture layers fit in the material\nstack; this skill is the drawing contract for making the texture itself.\n\n### generateTexture — draw seamless patterns locally (canvas 2D)\n\n`generateTexture(name, draw, size?)` renders your own canvas-2D drawing into\na SEAMLESS tile and mints it as an image asset — locally and instantly, no\nimage service, no quota, no checkerboard wait. It is THE tool for crisp\nREPEATING, GEOMETRIC real-world detail: brick/stone walls, roof tiles, wood\nplanks and parquet, ceramic/checker floors, pavement, windows-grid facades,\nwoven/fabric grids. (Keep `style` generation for photographic/organic looks —\nbark, marble, rust, lava — and the noise layer for formless micro-variation.)\n\n```\n// call 1 — draw the tile and apply it (same block is fine)\nconst bricks = generateTexture('Red Bricks', (ctx, { size, rng }) => {\n  ctx.fillStyle = '#b8b0a4';                       // opaque mortar base — ALWAYS first\n  ctx.fillRect(0, 0, size, size);\n  const rows = 8, gap = size * 0.012;\n  const bh = size / rows;\n  for (let r = 0; r < rows; r++) {\n    const bw = size / 4;\n    const shift = (r % 2) * bw * 0.5;              // running bond offset\n    // Draw each brick ONCE (cover [0, size) plus the shift overhang) — the\n    // replication passes complete whatever pokes past an edge on the other\n    // side. Never draw a feature twice \"to cover both edges\": the two\n    // copies would get different rng() values and the seam would mismatch.\n    for (let c = 0; c < 4; c++) {\n      const x = c * bw + shift, y = r * bh;\n      const tint = 18 - rng() * 36;                // per-brick variation via rng()\n      ctx.fillStyle = `rgb(${168 + tint}, ${74 + tint * 0.6}, ${56 + tint * 0.4})`;\n      ctx.fillRect(x + gap, y + gap, bw - gap * 2, bh - gap * 2);\n    }\n  }\n});\nselect('Wall');\nlayer('texture', { image: bricks.id, projection: 'triplanar', alpha: 0.85,\n  texture: { repeat: [2, 2] } });\n```\n\nThe draw callback is replicated at the 8 neighboring tile offsets with an\nIDENTICALLY seeded `rng`, so anything crossing an edge wraps to the opposite\nside — that machinery makes three rules load-bearing:\n- randomness ONLY via the provided `rng()` — `rand()`/`Math.random` would\n  give each replication pass a different pattern and tear every seam;\n- transforms only with `translate`/`rotate`/`scale` inside `save`/`restore`\n  — `setTransform`/`resetTransform` would wipe the replication offset;\n- an OPAQUE full-tile base fill first — uncovered pixels are transparent and\n  sample BLACK in the material.\nAlso: draw in TILE-relative units (fractions of `size`), keep features\nsmaller than the tile, and let `texture: { repeat }` set the real-world\nscale. Redrawing under the SAME name replaces that asset's pixels in place\n(every surface using it updates — iterate freely without littering assets),\nand the same name keeps the same rng layout. `size` defaults to 512; use\n1024 for hero close-ups or when one tile must span a large surface (see\nREPEAT IS ALSO RESOLUTION below).\n\nPattern vocabulary that reads instantly: running-bond offset rows (bricks),\ngrout-gap grids (bathroom/kitchen tiles, checker floors via alternating\nfills), long vertical boards + a few darker knots/streaks per board (planks;\nrotate the repeat or the layer for horizontal), staggered scallops (roof\nshingles), irregular rounded polygons on a dark base (flagstone), thin\ndouble pinstripes (fabric). Two or three `rng`-jittered tones per feature\nbeat flat fills every time.\n"
}

SHA-256 of public snapshot: 0ae1ba8c02941b00bf06434e92bfa041be338da66682a3c2fb00a6635b20337c