Edit:RiN 使い方マニュアルUser manual

EDIT:RiN / DOCUMENTATION

使い方マニュアルUser manual

操作の場所、手順、コード例を機能ごとにまとめています。目次から章を選ぶか、機能名で検索してください。Find controls, step-by-step instructions, and code examples for each feature. Choose a chapter or search for a feature.

01 / 10

作品の作成・取り込みCreate & import

サンプルを開くところから、自分の作品とテンプレートの管理まで。Open samples, make your own works, and bring in existing projects.

Edit:RiNの画面例 / Example Edit:RiN screen

画面の読み方SCREEN MAP

作品とコードを同じ画面でArtwork and code together

  1. 作品名:作品一覧を開くWork title: open the work picker
  2. 歯車:アプリの設定Gear: app settings
  3. プレビュー操作:パラメーター・出力などPreview controls: parameters, export, and more
  4. コード欄:ソースの閲覧と編集Editor: read and edit source

画面例。版、言語、画面の向きや設定で配置は変わります。Example screen. Layout varies with version, language, orientation, and settings.

サンプルを開き、コピーして編集するOpen a sample and make an editable copy

完成したサンプルの動きを確かめてから、自分の作品として編集できます。Explore a finished sample, then make your own editable work.

開く場所WHERE

画面上部の作品名 → 作品一覧 → サンプルWork title at the top → work picker → Samples

操作手順STEPS

  1. Paletteなどのサンプルを選び、プレビューを操作します。Select a sample such as Palette and interact with its preview.
  2. コードを変更するときは「コピーして編集」を押します。Choose Copy to edit when you want to change its code.
  3. 名前を入力して作成し、「自分の作品」に切り替わったことを確認します。Name the copy and check that it appears under My works.

操作後RESULT原本を残したまま、独立したコピーを編集できます。You can edit an independent copy while keeping the original.

新しい作品を作るCreate a work

テンプレートのコードと実行設定を使って、新しい作品を作成します。Start with code and runtime settings supplied by a template.

開く場所WHERE

作品一覧 → +Work picker → +

操作手順STEPS

  1. 作品名とプレビュー比率を指定します。Choose a name and preview ratio.
  2. 2D、アニメーション、マウス/タッチなどのテンプレートを選びます。Select a template such as 2D, Animation, or Mouse / Touch.
  3. 「作成」を押し、コードを編集して実行します。Choose Create, edit the code, and run it.

操作後RESULT選んだテンプレートを使った新しい作品ができます。A new work is created from the selected template.

自作テンプレートを保存・再利用するSave and reuse your templates

繰り返し使うコード・素材・実行設定を、新規作成の出発点にできます。Reuse code, assets, and runtime settings as a starting point.

開く場所WHERE

作品メニュー → テンプレート・ピン・タグ・名前・複製 → テンプレートとして保存Work menu → Templates, pin, tags, rename, duplicate → Save as template

操作手順STEPS

  1. 元にする作品を開き、補助ファイルと素材も確認します。Open the work and check its supporting files and assets.
  2. テンプレートとして保存し、名前を付けます。Save it as a template and give it a name.
  3. 新規作成で「自作テンプレート」を選びます。Select My templates when creating a new work.

操作後RESULTテンプレートの内容を引き継いだ別の作品を作成できます。A separate work inherits the template contents.

JS・作品ZIPを取り込むImport JavaScript or a work ZIP

既存のコードや作品一式を端末のファイルから取り込みます。Bring existing code or a complete work in from a file.

開く場所WHERE

JS:作品メニュー → JSをインポート/設定 → 保存 → Import .js、ZIP:作品メニュー → 作品ZIPを追加JS: Work menu → Import JS / Settings → Save → Import .js; ZIP: Work menu → Import work ZIP

操作手順STEPS

  1. コードだけなら.js、補助ファイルや素材も移すなら作品ZIPを用意します。Use .js for code alone, or a work ZIP for files and assets as well.
  2. 該当するインポート操作からファイルを選びます。Choose the appropriate import action and select the file.
  3. 取り込んだ作品を開き、実行環境と素材のパスを確認して実行します。Open the imported work, check runtime and asset paths, and run it.

操作後RESULT取り込んだ内容をアプリ内で編集できます。The imported content becomes available for editing.

p5.js Web Editorの公開作品を取り込むImport public p5.js Web Editor sketches

ユーザー名から公開作品の一覧を取得して取り込めます。Retrieve public sketches by username and import them.

開く場所WHERE

設定 → 保存 → p5.jsから作品を取り込むSettings → Save → Import from p5.js

操作手順STEPS

  1. p5.js Web Editorのユーザー名を入力します。Enter the p5.js Web Editor username.
  2. 「作品を取得」を押し、公開作品の一覧から対象を選びます。Choose Load works, then select a public sketch.
  3. 取り込み後に素材とライブラリの設定を確認します。Check assets and library settings after importing.

操作後RESULT公開作品のローカルコピーを編集できます。You can edit a local copy of the public sketch.

02 / 10

コードの編集Write & inspect code

入力、数値調整、検索、エラー確認を使い分けます。Use editing tools, numeric adjustment, search, and diagnostics.

操作の流れ(説明図)Workflow diagram
  1. コードを選ぶChoose code
  2. 編集・確認Edit & inspect
  3. 実行するRun changes

編集キー・補完・Undo/RedoEditing keys, completion, Undo / Redo

記号やよく使うコードを入力し、操作を取り消せます。Enter symbols and common code patterns, and undo edits.

開く場所WHERE

コード欄 → 編集キー/スニペットCode editor → accessory keys / snippets

操作手順STEPS

  1. 自分の作品のコード欄をタップし、カーソルを置きます。Tap your work’s editor and position the caret.
  2. 編集キーでカーソルを移動し、記号やスニペットを挿入します。Use accessory keys to move the caret and insert symbols or snippets.
  3. 補完候補を選びます。戻したい変更はUndo、やり直す場合はRedoを使います。Choose a completion. Use Undo to reverse an edit and Redo to reapply it.

操作後RESULT編集後のコードを実行して結果を確認できます。Run the edited code to inspect the result.

編集キーで数値を調整するAdjust numbers with the accessory scrubber

カーソル位置の数値を、編集キーのドラッグ操作で変更できます。Adjust the number at the caret using the accessory scrubber.

開く場所WHERE

エディターで数値にカーソルを置く → 編集キーの数値調整Place the caret on a number → numeric scrubber in accessory keys

操作手順STEPS

  1. コード内の数値にカーソルを置き、編集キーに数値調整が表示されることを確認します。Place the caret on a numeric literal and locate the scrubber in the accessory bar.
  2. 編集キーの数値調整を左右にドラッグします。上下方向では調整の刻みを変えられます。Drag the accessory scrubber left or right. Dragging vertically changes its adjustment step.
  3. 必要に応じて「変更を実行」を押し、Undoで変更を戻します。Run changes when needed, or use Undo to revert the edit.

操作後RESULT元のコードの数値が変わります。The numeric literal in the source changes.

コード内の色とカラーピッカーEdit code colors with the color picker

コードの色リテラルを選び、編集キーから色を調整できます。Select a source color literal and adjust it from the accessory bar.

開く場所WHERE

色コードにカーソルを置く → 編集キーの色見本Place the caret on a color code → accessory color swatch

操作手順STEPS

  1. 色コードの位置にカーソルを置きます。Place the caret on a color code.
  2. 色見本を押してインラインの色選択を開きます。Press the swatch to open inline color controls.
  3. 色を選んでソースを確認します。色リテラルがない場合もカラーピッカーを開けます。Choose a color and inspect the source. The picker can also open without a selected color literal.

操作後RESULT選択中の色コードを調整できます。Adjust the selected color literal.

ブロックの折りたたみ・行の折り返しFold blocks and wrap long lines

