「空き時間グリッド」は Pro に含まれます。解除するとプレビューが表示されます。
「周期的なタイル張り」は Pro に含まれます。解除するとプレビューが表示されます。
仕組み
周期模様を示す教科書風の図です。色付きで墨色の枠があるセルが元のセルで、図にはその八つのコピーが並びます。どこに描いても線は元のセルに折り返され、すべてのコピーが同じ線をくり返します。平行移動では各コピーがセル単位で移動し(壁紙群 p1)、鏡映では 1 列おきに縦の継ぎ目で反転し(pm)、二方向鏡映ではすべての継ぎ目で反転します(pmm)。継ぎ目の端点には、隣のコピーが線を続けるなら墨色の点、切れるなら赤い輪が付きます。
向いている場面
- Teach translation and reflection symmetry: why a wave repeats under any symmetry while a slanted line only joins up into a zigzag with mirrors.
- Let learners design a repeating motif and check that it tiles without breaks before using it as a border, fabric or wallpaper.
向かない場面
- For rotations, glide reflections or non-square cells, use a full wallpaper-group tool: this one covers p1, pm and pmm on a square cell.
使い方
import React, { useState } from 'react'
import { WovenSeamStudio } from './WovenSeamStudio.jsx'
export function TilingLesson() {
const [strokes, setStrokes] = useState([])
const [seams, setSeams] = useState(null)
return (
<WovenSeamStudio
value={strokes}
onChange={(next, details) => {
setStrokes(next)
setSeams(details.seams)
}}
defaultSymmetry="mirror"
/>
)
}プロパティ
| プロパティ | 型 | 既定値 | 説明 |
|---|---|---|---|
value | Array<Array<Array<[x, y]>>> | — | Controlled drawing: a list of strokes, each a list of pieces, each a list of points in source-cell units (0–100 on both axes). A stroke that crosses seams is stored as one piece per cell it passed through. |
defaultValue | Array<Array<Array<[x, y]>>> | one wave from the left edge to the right edge | Starting drawing when uncontrolled. Pass [] to start empty. |
onChange | (strokes, { reason, seams: { matched, total } }) => void | — | Called after a stroke is drawn, undone or cleared. reason is 'draw', 'keyboard', 'undo' or 'clear'; seams counts the seam ends and how many of them continue under the current symmetry. |
symmetry | 'translate' | 'mirror' | 'mirror2' | — | Controlled symmetry: translation only (p1), mirrors across the vertical seams (pm), or mirrors across every seam (pmm). |
defaultSymmetry | 'translate' | 'mirror' | 'mirror2' | 'translate' | Starting symmetry when uncontrolled. |
onSymmetryChange | (symmetry) => void | — | Called when the symmetry is changed. |
labels | object | — | Replaces any built-in text: title, formulas ({ translate, mirror, mirror2 }), legendSource, legendMatch, legendOpen, source, canvas, help, keys, symmetry, translate, mirror, mirror2, undo, clear, readout, noSeams, pointAdded ('{n}'), drawn ('{n}', '{matched}', '{total}'), undone, cleared and matchText ('{matched}', '{total}'). |
locale | string | 'en' | Language tag for the numbers. |
className | string | — | Extra class on the card, for example to set its width (30rem by default, never wider than its container). |
アクセシビリティ
- The tiling is an application region with its instructions as its description. Arrows move a cross-hair (Shift moves half a cell), Space adds a point, Enter draws the stroke through the points, Backspace removes the last point and Escape drops them. A hint with these keys shows while the tiling has keyboard focus. Control or Command with Z undoes the last stroke.
- A polite status announces each stroke with how many seam ends continue, and the new count when the symmetry changes.
- The symmetry is a radio group: arrows move between Translate, Mirror and Mirror both. Undo and Clear are buttons, marked unavailable when there is nothing to remove.
- Drawing uses pointer capture and touch-action none on the tiling only; a cancelled gesture draws nothing.
モーション
When the symmetry changes, the mirrored copies flip over for --ds-duration-base; while drawing, every copy follows the pointer at once. With reduced motion there is no animation.
プロジェクトに追加
Pro メンバーはプロンプトをコピーし、コーディングエージェントが無料コンポーネントと同じ手順でソースを導入します。
WovenSeamStudio.jsxwoven-seam-studio.csstokens.cssREADME.md
2 つのファイルを一緒に導入します。スタイルは tokens.css の変数を読み、予備の値も持つため、単体でも表示できます。
同じカテゴリ
フォーム入力「図形のブール演算」は Pro に含まれます。解除するとプレビューが表示されます。
「カスケード選択」は Pro に含まれます。解除するとプレビューが表示されます。







