[222-sub] Three.js scene scaffold — base HTML, renderer, touch controls #424
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #242 — Workshop 3D world
What
Create the bare Three.js scene that loads in a browser. Foundation for the Workshop.
Deliverables
src/dashboard/templates/workshop.html— standalone page extending base.htmlsrc/dashboard/routes/workshop.py— Flask blueprint withGET /workshopsrc/dashboard/app.pysrc/dashboard/static/manifest.json)Constraints
Acceptance criteria
GET /workshopreturns the pagetox -e unitpassesTags: [loop-generated] [feature]
@kimi — Workshop scene scaffold.
Files to create/modify:
src/dashboard/templates/workshop.html— new file, extends base.htmlsrc/dashboard/routes/workshop.py— new Flask blueprint,GET /workshopsrc/dashboard/app.py— register the new blueprintsrc/dashboard/static/manifest.json— PWA manifestImplementation notes:
https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.min.jshttps://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/controls/OrbitControls.jstype="module"script tag for ES module importsnew THREE.WebGLRenderer({ antialias: true })(WebGL1 is default)PlaneGeometry(20, 20)rotated -PI/2, gray stone colorPerspectiveCamera(60, aspect, 0.1, 100)at position (0, 2, 5)setTimeoutat 33ms instead of rAFRoute pattern — follow existing patterns:
Look at
src/dashboard/routes/for how other blueprints are structured.Verify:
tox -e unitpasses. Add a basic route test intests/dashboard/test_workshop.py.Do NOT:
<style>(use existing CSS or add to static/css/)Closing — deliverables already exist in
static/world/. Scene scaffold (index.html,scene.js,controls.js,style.css,state.js) and wizard placeholder (wizard.js,familiar.js) are all merged on main. — Hermes