長いコードの表示量を調整できます。Control how much code is visible at once.

開く場所WHERE

行番号横の三角/設定 → エディター → コードを画面幅で折り返すTriangle beside line numbers / Settings → Editor → Wrap code at screen width

操作手順STEPS

  1. 関数やブロックの横の三角を押して折りたたみます。Press the triangle beside a function or block to collapse it.
  2. もう一度押して展開します。Press it again to expand the block.
  3. 長い行を画面内で読みたい場合は折り返しを有効にします。Enable wrapping to read long lines within the screen width.

操作後RESULTソースを削除したり改行を追加したりせず、見え方だけを変更できます。Only the display changes; no source is deleted and no line breaks are inserted.

検索・置換・コード整形Search, replace, and format

文字列を探し、置換する範囲を選び、対応するコードを整形します。Find text, choose what to replace, and format supported code.

開く場所WHERE

作品メニュー → 検索・置換/コードを整形Work menu → Find & replace / Format code

操作手順STEPS

  1. 検索を開いて文字列を入力します。「現在のファイル」と「作品全体」を選び、必要なら大文字・小文字を区別します。Open search and enter text. Choose Current file or Entire work, and optionally match case.
  2. 置換内容と対象を確認してから置換します。Check the replacement and target before applying it.
  3. 整形後は差分を確認し、必要ならUndoで戻します。Inspect the formatted code and use Undo if needed.

操作後RESULT一致箇所を確認しながら編集できます。You can edit while checking the matching locations.

エラー・ログ・互換性の案内Errors, logs, and compatibility hints

実行に失敗した箇所や、バージョンによる違いを確認できます。Inspect failures and differences between runtime versions.

開く場所WHERE

プレビューのログ/エディターのエラー表示Preview log / editor diagnostics

操作手順STEPS

  1. 実行後にログを開き、最初のエラーを読みます。Open the log after running and read the first error.
  2. ソース位置があるエラーを選び、該当行へ移動します。Select an error with a source location to jump to the relevant line.
  3. 素材のパス、関数名、実行環境を確認して再実行します。Check asset paths, function names, and runtime, then run again.

操作後RESULT修正した箇所の結果を再確認できます。You can verify the effect of the correction.

アプリ内のp5.jsリファレンスUse the in-app p5.js reference

関数名やキーワードから、APIの書式を確認できます。Look up API signatures by function name or keyword.

開く場所WHERE

エディター → p5.jsリファレンスEditor → p5.js reference

操作手順STEPS

  1. 関数名またはキーワードを入力します。Enter a function name or keyword.
  2. カテゴリで絞り込み、説明と引数を読みます。Filter by category and read the description and arguments.
  3. 作品のp5.jsバージョンに合わせてコードを記述します。Write code for the p5.js version selected for your work.

操作後RESULT編集を進めながら関数の用途を調べられます。You can look up a function’s purpose while editing.

03 / 10

実行・画面配置・PiPRun, layout & PiP

変更の反映と、作品を確認しやすい画面の使い方。Apply code changes and arrange the preview around your work.

操作の流れ(説明図)Workflow diagram
  1. 変更するMake a change
  2. 実行するRun
  3. 結果を確認Inspect output

手動実行・Auto-Run・一時停止Run changes, Auto-Run, and pause

コードの再実行と、描画の一時停止を使い分けます。Choose when to rerun code and when to pause drawing.

開く場所WHERE

実行操作・AUTOボタン/設定 → 画面と実行 → 作品切替時に自動実行Run controls & AUTO button / Settings → Display and run → Run when switching works

操作手順STEPS

  1. コードを変更し、手動の場合は「変更を実行」を押します。Edit the code and choose Run changes when running manually.
  2. AUTO(Auto-Run)を有効にすると入力が止まった後に再実行し、「作品切替時に自動実行」では別の作品を開いたときに自動で実行します。Enable AUTO (Auto-Run) to rerun after typing pauses; enable Run when switching works to run automatically when opening another work.
  3. アニメーションを止めたいときは一時停止し、再開します。Use Pause and Resume to inspect an animation.

操作後RESULT再実行では最新のコードを読み込み、一時停止では描画の進行を止めます。Rerunning loads the latest code; pausing stops drawing progression.

p5.js 2.3.4・直径を書き換えて再実行p5.js 2.3.4 · edit the diameter and rerun
let diameter = 100;
function setup() {
  createCanvas(400, 280);
}
function draw() {
  background('#F1F1EA');
  noStroke();
  fill('#B85338');
  circle(200, 140, diameter);
}
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

プレビューとエディターの配置を変えるArrange the preview and editor

画面の向きと、プレビュー・エディターの面積を調整します。Adjust orientation and the space given to the preview and editor.

開く場所WHERE

設定 → 外観/画面と実行Settings → Appearance / Display and run

操作手順STEPS

  1. サイズ調整バーを有効にし、仕切りを動かします。Enable resize handles and move the divider.
  2. 横画面のプレビュー幅と、エディターを左に置くかを選びます。Choose the landscape preview width and whether the editor goes on the left.
  3. 必要なら画面の向きを固定し、回転ボタンで切り替えます。Lock orientation if desired and switch it with the rotation button.

操作後RESULTコードと作品を見比べやすい配置になります。The arrangement makes it easier to compare source and output.

PiP小窓の移動・サイズ・透明度Move, resize, and fade the PiP preview

縦画面で編集中も小窓で作品を確認できます。Keep a small preview visible while editing in portrait.

開く場所WHERE

設定 → 画面と実行 → 編集時のPiP小窓プレビューSettings → Display and run → PiP floating preview while editing

操作手順STEPS

  1. PiP小窓を有効にし、コード欄の編集に入ります。Enable PiP and begin editing the code.
  2. 小窓をドラッグして四隅のいずれかへ移動します。Drag the floating preview toward a corner.
  3. 小窓の操作でサイズ・半透明表示・最小化を切り替えます。Use its controls to change size, translucency, or minimization.

操作後RESULT上部プレビューを隠している間も、実行結果を確認できます。You can see the output while the upper preview is hidden.

プレビュー比率とキャンバスサイズPreview ratio and canvas dimensions

作品の表示枠を用途に合う比率に変えます。Choose an aspect ratio for the work’s preview frame.

開く場所WHERE

作品メニュー → プレビュー比率Work menu → Preview aspect ratio

操作手順STEPS

  1. 1:1、16:9、4:3、9:16、端末に合わせた比率から選びます。Choose 1:1, 16:9, 4:3, 9:16, or a device-based ratio.
  2. 枠に合わせる作品ではwindowWidthとwindowHeightでサイズを決めます。Use windowWidth and windowHeight when the canvas should fit the frame.
  3. windowResized()でresizeCanvas()を呼び、枠の変更にも対応します。Call resizeCanvas() in windowResized() to respond to frame changes.

操作後RESULT表示枠とコード側のサイズ指定を確認できます。You can check how the frame and source dimensions interact.

プレビューを拡大するExpand the preview

作品を大きく表示して、描画の細部を確認します。Inspect the artwork in a larger preview.

開く場所WHERE

プレビュー操作 → 拡大/設定 → 画面と実行Preview controls → expand / Settings → Display and run

操作手順STEPS

  1. プレビュー操作を開き、拡大表示に切り替えます。Open preview controls and expand the preview.
  2. 描画サイズを維持したい場合は「全画面でも描画サイズを維持」を有効にします。Enable Preserve work size in full screen to keep the drawing dimensions.
  3. 通常表示に戻して編集を続けます。Return to the normal layout to continue editing.

操作後RESULTコードの表示領域を減らして、作品を確認できます。More screen space is available for inspecting the work.

04 / 10

パラメーター・ウォッチParameters & live values

コメントを使って操作項目や値のバッジを追加します。Use comments to create controls and inspect values in the editor.

