1
0

carosel images
All checks were successful
Test / test (push) Successful in 9m32s

This commit is contained in:
Aiden
2026-06-10 15:12:25 +10:00
parent c28386ccdd
commit 857c9ac980
14 changed files with 466 additions and 21 deletions

View File

@@ -53,6 +53,24 @@ test('MediaTextureManager assigns and clears material maps', () => {
assert.equal(manager.current, null);
});
test('MediaTextureManager can switch sources before creating the next texture', () => {
const firstSource = { name: 'first' };
const secondSource = { name: 'second' };
const createdFrom = [];
const manager = new MediaTextureManager(firstSource, (source) => {
createdFrom.push(source);
return createTexture(source.name);
}, () => true);
const firstTexture = manager.create();
manager.setSource(secondSource);
const secondTexture = manager.create();
assert.equal(firstTexture.disposed, true);
assert.equal(secondTexture.name, 'second');
assert.deepEqual(createdFrom, [firstSource, secondSource]);
});
test('MediaTextureManager only marks textures dirty when the update predicate allows it', () => {
const video = createVideo();
const manager = new MediaTextureManager(