Skip to content

Commit

Permalink
Merge pull request #137 from BenjaTK/online-tutorials
Browse files Browse the repository at this point in the history
Update in-editor tutorials
  • Loading branch information
BenjaTK authored Jul 9, 2024
2 parents e1c112a + fa65768 commit 7c24f55
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 8 deletions.
1 change: 1 addition & 0 deletions addons/gaea/generators/2D/chunk_aware_generator_2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@icon("../chunk_aware_generator.svg")
class_name ChunkAwareGenerator2D
extends GaeaGenerator2D
## @tutorial(Chunk Generation): https://benjatk.github.io/Gaea/#/tutorials/chunk_generation

## Emitted when any update to a chunk is made. Either erasing it or generating it.
signal chunk_updated(chunk_position: Vector2i)
Expand Down
2 changes: 1 addition & 1 deletion addons/gaea/generators/2D/generator_settings_2d.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@icon("../generator_settings.svg")
class_name GeneratorSettings2D
extends Resource
## @tutorial(Gaea's Structure): https://benjatk.github.io/Gaea/#/structure
## @tutorial(Gaea's Resources): https://benjatk.github.io/Gaea/#/resources

@export var modifiers: Array[Modifier2D] # TODO: Replace with custom control for easier editing. Similar to Blender.

Expand Down
1 change: 1 addition & 0 deletions addons/gaea/generators/2D/grid_2d.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class_name GaeaGrid2D
extends GaeaGrid
## @tutorial(Gaea's Resources): https://benjatk.github.io/Gaea/#/resources