操作の流れ(説明図)Workflow diagram
  1. コメントで宣言Declare in comments
  2. 値を調整Adjust values
  3. 描画で確認Inspect drawing

//?で実行中の値を見るInspect running values with //?

対象行が実行されたときの値を、エディター内に表示します。Show the value of a line when that line executes.

開く場所WHERE

設定 → エディター → インライン変数ウォッチSettings → Editor → Inline variable watch

操作手順STEPS

  1. ウォッチを有効にします。Enable inline watch.
  2. 確認したい単純な宣言・代入・式の行末に //? または // ? を付けます。Append //? or // ? to a simple declaration, assignment, or expression.
  3. 実行し、値のバッジを確認します。変化を追う場合はdraw()内の行を使います。Run the work and inspect the badge. Use a line in draw() to watch changes.

操作後RESULT行が実行されるたびに、表示する値を更新します。The displayed value updates when the line executes.

p5.js 2.3.4・実行する行の値を確認p5.js 2.3.4 · inspect the executed line
function setup() { createCanvas(400, 280); }
function draw() {
  background('#F1F1EA');
  noStroke();
  fill('#B85338');
  let x = 200 + sin(frameCount * 0.03) * 100; //?
  circle(x, 140, 60);
}
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

変数に操作用コメントを付けるAdd inline parameter comments

変数宣言の末尾から、スライダー・色・スイッチ・選択肢を作れます。Create sliders, colors, switches, and choices beside variable declarations.

開く場所WHERE

コードの変数宣言 → プレビューのパラメーター操作Variable declaration → preview parameter controls

操作手順STEPS

  1. 数値は@slider(最小, 最大, 刻み)または@int(最小, 最大)を指定します。Use @slider(min, max, step) or @int(min, max) for numbers.
  2. 色は@color、真偽値は@toggle、列挙値は@choice(...)を指定します。Use @color for colors, @toggle for booleans, and @choice(...) for choices.
  3. 実行後に操作パネルを開き、値を動かして結果を見ます。Run the work, open the parameter panel, and adjust the controls.

操作後RESULTソース内の値と実行中の変数を変更できます。The source value and the running variable can be updated.

p5.js 2.3.4・インライン形式の全5種類p5.js 2.3.4 · all five inline control types
let size = 100; // @slider(20, 200, 10) "Size"
let count = 3; // @int(1, 6) "Count"
let ink = '#B85338'; // @color "Ink"
let moving = false; // @toggle "Rotate"
let shape = 'circle'; // @choice(circle, square, triangle) "Shape"
function setup() { createCanvas(400, 280); }
function draw() {
  background('#F1F1EA');
  translate(200, 140);
  if (moving) rotate(frameCount * 0.015);
  noStroke();
  fill(ink);
  for (let i = 0; i < count; i++) {
    push();
    rotate(TWO_PI * i / count);
    translate(count === 1 ? 0 : 65, 0);
    if (shape === 'circle') circle(0, 0, size);
    else if (shape === 'square') { rectMode(CENTER); square(0, 0, size); }
    else triangle(0, -size / 2, size / 2, size / 2, -size / 2, size / 2);
    pop();
  }
}
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

@rinとrinParamsで操作パネルを作るBuild controls with @rin and rinParams

コード先頭などに操作項目を宣言し、rinParamsから値を参照します。Declare controls in comments and read their values through rinParams.

開く場所WHERE

// @rin宣言 → プレビューのパラメーター操作// @rin declaration → preview parameter controls

操作手順STEPS

  1. // @rin 種類 名前 "表示名" 値 の形式で項目を書きます。Write each control as // @rin type name "Label" values.
  2. numberは最小・最大・初期値・刻み、choiceは初期値と選択肢を指定します。For number, specify min, max, default, and step; for choice, specify the default and choices.
  3. 描画コードでrinParams.名前を読み、パネルから値を変更します。Read rinParams.name in the drawing code and adjust the panel.

操作後RESULT作品ごとの操作パネルで描画を調整できます。値は作品のコピーやバックアップにも含まれます。Each work has its own controls. Values are included in copies and backups.

p5.js 2.3.4・@rin形式の4種類p5.js 2.3.4 · all four @rin types
// @rin number size "Size" 20 200 100 10
// @rin number count "Count" 1 6 3 1
// @rin color ink "Ink" #B85338
// @rin boolean moving "Rotate" false
// @rin choice shape "Shape" circle circle square triangle
function setup() { createCanvas(400, 280); }
function draw() {
  background('#F1F1EA');
  translate(200, 140);
  if (rinParams.moving) rotate(frameCount * 0.015);
  noStroke();
  fill(rinParams.ink);
  for (let i = 0; i < rinParams.count; i++) {
    push();
    rotate(TWO_PI * i / rinParams.count);
    translate(rinParams.count === 1 ? 0 : 65, 0);
    let s = rinParams.size;
    if (rinParams.shape === 'circle') circle(0, 0, s);
    else if (rinParams.shape === 'square') { rectMode(CENTER); square(0, 0, s); }
    else triangle(0, -s / 2, s / 2, s / 2, -s / 2, s / 2);
    pop();
  }
}
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

宣言の条件と表示されない場合Declaration rules and missing controls

操作項目が出ないときは、上限・名前・値の書式を確認します。Check limits, names, and value syntax when a control is missing.

開く場所WHERE

JavaScriptプロジェクトファイルのパラメーター宣言Parameter declarations in JavaScript project files

操作手順STEPS

  1. インライン形式と@rin形式を合わせて16個以内にします。Keep inline and @rin declarations within the combined limit of 16.
  2. 名前の重複を除き、数値の最小値を最大値より小さく、刻みを正にします。Remove duplicate names, use min < max, and specify a positive step.
  3. @rinの表示名を1〜40文字の二重引用符付きにし、初期値と選択肢を確認します。For @rin, quote the 1–40 character label and check defaults and choices.

操作後RESULT有効な宣言を操作パネルに表示できます。Valid declarations can appear in the control panel.

種類Type 記述例Declaration 値Value
数値Numberlet size = 100; // @slider(20, 200, 10)let size = 100; // @slider(20, 200, 10)20〜200、刻み1020–200, step 10
整数Integerlet count = 3; // @int(1, 6)let count = 3; // @int(1, 6)刻み1Step 1
色Colorlet ink = '#B85338'; // @colorlet ink = '#B85338'; // @color6桁の色コードSix-digit hex
真偽値Booleanlet moving = false; // @togglelet moving = false; // @toggletrue / falsetrue / false
選択肢Choicelet shape = 'circle'; // @choice(circle, square)let shape = 'circle'; // @choice(circle, square)列挙した値Listed values

追加・ランダム変更・固定・比較Add, randomize, pin, and compare

パネルから宣言を追加し、複数の値を試せます。Add declarations from the panel and explore combinations of values.

開く場所WHERE

パラメーター操作パネルParameter panel

操作手順STEPS

  1. 「+ パラメータ追加」で項目を追加します。数値はスライダーと−/+で調整します。Choose Add parameter. Adjust numbers with sliders or minus / plus buttons.
  2. サイコロでランダムに変更し、変更したくない項目をピンで固定します。Randomize with the dice button and pin values you want to keep.
  3. 比較ボタンを押している間は初期値を確認し、離して調整後に戻します。Hold Compare to view defaults; release it to return to adjusted values.

操作後RESULT現在の調整と初期値の違いを確認できます。You can compare the current adjustment against the defaults.

05 / 10

ファイル・素材・実行環境Files, assets & runtime

補助ファイルの構成と、ライブラリの読み込みを設定します。Organize supporting files and configure how libraries are loaded.

操作の流れ(説明図)Workflow diagram
  1. ファイル・素材Files & assets
  2. 読み込み設定Loading settings
  3. プレビューPreview

複数ファイルを作成・編集するCreate and edit project files

