mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Every image kind draws on the Cesium port, atlas slots wherever an image is taken
Icons on billboards and on the GPU, line patterns, shape fills, quads and raster shells take a URL, SVG, a blob (one object URL per blob), a keyed canvas (packed into the GPU icon atlas as it is, by its key) and an atlas slot as the image it holds. Blobs and canvases were refused on the GPU path, blobs on billboards, and atlas slots everywhere but billboards. The new conformance check draw.icons.images draws each kind on still and receding icons; Cesium runs it.
This commit is contained in:
1 parent
0e8be0fb78
commit
71f0945635
10 files changed
+229
-45
No files matched your search
@@ -4445,7 +4445,8 @@ test('a draped rectangle turns, its image fill with it, on a ground primitive th
|
||||
const [flat] = grounds();
|
||||
assert.equal(flat.geometryInstances[0].geometry._rotation, 0);
|
||||
plain.dispose();
|
||||
// An image it cannot take is refused before anything is built.
|
||||
// An atlas slot fills as the image it holds; one not registered is
|
||||
// refused before anything is built.
|
||||
const made = scene.added.length;
|
||||
assert.throws(
|
||||
() =>
|
||||
@@ -4455,9 +4456,16 @@ test('a draped rectangle turns, its image fill with it, on a ground primitive th
|
||||
overlay(),
|
||||
overlay({ id: 'b', fill: { image: { atlas: 'a', slot: 's' } } }),
|
||||
]),
|
||||
/URL, SVG and canvas images only/,
|
||||
/atlas a has no slot s registered/,
|
||||
);
|
||||
assert.equal(scene.added.length, made, 'nothing drawn');
|
||||
draw.atlas('a', { s: 'slot.png' });
|
||||
const slotted = draw.shapes({ id: 'atlas-registered' });
|
||||
slotted.set([
|
||||
overlay({ id: 'b', fill: { image: { atlas: 'a', slot: 's' } } }),
|
||||
]);
|
||||
assert.ok(scene.added.length > made, 'drawn from the slot');
|
||||
slotted.dispose();
|
||||
}));
|
||||
|
||||
test('scene data packs draw their geometry and media marker through the Cesium draw port on a viewer of its own', async (t) => {
|
||||
|
||||
Reference in new issue
Block a user