const SURROUNDING := [
Vector2i.RIGHT, Vector2i.LEFT,
Expand Down
1 change: 1 addition & 0 deletions addons/gaea/generators/3D/chunk_aware_generator_3d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@icon("../chunk_aware_generator.svg")
class_name ChunkAwareGenerator3D
extends GaeaGenerator3D
## @tutorial(Chunk Generation): https://benjatk.github.io/Gaea/#/tutorials/chunk_generation

## Emitted when any update to a chunk is made. Either erasing it or generating it.
signal chunk_updated(chunk_position: Vector3i)
Expand Down
2 changes: 1 addition & 1 deletion addons/gaea/generators/3D/generator_settings_3d.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@icon("../generator_settings.svg")
class_name GeneratorSettings3D
extends Resource
## @tutorial(Gaea's Structure): https://benjatk.github.io/Gaea/#/structure
## @tutorial(Gaea's Resources): https://benjatk.github.io/Gaea/#/resources

@export var modifiers: Array[Modifier3D] # TODO: Replace with custom control for easier editing. Similar to Blender.

Expand Down
1 change: 1 addition & 0 deletions addons/gaea/generators/3D/grid_3d.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class_name GaeaGrid3D
extends GaeaGrid
## @tutorial(Gaea's Resources): https://benjatk.github.io/Gaea/#/resources

const NEIGHBORS := [
Vector3i.RIGHT, Vector3i.LEFT,
Expand Down
1 change: 1 addition & 0 deletions addons/gaea/grid.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class_name GaeaGrid
extends Resource
## The grid which all [GaeaGenerator]s fill, and the base
## of the Gaea plugin.
## @tutorial(Gaea's Resources): https://benjatk.github.io/Gaea/#/resources

## Holds the layers as subdictionaries containing values for each position.
var _grid: Dictionary
Expand Down
4 changes: 2 additions & 2 deletions addons/gaea/others/chunk_loader_2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
@icon("chunk_loader.svg")
class_name ChunkLoader2D
extends Node2D
## Used to handle chunk loading and unloading in conjunction with a Noise Generator
##@tutorial(Chunk Generation): https://benjatk.github.io/Gaea/#/tutorials/chunk_generation
## Used to handle chunk loading and unloading with a [ChunkAwareGenerator2D].
## @tutorial(Chunk Generation): https://benjatk.github.io/Gaea/#/tutorials/chunk_generation

## The generator that loads the chunks.[br]
## [b]Note:[/b] If you're chaining generators together using [param next_pass],
Expand Down
2 changes: 2 additions & 0 deletions addons/gaea/others/chunk_loader_3d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
class_name ChunkLoader3D
extends Node3D
## @experimental
## Used to handle chunk loading and unloading with a [ChunkAwareGenerator3D].
## @tutorial(Chunk Generation): https://benjatk.github.io/Gaea/#/tutorials/chunk_generation

## The generator that loads the chunks.[br]
## [b]Note:[/b] If you're chaining generators together using [param next_pass],
Expand Down
4 changes: 4 additions & 0 deletions addons/gaea/others/threaded_chunk_loader_2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
class_name ThreadedChunkLoader2D
extends ChunkLoader2D
## @experimental
## A threaded version of [ChunkLoader2D], allowing generation code to run parallel to the main thread of your game.
##
## @tutorial(Chunk Generation): https://benjatk.github.io/Gaea/#/tutorials/chunk_generation
## @tutorial(Optimization): https://benjatk.github.io/Gaea/#/tutorials/optimization

@export var threaded: bool = true

Expand Down
4 changes: 4 additions & 0 deletions addons/gaea/others/threaded_chunk_loader_3d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
class_name ThreadedChunkLoader3D
extends ChunkLoader3D
## @experimental
## A threaded version of [ChunkLoader3D], allowing generation code to run parallel to the main thread of your game.
##
## @tutorial(Chunk Generation): https://benjatk.github.io/Gaea/#/tutorials/chunk_generation
## @tutorial(Optimization): https://benjatk.github.io/Gaea/#/tutorials/optimization

@export var threaded: bool = true

Expand Down
8 changes: 6 additions & 2 deletions addons/gaea/renderers/2D/threaded_tilemap_gaea_renderer.gd
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
@tool
class_name ThreadedTilemapGaeaRenderer
extends TilemapGaeaRenderer
## Wrapper for TilemapGaeaRenderer that runs multiple _draw_area calls
## in parallel using the WorkerThreadPool.
## A threaded verison of [TilemapGaeaRenderer], allowing rendering code to run parallel to the main thread of your game.
##
## Wrapper for [TilemapGaeaRenderer] that runs multiple [method GaeaRenderer2D._draw_area] calls
## in parallel using the [WorkerThreadPool].
## @experimental
##
## @tutorial(Optimization): https://benjatk.github.io/Gaea/#/tutorials/optimization

## Whether or not to pass calls through to the default TilemapGaeaRenderer,
## instead of threading them.
Expand Down
8 changes: 6 additions & 2 deletions addons/gaea/renderers/3D/threaded_gridmap_gaea_renderer.gd
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
@tool
class_name ThreadedGridmapGaeaRenderer
extends GridmapGaeaRenderer
## Wrapper for GridmapGaeaRenderer that runs multiple _draw_area calls
## in parallel using the WorkerThreadPool.
## A threaded verison of [GridmapGaeaRenderer], allowing rendering code to run parallel to the main thread of your game.
##
## Wrapper for [GridmapGaeaRenderer] that runs multiple [method GaeaRenderer3D._draw_area] calls
## in parallel using the [WorkerThreadPool].
## @experimental
##
## @tutorial(Optimization): https://benjatk.github.io/Gaea/#/tutorials/optimization

## Whether or not to pass calls through to the default GridmapGaeaRenderer,
## instead of threading them.
Expand Down
1 change: 1 addition & 0 deletions addons/gaea/tile_info/tile_info.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ extends Resource
## Generic class to be extended to pass in data to the
## [GaeaGenerator] in each cell. Each [GaeaGenerator] creates
## a grid of [TileInfo]s.
## @tutorial(Gaea's Resources): https://benjatk.github.io/Gaea/#/resources

## [b]Optional[/b]. Used by modifiers for filtering.
@export var id: String = "":
Expand Down

0 comments on commit 7c24f55

Please sign in to comment.