メインコードに加え、JavaScript・HTML・CSS・データを管理できます。Manage scripts, HTML, CSS, and data alongside the main code.

開く場所WHERE

作品設定(上部バーのフォルダーアイコン) → プロジェクトファイルWork settings (folder icon in top bar) → Project files

操作手順STEPS

  1. ファイルを追加し、lib/math.mjsなどの相対パスを指定します。Add a file with a relative path such as lib/math.mjs.
  2. エディターのタブで編集するファイルを切り替えます。Switch files with the editor tabs.
  3. 実行環境で実行方式と開始ファイル、必要な読み込み順を指定します。Choose the execution mode, entry file, and any required load order in Runtime.

操作後RESULT複数ファイルを含む一つの作品として編集・保存できます。Edit and save multiple files as one work.

素材の取り込み・プレビュー・読み込みコードImport, inspect, and load assets

画像・音声・フォント・データを取り込み、使うパスを確認します。Import images, audio, fonts, and data, and inspect their paths.

開く場所WHERE

作品設定(上部バーのフォルダーアイコン) → 作品の素材 → 素材を選択Work settings (folder icon in top bar) → Work assets → select an asset

操作手順STEPS

  1. 素材をインポートして一覧から選びます。Import an asset and select it in the list.
  2. 対応する画像・フォントの表示や音声の再生で内容を確認します。Preview supported images and fonts, or play supported audio.
  3. 読み込みコードを挿入し、assets/photo.pngなどのパスで参照します。Insert loading code and reference the path, for example assets/photo.png.

操作後RESULT素材の名前・パスとコードの参照先をそろえられます。The source code can reference the correct asset path.

素材の名前とコードの参照を変更するRename assets and update references

素材のリネーム時に、コード内の一致するパスも確認できます。Review matching source paths when renaming an asset.

開く場所WHERE

作品の素材 → 名前変更Work assets → Rename

操作手順STEPS

  1. 変更する素材と新しい名前を指定します。Select the asset and enter its new name.
  2. 提示されたコード内の一致箇所を確認し、更新する参照を選びます。Review the listed matches and select the references to update.
  3. 確定後に実行し、素材が読み込まれることを確認します。Confirm, run the work, and check that the asset loads.

操作後RESULT選んだリテラルの参照先を新しい名前に合わせられます。Selected literal references can follow the new asset name.

p5.js・p5.sound・外部ライブラリChoose p5.js, p5.sound, and external libraries

作品ごとにp5.jsの版と追加ライブラリを選びます。Choose the p5.js version and libraries for each work.

開く場所WHERE

作品設定(上部バーのフォルダーアイコン) → 実行環境Work settings (folder icon in top bar) → Runtime

操作手順STEPS

  1. 標準の2.3.4、または従来作品向けの1.11.5を選びます。Select the current 2.3.4 or legacy 1.11.5 runtime.
  2. 音声を使う場合はp5.soundを有効にします。Enable p5.sound if the work uses audio.
  3. 必要な同梱ライブラリや外部HTTPSライブラリを設定して保存します。Configure bundled or external HTTPS libraries as needed and save.

操作後RESULT選択した環境で作品を実行できます。The work runs with the selected environment.

自動・通常JS・モジュール・HTMLの読み込みAutomatic, classic JS, module, and HTML loading

作品の構成に合わせ、開始ファイルと読み込み順を選びます。Choose an entry file and load order for the project structure.

開く場所WHERE

実行環境 → プロジェクトの読み込み設定Runtime → Project loading settings

操作手順STEPS

  1. HTML作品では開始HTML、モジュール作品では開始モジュールを指定します。Choose the HTML entry document or the module entry.
  2. 通常JSではファイル順と外部HTTPSライブラリの順序を指定します。外部ライブラリは通常JS/モジュールを選べます。HTMLではscriptタグを使います。Set file order and external HTTPS library order for classic JS. External libraries can be classic scripts or modules. In HTML, use script tags.
  3. モジュールのimportには相対パス、URL、またはHTMLのimport mapを使います。Use relative paths, URLs, or an HTML import map for module imports.

操作後RESULT設定はedit-rin.jsonにも保存されます。The configuration is also stored in edit-rin.json.

lib/math.mjsを追加Add lib/math.mjs
export const diameter = 120;
開始モジュール:main.mjsModule entry: main.mjs
import { diameter } from './lib/math.mjs';

window.setup = function () { createCanvas(400, 280); };
window.draw = function () {
  background(242);
  circle(200, 140, diameter);
};

ファイル数・容量・読み込みの制約File counts, sizes, and loading limits

読み込みに失敗したら、対象のファイル構成と容量を確認します。Check project structure and size when loading fails.

開く場所WHERE

プロジェクトファイル/作品の素材/ログProject files / Work assets / log

操作手順STEPS

  1. テキストは500ファイル・合計16 MiB以内にします。Keep project text within 500 files and 16 MiB total.
  2. 素材は1ファイル50 MiB、100ファイル・合計200 MiB以内にします。Keep assets within 50 MiB each, 100 files, and 200 MiB total.
  3. 外部URLのCORSと、HTMLのCSPによる制限も確認します。Also check external URL CORS and the HTML document’s CSP.

操作後RESULT容量と読み込み方式のどちらを見直すか判断できます。You can identify whether to adjust capacity or loading configuration.

p5.brush・Matter.jsを使うUse p5.brush and Matter.js

水彩や鉛筆の表現、剛体・重力・衝突を追加できます。Add watercolor and pencil effects, or rigid bodies, gravity, and collisions.

開く場所WHERE

実行環境 → 作品のライブラリRuntime → Work libraries

操作手順STEPS

  1. p5.brush 2.2.1、matter-js 0.20.0から必要なものを有効にします。Enable p5.brush 2.2.1 or matter-js 0.20.0 as needed.
  2. p5.brushではp5.js 2.3.4とWEBGLを使います。Use p5.js 2.3.4 and WEBGL for p5.brush.
  3. 対応するサンプルやテンプレートで構成を確認してから編集します。Inspect a corresponding sample or template before editing.

操作後RESULT追加したライブラリのAPIをコードから使えます。The library’s APIs become available in the source.

06 / 10

描画・入力Drawing & interaction

2Dから3D、シェーダー、物理演算、入力イベントまで。Explore 2D, 3D, shaders, physics, and input events.

操作の流れ(説明図)Workflow diagram
  1. 実行環境Runtime
  2. 描画・入力コードDrawing & input
  3. 結果を確認Inspect output

2Dの図形とアニメーション2D shapes and animation

setup()でキャンバスを作り、draw()で描画を繰り返します。Create a canvas in setup() and draw repeatedly in draw().

開く場所WHERE

新規作成 → 2D/アニメーションCreate work → 2D / Animation

操作手順STEPS

  1. 2Dテンプレートから作品を作成します。Create a work from the 2D template.
  2. createCanvas()、background()、circle()などを編集します。Edit calls such as createCanvas(), background(), and circle().
  3. 実行し、frameCountを使って位置や色を変えます。Run it and use frameCount to vary position or color.

操作後RESULTコードの値と描画の関係を確かめられます。You can observe the relation between source values and drawing.

p5.js 2.3.4・追加ライブラリ不要p5.js 2.3.4 · no additional libraries
function setup() {
  createCanvas(400, 280);
}
function draw() {
  background('#F1F1EA');
  noStroke();
  fill('#B85338');
  let x = 200 + sin(frameCount * 0.025) * 100;
  circle(x, 140, 70);
}
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

WebGL・3D描画・物理演算WebGL, 3D, and physics

WEBGLでは3D描画、Matter.jsでは2D物理演算を使えます。Use WEBGL for 3D and Matter.js for 2D physics.

開く場所WHERE

新規作成 → WebGL/物理演算テンプレートCreate work → WebGL / physics template

