![]() |
GDevelop JS Platform
Platform for developing HTML5/Javascript based games with GDevelop
|
Export a project or a layout to a playable HTML5/Javascript based game. More...
#include <Exporter.h>
Public Member Functions | |
| Exporter (gd::AbstractFileSystem &fileSystem, gd::String gdjsRoot_="./JsPlatform") | |
| bool | ExportProjectForPixiPreview (const PreviewExportOptions &options) |
| Create a preview for the specified options. More... | |
| bool | ExportWholePixiProject (const ExportOptions &options) |
| Export the specified project, using Pixi.js. More... | |
| const gd::String & | GetLastError () const |
| Return the error that occurred during the last export. | |
| void | SetCodeOutputDirectory (gd::String codeOutputDir_) |
| Change the directory where code files are generated. More... | |
| void | SerializeProjectData (const gd::Project &project, const PreviewExportOptions &options, gd::SerializerElement &projectDataElement) |
| Serialize a project without its events to JSON. More... | |
| void | SerializeRuntimeGameOptions (const PreviewExportOptions &options, gd::SerializerElement &runtimeGameOptionsElement) |
| Serialize the content of the extra configuration to store in gdjs.runtimeGameOptions to JSON. More... | |
Export a project or a layout to a playable HTML5/Javascript based game.
| bool gdjs::Exporter::ExportProjectForPixiPreview | ( | const PreviewExportOptions & | options | ) |
Create a preview for the specified options.
| options | The options to generate the preview. |
| bool gdjs::Exporter::ExportWholePixiProject | ( | const ExportOptions & | options | ) |
Export the specified project, using Pixi.js.
Called by ShowProjectExportDialog if the user clicked on Ok.
| void gdjs::Exporter::SerializeProjectData | ( | const gd::Project & | project, |
| const PreviewExportOptions & | options, | ||
| gd::SerializerElement & | projectDataElement | ||
| ) |
Serialize a project without its events to JSON.
| project | The project to be exported |
| options | The content of the extra configuration |
| projectDataElement | The element where the project data is serialized |
| void gdjs::Exporter::SerializeRuntimeGameOptions | ( | const PreviewExportOptions & | options, |
| gd::SerializerElement & | runtimeGameOptionsElement | ||
| ) |
Serialize the content of the extra configuration to store in gdjs.runtimeGameOptions to JSON.
ExportProjectForPixiPreview must be called first to serialize the list of scripts files.| options | The content of the extra configuration |
| runtimeGameOptionsElement | The element where the game options are serialized |
|
inline |
Change the directory where code files are generated.
By default, this is set to a temporary directory.