diff --git a/examples/3d-island-terrain/3d-island-terrain.json b/examples/3d-island-terrain/3d-island-terrain.json index 0b24084dc..5a9955c4c 100644 --- a/examples/3d-island-terrain/3d-island-terrain.json +++ b/examples/3d-island-terrain/3d-island-terrain.json @@ -3342,10 +3342,6 @@ "description": "", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(480, 270);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "harness.watch('Player');", "const getPlayer = () => harness.getObjects('Player')[0];", "const terrain = harness.getRuntimeObject(harness.getObjects('Terrain')[0].id);", @@ -3369,12 +3365,6 @@ "description": "", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(480, 270);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", - "// Faster in the software renderer used to run tests (this test is about collisions).", - "harness.setGameResolutionSize(160, 90);", "harness.getCurrentRuntimeScene().getObjects('Grass')[0].hide(true);", "harness.watch('Player');", "const getPlayer = () => harness.getObjects('Player')[0];", @@ -3407,12 +3397,6 @@ "description": "", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(480, 270);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", - "// Faster in the software renderer used to run tests (this test is about collisions).", - "harness.setGameResolutionSize(160, 90);", "harness.getCurrentRuntimeScene().getObjects('Grass')[0].hide(true);", "harness.watch('Player');", "const getPlayer = () => harness.getObjects('Player')[0];", @@ -3444,10 +3428,6 @@ "description": "", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(160, 90);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "const { TerrainData, SampleRectangle, codec, relief, brushes, edits } = gdjs.__terrain3DExtension;", "const makeBase = (resolution, reliefName) => {", " const data = new TerrainData(resolution);", @@ -3546,10 +3526,6 @@ "description": "", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(160, 90);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "const scene = harness.getCurrentRuntimeScene();", "const terrainObject = scene.getObjects('Terrain')[0];", "const terrain = terrainObject.__terrain3D;", @@ -3576,10 +3552,6 @@ "description": "", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(160, 90);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "await harness.stepFrames(1);", "const scene = harness.getCurrentRuntimeScene();", "const physicsWorld = scene.getObjects('Terrain')[0].getBehavior('Physics3D')._sharedData;", @@ -3678,10 +3650,6 @@ "description": "", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(160, 90);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "const game = harness.getRuntimeGame();", "const scene = harness.getCurrentRuntimeScene();", "scene.getObjects('Player')[0].getBehavior('ThirdPersonCamera').activate(false);", @@ -3736,15 +3704,10 @@ "description": "", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(160, 90);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "await harness.stepFrames(2);", "const game = harness.getRuntimeGame();", "const scene = harness.getCurrentRuntimeScene();", "scene.getObjects('Player')[0].getBehavior('ThirdPersonCamera').activate(false);", - "scene.getObjects('Grass')[0].hide(true);", "const terrainObject = scene.getObjects('Terrain')[0];", "const terrain = terrainObject.__terrain3D;", "const targetX = 640, targetY = 1100;", @@ -3843,10 +3806,6 @@ "description": "Paints tints and wetness (with raised ground and painted layers) on terrains of several reliefs and resolutions: the saved data gives back the same colors. Also checks that unpainted data stays tiny, that data saved before tint and wetness existed (format 1) is still read, the tint and wetness edits, and that copies and resampled terrains keep the colors.", "source": [ "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(160, 90);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "const { TerrainData, SampleRectangle, codec, relief, brushes, edits } = gdjs.__terrain3DExtension;", "const makeBase = (resolution, reliefName) => {", " const data = new TerrainData(resolution);", @@ -3925,10 +3884,6 @@ "// Each brush stroke takes a few seconds in the software renderer used to run tests.", "harness.setTimeoutMs(60000);", "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(160, 90);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "await harness.stepFrames(2);", "const game = harness.getRuntimeGame();", "const scene = harness.getCurrentRuntimeScene();", @@ -3966,8 +3921,6 @@ "}", "console.log(tintedBlades + ' of ' + blades + ' blades take the tint of the ground');", "harness.assert(tintedBlades > 0 && tintedBlades < blades / 2, 'The blades on the dry patch take its tint.');", - "// Faster in the software renderer used to run tests.", - "scene.getObjects('Grass')[0].hide(true);", "", "// Actions and expressions.", "const spot = { x: meadow.x + 300, y: meadow.y - 300 };", @@ -4051,15 +4004,10 @@ "// Each brush stroke takes a few seconds in the software renderer used to run tests.", "harness.setTimeoutMs(60000);", "await harness.goToScene('Game Scene');", - "// Faster in the software renderer used to run tests.", - "harness.setGameResolutionSize(160, 90);", - "harness.getCurrentRuntimeScene().getLayer('').setEffectBooleanParameter('Effect', 'isCastingShadow', false);", - "for (const effectName of ['Ambient occlusion', 'Depth of field', 'Bloom']) harness.getCurrentRuntimeScene().getLayer('').enableEffect(effectName, false);", "await harness.stepFrames(2);", "const game = harness.getRuntimeGame();", "const scene = harness.getCurrentRuntimeScene();", "scene.getObjects('Player')[0].getBehavior('ThirdPersonCamera').activate(false);", - "scene.getObjects('Grass')[0].hide(true);", "const terrainObject = scene.getObjects('Terrain')[0];", "const terrain = terrainObject.__terrain3D;", "const countHoleSamples = () => terrainObject.getSurface().getHeightField().heights.filter(Number.isNaN).length;",