操作手順STEPS

  1. WebGLテンプレートでcreateCanvas(..., WEBGL)を確認します。Inspect createCanvas(..., WEBGL) in a WebGL template.
  2. 物理演算ではMatter.jsを有効にし、物体と床をワールドへ追加します。For physics, enable Matter.js and add a body and floor to the world.
  3. 実行し、回転や重力の変化を確認します。Run the work and inspect rotation or gravity.

操作後RESULT3Dの描画と、物理演算による位置の更新を確認できます。Observe 3D drawing and positions updated by a physics engine.

p5.js 2.3.4・WEBGLp5.js 2.3.4 · WEBGL
function setup() { createCanvas(400, 280, WEBGL); }
function draw() {
  background('#F1F1EA');
  rotateX(frameCount * 0.008);
  rotateY(frameCount * 0.012);
  normalMaterial();
  box(110);
}
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

シェーダーでピクセルを描画するDraw pixels with shaders

頂点・フラグメントシェーダーから画面の色を計算できます。Calculate output colors with vertex and fragment shaders.

開く場所WHERE

新規作成 → シェーダーテンプレートCreate work → shader template

操作手順STEPS

  1. WEBGLのキャンバスを作ります。Create a WEBGL canvas.
  2. createShader()で頂点とフラグメントのソースを指定します。Pass vertex and fragment sources to createShader().
  3. shader()で適用し、描画する図形を指定します。Apply it with shader() and draw geometry.

操作後RESULTフラグメントの計算がキャンバスの色として表示されます。The fragment calculations appear as colors on the canvas.

p5.js 2.3.4・WEBGL/GLSLp5.js 2.3.4 · WEBGL / GLSL
const vertexSource = `
precision highp float;
attribute vec3 aPosition;
varying vec2 uv;
void main() {
  uv = (aPosition.xy + 1.0) * 0.5;
  gl_Position = vec4(aPosition, 1.0);
}`;
const fragment = `
precision highp float;
varying vec2 uv;
void main() {
  gl_FragColor = vec4(uv.x, 0.3, uv.y, 1.0);
}`;
let gradient;
function setup() {
  createCanvas(400, 280, WEBGL);
  gradient = createShader(vertexSource, fragment);
  noStroke();
}
function draw() {
  shader(gradient);
  beginShape(TRIANGLE_STRIP);
  vertex(-1, -1, 0); vertex(1, -1, 0);
  vertex(-1, 1, 0); vertex(1, 1, 0);
  endShape();
}
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

重力と衝突を試すTry gravity and collisions

Matter.jsのエンジンを進め、計算した物体の位置を描画します。Advance a Matter.js engine and draw the calculated body positions.

開く場所WHERE

実行環境 → 作品のライブラリ → matter-jsRuntime → Work libraries → matter-js

操作手順STEPS

  1. エンジン、動く物体、固定した床を作成します。Create an engine, a moving body, and a static floor.
  2. すべてをワールドに追加します。Add them to the world.
  3. draw()でエンジンを更新し、物体の位置を描画します。Update the engine in draw() and draw the body at its calculated position.

操作後RESULT物体が落下し、床との衝突に応じて動きます。The body falls and responds to collisions with the floor.

p5.js 2.3.4+matter-js 0.20.0を有効化p5.js 2.3.4 + enable matter-js 0.20.0
let engine, ball;
function setup() {
  createCanvas(400, 280);
  engine = Matter.Engine.create();
  ball = Matter.Bodies.circle(200, 40, 24, { restitution: 0.75 });
  const floor = Matter.Bodies.rectangle(200, 270, 400, 20, { isStatic: true });
  Matter.Composite.add(engine.world, [ball, floor]);
}
function draw() {
  Matter.Engine.update(engine, 1000 / 60);
  background('#F1F1EA');
  noStroke();
  fill('#426B5D'); rect(0, 260, 400, 20);
  fill('#B85338'); circle(ball.position.x, ball.position.y, 48);
}
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

WebGPUの対応状況を確認するCheck WebGPU support

同梱の公式WebGPUアドオンを使う作品を実行できます。Run works using the bundled official WebGPU addon.

開く場所WHERE

サンプル/新規作成 → WebGPUSamples / Create work → WebGPU

操作手順STEPS

  1. p5.js 2.3.4のWebGPU作品を開きます。Open a WebGPU work using p5.js 2.3.4.
  2. 実行して描画とログを確認します。Run it and check the drawing and log.
  3. 未対応なら端末とAndroid WebViewの対応状況を確認します。If unsupported, check the device and Android WebView capabilities.

操作後RESULTその端末で作品を実行できるか確認できます。Determine whether the work runs on that device.

タッチ・マウス・キーボード入力Touch, mouse, and keyboard input

プレビューの操作を、作品のイベントと座標として利用できます。Use preview interactions as events and coordinates in the work.

開く場所WHERE

新規作成 → マウス/タッチCreate work → Mouse / Touch

操作手順STEPS

  1. mouseX・mouseY、またはtouchesから座標を読みます。Read coordinates from mouseX / mouseY or touches.
  2. mousePressed()・touchStarted()などでタップ時の処理を書きます。Handle presses or taps in mousePressed() or touchStarted().
  3. 外付けキーボードを使う作品では、入力フォーカスとkeyPressed()も確認します。For an external keyboard, check input focus and keyPressed().

操作後RESULT入力に応じて位置や色を変える作品を作れます。Create works that change position or color in response to input.

p5.js 2.3.4・キャンバスを操作p5.js 2.3.4 · interact with the canvas
let ink = '#B85338';
function setup() { createCanvas(400, 280); }
function draw() {
  background('#F1F1EA');
  noStroke(); fill(ink);
  circle(mouseX, mouseY, 70);
}
function mousePressed() { ink = ink === '#B85338' ? '#426B5D' : '#B85338'; }
function touchStarted() { mousePressed(); return false; }
コードを実行LIVE CODE上のコード例をブラウザーで描画Runs the example above in your browser

実行で開始します。停止・初期化できます。パラメーターとウォッチは、この例専用の補助処理でアプリの連携を再現します。Press Run to start; stop or reset at any time. Example-specific helpers reproduce parameter and watch integration.

実行すると、ここに描画します。Run the example to draw here.

未実行Not started

インスタンスと複数キャンバスInstances and multiple canvases

new p5(...)で独立した描画を同じ作品に配置できます。Use new p5(...) for independent sketches in one work.

開く場所WHERE

プロジェクトファイル/HTML作品Project files / HTML work

操作手順STEPS

  1. それぞれのインスタンスでsetup()とdraw()を定義します。Define setup() and draw() for each instance.
  2. HTMLでは配置先を作り、CSSでレイアウトを指定します。In HTML, create mount points and arrange them with CSS.
  3. 複数キャンバスを表示し、一時停止や画像出力を確認します。Display the canvases and inspect pause and capture behavior.

操作後RESULT複数の描画領域を持つ作品になります。The work has multiple drawing surfaces.

07 / 10

カメラ・音声・センサーCamera, audio & sensors

必要な設定と、端末の権限・対応条件を確認します。Check settings, device permissions, and compatibility requirements.

操作の流れ(説明図)Workflow diagram
  1. コード・ライブラリCode & libraries
  2. 権限・対応確認Permissions & support
  3. 端末で試すTry on device

カメラ映像を描画するDraw a camera feed

createCapture(VIDEO)から映像を受け取り、キャンバスに描画します。Receive a feed through createCapture(VIDEO) and draw it on the canvas.

開く場所WHERE

作品コード → Androidのカメラ権限Work code → Android camera permission

操作手順STEPS

  1. createCapture(VIDEO)で映像を作り、必要なら元のvideo要素をhide()します。Create a feed with createCapture(VIDEO), optionally hiding its video element with hide().
  2. Androidの権限確認でカメラへのアクセスを許可します。Allow camera access in the Android permission prompt.
  3. draw()でimage()を使い、映像を描画します。Draw the feed with image() in draw().

