diff --git a/.idea/[NanoForge] Editor.iml b/.idea/[NanoForge] Editor.iml index 668cacb..117200c 100644 --- a/.idea/[NanoForge] Editor.iml +++ b/.idea/[NanoForge] Editor.iml @@ -12,5 +12,7 @@ + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index d19124e..6b8b04c 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,6 +3,8 @@ + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..a2a0116 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,8 @@ - + + + \ No newline at end of file diff --git a/docs/docs/editor/components.mdx b/docs/docs/editor/components.mdx new file mode 100644 index 0000000..5ab9860 --- /dev/null +++ b/docs/docs/editor/components.mdx @@ -0,0 +1,50 @@ +--- +title: 'Components' +icon: 'book' +description: 'Nanoforge Editor components' +--- + +Components define the data and properties of an entity. On their own, they do not contain any logic. Instead, systems use them to determine how entities behave during the game. + +## Navigate + +To access your components, navigate to the **Components** tabs in the left panel. + +![Components navigation](../components-navigate.png) + +## Create a component + +In the **Components** panel, click **+** and **Create**. Enter a name for your component, and click **Confirm**. + +![Create component](../system-create.png) ![Create component name](../components-create-name.png) + +## Import a component + +In this **Components** panel, click **+** and **Import**. + +![Import component](../images/component-import.png) + +Choose the components that you need, click **Install** in the top right corner, and click **Apply** when you install all components you want. + +![Import components selection](../images/components-import-selection.png) + +## Edit a component + +To edit a component, navigate to **Components** tab, right-click the component, and click **Open code**. The component source file opens in the code editor. +![Access component code](../components-access.png) + +## Add Component to an entity + +Navigate to **Scenes** tab, and **Entities** subtab. Choose an entity and the component panel will be display on the right panel. + +![Components entity selection](../images/components-entity.png) ![Components entity panel](../images/components-entity-panel) + +You can click **Add component** and select the component that you need. + +![Add component to a entity](../components-entity-add.png) + +## Change entity components data + +You can modify the data of a component attach to an entity in the components inspector in the right panel. + +![Change component data](../images/components-data.png) diff --git a/docs/docs/editor/entities.mdx b/docs/docs/editor/entities.mdx new file mode 100644 index 0000000..f0e7b3b --- /dev/null +++ b/docs/docs/editor/entities.mdx @@ -0,0 +1,19 @@ +--- +title: 'Entities' +icon: 'book' +description: 'Nanoforge Editor entities' +--- + +Entities are the basic objects of your game. They represent all the elements such as player, background, props, or any object. + +## Create entity + +To access entities, navigate to **Scenes** tab, and **Entities** subtab. Click to **New entity**. You can organize your entities in folder. + +![New entity](../images/entities-new.png) + +## Delete or Rename entity + +To modify an entity, right-click on it and select **Edit**. Enter the new name and confirm the change. You can also select **Delete** to remove the entity. + +![Rename entity](../images/entities-rename.png) diff --git a/docs/docs/editor/export.mdx b/docs/docs/editor/export.mdx new file mode 100644 index 0000000..c3cc73c --- /dev/null +++ b/docs/docs/editor/export.mdx @@ -0,0 +1,15 @@ +--- +title: 'Export' +icon: 'book' +description: 'Nanoforge Editor export' +--- + +You can export your project to keep a local copy of your game. +Open the **File** menu and click **Export**. + +![Export button](../images/export.png) + +Wait a few seconds for the archive to be generated, then click **Download archive**. +The download link remains available for 15 minutes. + +![Download archive button](../images/download-export.png) diff --git a/docs/docs/editor/systems.mdx b/docs/docs/editor/systems.mdx new file mode 100644 index 0000000..66a85e9 --- /dev/null +++ b/docs/docs/editor/systems.mdx @@ -0,0 +1,48 @@ +--- +title: 'Systems' +icon: 'book' +description: 'Nanoforge Editor systems' +--- + +Systems contain the logic of your game. They are executed while the game is running and define the behavior of your entities. + +## Navigate + +To access your systems, navigate to the **Systems** tabs in the left panel. + +![System navigation](../systems-navigate.png) + +## Create a system + +In the **Systems** panel, click **+** and **Create**. Enter a name for your system, and click **Confirm**. + +![Create system](../system-create.png) ![Create system name](../system-create-name.png) + +## Import a system + +In this **Systems** panel, click **+** and **Import**. + +![Import system](../images/system-import.png) + +A list of system appear, you can now choose a system, click **Install** in the top right corner, and click **Apply** when you install all systems you want. + +![Import system selection](../images/system-import-selection.png) + +## Add system to the scene + +There are two ways to add a system to a scene. + +### 1. Add to the active scene + +In the **Systems** tab, right-click on the system you want and select **Add to active scene** +![Add system to active scene](../images/system-add-to-scene-1.png) + +### 2. Pick a system on your scene + +Navigate to **Scenes** tab, and select the **System** subtab. Click **+**, choose a system from the list, and click **Confirm**. +![Add system to a scene](../images/system-add-to-scene-2.png) + +## Edit a system + +To edit a system, navigate to **Systems** tab, right-click the system you want edit, and click **Open code**. The system source file opens in the code editor. +![Access system code](../system-access.png) diff --git a/docs/docs/editor/viewport.mdx b/docs/docs/editor/viewport.mdx new file mode 100644 index 0000000..8f7ffbf --- /dev/null +++ b/docs/docs/editor/viewport.mdx @@ -0,0 +1,21 @@ +--- +title: 'Viewport' +icon: 'book' +description: 'Nanoforge Editor viewport' +--- + +# The Viewport + +The viewport is a preview of your game, where you can run it and interact while editing. + +## Edit mode + +![Viewport toolbar on edit mode](../images/viewport-panel-edit.png) + +When the game is not running, the viewport toolbar displays two available buttons: Click **Play** (left) to start the game in the viewport and **Reload** (right) to restart the game with the last changes. + +## Play mode + +![Viewport toolbar on play mode](../images/viewport-panel-play.png) + +When the game is running, the toolbar displays three buttons. Click **Pause** (left) to pause or resume the game, **Stop** (middle) to stop the game and **Reload** (right) to restart the game with the last changes. diff --git a/docs/docs/getting-started/create-your-first-project.mdx b/docs/docs/getting-started/create-your-first-project.mdx new file mode 100644 index 0000000..574434d --- /dev/null +++ b/docs/docs/getting-started/create-your-first-project.mdx @@ -0,0 +1,24 @@ +--- +title: 'Create your first project' +icon: 'book' +description: 'How to create your first project' +--- + +To create your first game, start by creating a project from the [Project Dashboard](https://projects.nanoforge.eu/dashboard/projects). Click **New project** and fill the project information. + +![Create Project](../images/create-project.png) + +If you want to automatically link your project to a github repository, click **Add repositories from github** and select the organization you want to use. + +Once your project has been created, click **Open Editor** to launch it in the Nanoforge Editor. This will open the project initialization page, where you choose your programming language and select either a single-player or multiplayer game. + +![Init Project](../images/init-project.png) + +After the project is initialized, you will be redirected to the editor, which is composed of several panels: + +- **Center**: The **Viewport**, where you can preview and interact with your game while editing. +- **Left**: The **Project Explorer**, where you can manage your scenes, entities, and systems. You can also switch between the Components, Systems, Assets, and Libraries tabs. +- **Right**: The **Inspector**, which displays the properties of the selected entity and lets you add, remove, or edit its components. +- **Bottom**: The **File Explorer**, where you can browse your project files and open them to start coding. + +![Main Editor](../images/main-editor.png) diff --git a/docs/docs/getting-started/introduction.mdx b/docs/docs/getting-started/introduction.mdx new file mode 100644 index 0000000..ba6b04c --- /dev/null +++ b/docs/docs/getting-started/introduction.mdx @@ -0,0 +1,19 @@ +--- +title: 'Editor' +icon: 'book' +description: 'Nanoforge Editor documentation' +--- + +Nanoforge editor provide a complete online editor for create your game. + +## Start Here + +- [Create your first project](create-your-first-project) + +## Editor Documentation + +- [Entities](../editor/entities) +- [Components](../editor/compoents) +- [Systems](../editor/systems) +- [Viewport](../editor/viewport) +- [Export](../editor/export) diff --git a/docs/docs/images/components-access.png b/docs/docs/images/components-access.png new file mode 100644 index 0000000..1a634b7 Binary files /dev/null and b/docs/docs/images/components-access.png differ diff --git a/docs/docs/images/components-create-name.png b/docs/docs/images/components-create-name.png new file mode 100644 index 0000000..9ef5882 Binary files /dev/null and b/docs/docs/images/components-create-name.png differ diff --git a/docs/docs/images/components-create.png b/docs/docs/images/components-create.png new file mode 100644 index 0000000..fd9918b Binary files /dev/null and b/docs/docs/images/components-create.png differ diff --git a/docs/docs/images/components-data.png b/docs/docs/images/components-data.png new file mode 100644 index 0000000..1378d20 Binary files /dev/null and b/docs/docs/images/components-data.png differ diff --git a/docs/docs/images/components-entity-add.png b/docs/docs/images/components-entity-add.png new file mode 100644 index 0000000..5c57357 Binary files /dev/null and b/docs/docs/images/components-entity-add.png differ diff --git a/docs/docs/images/components-entity-panel.png b/docs/docs/images/components-entity-panel.png new file mode 100644 index 0000000..c83f115 Binary files /dev/null and b/docs/docs/images/components-entity-panel.png differ diff --git a/docs/docs/images/components-entity.png b/docs/docs/images/components-entity.png new file mode 100644 index 0000000..0c45631 Binary files /dev/null and b/docs/docs/images/components-entity.png differ diff --git a/docs/docs/images/components-import.png b/docs/docs/images/components-import.png new file mode 100644 index 0000000..b05d3ec Binary files /dev/null and b/docs/docs/images/components-import.png differ diff --git a/docs/docs/images/components-navigation.png b/docs/docs/images/components-navigation.png new file mode 100644 index 0000000..254cfbb Binary files /dev/null and b/docs/docs/images/components-navigation.png differ diff --git a/docs/docs/images/create-project.png b/docs/docs/images/create-project.png new file mode 100644 index 0000000..546425d Binary files /dev/null and b/docs/docs/images/create-project.png differ diff --git a/docs/docs/images/download-export.png b/docs/docs/images/download-export.png new file mode 100644 index 0000000..274757b Binary files /dev/null and b/docs/docs/images/download-export.png differ diff --git a/docs/docs/images/entities-new.png b/docs/docs/images/entities-new.png new file mode 100644 index 0000000..a684c6e Binary files /dev/null and b/docs/docs/images/entities-new.png differ diff --git a/docs/docs/images/entities-rename.png b/docs/docs/images/entities-rename.png new file mode 100644 index 0000000..c6b6dd5 Binary files /dev/null and b/docs/docs/images/entities-rename.png differ diff --git a/docs/docs/images/export.png b/docs/docs/images/export.png new file mode 100644 index 0000000..ca84662 Binary files /dev/null and b/docs/docs/images/export.png differ diff --git a/docs/docs/images/init-project.png b/docs/docs/images/init-project.png new file mode 100644 index 0000000..be7539c Binary files /dev/null and b/docs/docs/images/init-project.png differ diff --git a/docs/docs/images/main-editor.png b/docs/docs/images/main-editor.png new file mode 100644 index 0000000..b9f9807 Binary files /dev/null and b/docs/docs/images/main-editor.png differ diff --git a/docs/docs/images/system-access.png b/docs/docs/images/system-access.png new file mode 100644 index 0000000..e44c83d Binary files /dev/null and b/docs/docs/images/system-access.png differ diff --git a/docs/docs/images/system-add-to-scene-1.png b/docs/docs/images/system-add-to-scene-1.png new file mode 100644 index 0000000..33ae081 Binary files /dev/null and b/docs/docs/images/system-add-to-scene-1.png differ diff --git a/docs/docs/images/system-add-to-scene-2.png b/docs/docs/images/system-add-to-scene-2.png new file mode 100644 index 0000000..cdf2889 Binary files /dev/null and b/docs/docs/images/system-add-to-scene-2.png differ diff --git a/docs/docs/images/system-create-name.png b/docs/docs/images/system-create-name.png new file mode 100644 index 0000000..a29cb0f Binary files /dev/null and b/docs/docs/images/system-create-name.png differ diff --git a/docs/docs/images/system-import-selection.png b/docs/docs/images/system-import-selection.png new file mode 100644 index 0000000..24ebe8d Binary files /dev/null and b/docs/docs/images/system-import-selection.png differ diff --git a/docs/docs/images/system-import.png b/docs/docs/images/system-import.png new file mode 100644 index 0000000..2e04d72 Binary files /dev/null and b/docs/docs/images/system-import.png differ diff --git a/docs/docs/images/systems-create.png b/docs/docs/images/systems-create.png new file mode 100644 index 0000000..669b87c Binary files /dev/null and b/docs/docs/images/systems-create.png differ diff --git a/docs/docs/images/systems-navigate.png b/docs/docs/images/systems-navigate.png new file mode 100644 index 0000000..dbab978 Binary files /dev/null and b/docs/docs/images/systems-navigate.png differ diff --git a/docs/docs/images/viewport-panel-edit.png b/docs/docs/images/viewport-panel-edit.png new file mode 100644 index 0000000..90a5dbf Binary files /dev/null and b/docs/docs/images/viewport-panel-edit.png differ diff --git a/docs/docs/images/viewport-panel-play.png b/docs/docs/images/viewport-panel-play.png new file mode 100644 index 0000000..91b6bc3 Binary files /dev/null and b/docs/docs/images/viewport-panel-play.png differ