RFID 元宇宙(RFID Metaverse)
Overview
This skill packages the knowledge behind an RFID 射频技术模拟基地 · 元宇宙测试中心 —
a WebGL platform that lets people validate RFID deployments before they go live, by
simulating the radio-frequency environment inside a walkable 3D "metaverse" and
presenting the test results spatially.
Two names, one platform:
- 模拟基地(Simulation Base) answers "is this RFID scheme physically sound?" — it
computes radio propagation (coverage, directionality, attenuation, multipath, collision).
- 测试中心(Test Center) answers "how do testers intuitively design and observe it?" —
it is the immersive, walkable presentation of that simulation.
The skill is the procedural memory for (1) the positioning / white-paper narrative,
(2) the Three.js scene-editor implementation patterns, and (3) the deployment
(website + tunnel + Windows service). Use it so the same non-obvious patterns are not
rediscovered on every session.
When to use
- User asks to build, fix, or extend the RFID 3D scene editor (upload models, duplicate,
height, text labels, scroll screens, collision, streaming). - User wants to write or revise the RFID metaverse white paper (positioning, architecture,
scenarios, roadmap). - User mentions RFID 元宇宙 / 模拟基地 / 测试中心 and wants an explanation, plan, or doc.
- User needs to deploy or keep alive the website (Node server, Cloudflare Tunnel,
Error 1033 / 502 recovery, Windows service auto-start). - User wants to re-create the platform from scratch in a new project.
Core concepts (do not re-litigate)
Keep these distinctions crisp when writing docs or UI copy:
- 模拟基地 = "算得准" (computes RF behavior). 测试中心 = "看得清" (immersive view). Same data, two layers.
- The platform is not a generic metaverse; it is "a RFID laboratory inside a virtual world".
- Tagline: 把试错留在虚拟,把一次成功带去现场 (leave trial-and-error in the virtual, take
first-time success to the field).
- Validation gap it fills: RFID failures come from space & RF-environment uncertainty, not
device quality — so the platform moves verification from "on-site trial-and-error" to
"virtual rehearsal".
Architecture
The platform uses a four-layer architecture. Load references/architecture.md for the full
layer table, device/parameter model, KPI definitions, scenario list, and roadmap. Summary:
| Layer | Name | Responsibility |
|---|---|---|
| L1 | 物理仿真层 (Physical Simulation) | RF propagation modeling, device parameterization, environment factors — the core differentiator |
| L2 | 数字孪生层 (Digital Twin) | scene geometry, device 3D models, state sync |
| L3 | 测试编排层 (Test Orchestration) | test scripts, metric collection, reporting, attestation |
| L4 | 沉浸体验层 (Immersive Experience) | 3D walk, visualization, collaboration, authoring tools |
L1 is what separates it from "a pretty 3D viewer": coverage model (power/gain/sensitivity),
directionality (antenna lobe), attenuation (metal/liquid/body), multipath & interference,
concurrency/anti-collision (ALOHA-based). These make "move the gate 1 m left → how does read
rate change?" a computable question.
Building the 3D scene editor
The editor is a single-file Three.js app (public/rfid/index.html) backed by a Node server.
Load references/scene-patterns.md for copy-ready patterns and the gotchas that caused past
bugs. Key patterns:
- Model upload (GLB) + duplicate (Ctrl+D / 📋 button, offset +2 on an axis).
- Height clamp range -2.0 … 20.0 (note: originally 0.0, changed to allow below ground).
- Text label via CanvasTexture (e.g. "量子计算机", "制中") — must persist isLabel/labelText.
- Double-sided scroll screen playing the white paper, proximity-triggered (camera within
5 m), slow scroll, both faces upright (separate planes, not DoubleSide, which mirrors text).
- Model-surface anti-penetration collision via raycaster (so avatars stop at the model skin,
can enter doorways, NOT a big bounding-sphere wall).
- Streaming load/unload by distance (beyond 400 m unload, within 300 m reload) to handle large scenes.
Critical persistence bug (recurring): text labels vanished after refresh because the backend
sanitizeModel() only kept models with url or primitive, dropping isLabel entries. The fix
is to keep isLabel+labelText and not discard them when url/primitive are absent. Also,
the server caches plot-content.json in memory (_plotCache) — editing the file directly requires
a server restart to take effect.
Deployment
Load references/deployment.md for the full recipe. Essentials:
- Website = node server.js on port 3000 (backend serves the editor + plot-content.json + MetaMask auth).
- Public access = Cloudflare Tunnel (cloudflared tunnel run with the tunnel id), free, maps localhost:3000
to u8liulu.dpdns.org.
- Error 1033 = tunnel process down. Error 502 = tunnel up but node down. Both need restart.
- For stability, register both as Windows services: cloudflared (official service install is
unreliable in some environments — prefer wrapping with nssm using service run / tunnel run
and a working directory) and OpenWorldNode (nssm-wrapped node server.js). Services auto-start
on boot and auto-recover on crash.
- Reminder: moving RAM-heavy background work does not free RAM by changing disk drive — RAM vs
disk are different resources.
White paper authoring
Load references/whitepaper.md for the full V2.0 outline and copy. When the user revises the
white paper in Word, re-extract the text and update the scroll-screen WHITEPAPER_TEXT constant
(and the two face title bars) in index.html, then hard-refresh (Ctrl+Shift+R) to bypass cache.
Resources
references/architecture.md— four-layer architecture, device/parameter model, KPI, scenarios, roadmap.references/scene-patterns.md— Three.js editor code patterns + the recurring bugs and their fixes.references/deployment.md— Node + Cloudflare Tunnel + nssm service recipe, error codes, config paths.references/whitepaper.md— full RFID metaverse white-paper outline (V2.0) for regenerating/updating docs.