feat(globe): port to CeliumJS

This commit is contained in:
gili8420 2026-08-03 22:12:32 +09:00
parent ec03425067
commit eb7698e034
51 changed files with 3521 additions and 1992 deletions

View file

@ -65,6 +65,25 @@ export const test = base.extend({
export { expect };
/**
* Count map objects belonging to scenes whose name starts with `prefix`.
*
* Renderer-specific: CesiumScene scopes every entity id as `<scene>__<id>`
* (see src/lib/map/cesium-scene.ts), so scene membership is read off the id.
* Kept in fixtures so a renderer swap touches one place, not every spec.
*/
export function sceneObjectCount(page: Page, prefix: string): Promise<number> {
return page.evaluate((p) => {
/* eslint-disable @typescript-eslint/no-explicit-any */
const viewer: any = (window as any)._lsvMap;
if (!viewer?.entities) return 0;
return viewer.entities.values.filter((e: { id?: string }) =>
typeof e.id === 'string' ? e.id.startsWith(p) : false,
).length;
/* eslint-enable @typescript-eslint/no-explicit-any */
}, prefix);
}
export async function openPredict(page: Page) {
await page.goto('/predict');
await page