migration-todo.md
Migration TODO: Legacy API → Modern API
This document lists all files that currently use the legacy Polypoint.head.* API and should be migrated to the modern Polypoint.extend.* API.
Migration Guide
Old API → New API:
- Polypoint.head.deferredProp() → Polypoint.extend.prop()
- Polypoint.head.lazierProp() → Polypoint.extend.singleton()
- Polypoint.head.lazyProp() → Polypoint.extend.getter()
- Polypoint.head.installFunctions() → Polypoint.extend.functions()
- Polypoint.head.mixin() → Polypoint.extend.mixin()
- Polypoint.head.static() → Polypoint.extend.static()
- Polypoint.head.install() → Keep as is (no change needed)
Files Using Polypoint.head.install()
These files use .install() which is correct - no changes needed:
point_src/table.js(2 uses)point_src/pointlistgradient.jspoint_src/pointlistpen.jspoint_src/automouse.jspoint_src/compass.jspoint_src/point.jspoint_src/text/fps.jspoint_src/screenshot-v1.jspoint_src/random.jspoint_src/mirror.jspoint_src/events.jspoint_src/pointcast.jspoint_src/dragging.jspoint_src/stroke.jspoint_src/screenshot.jspoint_src/pointlistdraw.jspoint_src/keyboard.jspoint_src/pointlistgenerator.jspoint_src/pointlist.jspoint_src/pointpen.jspoint_src/iter/lerp.jspoint_src/curve-extras.js(2 uses)point_src/stage.jspoint_src/timeit.jspoint_src/pointdraw.js
Files Using Polypoint.head.deferredProp() → extend.prop()
Total: 22 files
point_src/intersections.jspoint_src/tethers.jspoint_src/arc.jspoint_src/table.jspoint_src/stagepen.jspoint_src/jiggle.jspoint_src/compass.jspoint_src/tethers-vec.jspoint_src/text/beta.jspoint_src/xybind.jspoint_src/constrain-distance.jspoint_src/screenwrap.jspoint_src/rotate.jspoint_src/functions/within.jspoint_src/functions/springs.jspoint_src/relative.jspoint_src/stage-clock.js(2 uses)point_src/windings.jspoint_src/offscreen.jspoint_src/stroke.jspoint_src/iter/lerp.jspoint_src/velocity.js
Files Using Polypoint.head.lazierProp() → extend.singleton()
Total: 10 files
point_src/text/styler.js(2 uses - Stage and StagePen)point_src/text/fps.jspoint_src/xybind.jspoint_src/screenshot-v1.jspoint_src/events.jspoint_src/pointcast.jspoint_src/dragging.js(2 uses - cursor and dragging)point_src/screenshot.jspoint_src/keyboard.jspoint_src/capture/encoder.js
Files Using Polypoint.head.lazyProp() → extend.getter()
Total: 4 files
point_src/functions/springs.jspoint_src/tangents.jspoint_src/pointpen.js(3 uses)point_src/pointdraw.js
Files Using Polypoint.head.installFunctions() → extend.functions()
Total: 10 files
point_src/json.js(2 uses - Point and PointList)point_src/curve-knife.jspoint_src/xybind.jspoint_src/constrain-distance.jspoint_src/split.js(3 uses - Point, BezierCurve, Line)point_src/touching.js(2 uses - Point and PointList)point_src/stage-resize.js
Files Using Polypoint.head.mixin() → extend.mixin()
Total: 4 files
point_src/point.jspoint_src/dragging.jspoint_src/distances.jspoint_src/velocity.js
Files Using Polypoint.head.static() → extend.static()
Total: 1 file
point_src/automouse.js
Files Using Legacy Polypoint.* (without .head) → Need Update
Total: 2 files
These use the deprecated root-level API and should be updated to Polypoint.extend.*:
point_src/area.js- usesPolypoint.installFunctions()point_src/dragging.js- usesPolypoint.mixin()
Summary Statistics
| Method | Files to Update | Total Usages |
|---|---|---|
deferredProp → prop |
22 | ~23 |
lazierProp → singleton |
10 | ~13 |
lazyProp → getter |
4 | ~6 |
installFunctions → functions |
10 | ~11 |
mixin → mixin |
4 | ~4 |
static → static |
1 | 1 |
| Legacy root API | 2 | 2 |
| Total | ~50 files | ~60 usages |
Priority Order
- High Priority - Files with multiple legacy usages:
point_src/dragging.js(4 usages)point_src/pointpen.js(3 usages)point_src/split.js(3 usages)-
point_src/xybind.js(3 usages) -
Medium Priority - Core functionality files:
point_src/point.jspoint_src/stage.js-
point_src/pointlist.js -
Low Priority - Addon/extension files (can be updated gradually)
Notes
- Files in
point_src/core/head.jscontain documentation examples - these are intentionally showing both old and new APIs - The
install()method has no new alternative - it remainsPolypoint.head.install() - Some files may have commented-out legacy code that doesn't need updating
Generated: 2025-11-02
This list was generated by searching for legacy API usage patterns across the point_src/ directory.