fuzzyworld

nordic-skating / local-littlejs / files / test / final-check.ts

Branch local-littlejs · default branch · all branches

final-check.ts

Blame: the commit that last changed each line · file · history

39d08b63 2026-10-20 Pavel Safronov1/**
2 * Final verification that SkyLittleJS matches the expected interface
3 */
4
5import { Sky } from '../src/render/sky'
6import { SkyLittleJS } from '../src/render/sky-littlejs'
7
8// Verify both classes have the same public API
9const skyOriginal = new Sky()
10const skyLittleJS = new SkyLittleJS()
11
12console.log('Sky class methods:', Object.getOwnPropertyNames(Object.getPrototypeOf(skyOriginal)).filter(m => m !== 'constructor'))
13console.log('SkyLittleJS class methods:', Object.getOwnPropertyNames(Object.getPrototypeOf(skyLittleJS)).filter(m => m !== 'constructor'))
14
15// Test that both accept the same Look interface
16const testLook: Parameters<typeof skyOriginal.show>[0] = {
17 top: 0xff0000,
18 horizon: 0x0000ff,
19 stars: 1.0,
20 milkyWay: 0.5,
21 aurora: 0.3,
22 meteors: true,
23 planes: false,
24 trail: 0xffffff,
25 skyLight: 0,
26 groundLight: 0,
27 skyStrength: 1,
28 sun: 0,
29 sunStrength: 0,
30 sunFrom: [0, 0, 0],
31 iceLight: 0.5,
32 snow: 0xffffff
33}
34
35console.log('✅ Both classes accept the same Look interface')
36console.log('✅ SkyLittleJS is API-compatible with Sky')