Compare commits

...

124 Commits

Author SHA1 Message Date
Florian Rival
0a35bc3272 Bump newIDE version 2018-01-22 23:35:55 +01:00
Florian Rival
d8b737a31f Fix LocalS3Export always reusing the same folder leading to useless files in exported game 2018-01-22 23:35:32 +01:00
Florian Rival
cfd2655f6c Bump newIDE version 2018-01-22 23:29:21 +01:00
Florian Rival
1896241b9d Move AWS S3 credentials to an .env file for games deployment on GDevelop hosting 2018-01-22 23:25:42 +01:00
Florian Rival
0ed22a6ee1 Fix upload to GDevelop hosting of exported games with large files 2018-01-22 22:52:44 +01:00
Florian Rival
2bfcb99c3e Add analytics when a signup is done 2018-01-22 00:20:32 +01:00
Florian Rival
815f8a520a Bump newIDE version 2018-01-21 22:11:59 +01:00
Florian Rival
f115b6607f Add PhysicsBehavior support to newIDE, with an example 2018-01-21 22:11:24 +01:00
Florian Rival
c876f67502 Add pathfinding example to newIDE web-app 2018-01-20 21:25:25 +01:00
Florian Rival
27674f272c Bump newIDE version 2018-01-20 19:21:13 +01:00
Florian Rival
02879507e3 Fix tests (outdated snapshots after adding Pathfinding to newIDE) 2018-01-20 19:19:38 +01:00
Florian Rival
0a7629878f Fix Sepia layer effect (broken since Pixi v4 update) 2018-01-20 19:00:22 +01:00
Florian Rival
b0368232d0 Add Parallax example to newIDE 2018-01-20 17:19:45 +01:00
Florian Rival
a32bf3db98 Add Pathfinding and Zombie Laser examples to newIDE 2018-01-20 17:02:47 +01:00
Florian Rival
64cbbb20d3 Expose PathfindingBehavior when building with Emscripten 2018-01-20 16:53:12 +01:00
Florian Rival
dd4fbecc98 Update some GDevelop services API to use api.gdevelop-app.com 2018-01-20 16:28:27 +01:00
Florian Rival
807a75a265 Update productName for newIDE 2018-01-19 00:24:07 +01:00
Florian Rival
6e1b44ea56 Bump newIDE version 2018-01-18 23:31:41 +01:00
Florian Rival
d870a54f58 Fix error when handling download-progress of an update 2018-01-18 23:31:00 +01:00
Florian Rival
9f464a3f23 Bump newIDE version 2018-01-18 23:12:37 +01:00
Florian Rival
ed4e84d665 Add Export icon in newIDE main toolbar & fix profile refreshing after getting a new subscription 2018-01-18 23:12:08 +01:00
Florian Rival
1e4ab96233 Bump newIDE version 2018-01-18 00:04:27 +01:00
Florian Rival
380c034ff5 Merge pull request #433 from 4ian/feature/online-cordova-export
Packaging for Android with GDevelop online build service + various improvements
2018-01-18 00:02:51 +01:00
Florian Rival
7c9abe432d Fix AboutDialog story in storybook and use retro default avatars 2018-01-18 00:02:05 +01:00
Florian Rival
2ca853c22c Add HelpButton in ProfileDialog and disabled icon field in ProjectPropertiesDialog 2018-01-17 23:55:40 +01:00
Florian Rival
b23d55612a Add display of user Gravatar in ProfileDetails 2018-01-17 22:36:51 +01:00
Florian Rival
b261faacfc Freeze GDCore/libGD.js and newIDE version to 4.0.96 (don't read it from Git tags) 2018-01-17 00:21:07 +01:00
Florian Rival
9984b32876 Add link to help page specific to each exporters 2018-01-16 23:42:46 +01:00
Florian Rival
d63ba75430 Change wording in CreateProfile 2018-01-16 23:33:44 +01:00
Florian Rival
2db903ed94 Fix profile refreshing after login/account creation 2018-01-16 22:00:45 +01:00
Florian Rival
3f9bc4d335 Fix upload and Android export for large files 2018-01-16 21:25:36 +01:00
Florian Rival
3df95d0e21 Switch authentification to use Firebase 2018-01-14 17:59:09 +01:00
Florian Rival
f445695f6a Add auto-update support to GDevelop 5 2018-01-13 17:17:48 +01:00
Florian Rival
6f3163d7bd Rework ExportDialog to have a list of exporters to choose from 2018-01-13 14:54:10 +01:00
Florian Rival
5421eae23d Add buttons to switch between exporters of the same kind 2018-01-11 00:04:31 +01:00
Florian Rival
a0e82ee22f Add button to download logs in LocalOnlineCordovaExport 2018-01-10 23:25:18 +01:00
Florian Rival
1fbf822769 Move GDevelop hosting API configuration to GDevelopServices/ApiConfigs.js 2018-01-09 23:52:44 +01:00
Florian Rival
6b0f037722 Add a comment about working with Auth0 during development 2018-01-09 23:52:44 +01:00
Florian Rival
ae231d2fe6 Update packageName of fixtures/example games 2018-01-09 23:52:44 +01:00
Florian Rival
2e95899da7 Ensure user is asked for authenticating again if needed 2018-01-09 23:52:44 +01:00
Florian Rival
3f45b38dfc [WIP] Make SubscriptionDialog working with GDevelop Services and Stripe
TODO: Properly handle the refresh of ProfileDialog
2018-01-09 23:52:44 +01:00
Florian Rival
daf4d36348 [WIP] Add SubscriptionDialog 2018-01-09 23:52:44 +01:00
Florian Rival
477cd16f23 Add storybook stories for Profile components 2018-01-09 23:52:44 +01:00
Florian Rival
83eded0056 [WIP] Improve LocalOnlineCordovaExport progress handling 2018-01-09 23:52:44 +01:00
Florian Rival
338de9c149 [WIP] Add LimitDisplayer and display subscriptions limits in LocalOnlineCordovaExport 2018-01-09 23:52:44 +01:00
Florian Rival
6d99d4e661 [WIP] Add happy path for LocalOnlineCordovaExport 2018-01-09 23:52:44 +01:00
Florian Rival
4e5a8060c8 [WIP] Add Archiver to create zip files for LocalOnlineCordovaExport 2018-01-09 23:52:44 +01:00
Florian Rival
eb938e39ff [WIP] Add LocalOnlineCordovaExport (with no real calls to the build service for now) 2018-01-09 23:52:44 +01:00
Florian Rival
cff8604a5f Fix flow error/incompatibility in auth0-lock's node_modules 2018-01-09 23:52:44 +01:00
Florian Rival
2afa54bcd2 [WIP] Add SubscriptionDetails, ProfileDetails and UsagesDetails in ProfileDialog 2018-01-09 23:52:44 +01:00
Florian Rival
4da6025b6f Move configuration of BrowserS3PreviewLauncher in ApiConfigs 2018-01-09 23:52:44 +01:00
Florian Rival
c4f64444e7 [WIP] Add a Profile in newIDE with login/logout based on Auth0 2018-01-09 23:52:44 +01:00
Florian Rival
b0205b296f Merge pull request #432 from 4ian/fix/various
Various improvements for GDJS (memory + libs update)
2018-01-09 23:48:15 +01:00
Florian Rival
e0c8b3cc81 Add comment about RuntimScene.unloadScene and memory management 2018-01-09 23:47:47 +01:00
Florian Rival
80ca92336e Fix filters and refactor Text style update for Pixi v4 2018-01-09 23:03:26 +01:00
Florian Rival
6c0681e4ca Merge branch 'mem' of https://github.com/dos1/GD into dos1-mem 2018-01-07 20:06:18 +01:00
Sebastian Krzyszkowiak
26e8503dc8 GDJS: HowlerSoundManager: use XMLHttpRequest to preload
Howler decodes the whole file, which causes massive memory spike
on load when the project contains lots of longer music files.
We could use HTML5 audio to avoid decoding, but then the load event
actually means "preloaded enough to start playing without buffering".

We don't need to decode here, putting the file into browser cache
should be enough, so let's just download the file with XHR.
2018-01-06 02:09:01 +01:00
Sebastian Krzyszkowiak
c1ce78efde GDJS: howler-sound-manager: use .unload() method when destroying to free the resources used by sounds 2018-01-06 02:08:54 +01:00
Sebastian Krzyszkowiak
2f52c2f062 GDJS: store global volume value in HowlerSoundManager to avoid rounding errors (#430) 2018-01-05 16:59:16 +01:00
Sebastian Krzyszkowiak
24d11a2446 GDJS: update howler.js to 2.0.7 2018-01-04 23:44:57 +01:00
Sebastian Krzyszkowiak
e1d4ae5bbd GDJS: update Pixi to 4.6.2 2018-01-04 23:44:32 +01:00
Sebastian Krzyszkowiak
dcfe346f54 GDJS: RuntimeScene: clean up more variables on unload, so they can be garbage collected 2018-01-04 23:44:13 +01:00
Florian Rival
3906db9efe Make UserUUID generation security/exception errors-proof 2017-12-26 16:47:00 +01:00
Florian Rival
ba5244d95d Bump newIDE version 2017-12-26 16:46:32 +01:00
Florian Rival
52db730870 Add ErrorBounday for handling editor crash and EmptyEventsPlaceholder for empty events sheets 2017-12-26 14:47:46 +01:00
Florian Rival
82d2278ebd Bump newIDE version 2017-12-25 23:55:48 +01:00
Florian Rival
30d08ac72d Add button linking to help about creating new themes in newIDE 2017-12-25 17:48:38 +01:00
Florian Rival
6f1e71c8e5 Update README about creating themes for newIDE 2017-12-25 17:41:00 +01:00
Florian Rival
385be9b5f5 Make EventsSheet color scheme customizable and add Monokai inspired dark color scheme 2017-12-25 17:33:25 +01:00
Florian Rival
25cb041d78 Improve DarkTheme to fix Raised buttons readability 2017-12-25 14:58:36 +01:00
Florian Rival
18fa9cd659 Merge pull request #429 from 4ian/feature/upgrade-mui-react
Upgrade to React 16 and Material-UI 0.20
2017-12-24 17:33:58 +01:00
Florian Rival
ce760541c5 Upgrade to React 16.2 2017-12-24 16:51:04 +01:00
Florian Rival
db51b652f0 Remove useless refs created warnings with React 16 2017-12-24 15:05:46 +01:00
Florian Rival
4222d98aa9 Update instructions parameters color scheme 2017-12-24 15:05:20 +01:00
Florian Rival
484f1e5dcb Fix typing 2017-12-24 14:30:43 +01:00
Florian Rival
7304b94a77 Fix warnings/React issues with refs in EventsSheet 2017-12-24 14:07:20 +01:00
Florian Rival
ee5ec7df72 Fix InstancePropertiesEditor not refreshed when an instance is deleted/moved 2017-12-24 12:49:20 +01:00
Florian Rival
9a1e4bdf7c Update react-i18next dependency of newIDE 2017-12-24 12:40:26 +01:00
Florian Rival
a43cca7629 Update react-dnd dependency of newIDE 2017-12-24 12:31:08 +01:00
Florian Rival
0cdabab2ec Update react-color dependency of newIDE 2017-12-24 12:24:49 +01:00
Florian Rival
28b968ea99 Update newIDE to React 15.6.2 2017-12-24 12:21:32 +01:00
Florian Rival
5160033092 Upgrade storybook and remove useless newIDE dependencies 2017-12-24 12:00:41 +01:00
Florian Rival
ce086c07b9 Upgrade material-ui to v0.20 and upgrade other dependencies 2017-12-24 11:49:40 +01:00
Florian Rival
bf9348488d Merge pull request #428 from 4ian/feature/themable-newIDE
Add a Dark theme to newIDE
2017-12-23 23:18:38 +01:00
Florian Rival
70b3e0701b Fix StartPage tests 2017-12-23 23:14:44 +01:00
Florian Rival
dc3d890937 Add comment explaining how to create a new theme 2017-12-23 23:14:02 +01:00
Florian Rival
f68be32e2d Update logo in newIDE StartPage and tweak colors 2017-12-23 23:11:10 +01:00
Florian Rival
3758e7af03 Fix editors not opening in SceneEditor in newIDE 2017-12-23 22:40:50 +01:00
Florian Rival
5ab1858349 [WIP] Refactor EventsSheet to make it partially themable 2017-12-23 21:50:12 +01:00
Florian Rival
54353bcb24 [WIP] Add PreferencesDialog and make the whole newIDE interface themable 2017-12-23 21:06:55 +01:00
Florian Rival
de7640558d Fix Clock Skew related errors while uploading to S3 from certain computers 2017-12-23 13:52:33 +01:00
Florian Rival
2e17b16516 Make newIDE context menus dynamic (greyed-out items if not applicable, checkbox for grid) 2017-12-23 13:51:36 +01:00
Sebastian Krzyszkowiak
345f9f1786 Run CopyRuntimeToGD.sh with bash explicitly (#427)
The script contains bashisms which fail on systems where sh is
symlinked to dash instead of bash.
2017-12-22 11:12:02 +01:00
Florian Rival
8c9214ce5e Bump newIDE version 2017-12-20 22:44:49 +01:00
Florian Rival
fc9cc8046d Merge pull request #426 from 4ian/feature/newide-js-code-event
Add support for Javascript Code Event in newIDE
2017-12-20 22:33:12 +01:00
Florian Rival
e592bb855d Add support for objects parameter in JsCodeEvent in newIDE 2017-12-20 22:30:53 +01:00
Florian Rival
f8407264da Add basic support for JsCodeEvent in newIDE 2017-12-19 21:16:27 +01:00
Florian Rival
202fe2b69a Add FpsLimiter to limit framerate on InstancesEditor of newIDE, to avoid killing CPU/battery 2017-12-18 00:05:31 +01:00
Florian Rival
d14a93f9d0 Remove ok button in MainFrame Snackbar 2017-12-17 19:37:13 +01:00
Florian Rival
1d1ccdbf06 Fix unmounting and related focus issue of editors in newIDE 2017-12-17 16:16:29 +01:00
Florian Rival
92fd647316 Add button to open external events or layout events from a LinkEvent in newIDE 2017-12-16 18:09:30 +01:00
Florian Rival
d8ca506200 Add flow typing to MainFrame 2017-12-16 17:18:09 +01:00
Florian Rival
928d6eda98 Update VSCode settings 2017-12-16 16:53:53 +01:00
Florian Rival
d5e6755694 Move all providers from MainFrame to a dedicated component 2017-12-16 16:53:37 +01:00
Florian Rival
a1431126ec Merge pull request #424 from 4ian/feature/clipboard-project-manager
Clipboard support for ProjectManager in newIDE
2017-12-16 16:17:14 +01:00
Florian Rival
13c8caeb8c Increase flow coverage 2017-12-16 16:12:10 +01:00
Florian Rival
b2b5ee0e19 Add a TODO about style refactoring 2017-12-16 14:28:32 +01:00
Florian Rival
ff74ecd7c9 Run prettier on newIDE codebase 2017-12-16 14:26:05 +01:00
Florian Rival
0ac3e79156 Fix flow typing in newIDE and update flow to latest version 2017-12-16 14:24:25 +01:00
Florian Rival
3a69936e2e Add copy/cut/paste support for External Layouts and Events in newIDE 2017-12-16 14:02:40 +01:00
Florian Rival
e738d5dd5f Add copy/cut/paste support for Layout in newIDE 2017-12-16 00:14:18 +01:00
Florian Rival
ed8ee21c04 Reduce GroupEvent height 2017-12-15 23:22:47 +01:00
Florian Rival
87220a941a Bump newIDE version 2017-12-15 23:19:23 +01:00
Florian Rival
4425d13c7a Rename objectWithScope to objectWithContext 2017-12-13 00:19:31 +01:00
Florian Rival
b818e5f493 Add support for copy/cut/paste objects 2017-12-12 23:57:37 +01:00
Lizard-13
403563ba32 Support keyboard top row numbers in HTML5 games (#422) 2017-12-11 14:29:14 +01:00
Florian Rival
156ca68116 Make newIDE save project as formatted JSON 2017-12-10 23:03:16 +01:00
Florian Rival
de3677a6c3 Add AnimationPreview in SpriteEditor 2017-12-10 23:02:51 +01:00
Florian Rival
3b76dfe9f4 Fix LocalCordovaExport storybook and increase expression selector height 2017-12-09 20:08:23 +01:00
Florian Rival
6e38ee6d16 Move newIDE test files next to the test source files (no __tests__ folder) 2017-12-09 18:05:59 +01:00
Florian Rival
454657b00f Add link to Tank Shooter beginner tutorial in newIDE 2017-12-09 17:47:54 +01:00
Florian Rival
aad0c4e909 Fix newIDE yarn.lock 2017-12-09 17:27:53 +01:00
Florian Rival
d106ee9ac1 Merge pull request #421 from 4ian/feature/newide-expressions-autocomplete
Expression field with list of available functions for newIDE
2017-12-09 17:16:41 +01:00
Lizard-13
495900c083 Add point inside object condition (#418)
* Add point inside object condition

* Update names and comments
2017-12-04 09:25:56 +01:00
302 changed files with 22945 additions and 5475 deletions

View File

@@ -13,6 +13,7 @@
"/usr/local/lib/wx/include/osx_cocoa-unicode-3.0",
"/usr/local/include/wx-3.0",
"/usr/include/machine",
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.0.0/include",
@@ -86,4 +87,4 @@
}
],
"version": 3
}
}

10
.vscode/settings.json vendored
View File

@@ -62,7 +62,15 @@
"__tuple": "cpp",
"hash_map": "cpp",
"hash_set": "cpp",
"system_error": "cpp"
"system_error": "cpp",
"__nullptr": "cpp",
"__functional_base": "cpp",
"__functional_base_03": "cpp",
"chrono": "cpp",
"ratio": "cpp",
"atomic": "cpp",
"locale": "cpp",
"string_view": "cpp"
},
"files.exclude": {
"Binaries/*build*": true,

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

View File

@@ -621,6 +621,18 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
.AddParameter("objectList", _("Objects"))
.MarkAsSimple();
obj.AddCondition("CollisionPoint",
_("Point inside object"),
_("Test if a point is inside the object collision masks."),
_("_PARAM1_;_PARAM2_ is inside _PARAM0_"),
_("Collision"),
"res/conditions/collisionPoint24.png",
"res/conditions/collisionPoint.png")
.AddParameter("object", _("Object"))
.AddParameter("expression", _("X position of the point"))
.AddParameter("expression", _("Y position of the point"))
.MarkAsSimple();
obj.AddExpression("X", _("X position"), _("X position of the object"), _("Position"), "res/actions/position.png")
.AddParameter("object", _("Object"));

View File

@@ -143,13 +143,13 @@ void InstructionSentenceFormatter::LoadTypesFormattingFromConfig()
{
//Load default configuration
typesFormatting.clear();
typesFormatting["expression"].SetColor(99, 0, 0).SetBold();
typesFormatting["object"].SetColor(19, 81, 0).SetBold();
typesFormatting["behavior"].SetColor(19, 81, 0).SetBold();
typesFormatting["operator"].SetColor(64, 81, 79).SetBold();
typesFormatting["objectvar"].SetColor(44, 69, 99).SetBold();
typesFormatting["scenevar"].SetColor(44, 69, 99).SetBold();
typesFormatting["globalvar"].SetColor(44, 69, 99).SetBold();
typesFormatting["expression"].SetColor(27, 143, 1).SetBold();
typesFormatting["object"].SetColor(182, 97, 10).SetBold();
typesFormatting["behavior"].SetColor(119, 119, 119).SetBold();
typesFormatting["operator"].SetColor(55, 131, 211).SetBold();
typesFormatting["objectvar"].SetColor(131, 55, 162).SetBold();
typesFormatting["scenevar"].SetColor(131, 55, 162).SetBold();
typesFormatting["globalvar"].SetColor(131, 55, 162).SetBold();
//Load any existing custom configuration
#if !defined(GD_NO_WX_GUI)

View File

@@ -10,7 +10,7 @@ include(CMakeUtils.txt) #Functions to factor common tasks done in CMakeLists.txt
#Add all the CMakeLists:
ADD_SUBDIRECTORY(AdMobObject)
ADD_SUBDIRECTORY(AnchorBehavior)
IF (NOT EMSCRIPTEN) #Only add some extensions when compiling with emscripten.
IF (NOT EMSCRIPTEN)
ADD_SUBDIRECTORY(AdvancedXML)
ADD_SUBDIRECTORY(AES)
ADD_SUBDIRECTORY(Box3DObject)
@@ -35,9 +35,9 @@ ENDIF()
ADD_SUBDIRECTORY(PanelSpriteObject)
IF (NOT EMSCRIPTEN)
ADD_SUBDIRECTORY(PathBehavior)
ADD_SUBDIRECTORY(PathfindingBehavior)
ADD_SUBDIRECTORY(PhysicsBehavior)
ENDIF()
ADD_SUBDIRECTORY(PathfindingBehavior)
ADD_SUBDIRECTORY(PhysicsBehavior)
ADD_SUBDIRECTORY(PlatformBehavior)
ADD_SUBDIRECTORY(PrimitiveDrawing)
ADD_SUBDIRECTORY(Shopify)

View File

@@ -7,8 +7,6 @@ This project is released under the MIT License.
#if defined(GD_IDE_ONLY)
#include "GDCore/Extensions/PlatformExtension.h"
#include "GDCore/Tools/Localization.h"
#include <iostream>
void DeclarePanelSpriteObjectExtension(gd::PlatformExtension & extension);

File diff suppressed because it is too large Load Diff

View File

@@ -8,26 +8,21 @@ This project is released under the MIT License.
#include "GDCore/Extensions/PlatformExtension.h"
#include "GDCore/Tools/Localization.h"
#include <iostream>
void DeclarePathfindingBehaviorExtension(gd::PlatformExtension & extension);
/**
* \brief This class declares information about the JS extension.
*/
class JsExtension : public gd::PlatformExtension
class PathfindingBehaviorJsExtension : public gd::PlatformExtension
{
public:
/**
* \brief Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
*/
JsExtension()
PathfindingBehaviorJsExtension()
{
SetExtensionInformation("PathfindingBehavior",
_("Pathfinding behavior"),
_("Compute paths for objects avoiding obstacles."),
"Florian Rival",
"Open source (MIT License)");
CloneExtension("GDevelop C++ platform", "PathfindingBehavior");
DeclarePathfindingBehaviorExtension(*this);
GetBehaviorMetadata("PathfindingBehavior::PathfindingBehavior")
.SetIncludeFile("Extensions/PathfindingBehavior/pathfindingruntimebehavior.js")
@@ -103,14 +98,21 @@ public:
}
StripUnimplementedInstructionsAndExpressions();
GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
};
};
#if defined(EMSCRIPTEN)
extern "C" gd::PlatformExtension * CreateGDJSPathfindingBehaviorExtension() {
return new PathfindingBehaviorJsExtension;
}
#else
/**
* Used by GDevelop to create the extension class
* -- Do not need to be modified. --
*/
extern "C" gd::PlatformExtension * GD_EXTENSION_API CreateGDJSExtension() {
return new JsExtension;
return new PathfindingBehaviorJsExtension;
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -6,29 +6,23 @@ This project is released under the MIT License.
*/
#if defined(GD_IDE_ONLY)
#include "GDCore/Extensions/PlatformExtension.h"
#include <iostream>
#include "GDCore/Tools/Localization.h"
void DeclarePhysicsBehaviorExtension(gd::PlatformExtension & extension);
/**
* \brief This class declares information about the JS extension.
*/
class JsExtension : public gd::PlatformExtension
class PhysicsBehaviorJsExtension : public gd::PlatformExtension
{
public:
/**
* \brief Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
*/
JsExtension()
PhysicsBehaviorJsExtension()
{
SetExtensionInformation("PhysicsBehavior",
_("Physics behavior"),
_("Behavior allowing to move objects as if they were subject to the laws of physics."),
"Florian Rival",
"Open source (MIT License)");
CloneExtension("GDevelop C++ platform", "PhysicsBehavior");
DeclarePhysicsBehaviorExtension(*this);
GetBehaviorMetadata("PhysicsBehavior::PhysicsBehavior")
.SetIncludeFile("Extensions/PhysicsBehavior/box2djs/box2d.js")
@@ -145,14 +139,21 @@ public:
*/
StripUnimplementedInstructionsAndExpressions();
GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
};
};
#if defined(EMSCRIPTEN)
extern "C" gd::PlatformExtension * CreateGDJSPhysicsBehaviorExtension() {
return new PhysicsBehaviorJsExtension;
}
#else
/**
* Used by GDevelop to create the extension class
* -- Do not need to be modified. --
*/
extern "C" gd::PlatformExtension * GD_EXTENSION_API CreateGDJSExtension() {
return new JsExtension;
return new PhysicsBehaviorJsExtension;
}
#endif
#endif

View File

@@ -7,6 +7,7 @@ This project is released under the MIT License.
#include "PhysicsBehavior.h"
#include <string>
#include "GDCore/Tools/Localization.h"
#include "Box2D/Box2D.h"
#include "Triangulation/triangulate.h"
#include "GDCpp/Runtime/RuntimeScene.h"
@@ -17,6 +18,10 @@ This project is released under the MIT License.
#include "GDCpp/Runtime/Project/Project.h"
#include "GDCpp/Runtime/Project/Layout.h"
#include "RuntimeScenePhysicsDatas.h"
#if defined(GD_IDE_ONLY)
#include <map>
#include "GDCore/IDE/Dialogs/PropertyDescriptor.h"
#endif
#undef GetObject
@@ -100,10 +105,6 @@ void PhysicsBehavior::DoStepPostEvents(RuntimeScene & scene)
float newHeight = object->GetHeight();
if ( (int)objectOldWidth != (int)newWidth || (int)objectOldHeight != (int)newHeight )
{
/*std::cout << "Changed:" << (int)objectOldWidth << "!=" << (int)newWidth << std::endl;
std::cout << "Changed:" << (int)objectOldHeight << "!=" << (int)newHeight << std::endl;
std::cout << "( Object name:" << object->GetName() << std::endl;*/
double oldAngularVelocity = body->GetAngularVelocity();
b2Vec2 oldVelocity = body->GetLinearVelocity();
@@ -700,6 +701,76 @@ void PhysicsBehavior::UnserializeFrom(const gd::SerializerElement & element)
SetPolygonCoords(PhysicsBehavior::GetCoordsVectorFromString(coordsStr, '/', ';'));
}
#if defined(GD_IDE_ONLY)
std::map<gd::String, gd::PropertyDescriptor> PhysicsBehavior::GetProperties(gd::Project & project) const
{
std::map<gd::String, gd::PropertyDescriptor> properties;
gd::String shapeTypeStr = _("Box (rectangle)");
if (shapeType == Box) shapeTypeStr = _("Box (rectangle)");
else if (shapeType == Circle) shapeTypeStr = _("Circle");
else if (shapeType == CustomPolygon) shapeTypeStr = _("Custom polygon");
properties[_("Shape")]
.SetValue(shapeTypeStr)
.SetType("Choice")
.AddExtraInfo(_("Box (rectangle)"))
.AddExtraInfo(_("Circle"));
properties[_("Dynamic object")].SetValue(dynamic ? "true" : "false").SetType("Boolean");
properties[_("Fixed rotation")].SetValue(fixedRotation ? "true" : "false").SetType("Boolean");
properties[_("Consider as bullet (better collision handling)")].SetValue(isBullet ? "true" : "false").SetType("Boolean");
properties[_("Mass density")].SetValue(gd::String::From(massDensity));
properties[_("Friction")].SetValue(gd::String::From(averageFriction));
properties[_("Restitution (elasticity)")].SetValue(gd::String::From(averageRestitution));
properties[_("Linear Damping")].SetValue(gd::String::From(linearDamping));
properties[_("Angular Damping")].SetValue(gd::String::From(angularDamping));
properties[_("PLEASE_ALSO_SHOW_EDIT_BUTTON_THANKS")].SetValue("");
return properties;
}
bool PhysicsBehavior::UpdateProperty(const gd::String & name, const gd::String & value, gd::Project & project)
{
if (name == _("Shape"))
{
if (value == _("Box (rectangle)"))
shapeType = Box;
else if (value == _("Circle"))
shapeType = Circle;
else if (value == _("Custom polygon"))
shapeType = CustomPolygon;
}
if ( name == _("Dynamic object") ) {
dynamic = (value != "0");
}
if ( name == _("Fixed rotation") ) {
fixedRotation = (value != "0");
}
if ( name == _("Consider as bullet (better collision handling)") ) {
isBullet = (value != "0");
}
if ( name == _("Mass density") ) {
massDensity = value.To<float>();
}
if ( name == _("Friction") ) {
averageFriction = value.To<float>();
}
if ( name == _("Restitution (elasticity)") ) {
averageRestitution = value.To<float>();
}
if ( name == _("Linear Damping") ) {
if ( value.To<float>() < 0 ) return false;
linearDamping = value.To<float>();
}
if ( name == _("Angular Damping") ) {
if ( value.To<float>() < 0 ) return false;
angularDamping = value.To<float>();
}
return true;
}
#endif
gd::String PhysicsBehavior::GetStringFromCoordsVector(const std::vector<sf::Vector2f> &vec, char32_t coordsSep, char32_t composantSep)
{

View File

@@ -56,6 +56,9 @@ public:
* Called when user wants to edit the behavior.
*/
virtual void EditBehavior( wxWindow* parent, gd::Project & project_, gd::Layout * layout_, gd::MainFrameWrapper & mainFrameWrapper_ );
virtual std::map<gd::String, gd::PropertyDescriptor> GetProperties(gd::Project & project) const;
virtual bool UpdateProperty(const gd::String & name, const gd::String & value, gd::Project & project);
#endif
/**

View File

@@ -29,13 +29,21 @@ gdjs.TextRuntimeObjectPixiRenderer.prototype.ensureUpToDate = function() {
gdjs.TextRuntimeObjectPixiRenderer.prototype.updateStyle = function() {
var fontName = "\"gdjs_font_" + this._object._fontName + "\"";
var style = { align:"left" };
style.font = "";
if ( this._object._italic ) style.font += "italic ";
if ( this._object._bold ) style.font += "bold ";
style.font += this._object._characterSize + "px " + fontName;
style.fill = "rgb("+this._object._color[0]+","+this._object._color[1]+","+this._object._color[2]+")";
this._text.style = style;
var style = this._text.style;
style.fontStyle = this._object._italic ? 'italic' : 'normal';
style.fontWeight = this._object._bold ? 'bold' : 'normal';
style.fontSize = this._object._characterSize;
style.fontFamily = fontName;
style.fill = gdjs.rgbToHexNumber(
this._object._color[0],
this._object._color[1],
this._object._color[2]
);
// Manually ask the PIXI object to re-render as we changed a style property
// see http://www.html5gamedevs.com/topic/16924-change-text-style-post-render/
this._text.dirty = true;
};
gdjs.TextRuntimeObjectPixiRenderer.prototype.updatePosition = function() {

View File

@@ -69,6 +69,7 @@ BaseObjectExtension::BaseObjectExtension()
objectActions["Rebondir"].SetFunctionName("SeparateObjectsWithForces").SetIncludeFile("GDCpp/Extensions/Builtin/ObjectTools.h");
objectActions["Ecarter"].SetFunctionName("SeparateObjectsWithoutForces").SetIncludeFile("GDCpp/Extensions/Builtin/ObjectTools.h");
objectActions["SeparateFromObjects"].SetFunctionName("SeparateFromObjects").SetIncludeFile("GDCpp/Extensions/Builtin/ObjectTools.h");
objectConditions["CollisionPoint"].SetFunctionName("IsCollidingWithPoint");
objectExpressions["X"].SetFunctionName("GetX");

View File

@@ -128,3 +128,19 @@ CollisionResult GD_API PolygonCollisionTest(Polygon2d & p1, Polygon2d & p2)
return result;
}
bool GD_API IsPointInsidePolygon(Polygon2d & poly, float x, float y)
{
bool inside = false;
sf::Vector2f vi, vj;
for (std::size_t i = 0, j = poly.vertices.size()-1; i < poly.vertices.size(); j = i++)
{
vi = poly.vertices[i];
vj = poly.vertices[j];
if ( ((vi.y>y) != (vj.y>y)) && (x < (vj.x-vi.x) * (y-vi.y) / (vj.y-vi.y) + vi.x) )
inside = !inside;
}
return inside;
}

View File

@@ -33,5 +33,16 @@ struct CollisionResult
*/
CollisionResult GD_API PolygonCollisionTest(Polygon2d & p1, Polygon2d & p2);
/**
* Check if a point is inside a polygon.
*
* Uses PNPOLY by W. Randolph Franklin (https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html)
*
* \return true if the point is inside the polygon
*
* \ingroup GameEngine
*/
bool GD_API IsPointInsidePolygon(Polygon2d & poly, float x, float y);
#endif // POLYGONCOLLISION_H

View File

@@ -379,6 +379,17 @@ bool RuntimeObject::IsCollidingWith(RuntimeObject * obj2)
return false;
}
bool RuntimeObject::IsCollidingWithPoint(float pointX, float pointY){
vector<Polygon2d> hitBoxes = GetHitBoxes();
for (std::size_t i = 0; i < hitBoxes.size(); ++i)
{
if ( IsPointInsidePolygon(hitBoxes[i], pointX, pointY) )
return true;
}
return false;
}
void RuntimeObject::SeparateObjectsWithoutForces( std::map <gd::String, std::vector<RuntimeObject*> *> pickedObjectLists)
{
vector<RuntimeObject*> objects2;

View File

@@ -223,6 +223,14 @@ public:
*/
bool IsCollidingWith(RuntimeObject * other);
/**
* \brief Check if a point is inside the object collision hitboxes.
* \param pointX The point x coordinate.
* \param pointY The point y coordinate.
* \return true if the point is inside the object collision hitboxes.
*/
bool IsCollidingWithPoint(float pointX, float pointY);
/**
* \brief Check collision with each object of the list using their hitboxes, and move the object
* according to the sum of the move vector returned by each collision test.

View File

@@ -103,7 +103,7 @@ ELSE()
ELSE()
add_custom_target(GDJS_Runtime
ALL
COMMAND sh "CopyRuntimeToGD.sh" ${GD_base_dir}/Binaries/Output/${CMAKE_BUILD_TYPE}_${CMAKE_SYSTEM_NAME}/JsPlatform/Runtime
COMMAND bash "CopyRuntimeToGD.sh" ${GD_base_dir}/Binaries/Output/${CMAKE_BUILD_TYPE}_${CMAKE_SYSTEM_NAME}/JsPlatform/Runtime
WORKING_DIRECTORY ${GD_base_dir}/GDJS/scripts)
ENDIF()
ENDIF()

View File

@@ -71,6 +71,7 @@ BaseObjectExtension::BaseObjectExtension()
objectConditions["ObjectVariableChildExists"].SetFunctionName("variableChildExists").SetIncludeFile("runtimeobject.js");
objectActions["ObjectVariableRemoveChild"].SetFunctionName("variableRemoveChild").SetIncludeFile("runtimeobject.js");
objectActions["ObjectVariableClearChildren"].SetFunctionName("variableClearChildren").SetIncludeFile("runtimeobject.js");
objectConditions["CollisionPoint"].SetFunctionName("isCollidingWithPoint").SetIncludeFile("runtimeobject.js");
objectExpressions["X"].SetFunctionName("getX");
objectExpressions["Y"].SetFunctionName("getY");

View File

@@ -137,6 +137,8 @@ gd::PlatformExtension * CreateGDJSInventoryExtension();
gd::PlatformExtension * CreateGDJSLinkedObjectsExtension();
gd::PlatformExtension * CreateGDJSSystemInfoExtension();
gd::PlatformExtension * CreateGDJSShopifyExtension();
gd::PlatformExtension * CreateGDJSPathfindingBehaviorExtension();
gd::PlatformExtension * CreateGDJSPhysicsBehaviorExtension();
}
#endif
@@ -183,6 +185,8 @@ JsPlatform::JsPlatform() :
AddExtension(std::shared_ptr<gd::PlatformExtension>(CreateGDJSLinkedObjectsExtension())); std::cout.flush();
AddExtension(std::shared_ptr<gd::PlatformExtension>(CreateGDJSSystemInfoExtension())); std::cout.flush();
AddExtension(std::shared_ptr<gd::PlatformExtension>(CreateGDJSShopifyExtension())); std::cout.flush();
AddExtension(std::shared_ptr<gd::PlatformExtension>(CreateGDJSPathfindingBehaviorExtension())); std::cout.flush();
AddExtension(std::shared_ptr<gd::PlatformExtension>(CreateGDJSPhysicsBehaviorExtension())); std::cout.flush();
#endif
std::cout << "done." << std::endl;
};

View File

@@ -100,6 +100,17 @@ gdjs.evtTools.input.keysNameToCode = {
"x": 88,
"y": 89,
"z": 90,
"Num0": 48,
"Num1": 49,
"Num2": 50,
"Num3": 51,
"Num4": 52,
"Num5": 53,
"Num6": 54,
"Num7": 55,
"Num8": 56,
"Num9": 57,
"Numpad0": 96,
"Numpad1": 97,

View File

@@ -17,7 +17,7 @@ var gdjs = gdjs || {
};
/**
* Convert a rgb color value to a hex value.
* Convert a rgb color value to a hex string.
* @note No "#" or "0x" are added.
* @static
*/
@@ -25,6 +25,14 @@ gdjs.rgbToHex = function(r, g, b) {
return "" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
};
/**
* Convert a rgb color value to a hex value.
* @static
*/
gdjs.rgbToHexNumber = function(r, g, b) {
return (r << 16) + (g << 8) + b;
}
/**
* Get a random integer between 0 and max.
* @method random

View File

@@ -75,6 +75,8 @@ gdjs.HowlerSoundManager = function(resources)
this._resources = resources;
this._availableResources = {}; //Map storing "audio" resources for faster access.
this._globalVolume = 100;
this._sounds = {};
this._musics = {};
this._freeSounds = []; //Sounds without an assigned channel.
@@ -121,7 +123,7 @@ gdjs.HowlerSoundManager = function(resources)
sound.play();
}
}
that._pausedSounds = [];
that._pausedSounds.length = 0;
that._paused = false;
}, false);
});
@@ -203,7 +205,7 @@ gdjs.HowlerSoundManager.prototype.playSound = function(soundName, loop, volume,
gdjs.HowlerSoundManager.prototype.playSoundOnChannel = function(soundName, channel, loop, volume, pitch) {
var oldSound = this._sounds[channel];
if (oldSound) {
oldSound.stop();
oldSound.unload();
}
var soundFile = this._getFileFromSoundName(soundName);
@@ -244,7 +246,7 @@ gdjs.HowlerSoundManager.prototype.playMusic = function(soundName, loop, volume,
gdjs.HowlerSoundManager.prototype.playMusicOnChannel = function(soundName, channel, loop, volume, pitch) {
var oldMusic = this._musics[channel];
if (oldMusic) {
oldMusic.stop();
oldMusic.unload();
}
var soundFile = this._getFileFromSoundName(soundName);
@@ -268,41 +270,43 @@ gdjs.HowlerSoundManager.prototype.getMusicOnChannel = function(channel) {
};
gdjs.HowlerSoundManager.prototype.setGlobalVolume = function(volume) {
Howler.volume(volume/100);
this._globalVolume = volume;
if (this._globalVolume > 100) this._globalVolume = 100;
if (this._globalVolume < 0) this._globalVolume = 0;
Howler.volume(this._globalVolume/100);
};
gdjs.HowlerSoundManager.prototype.getGlobalVolume = function() {
return Howler.volume()*100;
return this._globalVolume;
};
gdjs.HowlerSoundManager.prototype.clearAll = function() {
for (var i = 0;i<this._freeSounds.length;++i) {
if (this._freeSounds[i]) this._freeSounds[i].stop();
if (this._freeSounds[i]) this._freeSounds[i].unload();
}
for (var i = 0;i<this._freeMusics.length;++i) {
if (this._freeMusics[i]) this._freeMusics[i].stop();
if (this._freeMusics[i]) this._freeMusics[i].unload();
}
this._freeSounds.length = 0;
this._freeMusics.length = 0;
for (var p in this._sounds) {
if (this._sounds.hasOwnProperty(p) && this._sounds[p]) {
this._sounds[p].stop();
this._sounds[p].unload();
delete this._sounds[p];
}
}
for (var p in this._musics) {
if (this._musics.hasOwnProperty(p) && this._musics[p]) {
this._musics[p].stop();
this._musics[p].unload();
delete this._musics[p];
}
}
this._pausedSounds = [];
this._pausedSounds.length = 0;
}
gdjs.HowlerSoundManager.prototype.preloadAudio = function(onProgress, onComplete, resources) {
resources = resources || this._resources;
var files = [];
for(var i = 0, len = resources.length;i<len;++i) {
var res = resources[i];
@@ -319,10 +323,8 @@ gdjs.HowlerSoundManager.prototype.preloadAudio = function(onProgress, onComplete
var loaded = 0;
function onLoad(audioFile) {
console.log("loaded" + audioFile);
loaded++;
if (loaded === files.length) {
console.log("All audio loaded");
return onComplete();
}
@@ -332,13 +334,12 @@ gdjs.HowlerSoundManager.prototype.preloadAudio = function(onProgress, onComplete
var that = this;
for(var i = 0;i<files.length;++i) {
(function(audioFile) {
console.log("Loading" + audioFile)
var sound = new Howl({
src: [audioFile], //TODO: ogg, mp3...
preload: true,
onload: onLoad.bind(that, audioFile),
onloaderror: onLoad.bind(that, audioFile)
});
var sound = new XMLHttpRequest();
sound.addEventListener('load', onLoad.bind(that, audioFile));
sound.addEventListener('error', onLoad.bind(that, audioFile));
sound.addEventListener('abort', onLoad.bind(that, audioFile));
sound.open('GET', audioFile);
sound.send();
})(files[i]);
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,7 @@
gdjs.LayerPixiRenderer = function(layer, runtimeSceneRenderer)
{
this._pixiContainer = new PIXI.Container();
this._filters = {};
this._layer = layer;
runtimeSceneRenderer.getPIXIContainer().addChild(this._pixiContainer);

View File

@@ -22,13 +22,13 @@ gdjs.NightPixiFilter = function() {
opacity: { type: '1f', value: 1 }
};
PIXI.AbstractFilter.call(this,
PIXI.Filter.call(this,
vertexShader,
fragmentShader,
uniforms
);
}
gdjs.NightPixiFilter.prototype = Object.create(PIXI.AbstractFilter.prototype);
gdjs.NightPixiFilter.prototype = Object.create(PIXI.Filter.prototype);
gdjs.NightPixiFilter.prototype.constructor = gdjs.NightPixiFilter;
gdjs.LightNightPixiFilter = function() {
@@ -51,13 +51,13 @@ gdjs.LightNightPixiFilter = function() {
opacity: { type: '1f', value: 1 }
};
PIXI.AbstractFilter.call(this,
PIXI.Filter.call(this,
vertexShader,
fragmentShader,
uniforms
);
}
gdjs.LightNightPixiFilter.prototype = Object.create(PIXI.AbstractFilter.prototype);
gdjs.LightNightPixiFilter.prototype = Object.create(PIXI.Filter.prototype);
gdjs.LightNightPixiFilter.prototype.constructor = gdjs.LightNightPixiFilter;
gdjs.PixiFiltersTools._filters = {
@@ -70,7 +70,7 @@ gdjs.PixiFiltersTools._filters = {
if (parameterName !== 'intensity' &&
parameterName !== 'opacity') return;
filter.uniforms[parameterName].value = value;
filter.uniforms[parameterName] = value;
},
},
LightNight: {
@@ -81,17 +81,19 @@ gdjs.PixiFiltersTools._filters = {
updateParameter: function(filter, parameterName, value) {
if (parameterName !== 'opacity') return;
filter.uniforms.opacity.value = value;
filter.uniforms.opacity = value;
},
},
Sepia: {
makeFilter: function() {
return new PIXI.filters.SepiaFilter();
var colorMatrix = new PIXI.filters.ColorMatrixFilter();
colorMatrix.sepia();
return colorMatrix;
},
updateParameter: function(filter, parameterName, value) {
if (parameterName !== 'opacity') return;
filter.sepia = value;
filter.alpha = value;
},
},
};

File diff suppressed because one or more lines are too long

View File

@@ -258,3 +258,29 @@ gdjs.Polygon.distance = function(minA, maxA, minB, maxB)
if (minA < minB) return minB - maxA;
else return minA - maxB;
}
/**
* Check if a point is inside a polygon.
*
* Uses <a href="https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html">PNPOLY</a> by W. Randolph Franklin.
*
* @method isPointInside
* @static
* @param poly {Polygon} The polygon to test
* @param x {Number} The point x coordinate
* @param y {Number} The point y coordinate
* @return {Boolean} true if the point is inside the polygon
*/
gdjs.Polygon.isPointInside = function(poly, x, y)
{
var inside = false;
var vi, vj;
for (var i = 0, j = poly.vertices.length-1; i < poly.vertices.length; j = i++) {
vi = poly.vertices[i];
vj = poly.vertices[j];
if ( ((vi[1]>y) != (vj[1]>y)) && (x < (vj[0]-vi[0]) * (y-vi[1]) / (vj[1]-vi[1]) + vi[0]) )
inside = !inside;
}
return inside;
};

View File

@@ -1202,6 +1202,23 @@ gdjs.RuntimeObject.prototype.cursorOnObject = function(runtimeScene) {
return false;
};
/**
* \brief Check if a point is inside the object collision hitboxes.
* @method isCollidingWithPoint
* @param pointX The point x coordinate.
* @param pointY The point y coordinate.
* @return true if the point is inside the object collision hitboxes.
*/
gdjs.RuntimeObject.prototype.isCollidingWithPoint = function(pointX, pointY) {
var hitBoxes = this.getHitBoxes();
for(var i = 0; i < this.hitBoxes.length; ++i) {
if ( gdjs.Polygon.isPointInside(hitBoxes[i], pointX, pointY) )
return true;
}
return false;
}
/**
* Get the identifier associated to an object name :<br>

View File

@@ -146,6 +146,28 @@ gdjs.RuntimeScene.prototype.unloadScene = function() {
for(var i = 0;i < gdjs.callbacksRuntimeSceneUnloaded.length;++i) {
gdjs.callbacksRuntimeSceneUnloaded[i](this);
}
// It should not be necessary to reset these variables, but this help
// ensuring that all memory related to the RuntimeScene is released immediately.
this._layers = new Hashtable();
this._variables = new gdjs.VariablesContainer();
this._initialBehaviorSharedData = new Hashtable();
this._objects = new Hashtable();
this._instances = new Hashtable();
this._instancesCache = new Hashtable();
this._initialObjectsData = null;
this._eventsFunction = null;
this._objectsCtor = new Hashtable();
this._allInstancesList = [];
this._instancesRemoved = [];
this._renderer = new gdjs.RuntimeSceneRenderer(this, this._runtimeGame ? this._runtimeGame.getRenderer() : null);
this._lastId = 0;
this._eventsContext = null;
this._isLoaded = false;
this.onCanvasResized();
};
/**

View File

@@ -1,3 +1,4 @@
#!/bin/bash
#Get the destination, or copy by default to release directory
DESTINATION=../../Binaries/Output/Release_Linux/JsPlatform/Runtime/
if [ "$(uname)" == "Darwin" ]; then
@@ -14,4 +15,4 @@ mkdir -p "$DESTINATION"
cp -R ../Runtime/* "$DESTINATION"
rsync -r -u --include=*.js --include=*/ --exclude=* ../../Extensions/ "$DESTINATION"/Extensions/
echo "✅ Copied GDJS and extensions runtime files (*.js) to '$DESTINATION'."
echo "✅ Copied GDJS and extensions runtime files (*.js) to '$DESTINATION'."

View File

@@ -1,114 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Project>
<GDVersion Major="3" Minor="0" Build="11297" Revision="57008" />
<Info winExecutableFilename="" winExecutableIconFile="" linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false">
<Nom value="Projet" />
<Auteur value="" />
<Extensions>
<Extension name="BuiltinObject" />
<Extension name="BuiltinAudio" />
<Extension name="BuiltinVariables" />
<Extension name="BuiltinTime" />
<Extension name="BuiltinMouse" />
<Extension name="BuiltinKeyboard" />
<Extension name="BuiltinJoystick" />
<Extension name="BuiltinCamera" />
<Extension name="BuiltinWindow" />
<Extension name="BuiltinFile" />
<Extension name="BuiltinNetwork" />
<Extension name="BuiltinScene" />
<Extension name="BuiltinAdvanced" />
<Extension name="Sprite" />
<Extension name="BuiltinCommonInstructions" />
<Extension name="BuiltinCommonConversions" />
<Extension name="BuiltinStringInstructions" />
<Extension name="BuiltinMathematicalTools" />
<Extension name="BuiltinExternalLayouts" />
<Extension name="TextObject" />
</Extensions>
<Platforms current="GDevelop JS platform">
<Platform name="GDevelop JS platform" />
<Platform name="GDevelop C++ platform" />
</Platforms>
<WindowW value="800" />
<WindowH value="600" />
<Portable />
<LatestCompilationDirectory value="" />
<FPSmax value="60" />
<FPSmin value="10" />
<verticalSync value="false" />
</Info>
<Resources>
<Resources />
<ResourceFolders />
</Resources>
<Objects />
<ObjectGroups />
<Variables />
<Scenes firstScene="">
<Scene nom="Nouvelle sc<73>ne" mangledName="Nouvelle_32sc__4524ne" r="209.000000" v="209.000000" b="209.000000" titre="" oglFOV="90.000000" oglZNear="1.000000" oglZFar="500.000000" standardSortMethod="true" stopSoundsOnStartup="true" disableInputWhenNotFocused="true">
<UISettings gridWidth="32.000000" grid="false" snap="true" gridHeight="32.000000" gridR="158.000000" gridG="180.000000" gridB="255.000000" zoomFactor="1.000000" windowMask="true" associatedLayout="" />
<GroupesObjets />
<Objets>
<Objet nom="NouvelObjet" type="TextObject::Text" smoothed="true" bold="false" italic="false" underlined="false">
<Variables />
<String value="Heeello" />
<Font value="BOD_CB.TTF" />
<CharacterSize value="50" />
<Color r="255" g="128" b="0" />
</Objet>
</Objets>
<Layers>
<Layer Name="" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
</Layers>
<Variables />
<BehaviorsSharedDatas />
<Positions>
<Objet nom="NouvelObjet" x="297.000000" y="245.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
</Positions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="MettreXY" />
<Parametre value="NouvelObjet" />
<Parametre value="=" />
<Parametre value="300" />
<Parametre value="=" />
<Parametre value="300" />
</Action>
<Action>
<Type value="TextObject::Angle" />
<Parametre value="NouvelObjet" />
<Parametre value="+" />
<Parametre value="1" />
</Action>
<Action>
<Type value="TextObject::Opacity" />
<Parametre value="NouvelObjet" />
<Parametre value="=" />
<Parametre value="128+cos(TimeFromStart())*128" />
</Action>
<Action>
<Type value="TextObject::Size" />
<Parametre value="NouvelObjet" />
<Parametre value="=" />
<Parametre value="30+cos(TimeFromStart())*30" />
</Action>
</Actions>
</Event>
</Events>
</Scene>
</Scenes>
<ExternalEvents />
<ExternalLayouts />
<ExternalSourceFiles />
</Project>

View File

@@ -0,0 +1 @@
{"firstLayout": "","gdVersion": {"build": 96,"major": 4,"minor": 0,"revision": 89},"properties": {"folderProject": false,"linuxExecutableFilename": "","macExecutableFilename": "","packageName": "","projectFile": "/Users/florian/Projects/F/GD/GDJS/tests/games/Text.json","useExternalSourceFiles": false,"winExecutableFilename": "","winExecutableIconFile": "","name": "Projet","author": "","windowWidth": 800,"windowHeight": 600,"latestCompilationDirectory": "","maxFPS": 60,"minFPS": 10,"verticalSync": false,"extensions": [{"name": "BuiltinObject"},{"name": "BuiltinAudio"},{"name": "BuiltinVariables"},{"name": "BuiltinTime"},{"name": "BuiltinMouse"},{"name": "BuiltinKeyboard"},{"name": "BuiltinJoystick"},{"name": "BuiltinCamera"},{"name": "BuiltinWindow"},{"name": "BuiltinFile"},{"name": "BuiltinNetwork"},{"name": "BuiltinScene"},{"name": "BuiltinAdvanced"},{"name": "Sprite"},{"name": "BuiltinCommonInstructions"},{"name": "BuiltinCommonConversions"},{"name": "BuiltinStringInstructions"},{"name": "BuiltinMathematicalTools"},{"name": "BuiltinExternalLayouts"},{"name": "TextObject"}],"platforms": [{"name": "GDevelop JS platform"},{"name": "GDevelop C++ platform"}],"currentPlatform": "GDevelop C++ platform"},"resources": {"resources": [],"resourceFolders": []},"objects": [],"objectsGroups": [],"variables": [],"layouts": [{"b": 209,"disableInputWhenNotFocused": true,"mangledName": "Nouvelle_32sc_232ne","name": "Nouvelle scène","oglFOV": 90,"oglZFar": 500,"oglZNear": 1,"r": 209,"standardSortMethod": true,"stopSoundsOnStartup": true,"title": "","v": 209,"uiSettings": {"grid": false,"gridB": 255,"gridG": 180,"gridHeight": 32,"gridOffsetX": 0,"gridOffsetY": 0,"gridR": 158,"gridWidth": 32,"snap": true,"windowMask": true,"zoomFactor": 1},"objectsGroups": [],"variables": [],"instances": [{"angle": 0,"customSize": false,"height": 0,"layer": "","locked": false,"name": "NouvelObjet","width": 0,"x": 297,"y": 245,"zOrder": 1,"numberProperties": [],"stringProperties": [],"initialVariables": []}],"objects": [{"bold": false,"italic": false,"name": "NouvelObjet","smoothed": true,"type": "TextObject::Text","underlined": false,"variables": [],"behaviors": [],"string": "Heeello","font": "BOD_CB.TTF","characterSize": 50,"color": {"b": 0,"g": 128,"r": 255}}],"events": [{"disabled": false,"folded": false,"type": "BuiltinCommonInstructions::Standard","conditions": [],"actions": [{"type": {"inverted": false,"value": "MettreXY"},"parameters": ["NouvelObjet","=","300","=","300"],"subInstructions": []},{"type": {"inverted": false,"value": "TextObject::Angle"},"parameters": ["NouvelObjet","+","1"],"subInstructions": []},{"type": {"inverted": false,"value": "TextObject::Opacity"},"parameters": ["NouvelObjet","=","128+cos(TimeFromStart())*128"],"subInstructions": []},{"type": {"inverted": false,"value": "TextObject::Size"},"parameters": ["NouvelObjet","=","30+cos(TimeFromStart())*30"],"subInstructions": []}],"events": []}],"layers": [{"name": "","visibility": true,"cameras": [{"defaultSize": true,"defaultViewport": true,"height": 0,"viewportBottom": 1,"viewportLeft": 0,"viewportRight": 1,"viewportTop": 0,"width": 0}],"effects": []}],"behaviorsSharedData": []}],"externalEvents": [],"externalLayouts": [],"externalSourceFiles": []}

View File

@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0015 NEW)
project(GDVersion)
set(GD_VERSION_STR "4.0.96")
if(FULL_VERSION_NUMBER)
set(GENERATE_VERSION_SCRIPT ${PROJECT_SOURCE_DIR}/GenerateVersionFull.cmake)
@@ -11,5 +12,5 @@ endif()
add_custom_target(GDVersion
ALL
COMMAND ${CMAKE_COMMAND} -P ${GENERATE_VERSION_SCRIPT} ${PROJECT_SOURCE_DIR}/../Core/GDCore/Tools/
COMMAND ${CMAKE_COMMAND} -P ${GENERATE_VERSION_SCRIPT} ${PROJECT_SOURCE_DIR}/../Core/GDCore/Tools/ ${GD_VERSION_STR}
)

View File

@@ -1,13 +1,19 @@
find_package(Git)
if(GIT_FOUND)
EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} describe --tags
OUTPUT_VARIABLE GD_VERSION_STR
RESULT_VARIABLE GIT_DESCRIBE_RESULT
ERROR_VARIABLE GIT_DESCRIBE_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Retrieving GDevelop version from Git tags is disabled as GDevelop 5
# is being developed and we still want the old IDE version to stay at 4.
# The old IDE has the same version number as GDCore/libGD.js
# Hence, version of GDevelop 4 is manually specified in CMakeLists.txt
# EXECUTE_PROCESS(
# COMMAND ${GIT_EXECUTABLE} describe --tags
# OUTPUT_VARIABLE GD_VERSION_STR
# RESULT_VARIABLE GIT_DESCRIBE_RESULT
# ERROR_VARIABLE GIT_DESCRIBE_ERROR
# OUTPUT_STRIP_TRAILING_WHITESPACE
# )
set(GD_VERSION_STR ${CMAKE_ARGV4})
set(VERSIONPRIV_PATH "${CMAKE_ARGV3}/VersionPriv.h")
set(ORIGINAL_CONTENT " ")

View File

@@ -3,13 +3,19 @@ find_package(Git)
message(WARNING "You're not using the full version number. It's not suitable for public releases and builds!")
if(GIT_FOUND)
EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0 # Only get the lastest tag's name
OUTPUT_VARIABLE GD_VERSION_STR
RESULT_VARIABLE GIT_DESCRIBE_RESULT
ERROR_VARIABLE GIT_DESCRIBE_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Retrieving GDevelop version from Git tags is disabled as GDevelop 5
# is being developed and we still want the old IDE version to stay at 4.
# The old IDE has the same version number as GDCore/libGD.js
# Hence, version of GDevelop 4 is manually specified in CMakeLists.txt
# EXECUTE_PROCESS(
# COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0 # Only get the lastest tag's name
# OUTPUT_VARIABLE GD_VERSION_STR
# RESULT_VARIABLE GIT_DESCRIBE_RESULT
# ERROR_VARIABLE GIT_DESCRIBE_ERROR
# OUTPUT_STRIP_TRAILING_WHITESPACE
# )
set(GD_VERSION_STR ${CMAKE_ARGV4})
set(VERSIONPRIV_PATH "${CMAKE_ARGV3}/VersionPriv.h")
set(ORIGINAL_CONTENT " ")

View File

@@ -61,18 +61,29 @@ cd newIDE/app
yarn test #or npm run test
```
### Theming
It's possible to create new themes for the UI. See [this file](https://github.com/4ian/GD/blob/master/newIDE/app/src/UI/Theme/index.js) to declare a new theme. You can take a look at the [default theme](https://github.com/4ian/GD/blob/master/newIDE/app/src/UI/Theme/DefaultTheme/index.js), including the [styling of the Events Sheets](https://github.com/4ian/GD/blob/master/newIDE/app/src/UI/Theme/DefaultTheme/EventsSheet.css).
## Building and deploying the standalone app
### Desktop version
First, update version number which is read in `newIDE/electron-app/app/package.json`.
```bash
cd newIDE/electron-app
yarn build #or npm run build
```
This will build and package the Electron app for Windows, macOS and Linux (according to your OS).
The output are stored inside `newIDE/electron-app/dist` and copied to `Binaries/Output/Release_XXX`.
Version number is read from `newIDE/electron-app/app/package.json`.
This will build and package the Electron app for Windows, macOS and Linux (according to your OS). The output are stored inside `newIDE/electron-app/dist`.
To build artifacts for all platforms and publish to a draft GitHub release:
```
GH_TOKEN=xxx yarn build --mac --win --linux tar.gz --publish always
```
### Webapp version
@@ -86,7 +97,6 @@ yarn deploy #or npm run deploy
This new editor is still in development and is missing some features:
- [ ] Support for translations (See an [example of a component that can be translated](https://github.com/4ian/GD/blob/master/newIDE/app/src/MainFrame/Toolbar.js#L44))
- [ ] [Autocompletion of expressions and parameters in Events editor](https://trello.com/c/mAROBTR8/46-expression-editor-auto-complete-for-the-new-ide).
- [ ] [Collision mask editor](https://trello.com/c/2Kzwj61r/47-collision-masks-editors-for-sprite-objects-in-the-new-ide)
- [ ] Support for native games
- [ ] More [documentation](http://wiki.compilgames.net/doku.php/gdevelop5/start) about how to package for iOS/Android with Cordova/PhoneGap Build or Cocos2d-JS.

View File

@@ -1,4 +1,4 @@
# Rename this file as .env.local and complete the following values.
# Copy this file as ".env.local" and complete the following values.
# If values are not completed, some features will be unavailable.
REACT_APP_PREVIEW_S3_ACCESS_KEY_ID=

View File

@@ -1,5 +1,7 @@
[ignore]
<PROJECT_ROOT>/resources/.*
<PROJECT_ROOT>/node_modules/auth0-lock/node_modules/fbjs/flow/include/PromiseMap.js
<PROJECT_ROOT>/node_modules/protobufjs/src/bower.json
[include]

View File

@@ -5,6 +5,7 @@ node_modules
# testing
coverage
flow-coverage
# production
build
@@ -23,3 +24,4 @@ public/res
public/CppPlatform
public/JsPlatform
resources/GDJS

18
newIDE/app/flow-typed/libGD.js vendored Normal file
View File

@@ -0,0 +1,18 @@
// @flow
//TODO: These types could be generated from GDevelop.js instead of being
//manually written here.
type EmscriptenObject = Object & {
ptr: Number
};
declare type gdProject = EmscriptenObject;
declare type gdLayout = EmscriptenObject;
declare type gdExternalLayout = EmscriptenObject;
declare type gdExternalEvents = EmscriptenObject;
declare type gdSerializerElement = EmscriptenObject;
declare type gdInitialInstance = EmscriptenObject;
declare type gdBaseEvent = EmscriptenObject;
//Represents all objects that have serializeTo and unserializeFrom methods.
declare type gdSerializable = EmscriptenObject;

View File

@@ -0,0 +1,94 @@
// flow-typed signature: 6c6a5771bbdffe188d60637063b5f9a4
// flow-typed version: 6533cd10ce/react-i18next_v6.x.x/flow_>=v0.53.x
declare module "react-i18next" {
declare type TFunction = (key?: ?string, data?: ?Object) => string;
declare type Locales = string | Array<string>;
declare type TranslatorProps = {
t: TFunction,
i18nLoadedAt: Date,
i18n: Object
};
declare type Translator<OP, P> = (
component: React$ComponentType<P>
) => Class<React$Component<OP, *>>;
declare type TranslateOptions = $Shape<{
wait: boolean,
nsMode: "default" | "fallback",
bindi18n: false | string,
bindStore: false | string,
withRef: boolean,
translateFuncName: string,
i18n: Object
}>;
declare function translate<OP, P>(
locales?: Locales,
options?: TranslateOptions
): Translator<OP, P>;
declare type I18nProps = {
i18n?: Object,
ns?: string | Array<string>,
children: (t: TFunction, { i18n: Object, t: TFunction }) => React$Node,
initialI18nStore?: Object,
initialLanguage?: string
};
declare var I18n: React$ComponentType<I18nProps>;
declare type InterpolateProps = {
className?: string,
dangerouslySetInnerHTMLPartElement?: string,
i18n?: Object,
i18nKey?: string,
options?: Object,
parent?: string,
style?: Object,
t?: TFunction,
useDangerouslySetInnerHTML?: boolean
};
declare var Interpolate: React$ComponentType<InterpolateProps>;
declare type TransProps = {
count?: number,
parent?: string,
i18n?: Object,
i18nKey?: string,
t?: TFunction
};
declare var Trans: React$ComponentType<TransProps>;
declare type ProviderProps = { i18n: Object, children: React$Element<*> };
declare var I18nextProvider: React$ComponentType<ProviderProps>;
declare type NamespacesProps = {
components: Array<React$ComponentType<*>>,
i18n: { loadNamespaces: Function }
};
declare function loadNamespaces(props: NamespacesProps): Promise<void>;
declare var reactI18nextModule: {
type: "3rdParty",
init: (instance: Object) => void
};
declare var defaultOptions: {
wait: false,
withRef: false,
bindI18n: "languageChanged loaded",
bindStore: "added removed",
translateFuncName: "t",
nsMode: "default"
};
declare function setDefaults(options: TranslateOptions): void;
declare function getDefaults(): TranslateOptions;
declare function getI18n(): Object;
declare function setI18n(instance: Object): void;
}

View File

@@ -5,62 +5,74 @@
"license": "MIT",
"homepage": ".",
"devDependencies": {
"flow-bin": "^0.58.0",
"flow-bin": "^0.61.0",
"flow-coverage-report": "^0.4.0",
"follow-redirects": "^1.2.3",
"prettier": "1.7.0",
"react-scripts": "1.0.6",
"react-scripts": "1.0.17",
"shelljs": "^0.7.7"
},
"dependencies": {
"@storybook/react": "3.2.14",
"@storybook/react": "3.2.19",
"aws-sdk": "^2.100.0",
"axios": "^0.16.1",
"classnames": "^2.2.5",
"cursores": "^1.0.1",
"element-closest": "^2.0.2",
"blueimp-md5": "^2.10.0",
"classnames": "2.2.5",
"date-fns": "^1.29.0",
"element-closest": "2.0.2",
"firebase": "^4.8.2",
"flat": "2.0.1",
"fontfaceobserver": "^2.0.13",
"fontfaceobserver": "2.0.13",
"i18next": "^10.0.3",
"keen-tracking": "1.1.3",
"lodash": "4.17.4",
"material-ui": "0.18.3",
"material-ui-search-bar": "0.4.0",
"material-ui": "0.20",
"material-ui-search-bar": "0.4.1",
"pixi-simple-gesture": "0.2.2",
"pixi.js": "3.0.11",
"prop-types": "^15.5.10",
"raven-js": "^3.19.1",
"react": "15.4.2",
"react-addons-css-transition-group": "15.4.2",
"react-addons-perf": "15.4.2",
"react-color": "2.11.7",
"react-dnd": "2.3.0",
"react-dnd-html5-backend": "2.3.0",
"react-dom": "15.4.2",
"react-i18next": "^6.0.6",
"react-measure": "1.4.6",
"react": "^16.2.0",
"react-color": "2.13.8",
"react-dnd": "2.5.4",
"react-dnd-html5-backend": "2.5.4",
"react-dom": "^16.2.0",
"react-error-boundary": "^1.2.0",
"react-i18next": "6.2.0",
"react-measure": "1.4.7",
"react-mosaic-component": "1.0.3",
"react-sortable-hoc": "^0.6.3",
"react-sortable-tree": "^0.1.21",
"react-tap-event-plugin": "2.0.1",
"react-test-renderer": "15.4.2",
"react-virtualized": "9.3.0",
"slugs": "^0.1.3",
"react-sortable-hoc": "0.6.8",
"react-sortable-tree": "1.5.3",
"react-test-renderer": "16.2.0",
"react-virtualized": "9.14.1",
"slugs": "0.1.3",
"source-map-explorer": "^1.4.0",
"wait-promise": "^0.4.1"
"wait-promise": "0.4.1"
},
"scripts": {
"postinstall": "npm run import-resources",
"import-resources": "cd scripts && node import-libGD.js && node import-res-folder.js && node import-GDJS-Runtime.js",
"start": "npm run import-resources && react-scripts start",
"build": "npm run import-resources && react-scripts build",
"postinstall": "npm run import-resources",
"format": "prettier --write \"src/**/*.js\"",
"test": "react-scripts test --env=jsdom",
"flow": "flow",
"analyze-source-map": "source-map-explorer build/static/js/main.*",
"storybook": "start-storybook -p 9009 -s public",
"build-storybook": "build-storybook -s public"
"analyze-test-coverage": "react-scripts test --env=jsdom --coverage",
"analyze-flow-coverage": "flow-coverage-report",
"analyze-source-map": "source-map-explorer build/static/js/main.*"
},
"eslintConfig": {
"extends": "react-app"
},
"flow-coverage-report": {
"includeGlob": [
"src/**/*.js"
],
"type": [
"text",
"html",
"json"
]
}
}

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<title>GDevelop 5</title>
@@ -43,6 +43,10 @@
';path=/;expires='+new Date(0).toUTCString();i=d.indexOf('.');if(i<0)break;d=d.slice(i+1)}}};
})(window,document,window['_fs_namespace'],'script','user');
</script>
<!-- Stripe.com Checkout -->
<script src="https://checkout.stripe.com/checkout.js"></script>
</head>
<body>
<!-- Root div used for React `App` component rendering-->

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,760 @@
{
"firstLayout": "",
"gdVersion": {
"build": 96,
"major": 4,
"minor": 0,
"revision": 0
},
"properties": {
"folderProject": false,
"linuxExecutableFilename": "",
"macExecutableFilename": "",
"packageName": "",
"projectFile": "/Users/florian/Desktop/parallax/parallax.json",
"useExternalSourceFiles": false,
"winExecutableFilename": "",
"winExecutableIconFile": "",
"name": "Project",
"author": "",
"windowWidth": 600,
"windowHeight": 400,
"latestCompilationDirectory": "",
"maxFPS": 60,
"minFPS": 10,
"verticalSync": false,
"extensions": [
{
"name": "BuiltinObject"
},
{
"name": "BuiltinAudio"
},
{
"name": "BuiltinVariables"
},
{
"name": "BuiltinTime"
},
{
"name": "BuiltinMouse"
},
{
"name": "BuiltinKeyboard"
},
{
"name": "BuiltinJoystick"
},
{
"name": "BuiltinCamera"
},
{
"name": "BuiltinWindow"
},
{
"name": "BuiltinFile"
},
{
"name": "BuiltinNetwork"
},
{
"name": "BuiltinScene"
},
{
"name": "BuiltinAdvanced"
},
{
"name": "Sprite"
},
{
"name": "BuiltinCommonInstructions"
},
{
"name": "BuiltinCommonConversions"
},
{
"name": "BuiltinStringInstructions"
},
{
"name": "BuiltinMathematicalTools"
},
{
"name": "BuiltinExternalLayouts"
}
],
"platforms": [
{
"name": "GDevelop JS platform"
}
],
"currentPlatform": "GDevelop JS platform"
},
"resources": {
"resources": [
{
"alwaysLoaded": false,
"file": "Vegetation_(middle_layer).png",
"kind": "image",
"name": "Vegetation_(middle_layer).png",
"smoothed": true,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "Ground_(front_layer).png",
"kind": "image",
"name": "Ground_(front_layer).png",
"smoothed": true,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "Sky_back_layer.png",
"kind": "image",
"name": "Sky_back_layer.png",
"smoothed": true,
"userAdded": true
},
{
"alwaysLoaded": false,
"file": "Elisa_standing.png",
"kind": "image",
"name": "Elisa_standing.png",
"smoothed": true,
"userAdded": true
}
],
"resourceFolders": []
},
"objects": [],
"objectsGroups": [],
"variables": [],
"layouts": [
{
"b": 209,
"disableInputWhenNotFocused": true,
"mangledName": "New_32scene",
"name": "New scene",
"oglFOV": 90,
"oglZFar": 500,
"oglZNear": 1,
"r": 209,
"standardSortMethod": true,
"stopSoundsOnStartup": true,
"title": "",
"v": 209,
"uiSettings": {
"grid": true,
"gridB": 255,
"gridG": 180,
"gridHeight": 32,
"gridOffsetX": 0,
"gridOffsetY": 0,
"gridR": 158,
"gridWidth": 32,
"snap": true,
"windowMask": false,
"zoomFactor": 1
},
"objectsGroups": [],
"variables": [],
"instances": [
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "",
"locked": false,
"name": "ObjectToFollow",
"width": 0,
"x": -128,
"y": 320,
"zOrder": 1,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "Layer4",
"locked": false,
"name": "Background",
"width": 0,
"x": -640,
"y": -32,
"zOrder": 1,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "Layer3",
"locked": false,
"name": "Background",
"width": 0,
"x": -640,
"y": -32,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "Layer2",
"locked": false,
"name": "Background",
"width": 0,
"x": -608,
"y": -32,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 2
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "Layer3",
"locked": false,
"name": "Background",
"width": 0,
"x": 0,
"y": -32,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 1
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "Layer2",
"locked": false,
"name": "Background",
"width": 0,
"x": 0,
"y": -32,
"zOrder": 1,
"numberProperties": [
{
"name": "animation",
"value": 2
}
],
"stringProperties": [],
"initialVariables": []
},
{
"angle": 0,
"customSize": false,
"height": 0,
"layer": "Layer4",
"locked": false,
"name": "Background",
"width": 0,
"x": 0,
"y": -32,
"zOrder": 1,
"numberProperties": [],
"stringProperties": [],
"initialVariables": []
}
],
"objects": [
{
"name": "Background",
"type": "Sprite",
"updateIfNotVisible": true,
"variables": [],
"behaviors": [],
"animations": [
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "Sky_back_layer.png",
"points": [],
"originPoint": {
"name": "origine",
"x": 0,
"y": 0
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 0,
"y": 0
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
}
]
]
}
]
}
]
},
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "Vegetation_(middle_layer).png",
"points": [],
"originPoint": {
"name": "origine",
"x": 0,
"y": 0
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 0,
"y": 0
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
}
]
]
}
]
}
]
},
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "Ground_(front_layer).png",
"points": [],
"originPoint": {
"name": "origine",
"x": 0,
"y": 0
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 0,
"y": 0
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
}
]
]
}
]
}
]
}
]
},
{
"name": "ObjectToFollow",
"type": "Sprite",
"updateIfNotVisible": true,
"variables": [],
"behaviors": [],
"animations": [
{
"name": "",
"useMultipleDirections": false,
"directions": [
{
"looping": false,
"timeBetweenFrames": 1,
"sprites": [
{
"hasCustomCollisionMask": false,
"image": "Elisa_standing.png",
"points": [],
"originPoint": {
"name": "origine",
"x": 0,
"y": 0
},
"centerPoint": {
"automatic": true,
"name": "centre",
"x": 0,
"y": 0
},
"customCollisionMask": [
[
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
}
]
]
}
]
}
]
}
]
}
],
"events": [
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "The character can just be moved left and right - in a real game you can use the Platformer character behavior.",
"comment2": ""
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "KeyPressed"
},
"parameters": [
"",
"Left"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "AddForceXY"
},
"parameters": [
"ObjectToFollow",
"-200",
"0",
"0"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": false,
"value": "KeyPressed"
},
"parameters": [
"",
"Right"
],
"subInstructions": []
}
],
"actions": [
{
"type": {
"inverted": false,
"value": "AddForceXY"
},
"parameters": [
"ObjectToFollow",
"200",
"0",
"0"
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"inverted": false,
"value": "MoveObjects"
},
"parameters": [
""
],
"subInstructions": []
}
],
"events": []
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Parallax is achieved by setting the position of the camera to the position of the player, multiplied by a factor (between 0 and 1).\nA small factor makes the layer appears far.\nA factor close to 1 makes the layer appears like if it was near the player.",
"comment2": ""
},
{
"disabled": false,
"folded": false,
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"inverted": false,
"value": "CameraX"
},
"parameters": [
"",
"=",
"ObjectToFollow.X()",
"",
""
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "CameraX"
},
"parameters": [
"",
"=",
"ObjectToFollow.X()*0.75",
"\"Layer2\"",
""
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "CameraX"
},
"parameters": [
"",
"=",
"ObjectToFollow.X()*0.50",
"\"Layer3\"",
""
],
"subInstructions": []
},
{
"type": {
"inverted": false,
"value": "CameraX"
},
"parameters": [
"",
"=",
"ObjectToFollow.X()*0.25",
"\"Layer4\"",
""
],
"subInstructions": []
}
],
"events": []
}
],
"layers": [
{
"name": "Layer4",
"visibility": true,
"cameras": [
{
"defaultSize": true,
"defaultViewport": true,
"height": 0,
"viewportBottom": 1,
"viewportLeft": 0,
"viewportRight": 1,
"viewportTop": 0,
"width": 0
}
],
"effects": []
},
{
"name": "Layer3",
"visibility": true,
"cameras": [
{
"defaultSize": true,
"defaultViewport": true,
"height": 0,
"viewportBottom": 1,
"viewportLeft": 0,
"viewportRight": 1,
"viewportTop": 0,
"width": 0
}
],
"effects": []
},
{
"name": "Layer2",
"visibility": true,
"cameras": [
{
"defaultSize": true,
"defaultViewport": true,
"height": 0,
"viewportBottom": 1,
"viewportLeft": 0,
"viewportRight": 1,
"viewportTop": 0,
"width": 0
}
],
"effects": []
},
{
"name": "",
"visibility": true,
"cameras": [
{
"defaultSize": true,
"defaultViewport": true,
"height": 0,
"viewportBottom": 1,
"viewportLeft": 0,
"viewportRight": 1,
"viewportTop": 0,
"width": 0
}
],
"effects": []
}
],
"behaviorsSharedData": []
}
],
"externalEvents": [],
"externalLayouts": [],
"externalSourceFiles": []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

View File

@@ -65,7 +65,12 @@ export default class NewBehaviorDialog extends Component {
if (!open || !project) return null;
const actions = [
<FlatButton key="close" label="Close" primary={false} onClick={onClose} />,
<FlatButton
key="close"
label="Close"
primary={false}
onClick={onClose}
/>,
];
return (

View File

@@ -1,10 +0,0 @@
export const selectableArea = 'selectable';
export const selectedArea = 'selected';
export const largeSelectableArea = 'large-selectable';
export const largeSelectedArea = 'large-selected';
export const background = 'background';
export const container = 'gd-events-sheet';
export const eventsTree = 'events-tree';

Some files were not shown because too many files have changed in this diff Show More