Skip to content

Editor and Projects ​

Photon uses the LDLib2 editor framework. The FX project adds a real-time scene, an FX object hierarchy, and a Timeline to the standard resource and Inspector workflow.

Workspace ​

AreaPurpose
FX HierarchyCreate, name, parent, reorder, and select FX objects. Copy, paste, and duplicate them together with their Timeline tracks. Place FX instances.
ScenePreview the runtime, inspect shapes, move objects, and control playback. Toolbar toggles show helpers such as bloom, dynamic lights, and the collision view.
InspectorEdit the selected object's transform, emitter config, modules, material, and renderer.
ResourcesCreate and reuse materials, graphs, curves, gradients, colors, and meshes.
TimelineSequence objects, animate transforms/config values, play audio, and submit post effects.
HistoryInspect and undo editor commands.
Maximized Photon editor showing Scene, Timeline, Resources, Inspector, and Hierarchy
The maximized editor keeps the Timeline beside the Scene, Resources, Inspector, and Hierarchy; selecting a target connects all five views.

Copy, Paste, and Duplicate ​

Since 2.2.8

Right-click in the FX Hierarchy and choose Copy, Duplicate, or Paste, or press Ctrl+C, Ctrl+D, or Ctrl+V. A paste goes under the parent the selected objects share, or under root.

A copy carries every Timeline track that targets the copied objects, retargeted to the copies:

  • Animation, Activator, Speed, and Audio tracks;
  • the copied objects' own clips on Control tracks;
  • track groups, trimmed to the copied tracks.

An animated object therefore keeps animating instead of freezing on the frame shown when you copied it.

Since 2.2.8, removing a parent also removes its children for good. Before, they came back after the project was reopened.

Scene Toggles ​

The Scene toolbar has icon toggles for helper views. Two are new:

ToggleSinceShows
Show dynamic lights2.2.8Dynamic lights in the preview.
Collision view2.2.9The selected collider's gizmo, or the selected emitter's last particle contacts with their normals. See Particle Collision.

Keyboard Shortcuts ​

Since 2.2.7

The FX editor adds these shortcuts to LDLib2's built-in ones. You can rebind any of them in Settings → Keymap; see Keymap.

ActionDefault
Gizmo: None / Move / Rotate / ScaleQ / W / E / R
Gizmo: Toggle Local / GlobalX
Cycle Draw Mode (Shaded / Wireframe / Both)Z
Toggle BloomB
Play / PauseSpace
Stop and RewindShift+Space
Step Back One Tick / Step Forward One Tick, / .
Reload EffectCtrl+R

LDLib2's built-in edit shortcuts work in the FX Hierarchy and the Scene: Ctrl+C / Ctrl+V / Ctrl+D copy, paste, and duplicate FX objects, and Ctrl+Z / Ctrl+Y undo and redo. Ctrl+S saves the project.

Single-key shortcuts do nothing while you type in a field. The gizmo keys are also ignored while the fly camera is active (right mouse button held), because the fly controls use the same keys.

File Menu ​

Changed 2.2.9
ItemDoesNeeds an open project
Export → Export FX (Definition Only)Writes the effect as a .fx runtime definition.Yes
Export → Export to FXPack...Adds the effect and its dependencies to an .fxpack.Yes
Convert .fx to Project...Turns an .fx back into an editable project.No
Manage FXPack...Lists a pack's effects, converts them into projects, or removes them.No

Since 2.2.9, Convert .fx to Project... (new) and Manage FXPack... belong to the editor's own File menu rather than the project's, so both work without an open project. See Distribution and FX Packs for exporting, converting, and managing packs.

Photon editor File menu with Export, Convert .fx to Project, and Manage FXPack
The editor's File menu: Export, Convert .fx to Project..., and Manage FXPack....

File Types ​

FileRole
.fxprojEditable project file, including project metadata and the authored FX definition.
.fxCompressed runtime definition. It references resources by path.
.fxpackResource-pack zip containing one or more effects and their collected dependencies.
*.material.nbtReusable material resource.
*.shader_graph.nbtParticle/material Shader Graph.
*.shader_function.nbtReusable shader function graph.
*.fullscreen_graph.nbtFullscreen shader pass.
*.render_graph.nbtMulti-pass post-effect graph.
*.mesh.nbtReusable mesh source.
Since 2.2.9

The Asset Browser shows .fx files with their own FX icon, distinct from .fxproj. Opening an .fx (double-click) converts it into a project and opens that project; it asks where to save the project first. Right-click an .fx to place it as an FX instance.

Raw model files (.obj, .json, .glb, .gltf) can be dropped into the Mesh resource panel. See glTF models.

Project Resources ​

An FXProject installs Material, Shader Graph, Shader Function, Fullscreen Graph, Render Graph, Color, Curve, Gradient, and Mesh resource panels. A resource can be dragged into a compatible Inspector field or graph input.

File-backed resources under <gameDir>/ldlib2/assets/ can be shared by several projects. Built-in resources are read-only. Saving a graph resource recompiles dependent materials or passes.

Authoring and Runtime Files ​

Do not treat .fxproj and .fx as interchangeable:

  1. Edit and save the project as .fxproj.
  2. Export .fx for local runtime use when all referenced resources already exist.
  3. Export .fxpack when the effect must travel with its dependencies.

To edit an exported effect again, convert it back with File → Convert .fx to Project.... To reuse it inside a bigger effect, place it as an FX instance instead of copying its objects.

The editor stamps exported FX data with a project format version. Photon applies registered data fixes while loading older versioned files.

Practical Rules ​

  • Give runtime-controlled objects stable, unique names; Java code can find them with FXRuntime#findObject.
  • Keep reusable graphs, materials, gradients, and meshes in named resource folders instead of duplicating inline data.
  • After changing a resource file outside the editor, reload resources before judging the preview.
  • Use lowercase resource paths without spaces for anything that will ship in a resource pack.

Released under the MIT License.