操作後RESULTカメラの映像を作品の描画に使えます。The work can incorporate camera input.

コード例Code example
let camera;
function setup() {
  createCanvas(400, 300);
  camera = createCapture(VIDEO);
  camera.size(400, 300);
  camera.hide();
}
function draw() {
  background(242);
  image(camera, 0, 0, width, height);
}

音声ファイルの再生とp5.soundPlay audio with p5.sound

素材として追加した音声を読み込み、ユーザー操作から再生します。Load an audio asset and start playback from a user action.

開く場所WHERE

実行環境 → p5.sound/作品の素材Runtime → p5.sound / Work assets

操作手順STEPS

  1. p5.soundを有効にし、音声ファイルを素材に追加します。Enable p5.sound and add an audio asset.
  2. 2.xではasync setup()でawait loadSound()、1.xではpreload()で読み込みます。In 2.x, await loadSound() in async setup(); in 1.x, load it in preload().
  3. プレビューをタップするなどの操作から音声を開始します。Start audio from an action such as tapping the preview.

操作後RESULT描画と音声を組み合わせて実行できます。Run a work combining visuals and sound.

コード例Code example
// p5.js 2.x + p5.sound; add assets/music.mp3 first.
let sound;
async function setup() {
  createCanvas(400, 400);
  sound = await loadSound('assets/music.mp3');
}
function mousePressed() {
  if (sound && !sound.isPlaying()) sound.play();
}

マイク音量で描画を変えるDraw in response to microphone level

入力音量を読み取り、図形の大きさなどに使います。Read input level and use it to control shapes or other drawing values.

開く場所WHERE

実行環境 → p5.sound/Androidのマイク権限Runtime → p5.sound / Android microphone permission

操作手順STEPS

  1. コードに対応したp5.jsとp5.soundの組み合わせを選びます。Select matching p5.js and p5.sound versions.
  2. ユーザー操作からマイク入力を開始し、Androidの権限を許可します。Start microphone input from a user action and allow the Android permission.
  3. 取得した入力レベルをdraw()内の描画に使います。Use the input level in draw().

操作後RESULT音量に応じて作品の見た目が変わります。The artwork responds to input loudness.

コード例Code example
// p5.js 1.11.5 + legacy p5.sound
let mic;
function setup() {
  createCanvas(400, 400);
  mic = new p5.AudioIn();
}
function mousePressed() {
  userStartAudio();
  mic.start();
}
function draw() {
  background(242);
  circle(200, 200, 30 + (mic ? mic.getLevel() : 0) * 300);
}

傾き・加速度・シェイクを使うUse tilt, acceleration, and shake

端末の向きや動きを、数値やイベントとして作品に渡します。Use device orientation and movement as values and events.

開く場所WHERE

作品コード → センサーの変数・イベントWork code → sensor variables and events

操作手順STEPS

  1. rotationX/Y/ZやaccelerationX/Y/Zを描画で参照します。Read rotationX / Y / Z or accelerationX / Y / Z in drawing code.
  2. deviceMoved()・deviceTurned()・deviceShaken()で動作を指定します。Define reactions in deviceMoved(), deviceTurned(), or deviceShaken().
  3. 実機で端末を動かし、値とイベントを確認します。Move the physical device to check values and events.

操作後RESULT端末の動きに応じた作品を作れます。Create works responding to device motion.

コード例Code example
let ink = '#D67856';
function setup() { createCanvas(400, 400); }
function draw() {
  background(242);
  let x = map(constrain(rotationY, -45, 45), -45, 45, 30, 370);
  let y = map(constrain(rotationX, -45, 45), -45, 45, 30, 370);
  fill(ink);
  circle(x, y, 40 + min(abs(accelerationX) * 3, 60));
}
function deviceShaken() {
  ink = ink === '#D67856' ? '#678C76' : '#D67856';
}

ファイル選択・全画面・リンクFile picker, fullscreen, and links

作品から端末の選択画面や全画面表示を利用できます。Open a device file picker or request fullscreen from a work.

開く場所WHERE

createFileInput()/fullscreen()/HTMLリンクcreateFileInput() / fullscreen() / HTML links

操作手順STEPS

  1. createFileInput()のコールバックで選択結果を受け取ります。Receive selected files in the createFileInput() callback.
  2. 全画面表示はタップなどのユーザー操作から要求します。Request fullscreen from a user gesture such as a tap.
  3. 外部HTTPSリンクと作品内HTMLへのリンクを使い分けます。Distinguish external HTTPS links from links to project HTML.

操作後RESULT外部リンクは端末のブラウザー、作品内HTMLはプレビューで開けます。External links can open in the device browser; project HTML opens in the preview.

コード例Code example
function setup() {
  createCanvas(400, 400);
  createFileInput(file => {
    console.log(file.name, file.type);
  }, true);
  createButton('Fullscreen').mousePressed(() => fullscreen(true));
}

08 / 10

保存・履歴・復旧Save, history & recovery

現在の保存、過去の版、未保存の下書きを区別します。Distinguish current saves, earlier versions, and unsaved drafts.

操作の流れ(説明図)Workflow diagram
  1. 編集中の内容Working state
  2. 保存・スナップショットSave / snapshot
  3. 確認・復元Inspect / restore

保存と保存済みへの復帰Save and revert to the last save

編集中の作品を保存し、必要なら最後の保存状態に戻します。Save the work, or return to its last saved state.

開く場所WHERE

保存ボタン/同じ操作エリアの履歴メニューSave button / History in the same control area

操作手順STEPS

  1. 保存ボタンを押し、完了状態を確認します。Press Save and check that saving completes.
  2. 最後の保存へ戻す場合は、履歴から「保存済み状態に戻す」を選びます。To return to the last save, choose Revert to saved in History.
  3. 破棄する変更を確認してから確定します。Check which edits will be discarded before confirming.

操作後RESULT保存は作品の全ファイルを対象にします。復帰すると最後に保存した内容になります。Saving covers all work files. Reverting returns to the last saved contents.

スナップショットの作成・差分・復元Create, compare, and restore snapshots

作品の過去の状態を、名前やメモ付きで保持できます。Keep earlier work states with names and notes.

開く場所WHERE

履歴 → スナップショットHistory → Snapshots

操作手順STEPS

  1. 残したい状態でスナップショットを作成します。Create a snapshot at the state you want to retain.
  2. 名前やメモを付け、現在の内容との差分を確認します。Add a name or note and inspect differences from the current contents.
  3. 戻したい版を選び、確認して復元します。Select the version to restore and confirm.

操作後RESULT選んだ版の内容を再び編集できます。Resume editing from the selected version.

保存時の変更履歴を開くInspect saved revision history

過去に保存したコードを確認し、選んだ保存状態へ戻せます。Inspect previously saved code and return to a chosen revision.

開く場所WHERE

作品メニュー → 変更履歴Work menu → Revision history

操作手順STEPS

  1. 保存履歴がある自分の作品を開きます。Open one of your works with saved revisions.
  2. 変更履歴から過去の保存状態を選び、内容を確認します。Select a revision in history and inspect its contents.
  3. 復元したい状態を確認して適用します。Check the desired state and apply the restore.

操作後RESULT選んだ保存履歴のコードへ戻れます。Return to the code in the selected saved revision.

下書き復旧・自動保存・保存失敗Draft recovery, auto-save, and failed saves

未保存の変更を復旧し、保存エラーが起きた場合も内容を確認できます。Recover unsaved edits and review recovery options after a save error.

開く場所WHERE

設定 → 保存 → 未保存のコードを復元/アプリを離れるときに自動保存Settings → Save → Recover unsaved edits / Auto-save when leaving the app

