本文へ移動
日本語
「動きの記録」は Pro に含まれます。解除するとプレビューが表示されます。

仕組み

運動学のための教科書風の図です。平面的な人形には二つの関節があり、頭は前へ最大 45°、腕は前へ最大 135° 動きます。どちらかをドラッグすると記録が始まり、毎フレーム二つの角度を時刻とともに記録します。二本のグラフは同じ時間軸を共有し、再生すると再生位置が両方を通り、人形が同じ動きをくり返します。各グラフには再生位置での角度と角速度(グラフの傾き)が表示されます。

向いている場面

  • Teach position–time graphs: a flat stretch means rest, a steep one means fast motion, and the slope is the speed.
  • Compare two movements on one time axis to see their order and overlap.

向かない場面

  • For measured data from sensors or video, use a chart of that data: this figure records only what is moved on screen.

使い方

import React, { useState } from 'react'
import { PuppetTake } from './PuppetTake.jsx'

export function MotionLesson() {
  const [take, setTake] = useState(null)
  return <PuppetTake value={take} onChange={(next) => setTake(next)} maxSeconds={8} />
}

プロパティ

プロパティ型既定値説明
value{ duration: number, samples: Array<{ t, head, arm }> } | null—Controlled recording: its length in seconds and the samples, each a time in seconds with the head angle (0–45°) and the arm angle (0–135°). null shows no recording.
defaultValue{ duration, samples } | nulla nod, then an arm lift, 5 sStarting recording when uncontrolled; Reset returns to it.
onChange(take, { reason }) => void—Called when a recording stops (reason 'record') or Reset is pressed (reason 'reset').
defaultTimenumberhalf the recordingWhere the playhead starts, in seconds, and where Reset puts it. After a new recording it stands at the end.
maxSecondsnumber6Longest recording, in seconds (1–60); it is also the length of the time axis.
labelsobject—Replaces any built-in text: title, formula, head, arm, figure, help, traces, record, stop, play, pause, reset, readout, recording, empty, seconds, degrees and speed ('{n}'), started, recorded and paused ('{n}'), playing and restored.
localestring'en'Language tag for the numbers.
classNamestring—Extra class on the card, for example to set its width (30rem by default, never wider than its container).

アクセシビリティ

  • The head and the hand are sliders with their angle as the value. Arrow keys turn them by 5° (Shift or Page keys by 15°), Home and End go to the ends of the range. The first key starts a recording and Enter on a joint stops it; while recording, the joint follows the keys at 150° per second so the trace has a real slope.
  • The traces are a slider for the playhead: arrows move it by 0.1 s (Shift by 0.5 s), Home and End go to the start and the end.
  • Record and Replay are buttons whose names change to Stop and Pause while active. A polite status announces when a recording starts and stops and where replay paused.
  • Joints use pointer capture and touch-action none; the traces allow vertical scrolling and scrub with a horizontal drag.

モーション

Recording and replay run in real time, because the timing is the content. Under keyboard control the joints glide at 150° per second. With reduced motion there are no transitions and the record mark does not pulse.

プロジェクトに追加

Pro メンバーはプロンプトをコピーし、コーディングエージェントが無料コンポーネントと同じ手順でソースを導入します。

PuppetTake.jsxpuppet-take.csstokens.cssREADME.md

2 つのファイルを一緒に導入します。スタイルは tokens.css の変数を読み、予備の値も持つため、単体でも表示できます。

フォーム入力
「空き時間グリッド」は Pro に含まれます。解除するとプレビューが表示されます。
「図形のブール演算」は Pro に含まれます。解除するとプレビューが表示されます。
「カスケード選択」は Pro に含まれます。解除するとプレビューが表示されます。