Add pointer-driven camera scripts with Cesium goldens, and count wheel lines as Cesium does

Five new camera conformance scripts move the camera by user input: a
left drag that coasts, thirty pixel-mode and thirty line-mode wheel
notches from 5 km, a middle-drag tilt, and Shift and Ctrl drags held too
long to coast. The runner turns input steps into pointer events for a
driver: a move starts where the pointer last pressed or moved and carries
the held button. The golden recorder now drives Cesium's own screen-space
camera controller on a stand-in canvas, with Date on the virtual clock so
inertia is deterministic. The existing goldens are unchanged.

A harness that answers pointer input sets cameraInput and a pointer hook.
Harnesses without it, such as the stub, skip the input scripts.

The input port reported a line-mode wheel at 33 1/3 pixels a line. It now
counts lines as the reference does, 40 pixels a line and 3 lines a page,
so a pixel or line wheel converts back to the same pixels.
This commit is contained in:
Sameh Khamis committed 2026-11-08 20:08:56 -08:00
1 parent ef616b7905
commit 90499762f5
16 files changed
+1055 -38

No files matched your search

+490
View File
@@ -2312,6 +2312,496 @@
],
"flights": []
},
"a left drag turns the globe under the pointer, then coasts": {
"records": [
{
"step": 24,
"kind": "pose",
"value": {
"position": {
"x": -743874.2827583898,
"y": -5467123.5663921,
"z": 3198867.771901153
},
"direction": {
"x": 0.20397712796409123,
"y": 0.9652906415976404,
"z": -0.1631174684438692
},
"up": {
"x": 0.2033249113752558,
"y": 0.12121518562266298,
"z": 0.9715790545234638
},
"right": {
"x": 0.9576284831195057,
"y": -0.2313457499468691,
"z": -0.17154250872525903
},
"heading": 0.19995498090715547,
"pitch": -1.1999997631348354,
"roll": 6.283185067768231,
"height": 5001.202022602089,
"frameIsIdentity": true
}
},
{
"step": 26,
"kind": "pose",
"value": {
"position": {
"x": -744179.2414489042,
"y": -5466945.298349385,
"z": 3199101.5023454726
},
"direction": {
"x": 0.2040230499283474,
"y": 0.9652742041266187,
"z": -0.1631573042975954
},
"up": {
"x": 0.20331111154933998,
"y": 0.12125033636499621,
"z": 0.971577556272245
},
"right": {
"x": 0.9576216304044657,
"y": -0.231395909166732,
"z": -0.1715131079608628
},
"heading": 0.199925453927559,
"pitch": -1.199999607856077,
"roll": 6.2831849106714515,
"height": 5001.990172385319,
"frameIsIdentity": true
}
},
{
"step": 28,
"kind": "pose",
"value": {
"position": {
"x": -744372.9914909918,
"y": -5466832.025336116,
"z": 3199249.992913194
},
"direction": {
"x": 0.20405222591363384,
"y": 0.9652637587817955,
"z": -0.1631826126832485
},
"up": {
"x": 0.20330234482603304,
"y": 0.1212726692625212,
"z": 0.9715766034020066
},
"right": {
"x": 0.9576172751616003,
"y": -0.23142777636313006,
"z": -0.171494427430424
},
"heading": 0.19990669247367698,
"pitch": -1.19999950921419,
"roll": 6.283184810827273,
"height": 5002.490919151834,
"frameIsIdentity": true
}
},
{
"step": 54,
"kind": "pose",
"value": {
"position": {
"x": 7805906.904869736,
"y": -14670498.917206015,
"z": 13440141.433819043
},
"direction": {
"x": -0.3655537074410778,
"y": 0.6843524703919436,
"z": -0.6308979182439318
},
"up": {
"x": 0.110917768366866,
"y": 0.7050070428413021,
"z": 0.7004729246763767
},
"right": {
"x": 0.9241578521208361,
"y": 0.18608268541862594,
"z": -0.3336247870749348
},
"heading": 0.443475027365972,
"pitch": -1.5693855130982848,
"roll": 0,
"height": 15003040.278641503,
"frameIsIdentity": true
}
}
],
"flights": []
},
"thirty pixel-mode wheel notches from 5 km, then out again": {
"records": [
{
"step": 23,
"kind": "pose",
"value": {
"position": {
"x": -742628.7924789503,
"y": -5463700.648822847,
"z": 3197887.172893453
},
"direction": {
"x": 0.20390710151866062,
"y": 0.9653157014443385,
"z": -0.1630567094457735
},
"up": {
"x": 0.2033459565896657,
"y": 0.12116157542641381,
"z": 0.971581337088575
},
"right": {
"x": 0.9576389277221831,
"y": -0.23126925689597005,
"z": -0.17158733906058854
},
"heading": 0.20002548249494634,
"pitch": -1.1997833418598227,
"roll": 6.283184995415831,
"height": 1432.7693523452285,
"frameIsIdentity": true
}
},
{
"step": 44,
"kind": "pose",
"value": {
"position": {
"x": -742405.2309695639,
"y": -5462642.287276622,
"z": 3197708.399305835
},
"direction": {
"x": 0.20390710151866057,
"y": 0.9653157014443385,
"z": -0.1630567094457731
},
"up": {
"x": 0.20334595658966526,
"y": 0.12116157542641454,
"z": 0.9715813370885751
},
"right": {
"x": 0.9576389277221832,
"y": -0.2312692568959699,
"z": -0.17158733906058796
},
"heading": 0.20003278999578278,
"pitch": -1.1997212353912805,
"roll": 6.283184906110748,
"height": 410.9902001027421,
"frameIsIdentity": true
}
},
{
"step": 65,
"kind": "pose",
"value": {
"position": {
"x": -742341.2056470874,
"y": -5462339.185282548,
"z": 3197657.2007044787
},
"direction": {
"x": 0.20390710151866076,
"y": 0.9653157014443386,
"z": -0.16305670944577244
},
"up": {
"x": 0.20334595658966534,
"y": 0.121161575426415,
"z": 0.971581337088575
},
"right": {
"x": 0.9576389277221832,
"y": -0.23126925689596994,
"z": -0.17158733906058796
},
"heading": 0.20003488343521703,
"pitch": -1.199703445182633,
"roll": 6.28318488053483,
"height": 118.36954505315934,
"frameIsIdentity": true
}
},
{
"step": 67,
"kind": "pose",
"value": {
"position": {
"x": -742333.1507133974,
"y": -5462301.052456831,
"z": 3197650.759482114
},
"direction": {
"x": 0.20390710151866143,
"y": 0.9653157014443386,
"z": -0.16305670944577194
},
"up": {
"x": 0.20334595658966512,
"y": 0.12116157542641479,
"z": 0.9715813370885751
},
"right": {
"x": 0.9576389277221832,
"y": -0.23126925689597047,
"z": -0.1715873390605877
},
"heading": 0.20003514682861567,
"pitch": -1.199701206906512,
"roll": 6.283184877317159,
"height": 81.55550603363947,
"frameIsIdentity": true
}
},
{
"step": 79,
"kind": "pose",
"value": {
"position": {
"x": -742361.5559644367,
"y": -5462435.52562931,
"z": 3197673.474074843
},
"direction": {
"x": 0.2039071015186621,
"y": 0.9653157014443386,
"z": -0.1630567094457709
},
"up": {
"x": 0.2033459565896656,
"y": 0.12116157542641448,
"z": 0.971581337088575
},
"right": {
"x": 0.957638927722183,
"y": -0.23126925689597097,
"z": -0.17158733906058815
},
"heading": 0.2000342180079615,
"pitch": -1.199709099940855,
"roll": 6.283184888664081,
"height": 211.37819848930863,
"frameIsIdentity": true
}
}
],
"flights": []
},
"thirty line-mode wheel notches from 5 km": {
"records": [
{
"step": 23,
"kind": "pose",
"value": {
"position": {
"x": -742556.7099509701,
"y": -5463359.40324807,
"z": 3197829.5312530524
},
"direction": {
"x": 0.20390710151866023,
"y": 0.9653157014443386,
"z": -0.1630567094457732
},
"up": {
"x": 0.203345956589666,
"y": 0.12116157542641305,
"z": 0.9715813370885751
},
"right": {
"x": 0.9576389277221831,
"y": -0.2312692568959697,
"z": -0.17158733906058904
},
"heading": 0.20002783824820192,
"pitch": -1.1997633191576402,
"roll": 6.283184966621368,
"height": 1103.3162549917931,
"frameIsIdentity": true
}
},
{
"step": 65,
"kind": "pose",
"value": {
"position": {
"x": -742322.8917203792,
"y": -5462252.485403653,
"z": 3197642.555757815
},
"direction": {
"x": 0.20390710151865987,
"y": 0.9653157014443383,
"z": -0.16305670944577555
},
"up": {
"x": 0.20334595658966786,
"y": 0.12116157542641243,
"z": 0.9715813370885749
},
"right": {
"x": 0.9576389277221826,
"y": -0.23126925689597005,
"z": -0.17158733906059095
},
"heading": 0.20003548230067558,
"pitch": -1.1996983561368815,
"roll": 6.2831848732190485,
"height": 34.668143935951555,
"frameIsIdentity": true
}
}
],
"flights": []
},
"a middle drag tilts about the centre, then coasts": {
"records": [
{
"step": 24,
"kind": "pose",
"value": {
"position": {
"x": -743241.7317811222,
"y": -5464487.455673964,
"z": 3195978.047404553
},
"direction": {
"x": 0.3675783291212823,
"y": 0.81316539817522,
"z": 0.4512739823776041
},
"up": {
"x": 0.08270178763465089,
"y": -0.5119037171950899,
"z": 0.8550526291661131
},
"right": {
"x": 0.9263080407091582,
"y": -0.27697765168400346,
"z": -0.2554149451092779
},
"heading": 0.3008134433902425,
"pitch": -0.5367351449364697,
"roll": 6.282589696577563,
"height": 1215.0821198795002,
"frameIsIdentity": true
}
},
{
"step": 26,
"kind": "pose",
"value": {
"position": {
"x": -743241.80671276,
"y": -5463765.475245942,
"z": 3195201.3342659683
},
"direction": {
"x": 0.36760985348731867,
"y": 0.5094221457939676,
"z": 0.7780437474806298
},
"up": {
"x": -0.0855345107763599,
"y": -0.8145571574843389,
"z": 0.5737425247071049
},
"right": {
"x": 0.9260382514158263,
"y": -0.2774629967503845,
"z": -0.2558660633007341
},
"heading": 0.3012445916881008,
"pitch": -0.08686439532730006,
"roll": 6.282451156320272,
"height": 205.77116965382524,
"frameIsIdentity": true
}
}
],
"flights": []
},
"modified drags: Shift looks, Ctrl tilts, held too long to coast": {
"records": [
{
"step": 26,
"kind": "pose",
"value": {
"position": {
"x": -743060.1500720647,
"y": -5464827.966102482,
"z": 3196999.1724985815
},
"direction": {
"x": 0.3198554534385449,
"y": 0.8196936321897058,
"z": 0.4751787434779361
},
"up": {
"x": 0.07739593213172483,
"y": -0.5224541754567694,
"z": 0.8491475161815223
},
"right": {
"x": 0.9442999304220479,
"y": -0.2348275620437983,
"z": -0.23055076991734758
},
"heading": 0.2406372218166659,
"pitch": -0.5226924574159404,
"roll": 0.028997148507913906,
"height": 2000.0000000013995,
"frameIsIdentity": true
}
},
{
"step": 51,
"kind": "pose",
"value": {
"position": {
"x": -743061.3004932855,
"y": -5464044.082279529,
"z": 3196047.0359984883
},
"direction": {
"x": 0.3201424713636519,
"y": 0.6241229075555551,
"z": 0.712726731849994
},
"up": {
"x": -0.02221334720207947,
"y": -0.7471697869219248,
"z": 0.66426190370751
},
"right": {
"x": 0.9471089510902393,
"y": -0.22849049384043377,
"z": -0.22533692327113536
},
"heading": 0.2408776874059173,
"pitch": -0.21383964601254024,
"roll": 0.028905924656936755,
"height": 849.3858537714274,
"frameIsIdentity": true
}
}
],
"flights": []
},
"projection, picks and the horizon": {
"records": [
{