mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
Move the wind's Cesium rendering into the Cesium adapter
The particle canvas, its GPU path and the relief shading move unchanged from src/layers/wind/ to src/globe/cesium/; the adapter reads the Cesium viewer itself, so the layer no longer hands one in.
This commit is contained in:
1 parent
a90407d547
commit
e0d3e93a28
8 files changed
+15
-11
No files matched your search
@@ -6,7 +6,7 @@ try {
|
|||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
await page.goto(`${process.env.QA_BASE_URL || 'http://localhost:4173'}/`, { waitUntil: 'domcontentloaded' });
|
await page.goto(`${process.env.QA_BASE_URL || 'http://localhost:4173'}/`, { waitUntil: 'domcontentloaded' });
|
||||||
const result = await page.evaluate(async () => {
|
const result = await page.evaluate(async () => {
|
||||||
const { createWindRendering } = await import('/src/layers/wind/rendering.js');
|
const { createWindRendering } = await import('/src/globe/cesium/windRendering.js');
|
||||||
const raf = window.requestAnimationFrame; const caf = window.cancelAnimationFrame;
|
const raf = window.requestAnimationFrame; const caf = window.cancelAnimationFrame;
|
||||||
const callbacks = new Map(); let sequence = 0;
|
const callbacks = new Map(); let sequence = 0;
|
||||||
window.requestAnimationFrame = callback => { callbacks.set(++sequence, callback); return sequence; };
|
window.requestAnimationFrame = callback => { callbacks.set(++sequence, callback); return sequence; };
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Cesium's backend of the wind display: the wind renderer's streamlines
|
// Cesium's backend of the wind display: the wind renderer's streamlines
|
||||||
// (src/layers/wind/rendering.js) over the viewer, read only once a Cesium globe draws.
|
// over the viewer, read only once a Cesium globe draws.
|
||||||
import * as Cesium from 'cesium';
|
import * as Cesium from 'cesium';
|
||||||
import { createWindRendering } from '../../layers/wind/rendering.js';
|
import { createWindRendering } from './windRendering.js';
|
||||||
|
|
||||||
export function createWindCesiumFlow(engine, { onStatusChange } = {}) {
|
export function createWindCesiumFlow(engine, { onStatusChange } = {}) {
|
||||||
return createWindRendering({
|
return createWindRendering({
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
WIND_DISPLAY_HEIGHT_METERS,
|
WIND_DISPLAY_HEIGHT_METERS,
|
||||||
WIND_PATH_LIMIT,
|
WIND_PATH_LIMIT,
|
||||||
WIND_NARROW_PATH_LIMIT,
|
WIND_NARROW_PATH_LIMIT,
|
||||||
} from './streamlines.js';
|
} from '../../layers/wind/streamlines.js';
|
||||||
|
|
||||||
const WIND_FADE_LOW_METERS = 15000;
|
const WIND_FADE_LOW_METERS = 15000;
|
||||||
const WIND_FADE_HIGH_METERS = 60000;
|
const WIND_FADE_HIGH_METERS = 60000;
|
||||||
File renamed without changes.
@@ -1,7 +1,11 @@
|
|||||||
import { createWindRelief } from './relief.js';
|
import { createWindRelief } from './windRelief.js';
|
||||||
import { createWindGpuRendering } from './gpuRendering.js';
|
import { createWindGpuRendering } from './windGpuRendering.js';
|
||||||
import { advectParticle, sampleWind, sameWind } from './model.js';
|
import {
|
||||||
import { trailEraseAlpha, windTrailColor } from './fields.js';
|
advectParticle,
|
||||||
|
sampleWind,
|
||||||
|
sameWind,
|
||||||
|
} from '../../layers/wind/model.js';
|
||||||
|
import { trailEraseAlpha, windTrailColor } from '../../layers/wind/fields.js';
|
||||||
|
|
||||||
/** The wind's streamlines on Cesium (the wind display's flow backend,
|
/** The wind's streamlines on Cesium (the wind display's flow backend,
|
||||||
* render/display.js, which draws the colour field): globe-projected surface
|
* render/display.js, which draws the colour field): globe-projected surface
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import test from 'node:test';
|
import test from 'node:test';
|
||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
import { createWindGpuRendering } from './gpuRendering.js';
|
import { createWindGpuRendering } from '../../globe/cesium/windGpuRendering.js';
|
||||||
import {
|
import {
|
||||||
BoundingSphere,
|
BoundingSphere,
|
||||||
Cartesian3,
|
Cartesian3,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import test from 'node:test';
|
import test from 'node:test';
|
||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
import { createWindRelief } from './relief.js';
|
import { createWindRelief } from '../../globe/cesium/windRelief.js';
|
||||||
|
|
||||||
function fixture({ material = undefined, normals = true } = {}) {
|
function fixture({ material = undefined, normals = true } = {}) {
|
||||||
const materials = [];
|
const materials = [];
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import test from 'node:test';
|
import test from 'node:test';
|
||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
|
|
||||||
import { createWindRendering } from './rendering.js';
|
import { createWindRendering } from '../../globe/cesium/windRendering.js';
|
||||||
|
|
||||||
function event() {
|
function event() {
|
||||||
const listeners = new Set();
|
const listeners = new Set();
|
||||||
|
|||||||
Reference in new issue
Block a user