Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions examples/3d-island-terrain/3d-island-terrain.json
Original file line number Diff line number Diff line change
Expand Up @@ -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);",
Expand All @@ -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];",
Expand Down Expand Up @@ -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];",
Expand Down Expand Up @@ -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);",
Expand Down Expand Up @@ -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;",
Expand All @@ -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;",
Expand Down Expand Up @@ -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);",
Expand Down Expand Up @@ -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;",
Expand Down Expand Up @@ -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);",
Expand Down Expand Up @@ -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();",
Expand Down Expand Up @@ -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 };",
Expand Down Expand Up @@ -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;",
Expand Down
Loading