# projapayuri/ar_test architecture

> Architecture diagram of the GitHub repository projapayuri/ar_test, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/projapayuri/ar_test
- Repository: https://github.com/projapayuri/ar_test

## Overview

This repository is a collection of browser-based robot and AR experiments, not a single application. Its clearest end-to-end flow is the `dots` battle demo: a user triggers attacks, the controller updates HP and animation state, and the robot model is displayed in a marker-based AR scene or a camera-free preview. The tree also shows separate robot-animation lessons, marker/model experiments, and small standalone demos. README content is absent, and only the battle controller was sampled, so relationships among the other pages are not asserted.

Main entry points: [`dots/battle.js`](https://github.com/projapayuri/ar_test/blob/main/dots/battle.js) (Battle controller), [`robot.glb`](https://github.com/projapayuri/ar_test/blob/main/robot.glb) (Robot model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_battle["Battle demo"]
  node_battle_controller["Battle controller<br/>[battle.js]"]
  node_ar_scene["AR scene setup<br/>[battle.js]"]
  node_robot_model["Robot model<br/>[robot.glb]"]
  node_dots_battle_page["Battle page<br/>[index.html]"]
  node_dots_battle["Battle interactions<br/>[battle.js]"]
end

subgraph group_lessons["Animation lessons"]
  node_lesson_index["Lesson overview<br/>[index.html]"]
  node_lesson_01["Lesson 01<br/>[01.html]"]
  node_lesson_02["Lesson 02<br/>[02.html]"]
  node_lesson_03["Lesson 03<br/>[03.html]"]
  node_lesson_04["Lesson 04<br/>[04.html]"]
  node_lesson_05["Lesson 05<br/>[05.html]"]
  node_lesson_06["Lesson 06<br/>[06.html]"]
  node_lesson_07["Lesson 07<br/>[07.html]"]
  node_lesson_short["Short lesson<br/>[short.html]"]
  node_lesson_short2["Short lesson 2<br/>[short2.html]"]
end

subgraph group_experiments["AR experiments"]
  node_marker_demo["Two markers<br/>[twoMarkers.html]"]
  node_marker_values["Marker values<br/>[z0and0.5]"]
  node_model_test["Model test<br/>[index.html]"]
  node_mesh_test["Mesh test<br/>[mesh.html]"]
  node_robot_1019["Robot demo 1019<br/>[index.html]"]
  node_robot_1022["Robot demo 1022<br/>[index.html]"]
  node_robot_move["Robot movement<br/>[index.html]"]
  node_robot_photo["Robot photo<br/>[index.html]"]
  node_robot_enlarge["Robot enlarge<br/>[index.html]"]
  node_robot_hand["Hand robot test<br/>[hand-robot.html]"]
  node_robot_hand_fixed["Fixed hand test"]
  node_test_index["Test overview<br/>[index.html]"]
end

subgraph group_standalone["Standalone demos"]
  node_home["Main page<br/>[index.html]"]
  node_boxes["Boxes demo<br/>[boxes.html]"]
  node_box["Box demo<br/>[box.html]"]
  node_card_input["Card input<br/>[cardInput.html]"]
end

node_user(("User"))
node_web_camera["Browser camera"]
node_web_audio["Web Audio"]

node_user -->|"attacks or resets"| node_battle_controller
node_ar_scene -->|"loads model"| node_robot_model
node_ar_scene -->|"requests camera"| node_web_camera
node_battle_controller -->|"plays clips"| node_robot_model
node_battle_controller -->|"plays sound"| node_web_audio

click node_battle_controller "https://github.com/projapayuri/ar_test/blob/main/dots/battle.js"
click node_ar_scene "https://github.com/projapayuri/ar_test/blob/main/dots/battle.js"
click node_robot_model "https://github.com/projapayuri/ar_test/blob/main/robot.glb"
click node_lesson_index "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/index.html"
click node_lesson_01 "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/01.html"
click node_lesson_02 "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/02.html"
click node_lesson_03 "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/03.html"
click node_lesson_04 "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/04.html"
click node_lesson_05 "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/05.html"
click node_lesson_06 "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/06.html"
click node_lesson_07 "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/07.html"
click node_lesson_short "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/short.html"
click node_lesson_short2 "https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/short2.html"
click node_marker_demo "https://github.com/projapayuri/ar_test/blob/main/twoMarkers.html"
click node_marker_values "https://github.com/projapayuri/ar_test/blob/main/z0and0.5"
click node_model_test "https://github.com/projapayuri/ar_test/blob/main/1102test3/index.html"
click node_mesh_test "https://github.com/projapayuri/ar_test/blob/main/1102test3/mesh.html"
click node_robot_1019 "https://github.com/projapayuri/ar_test/blob/main/1019/index.html"
click node_robot_1022 "https://github.com/projapayuri/ar_test/blob/main/1022/index.html"
click node_robot_move "https://github.com/projapayuri/ar_test/blob/main/move/index.html"
click node_robot_photo "https://github.com/projapayuri/ar_test/blob/main/photo/index.html"
click node_robot_enlarge "https://github.com/projapayuri/ar_test/blob/main/enlarge.html/index.html"
click node_robot_hand "https://github.com/projapayuri/ar_test/blob/main/test/hand-robot.html"
click node_robot_hand_fixed "https://github.com/projapayuri/ar_test/blob/main/test/hand-robot-fixed.html"
click node_test_index "https://github.com/projapayuri/ar_test/blob/main/test/index.html"
click node_home "https://github.com/projapayuri/ar_test/blob/main/index.html"
click node_boxes "https://github.com/projapayuri/ar_test/blob/main/boxes.html"
click node_box "https://github.com/projapayuri/ar_test/blob/main/box.html"
click node_card_input "https://github.com/projapayuri/ar_test/blob/main/cardInput.html"
click node_dots_battle_page "https://github.com/projapayuri/ar_test/blob/main/dots/index.html"
click node_dots_battle "https://github.com/projapayuri/ar_test/blob/main/dots/battle.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_battle_controller,node_ar_scene,node_robot_model,node_dots_battle_page,node_dots_battle,node_user,node_web_camera toneBlue
class node_lesson_index,node_lesson_01,node_lesson_02,node_lesson_03,node_lesson_04,node_lesson_05,node_lesson_06,node_lesson_07,node_lesson_short,node_lesson_short2 toneAmber
class node_marker_demo,node_marker_values,node_model_test,node_mesh_test,node_robot_1019,node_robot_1022,node_robot_move,node_robot_photo,node_robot_enlarge,node_robot_hand,node_robot_hand_fixed,node_test_index toneMint
class node_home,node_boxes,node_box,node_card_input toneRose
class node_web_audio toneIndigo
```

## Components

### Battle demo

- [Battle controller](https://github.com/projapayuri/ar_test/blob/main/dots/battle.js): `dots/battle.js`
- [AR scene setup](https://github.com/projapayuri/ar_test/blob/main/dots/battle.js): `dots/battle.js`
- [Robot model](https://github.com/projapayuri/ar_test/blob/main/robot.glb): `robot.glb`
- [Battle page](https://github.com/projapayuri/ar_test/blob/main/dots/index.html): `dots/index.html`
- [Battle interactions](https://github.com/projapayuri/ar_test/blob/main/dots/battle.js): `dots/battle.js`

### Animation lessons

- [Lesson overview](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/index.html): `robot_animation_lesson/index.html`
- [Lesson 01](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/01.html): `robot_animation_lesson/01.html`
- [Lesson 02](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/02.html): `robot_animation_lesson/02.html`
- [Lesson 03](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/03.html): `robot_animation_lesson/03.html`
- [Lesson 04](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/04.html): `robot_animation_lesson/04.html`
- [Lesson 05](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/05.html): `robot_animation_lesson/05.html`
- [Lesson 06](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/06.html): `robot_animation_lesson/06.html`
- [Lesson 07](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/07.html): `robot_animation_lesson/07.html`
- [Short lesson](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/short.html): `robot_animation_lesson/short.html`
- [Short lesson 2](https://github.com/projapayuri/ar_test/blob/main/robot_animation_lesson/short2.html): `robot_animation_lesson/short2.html`

### AR experiments

- [Two markers](https://github.com/projapayuri/ar_test/blob/main/twoMarkers.html): `twoMarkers.html`
- [Marker values](https://github.com/projapayuri/ar_test/blob/main/z0and0.5): `z0and0.5`
- [Model test](https://github.com/projapayuri/ar_test/blob/main/1102test3/index.html): `1102test3/index.html`
- [Mesh test](https://github.com/projapayuri/ar_test/blob/main/1102test3/mesh.html): `1102test3/mesh.html`
- [Robot demo 1019](https://github.com/projapayuri/ar_test/blob/main/1019/index.html): `1019/index.html`
- [Robot demo 1022](https://github.com/projapayuri/ar_test/blob/main/1022/index.html): `1022/index.html`
- [Robot movement](https://github.com/projapayuri/ar_test/blob/main/move/index.html): `move/index.html`
- [Robot photo](https://github.com/projapayuri/ar_test/blob/main/photo/index.html): `photo/index.html`
- [Robot enlarge](https://github.com/projapayuri/ar_test/blob/main/enlarge.html/index.html): `enlarge.html/index.html`
- [Hand robot test](https://github.com/projapayuri/ar_test/blob/main/test/hand-robot.html): `test/hand-robot.html`
- [Fixed hand test](https://github.com/projapayuri/ar_test/blob/main/test/hand-robot-fixed.html): `test/hand-robot-fixed.html`
- [Test overview](https://github.com/projapayuri/ar_test/blob/main/test/index.html): `test/index.html`

### Standalone demos

- [Main page](https://github.com/projapayuri/ar_test/blob/main/index.html): `index.html`
- [Boxes demo](https://github.com/projapayuri/ar_test/blob/main/boxes.html): `boxes.html`
- [Box demo](https://github.com/projapayuri/ar_test/blob/main/box.html): `box.html`
- [Card input](https://github.com/projapayuri/ar_test/blob/main/cardInput.html): `cardInput.html`

### Other components

- **User**
- **Browser camera**
- **Web Audio**

## Connections

- User → Battle controller: attacks or resets (evidence: `dots/battle.js`)
- AR scene setup → Robot model: loads model (evidence: `dots/battle.js`)
- AR scene setup → Browser camera: requests camera (evidence: `dots/battle.js`)
- Battle controller → Robot model: plays clips (evidence: `dots/battle.js`)
- Battle controller → Web Audio: plays sound (evidence: `dots/battle.js`)