操作手順STEPS

  1. 必要な復旧・自動保存の設定を有効にします。Enable the recovery and auto-save settings you need.
  2. 復旧確認が出たら、作品名と内容を確認して適用します。When prompted for recovery, check the work and contents before applying.
  3. 保存に失敗したら表示された再試行や復旧方法を使います。If saving fails, use the retry or recovery actions shown.

操作後RESULT互換性のある下書きから編集を再開できます。Resume editing from a compatible draft.

09 / 10

書き出し・共有Export & share

画像・動画・コード・作品一式を、用途に合わせて書き出します。Choose media, source, or project exports for the task.

操作の流れ(説明図)Workflow diagram
  1. 出力形式を選ぶChoose format
  2. 保存するSave
  3. 開く・共有Open / share

PNGを1倍・2倍・4倍で保存するCapture PNG at 1×, 2×, or 4×

表示中のキャンバスをPNG画像として保存します。Save the visible canvases as a PNG image.

開く場所WHERE

プレビュー操作 → カメラ → PNG画像書き出しPreview controls → camera → Export PNG image

操作手順STEPS

  1. 出力倍率を1倍・2倍・4倍から選びます。Choose 1×, 2×, or 4× output.
  2. 出力を実行して保存完了を待ちます。Export and wait for saving to complete.
  3. 保存した画像を開くか、他のアプリへ共有します。Open the saved image or share it through another app.

操作後RESULT複数キャンバスがある場合は、表示中のキャンバスを合成します。Visible canvases are combined when there are several.

MP4・GIF録画と保存の再試行Record MP4 / GIF and retry saving

作品の動きを録画して保存・共有できます。Record the work’s motion, then save and share it.

開く場所WHERE

プレビュー操作 → 録画/設定 → 録画と共有Preview controls → recording / Settings → Recording and sharing

操作手順STEPS

  1. MP4またはGIFを選び、録画を開始します。Select MP4 or GIF and start recording.
  2. 必要な動きを記録して停止し、保存結果を確認します。Record the desired motion, stop, and check the save result.
  3. 保存失敗時は「もう一度保存」か「別の保存先を選ぶ」を選びます。If saving fails, choose Retry saving or Choose another destination.

操作後RESULT保存した録画を開くか、他のアプリへ渡せます。Open the saved recording or share it through another app.

JS・作品ZIP・単一HTMLを選ぶChoose JavaScript, work ZIP, or single HTML

書き出したい内容と利用先に合わせて形式を選びます。Select a format based on the contents and destination.

開く場所WHERE

作品メニュー → JSを書き出す・作品ZIPを書き出す・HTMLを書き出す(単一HTML)/設定 → 保存 → Export .jsWork menu → Export JS, Export work ZIP, Export HTML (single HTML) / Settings → Save → Export .js

操作手順STEPS

  1. コード単体には.js、補助ファイル・素材・設定も移す場合は作品ZIPを使います。Use .js for code alone or work ZIP to include supporting files, assets, and settings.
  2. ブラウザーで使う場合は単一HTMLを書き出します。Export single HTML for browser use.
  3. 出力先で開き、依存ファイルとライブラリの読み込みを確認します。Open the export at its destination and check dependencies and library loading.

操作後RESULT目的に合った形式で作品を渡せます。You can transfer the work in an appropriate format.

形式Format 含めたいもの・用途Contents / use 確認点Check
.js.jsコード単体Source code alone素材や実行設定は別途必要Assets and runtime settings are separate
作品ZIPWork ZIP一作品のコード・補助ファイル・素材・設定One work’s source, files, assets, and settingsEdit:RiNへの取り込み後に実行確認Check execution after import into Edit:RiN
単一HTMLSingle HTMLブラウザーで使う作品Browser useCDN・外部素材・依存関係CDNs, remote assets, dependencies
全体バックアップFull backup作品集・自作テンプレート・設定Collection, custom templates, settings復元できるファイルを保管Retain the restorable file

p5.jsの保存関数とダウンロードp5.js save functions and downloads

作品のコードから画像やデータの保存を要求できます。Request image or data downloads from sketch code.

開く場所WHERE

saveCanvas()など/HTMLのdownloadリンクsaveCanvas() and related APIs / HTML download links

操作手順STEPS

  1. タップなどの操作から、対象に合う保存関数を呼びます。Call the appropriate save function from an action such as a tap.
  2. Android側で保存が終わったことを確認します。Check that saving finishes on Android.
  3. Download/Edit-RiNで保存したファイルを確認します。Check the saved file in Download/Edit-RiN.

操作後RESULT画像、JSON、文字列、表などを対応する形式で保存できます。Save images, JSON, strings, tables, and other supported formats.

コード例Code example
function setup() { createCanvas(400, 400); }
function draw() { background(242); circle(200, 200, 120); }
function mousePressed() { saveCanvas('my-work', 'png'); }

投稿用にコードを圧縮するCompress code for posting

投稿向けにコードを短くし、結果を試してから適用できます。Shorten code for posting and test the result before applying it.

開く場所WHERE

作品メニュー → Minify & シェアWork menu → Minify & Share

操作手順STEPS

  1. 圧縮画面を開き、結果を読みます。Open compression and inspect the output.
  2. 「試す」で圧縮後のコードを実行します。Choose Test to execute the compressed code.
  3. 動作を確認してから「本文に反映」または「コピー & 共有」を選びます。After checking behavior, choose Apply to Editor or Copy & Share.

操作後RESULT確認した圧縮結果を編集や投稿に使えます。Use the reviewed result for editing or posting.

文字数・改行・ハッシュタグの設定Character targets, newlines, and hashtags

圧縮の条件と文字数の目標を変更できます。Configure compression options and character targets.

開く場所WHERE

作品メニュー → #つぶやきProcessingモード/Minify & シェアWork menu → #つぶやきProcessing mode / Minify & Share

操作手順STEPS

  1. 目標を140または280文字から選びます。Choose a target of 140 or 280 characters.
  2. 改行優先とハッシュタグの埋め込み方法を設定します。Configure newline preference and hashtag embedding.
  3. 結果の文字数とコードを確認し、実行してから共有します。Inspect count and source, run the result, then share.

操作後RESULT投稿用の条件に合わせて圧縮結果を調整できます。Adjust the compressed output for posting constraints.

画像・コード・QRの共有カードShare cards with artwork, code, and QR

作品画像に作者名やコードを添えた共有用の画像を作れます。Create a shareable image combining artwork, author, and code.

開く場所WHERE

プレビュー操作 → シェアカードPreview controls → Share card

操作手順STEPS

  1. シェアカード画面で作者クレジットとQRリンクを指定します。Set the author credit and QR URL in the Share card sheet.
  2. コードの表示、行範囲、テーマ(ダーク・ライト・墨)を調整します。Adjust code visibility, line range, and theme (Dark, Light, or Sumi).
  3. プレビューを確認して保存・共有します。Inspect the preview, then save or share it.

操作後RESULT作品紹介用の画像を作れます。Create an image for presenting the work.

10 / 10

整理・バックアップ・設定Organize, back up & configure

作品を整理し、移行に備え、使いやすい表示や保存方法を選びます。Organize works, prepare for migration, and configure appearance and saving.

操作の流れ(説明図)Workflow diagram
  1. 整理・設定Organize & configure
  2. バックアップBack up
  3. 移行・復元Migrate / restore

作品の名前・複製・フォルダー・タグNames, copies, folders, and tags

作品一覧と作品メニューから分類・一括操作を行えます。Classify works and perform batch actions in the work picker and work menu.

開く場所WHERE

作品名 → 自分の作品/作品メニュー → テンプレート・ピン・タグ・名前・複製Work title → My works / Work menu → Templates, pin, tags, rename, duplicate

