mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-20 17:02:53 -04:00
pagescene: prettier on the disposal helper and specs
This commit is contained in:
@@ -33,7 +33,9 @@ export function disposeObject3D(root: THREE.Object3D): void {
|
|||||||
|
|
||||||
// Every texture the tree's materials reference, as material properties or
|
// Every texture the tree's materials reference, as material properties or
|
||||||
// ShaderMaterial uniforms, deduplicated.
|
// ShaderMaterial uniforms, deduplicated.
|
||||||
export function collectObjectTextures(root: THREE.Object3D): Set<THREE.Texture> {
|
export function collectObjectTextures(
|
||||||
|
root: THREE.Object3D,
|
||||||
|
): Set<THREE.Texture> {
|
||||||
return collectMaterialTextures(collectMaterials(root));
|
return collectMaterialTextures(collectMaterials(root));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,10 @@ function makeScene(): Scene {
|
|||||||
|
|
||||||
// Scene only tracks Water instances by identity; a plain mesh stands in.
|
// Scene only tracks Water instances by identity; a plain mesh stands in.
|
||||||
function waterLikeMesh(): THREE.Mesh {
|
function waterLikeMesh(): THREE.Mesh {
|
||||||
return new THREE.Mesh(new THREE.PlaneGeometry(), new THREE.MeshBasicMaterial());
|
return new THREE.Mesh(
|
||||||
|
new THREE.PlaneGeometry(),
|
||||||
|
new THREE.MeshBasicMaterial(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// jsdom does not implement media playback, so stub the calls stopVideo makes.
|
// jsdom does not implement media playback, so stub the calls stopVideo makes.
|
||||||
|
|||||||
Reference in New Issue
Block a user