-# 🇨🇱 Cachipún 3D
+# ✊✋✌️ Cachipún 3D
-### Un tres en línea chileno, hecho hermoso con Three.js
-### A Chilean tic-tac-toe, made beautiful with Three.js
+### Piedra, papel o tijera a la chilena, hecho hermoso con Three.js
+### Chilean rock-paper-scissors, made beautiful with Three.js
[**▶ Jugar / Play**](https://fabianimv.github.io/cachipun/) · Three.js · WebGL · GitHub Pages
-*Vidrio refractivo · neón con bloom · sombras suaves · partículas · cero dependencias en runtime*
+*Manos 3D articuladas · vidrio refractivo · neón con bloom · confeti · cero dependencias en runtime*
@@ -15,17 +15,34 @@
## 🎯 Propósito · Purpose
-**ES** — El propósito de este `cachipun.github.io` es simple: **usar Three.js para algo
-hermoso**. Tomé las técnicas visuales de los juegos web que se volvieron virales hace
-poco (la estética *liquid glass*, el bloom, las sombras suaves, las partículas) y las
-llevé a un clásico de patio chileno. No es solo un gato: es una excusa para hacer que
-algo cotidiano se vea espectacular en el navegador.
+**ES** — El propósito de este repo es simple: **usar Three.js para algo hermoso**.
+Dos manos 3D articuladas se enfrentan sobre un escenario de vidrio: eliges tu jugada,
+ambas hacen el clásico **"¡ca… chi… pún!"** y revelan el gesto al mismo tiempo.
+Confeti para quien gana, y una CPU que aprende tus mañas.
-**EN** — The purpose of this `cachipun.github.io` is simple: **use Three.js to make
-something beautiful**. I took the visual techniques from the web games that recently
-went viral (the *liquid glass* look, bloom, soft shadows, particles) and brought them
-to a Chilean playground classic. It's not just tic-tac-toe: it's an excuse to make
-something ordinary look stunning in the browser.
+**EN** — The purpose of this repo is simple: **use Three.js to make something
+beautiful**. Two articulated 3D hands face off over a glass stage: pick your move,
+both hands do the classic three-beat countdown and reveal at once. Confetti for the
+winner, and a CPU that learns your patterns.
+
+---
+
+## 🎮 Cómo jugar · How to play
+
+**ES** — Elige **piedra ✊**, **papel ✋** o **tijera ✌️** con los botones o las
+teclas `1` · `2` · `3`. Piedra le gana a tijera, tijera a papel y papel a piedra.
+El marcador se guarda solo en tu navegador.
+
+**EN** — Pick **rock ✊**, **paper ✋** or **scissors ✌️** with the buttons or the
+`1` · `2` · `3` keys. Rock beats scissors, scissors beat paper, paper beats rock.
+The scoreboard is saved in your browser.
+
+### 🧠 La CPU · The CPU
+
+| Modo · Mode | ES | EN |
+|----|----|----|
+| 🧠 **CPU astuta** | Predictor de Markov de orden 1: aprende qué sueles tirar después de tu jugada anterior y juega la contra. Un 25 % de azar la mantiene ganable. | Order-1 Markov predictor: it learns what you tend to throw after your previous move and plays the counter. A 25 % random slip keeps it beatable. |
+| 🎲 **CPU al lote** | Puro azar, como jugar con tu sobrino. | Pure random, like playing your little cousin. |
---
@@ -33,24 +50,21 @@ something ordinary look stunning in the browser.
| ES | EN |
|----|----|
-| Tablero de **vidrio refractivo** (`transmission`) con reflejos por entorno PMREM | **Refractive glass** board (`transmission`) with PMREM environment reflections |
-| Piezas de **neón** (X cian, O magenta) que brillan con **UnrealBloom** | **Neon** pieces (cyan X, magenta O) glowing via **UnrealBloom** |
-| **Sombras PCF suaves**, luces de relleno de color y fondo con shader + niebla | **Soft PCF shadows**, colored rim lights and a shader gradient sky + fog |
-| **Animaciones con easing** (rebote, resorte) con un motor de tweens propio | **Eased animations** (bounce, spring) via a tiny custom tween engine |
-| **Cámara que respira** con parallax del mouse, **confeti** y línea ganadora iluminada | **Breathing camera** with mouse parallax, **confetti** and a lit winning line |
-| **CPU imbatible** (minimax) y modo **2 jugadores** | **Unbeatable CPU** (minimax) and **2-player** mode |
-| Partida y marcador guardados en **localStorage** | Game and scoreboard saved in **localStorage** |
-| **Sonido** WebAudio silenciable · responsive (mouse + touch) | Mutable WebAudio **sound** · responsive (mouse + touch) |
+| **Manos 3D articuladas** por dedo, poseadas por gesto (✊ ✋ ✌️) | **Articulated 3D hands** with per-finger joints posed per gesture |
+| Coreografía del **"¡ca-chi-pún!"**: tres botes y revelación con resorte | The **three-beat countdown** choreography with a springy reveal |
+| Escenario de **vidrio refractivo** (`transmission`) con reflejos PMREM | **Refractive glass** stage (`transmission`) with PMREM reflections |
+| Neón (tú cian, CPU magenta) que brilla con **UnrealBloom** | Neon glow (cyan you, magenta CPU) via **UnrealBloom** |
+| **Sombras PCF suaves**, luces rim de color, fondo con shader + niebla | **Soft PCF shadows**, colored rim lights, shader sky + fog |
+| **Cámara que respira** con parallax del mouse, **confeti** para quien gana | **Breathing camera** with mouse parallax, **confetti** for the winner |
+| Marcador y ajustes en **localStorage** · **sonido** WebAudio silenciable | Scoreboard and settings in **localStorage** · mutable WebAudio **sound** |
+| Responsive (mouse + touch) · **sin build step ni CDN** | Responsive (mouse + touch) · **no build step, no CDN** |
---
-## 🎮 Cómo jugar · How to play
-
-**ES** — Abre [la versión en línea](https://fabianimv.github.io/cachipun/). En local, como
-usa módulos ES, necesitas un servidor estático (no funciona con `file://`):
+## 🖥️ Correr local · Run locally
-**EN** — Open [the live version](https://fabianimv.github.io/cachipun/). Locally, since it
-uses ES modules, you need a static server (it won't work over `file://`):
+Usa módulos ES, así que necesita un servidor estático (no funciona con `file://`):
+It uses ES modules, so it needs a static server (it won't work over `file://`):
```bash
python3 -m http.server 8000 # → http://localhost:8000
@@ -64,11 +78,11 @@ npx serve .
```
index.html · markup + import map (Three.js vendorizado / vendored)
-styles.css · UI glassmorphism (HUD, marcador, banner)
+styles.css · UI glassmorphism (HUD, marcador, botones de jugada)
src/
- main.js · une lógica, escena, sonido y persistencia / glue layer
- scene.js · escena 3D, efectos y animaciones / 3D scene & effects
- game.js · reglas, ganador, CPU minimax, localStorage / rules & AI
+ main.js · flujo de juego, marcador, sonido / game flow, score, sound
+ scene.js · manos, coreografía y efectos 3D / hands, choreography & FX
+ game.js · reglas, cerebro de la CPU, localStorage / rules & CPU brain
tween.js · motor de animación con easing / easing tween engine
vendor/ · Three.js r160 (build + addons) — sin CDN en runtime / no runtime CDN
```
@@ -91,23 +105,25 @@ once at **Settings → Pages → Source: GitHub Actions** and push.
## 🛠️ Técnicas Three.js usadas · Three.js techniques used
+- Manos riggeadas a mano con `Group` + `CapsuleGeometry` y poses por articulación / hand-rigged hands via joint groups
- `MeshPhysicalMaterial` con `transmission`, `ior`, `thickness`, `clearcoat` (vidrio / glass)
- `PMREMGenerator` + `RoomEnvironment` (reflejos realistas / realistic reflections)
- `EffectComposer` → `RenderPass` + `UnrealBloomPass` + `OutputPass` (post-proceso / post-processing)
- `PCFSoftShadowMap`, `ACESFilmicToneMapping`, `SRGBColorSpace`
- `Points` + `BufferGeometry` (confeti y polvo / confetti and dust)
- `ShaderMaterial` para el degradado del cielo / for the sky gradient
-- `Raycaster` para seleccionar casillas en 3D / for picking 3D cells
---
## 📝 Nota cultural · Cultural note
-**ES** — En Chile, *cachipún* es estrictamente "piedra, papel o tijera"; a esto se le dice
-*gato* o *tres en línea*. Mantengo el nombre por cariño al proyecto. 😄
+**ES** — En Chile, *cachipún* es "piedra, papel o tijera". La primera versión de este
+repo era en verdad un *gato* (tres en línea) por una confusión histórica que quedó
+inmortalizada en el historial de git 😄. Ahora sí: cachipún de verdad.
-**EN** — In Chile, *cachipún* is strictly "rock, paper, scissors"; this game is usually
-called *gato* or *tres en línea*. I keep the name out of affection for the project. 😄
+**EN** — In Chile, *cachipún* means "rock, paper, scissors". The first version of this
+repo was actually tic-tac-toe due to a historic mix-up, now immortalized in the git
+history 😄. This time it's the real deal.
---
diff --git a/index.html b/index.html
index edbeac2..55fb855 100644
--- a/index.html
+++ b/index.html
@@ -4,9 +4,8 @@
- Cachipún 3D · Tres en línea a la chilena
-
-
+ Cachipún 3D · Piedra, papel o tijera
+
@@ -33,14 +32,15 @@