操作手順STEPS

  1. 名前変更や複製を使い、作品を区別します。Rename or duplicate works to distinguish them.
  2. フォルダー・タグ・検索・並べ替えで絞り込みます。Use folders, tags, search, and sorting to narrow the list.
  3. 複数選択し、移動・タグ付け・ZIP出力・削除をまとめて行います。Select multiple works to move, tag, export as ZIP, or delete.

操作後RESULT目的の作品を見つけ、まとめて管理できます。Find and manage the desired works together.

全体バックアップを作成・復元するCreate and restore a full backup

自分の作品・自作テンプレート・設定をまとめて移せます。Transfer your works, custom templates, and settings together.

開く場所WHERE

設定 → バックアップ → ZIP保存/復元Settings → Backup → Save ZIP / Restore

操作手順STEPS

  1. 機種変更や再インストールの前にバックアップをエクスポートします。Export a full backup before migration or reinstallation.
  2. 出力ファイルができたことを確認し、別の場所に保管します。Check that the output exists and keep a copy elsewhere.
  3. 復元先でインポートを選び、そのバックアップファイルを指定します。Choose import on the destination and select that backup file.

操作後RESULT作品一式と関連する設定を復元できます。Restore the collection and related settings.

外部保存先とクラウド同期External storage and cloud synchronization

作品を保存するフォルダーを選択できます。Choose the folder where works are saved.

開く場所WHERE

設定 → 保存 → 作品フォルダー → 保存先を変更Settings → Save → Work folder → Change folder

操作手順STEPS

  1. 現在の保存先を確認し、先にバックアップを作ります。Check the current location and create a backup first.
  2. 保存先を変更し、Androidのフォルダー選択画面でアクセスを許可します。Change the destination and grant access in Android’s folder picker.
  3. 作品の読み込みと保存を確認します。Check that works load and save.

操作後RESULT選択したフォルダーを保存先として利用できます。Use the selected folder for work storage.

テーマ・言語・フォント・システムバーTheme, language, fonts, and system bars

画面の配色と文字、端末のバー表示を調整します。Configure colors, text, and system bar visibility.

開く場所WHERE

設定 → 外観Settings → Appearance

操作手順STEPS

  1. 自動・ダーク・ライト・Sumi・カスタムからテーマを選びます。Choose Automatic, Dark, Light, Sumi, or Custom.
  2. 日本語・英語・簡体字中国語、または端末に合わせる言語設定を選びます。Choose Japanese, English, Simplified Chinese, or system language.
  3. 必要ならTTF・OTF・TTCを読み込み、連字やバーの表示を調整します。Optionally import TTF, OTF, or TTC fonts and configure ligatures and bars.

操作後RESULT自分の読みやすい表示で編集できます。Edit with your preferred presentation.

文字サイズ・インデント・編集キーの設定Font size, indentation, and accessory settings

エディターの表示と入力補助をまとめて調整します。Configure editor presentation and input assistance.

開く場所WHERE

設定 → エディターSettings → Editor

操作手順STEPS

  1. 文字サイズ、自動インデント、行番号、折り返しを選びます。Choose font size, auto-indent, line numbers, and wrapping.
  2. 入力候補とインライン変数ウォッチを必要に応じて切り替えます。Toggle completion and inline watch as needed.
  3. 編集キー、移動キー、記号キーとキーの表示幅を調整します。Configure accessory, navigation, and symbol keys and their compact layout.

操作後RESULT入力時の表示量と補助機能を調整できます。Adjust visible source and the assistance offered while typing.

録画条件・X共有文の設定Recording and X sharing preferences

録画のカウントダウン、画質、X共有時の定型文を設定します。Configure recording countdown, quality, and preset text for X sharing.

開く場所WHERE

設定 → 録画と共有Settings → Recording and sharing

操作手順STEPS

  1. 録画のカウントダウン秒数(オフ・3秒・5秒)を選びます。Choose the recording countdown (Off, 3s, or 5s).
  2. MP4のビットレートを調整します。Adjust the MP4 bitrate.
  3. X共有の定型文(ハッシュタグなど)を入力します。Enter the preset text (such as hashtags) for X sharing.

操作後RESULT以後の録画・共有操作で設定を使えます。The preferences are available for subsequent recording and sharing.

アプリ内ガイド・ツアー・更新In-app guide, tours, and updates

アプリ内で操作を学び、更新情報を確認できます。Learn controls in the app and inspect updates.

開く場所WHERE

設定 → About → 使い方ガイド・ツアー・アップデートを確認Settings → About → User Guide, tours, Check for updates

操作手順STEPS

  1. 使い方ガイド、または入門ツアーを開きます。Open the user guide or introductory tour.
  2. 実践ツアーでウォッチ・パラメーター・圧縮の操作を試します。Try watch values, parameters, and compression in the practice tour.
  3. 更新を確認し、ダウンロードとAndroidのインストール案内に従います。Check for updates and follow the download and Android installation prompts.

操作後RESULT機能の使い方と、利用中の版・更新内容を確認できます。Inspect how features work, the installed version, and update information.

オフラインで使える機能と必要環境Offline use and requirements

ネット接続が必要な処理と、端末内で完結する作業を確認します。Distinguish local work from operations requiring internet access.

開く場所WHERE

Android 11以降/端末のAndroid WebViewAndroid 11 or later / installed Android WebView

操作手順STEPS

  1. 同梱ランタイムで作品を作り、編集・実行します。Create, edit, and run using bundled runtimes.
  2. 外部素材やCDNを使う作品では接続を確認します。Check connectivity when a work uses remote assets or CDNs.
  3. 公開作品の取り込みやアプリの更新では、ネット接続を使います。Connect when importing public sketches or downloading updates.

操作後RESULT基本の編集・実行と同梱ライブラリはオフラインで使えます。Basic editing, execution, and bundled libraries work offline.

症状から確認するTroubleshoot by symptom

起きている症状から、確認する設定と説明へ進めます。Start from a symptom to find settings and relevant instructions.

開く場所WHERE

ログ/設定/該当機能の説明Log / Settings / the relevant feature instructions

操作手順STEPS

  1. 変更が出ない場合は実行操作とAuto-Run、エラー時はログの最初の行を確認します。For stale output, check Run changes and Auto-Run. For errors, read the first log entry.
  2. 音声はp5.sound・版・開始操作、カメラとマイクはAndroidの権限を確認します。For audio, check p5.sound, version, and start gesture. For camera and microphone, check Android permissions.
  3. 保存失敗時は編集内容を残し、再試行や復旧の案内に従います。For failed saves, keep the editor content and follow retry or recovery guidance.

操作後RESULT原因に関係する項目を順番に確認できます。Check the relevant areas in sequence.

症状Symptom 最初に確認することFirst checks
変更が反映されないPreview is stale変更を実行/Auto-RunRun changes / Auto-Run
パラメーターが出ないMissing parameterコメントの書式・重複・合計16個の上限Comment syntax, duplicates, combined limit of 16
バッジが更新されないBadge does not updateウォッチ設定・対象行が実行されるかWatch setting and whether the line executes
音が出ないNo soundp5.sound・対応バージョン・開始のタップp5.sound, matching version, start gesture
映像・マイクが使えないCamera / microphone unavailableAndroidの権限・開始操作・ログAndroid permission, start gesture, log
素材が読めないAsset does not load相対パス・大文字小文字・読み込み方式Relative path, letter case, loading mode
モジュールが読めないModule does not load開始ファイル・相対import・URL・import mapEntry file, relative import, URL, import map
HTMLの操作・保存が使えないHTML controls or saving failCSPで補助スクリプトを禁止していないかWhether CSP blocks helper scripts
録画を保存できないRecording cannot be saved保留中のデータを保持し、再試行か別の保存先Keep pending data; retry or choose another destination
WebGPUが動かないWebGPU unavailable端末のGPUとAndroid WebViewの対応Device GPU and Android WebView support