Commit Graph

10371 Commits

Author SHA1 Message Date
Aurélien Vivet 98af5082fe feat(editor): add 3D collision toggle in the Layers panel for in-app editor
Add a Debug-icon button next to the Lightbulb in the root row of the
Layers tree view (only when in embedded-game / in-app editor mode).
Clicking it toggles the local state `areCollisionsShownInEditor` in
SceneEditor and broadcasts a `set3DCollisionsShownInEditor` message
to the embedded preview frames via `previewDebuggerServer`.

The runtime debugger client receives the command and calls
`enableDebugDraw3D` on the edited instance container, reusing the
default color and depth-test settings.

Props are threaded through the `EditorsDisplay` interface, both
mosaic and swipeable-drawer displays, plus the LayersList story mock.
2026-05-13 22:19:04 +02:00
Aurélien Vivet 2974b9c052 feat(debuggertools): add actions to enable/toggle 3D debug draw
Expose the new 3D debug-draw via two GDevelop actions in the Debugger
Tools extension:

- `EnableDebugDraw3D` — enable/disable with explicit color (R;G;B)
  and depth-test parameters. Mirrors the existing `EnableDebugDraw`
  action used for 2D.
- `ToggleDebugDraw3D` — flips the current state, reusing the last
  color and depth-test values stored on the instance container.

Both delegate to `RuntimeInstanceContainer.enableDebugDraw3D`.
2026-05-13 22:19:04 +02:00
Aurélien Vivet c8f55dd99a feat(gdjs): render 3D collision wireframes in the debugger renderer
Implement `renderDebugDraw3D` and `clearDebugDraw3D` on
DebuggerPixiRenderer. Wireframes are rendered as THREE.js meshes
attached to each object's 3D renderer object.

Supports the four Physics3D primitive shapes (Box, Sphere, Capsule,
Cylinder) including orientation (X/Y/Z), shape offsets, parent-scale
compensation, and the PhysicsCharacter3D bottom-origin adjustment.

Also supports the Mesh shape: each child mesh of the object's 3D
renderer is wrapped with a `THREE.WireframeGeometry` + LineSegments.
Async-loaded Model3D meshes are picked up automatically each frame,
and detached source meshes are pruned.

State is tracked in a `Map<RuntimeObject, DebugDraw3DState>` on the
renderer, with a per-frame `seen` set that disposes wireframes whose
owning object disappeared. CustomRuntimeObject children are visited
recursively so nested Physics3D objects are covered.

Wireframes opt out of raycasting (`mesh.raycast = () => {}`) so that
the community Raycaster3D extension doesn't crash on intersections
without normals.
2026-05-13 22:19:03 +02:00
Aurélien Vivet 480a155cef feat(gdjs): add 3D debug-draw infrastructure mirroring the 2D pattern
Add `_debugDraw3DEnabled`, `_debugDraw3DColorHex` and
`_debugDraw3DDepthTest` to RuntimeInstanceContainer, plus a new
`enableDebugDraw3D(enabled, colorHex, depthTest)` method that mirrors
the existing 2D `enableDebugDraw`. When the settings change while a
draw is active, the existing wireframes are cleared so the renderer
rebuilds them with the new configuration.

`RuntimeScene.renderAndStep` calls `renderDebugDraw3D` each frame when
the flag is on — same hook point as the 2D debug draw.

The actual rendering is implemented in a follow-up commit.
2026-05-13 22:19:03 +02:00
Aurélien Vivet ba7903f54c feat(physics3d): support hot reload of shape and physics properties
Extract the field initialization from the constructor into a private
`_applyBehaviorData` helper, and reuse it for both the constructor
(full data) and the hot-reload hook `applyBehaviorOverriding` (diff
containing only changed fields). When any shape-related property is
present in the diff, the body is rebuilt via `recreateBody()`.

