TurboWarp-AR provides camera-source based AR session and target-state blocks for TurboWarp projects.
A-Frame is optional. Attached selectors receive visible, position, rotation, data-ar-target, and data-ar-confidence attributes.
See the repository README and architecture documentation for build, test, release, and compatibility details.
TurboWarp-AR: complete block reference
All 16 blocks are documented below, including compatibility blocks and blocks available through optional features. Select a block to read its behavior, arguments, default values, and menu choices. Each block has a permanent link.
create AR scene with camera [CAMERA_ID] layer [LAYER]Starts an AR session by acquiring a shared camera-source camera lease.
Block type: COMMAND. Opcode: createARScene. Permanent link
Argument Type Default value Menu choices CAMERA_IDSTRING defaultLAYERSTRING above-stage
LAYERを固定フォームで編集します。数値は有限数値の完全なJSON表記を使用し、範囲と静的な関連入力を検証します。enumは既知候補から選択します。未変更の空白・大小文字・数値表記は原文を保持し、reporterは評価しません。対象外の入力は変更しません。 GUIのDialogs/FixedInputsは起動時既定OFFです。有効にして再読込すると利用できます。
stop AR sceneStops the AR session and releases the shared camera lease.
Block type: COMMAND. Opcode: stopARScene. Permanent link
This block has no arguments.
AR statusReturns the AR session status.
Block type: REPORTER. Opcode: arStatus. Permanent link
This block has no arguments.
AR scene is running?Reports whether the AR session is running.
Block type: BOOLEAN. Opcode: isARSceneRunning. Permanent link
This block has no arguments.
define AR target [TARGET_ID]Creates or resets a named AR target state.
Block type: COMMAND. Opcode: defineARTarget. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1
set AR target [TARGET_ID] visible [VISIBLE] confidence [CONFIDENCE]Updates a target's visibility and confidence using the manual MVP backend.
Block type: COMMAND. Opcode: setARTargetVisible. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1VISIBLEBOOLEAN trueCONFIDENCENUMBER 1
CONFIDENCEを固定フォームで編集します。数値は有限数値の完全なJSON表記を使用し、範囲と静的な関連入力を検証します。enumは既知候補から選択します。未変更の空白・大小文字・数値表記は原文を保持し、reporterは評価しません。対象外の入力は変更しません。VISIBLEはBoolean入力のまま読取専用です。CONFIDENCEに0..1の新制約は加えず、実行時のclampを維持します。 GUIのDialogs/FixedInputsは起動時既定OFFです。有効にして再読込すると利用できます。
set AR target [TARGET_ID] position x [X] y [Y] z [Z]Updates a target's position in AR scene coordinates.
Block type: COMMAND. Opcode: setARTargetPosition. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1XNUMBER 0YNUMBER 0ZNUMBER -1
X・Y・Zを固定フォームで編集します。数値は有限数値の完全なJSON表記を使用し、範囲と静的な関連入力を検証します。enumは既知候補から選択します。未変更の空白・大小文字・数値表記は原文を保持し、reporterは評価しません。対象外の入力は変更しません。 GUIのDialogs/FixedInputsは起動時既定OFFです。有効にして再読込すると利用できます。
set AR target [TARGET_ID] rotation x [X] y [Y] z [Z]Updates a target's Euler rotation in degrees.
Block type: COMMAND. Opcode: setARTargetRotation. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1XNUMBER 0YNUMBER 0ZNUMBER 0
X・Y・Zを固定フォームで編集します。数値は有限数値の完全なJSON表記を使用し、範囲と静的な関連入力を検証します。enumは既知候補から選択します。未変更の空白・大小文字・数値表記は原文を保持し、reporterは評価しません。対象外の入力は変更しません。 GUIのDialogs/FixedInputsは起動時既定OFFです。有効にして再読込すると利用できます。
AR target [TARGET_ID] is visible?Reports whether the target is currently visible.
Block type: BOOLEAN. Opcode: isARTargetVisible. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1
AR target [TARGET_ID] confidenceReturns the target confidence from 0 to 1.
Block type: REPORTER. Opcode: arTargetConfidence. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1
AR target [TARGET_ID] position [AXIS]Returns one axis of the target position.
Block type: REPORTER. Opcode: arTargetPosition. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1AXISSTRING x
AXISを固定フォームで編集します。数値は有限数値の完全なJSON表記を使用し、範囲と静的な関連入力を検証します。enumは既知候補から選択します。未変更の空白・大小文字・数値表記は原文を保持し、reporterは評価しません。対象外の入力は変更しません。 GUIのDialogs/FixedInputsは起動時既定OFFです。有効にして再読込すると利用できます。
AR target [TARGET_ID] rotation [AXIS]Returns one axis of the target rotation.
Block type: REPORTER. Opcode: arTargetRotation. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1AXISSTRING y
AXISを固定フォームで編集します。数値は有限数値の完全なJSON表記を使用し、範囲と静的な関連入力を検証します。enumは既知候補から選択します。未変更の空白・大小文字・数値表記は原文を保持し、reporterは評価しません。対象外の入力は変更しません。 GUIのDialogs/FixedInputsは起動時既定OFFです。有効にして再読込すると利用できます。
when AR target [TARGET_ID] foundFires once when a target transitions from hidden to visible.
Block type: HAT. Opcode: whenARTargetFound. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1
when AR target [TARGET_ID] lostFires once when a target transitions from visible to hidden.
Block type: HAT. Opcode: whenARTargetLost. Permanent link
Argument Type Default value Menu choices TARGET_IDSTRING marker-1
attach selector [SELECTOR] to AR target [TARGET_ID]Synchronizes matching DOM or A-Frame nodes to an AR target pose.
Block type: COMMAND. Opcode: attachSelectorToARTarget. Permanent link
Argument Type Default value Menu choices SELECTORSTRING #cardTARGET_IDSTRING marker-1
detach selector [SELECTOR] from AR targetStops synchronizing a selector to any AR target.
Block type: COMMAND. Opcode: detachSelectorFromARTarget. Permanent link
Argument Type Default value Menu choices SELECTORSTRING #card
Repository guide and examples