Previously the default `applyBehaviorOverriding` returned false, so
hot reload of Physics3D properties was silently dropped, forcing a
full restart of the app or closing and reopening the tab to see any
tweak made in the editor.
2026-05-13 22:18:57 +02:00
Aurélien Vivet 3e3b7bcd71 fix(editor): trigger hot reload when a behavior property is edited
`onBehaviorUpdated` in CompactObjectPropertiesEditor was a no-op, so
editing behavior properties from the compact panel never propagated
to the in-app editor preview. Wire it to `onObjectsModified([object])`
like the other property edits in the same file. Debounced at 250ms
via `useDebounce` to avoid one hot reload per keystroke on fields.
2026-05-13 21:43:44 +02:00
D8H 0b3f8e7205 Improve types for TypeScript 6 (#8591)
Only show in developer changelog
2026-05-13 12:07:46 +02:00
Clément Pasteau 4bb652f5e1 Fix Ai Panel not aligned to the top properly on mobile + improve games search to be more relevant (#8590) 2026-05-13 10:27:58 +02:00
github-actions[bot] f60562eae3 [Auto PR] Update translations (#8585) 2026-05-13 10:27:13 +02:00
D8H 1c17c895bb Allow custom objects to move layer cameras (#8572)
- Also fix a crash when there is a trigger once in an external function used from a custom object
2026-05-12 11:14:34 +02:00
ViktorVovk 651c93ae1f Add "Select All" in Events Sheet and ability to deselect an event when doing a multi-selection (#8578) 2026-05-11 14:29:29 +02:00
Clément Pasteau 0eb6014a93 Fix some visual glitches in the Events Sheet when opening and scrolling (#8571) 2026-05-11 10:52:30 +02:00
Florian Rival d52d42d3b4 Add integration test for objects created via a behavior action parameter (#8576)
Verify that a behavior's custom action whose events Create the object
passed as parameter (FireBullet-style) leads to the newly created
instances being picked in the calling scope, while a previously created
instance of the same object remains untouched.

Don't show in changelog
v5.6.269
2026-05-07 19:00:52 +02:00
Florian Rival 230657d076 Bump 2026-05-07 17:48:54 +02:00
D8H 1480595463 Fix objects created by custom actions not being picked (#8575) 2026-05-07 17:48:22 +02:00
Florian Rival edc26bdcbf Return non-zero objectSizeInfo for TextInput, Lighting and 3D objects and null when unknown 2026-05-07 16:14:18 +02:00
Florian Rival 1e8f76d3ba Bump newIDE version v5.6.268 2026-05-06 16:49:23 +02:00
Clément Pasteau 3c80598d09 Revert "Fix some visual glitches in the Events Sheet (#8551)" (#8570)
This reverts commit 232443328d.
2026-05-06 16:48:11 +02:00
Florian Rival b3f7bc5ebf Bump newIDE version v5.6.267 2026-05-06 09:52:50 +02:00
github-actions[bot] 286f8594c4 [Auto PR] Update translations [ci skip] (#8565) 2026-05-06 09:51:44 +02:00
Clément Pasteau 232443328d Fix some visual glitches in the Events Sheet (#8551) 2026-05-05 18:29:21 +02:00
D8H 98e5184958 Fix missing error on expressions with unknown objects in the event sheet (#8566) 2026-05-05 16:06:31 +02:00
Florian Rival a28716d696 Add more hints on some actions
Don't show in changelog
2026-05-04 17:40:26 +02:00
Florian Rival dd2ee4baa7 Add a hint that the Tween opacity action only works on 2D objects 2026-05-04 17:10:11 +02:00
github-actions[bot] 100787f9e9 [Auto PR] Update translations (#8555) 2026-05-04 16:23:16 +02:00
Florian Rival c293911c84 Fix missing space in documentation generation and update types 2026-05-04 15:52:51 +02:00
D8H 18cd4f9110 Add expressions to access the components of forward/up/right vectors of 3D objects (#8558)
- These are advanced expressions mostly useful for extensions manipulating objects in 3D space.
2026-05-04 15:19:35 +02:00
Florian Rival 5dd2b8ffd8 Add hints for some extensions, displayed in the documentation (#8564) 2026-05-04 15:11:56 +02:00
Clément Pasteau e6a5b70a24 Fix events locking up when dragging on mobile (#8563) 2026-05-04 14:26:09 +02:00
D8H 8e50ddefe4 Allow to configure object resources to be loaded independently from the scene (#8514)
- This is an advanced, experimental feature which is subject to changes. It's in most cases not useful, unless you have a large game or low end devices for which controlling memory usage is important. It's mostly useful to delay loading of large custom objects.
- Objects can be configured so that its resources are not loaded when the scene is loaded. Instead, you can use an action to manually load the resources used by it. When the loading is done (this can be checked using a condition), the object can then be created.
  Be careful: if an object assets are not loaded, it will be broken when displayed on screen.
2026-05-04 10:45:51 +02:00
Clément Pasteau c5c718354a Fix object dragging on mobile having a small delay (#8562)
Do not show in changelog
2026-05-04 10:39:26 +02:00
D8H f7012ebfd6 Fix created child objects instances in custom objects being picked twice (#8559) 2026-05-04 09:37:51 +02:00
Florian Rival e8fe23d9dc Fix rendering of events true/false or yes/no as text when parameter not filled (#8561) 2026-05-03 23:35:12 +02:00
Florian Rival 182fb12dff Fix variable edition by AI wrongly erasing content of existing structure variables 2026-05-03 16:23:38 +02:00
Florian Rival 1fc3e48caf Revert new basis expressions
Don't show in changelog
2026-04-30 18:20:55 +02:00
Florian Rival b697245ea6 Fix wrong usage of THREE crash
Don't show in changelog
2026-04-30 18:10:08 +02:00
github-actions[bot] e25265dc19 [Auto PR] Update translations (#8550) 2026-04-30 14:24:31 +02:00
Clément Pasteau cd9d5f3b0a Fix course video visibility (#8554) 2026-04-30 14:24:14 +02:00
Florian Rival 840f0e93df Fix hot reloading for behaviors (#8553) 2026-04-30 11:08:56 +02:00
D8H ab5866386e Add expressions to get object and camera local basis in the world basis (#8546) 2026-04-29 17:19:21 +02:00
github-actions[bot] e9b9596d6d [Auto PR] Update translations (#8540) 2026-04-28 17:50:45 +02:00
Clément Pasteau 09ab670e7f Improve make a game courses structure (#8549) 2026-04-28 17:42:37 +02:00
Clément Pasteau 0f9127f506 Fix renaming objects on mobile weird behaviors (#8548)
- starting a rename was showing the image of the element dragged
- could not press on the input to select it
2026-04-28 14:30:28 +02:00
LuniMoon 0519896984 More Events Sheet design adjustments (#8545)
- Tweaking spacing (handles, event content spacing)
- Color: vertical lines for children, selection
- System Feedback: Warning & Errors
2026-04-28 14:27:25 +02:00
ViktorVovk e62e15c74b Add editor lifecycle hooks for auto running npm scripts (#8515)
- Three hooks are implemented:
  - * **onEditorReady** — after the project is loaded and settings are
applied
  - * **onPreviewStart** — before preview export/launch begins
  - * **onPreviewEnd** — when the preview window is closed
- Auto-execution of hooked scripts requires user consent.
  * Show a one-time dialog on the first hooked script trigger, asking the user to allow automatic script execution. The decision is then stored.
  * Then, hooked scripts run silently without any prompts.
2026-04-28 10:48:06 +02:00
Florian Rival 31282a90df Fix potential crash in scene editor when reloading resources with custom objects (#8544) 2026-04-27 16:41:55 +02:00
D8H cda13117a5 Fix object import and export never finishing loading (#8543)
- It also avoids to create the same "Blob" several times when resources
are used more than once
2026-04-27 15:03:08 +02:00
Clément Pasteau 2546cd0e96 Fix fields in Events sheet prefilling to "=" after opening a relational operator (#8541) 2026-04-27 14:23:02 +02:00
github-actions[bot] 3d852a5dfc [Auto PR] Update translations (#8539) 2026-04-27 10:42:58 +02:00
Clément Pasteau ca0c2ccb3d Improve 2D lights collision calculation for better performance (#8535) 2026-04-27 09:38:08 +02:00