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, duplicate, and select FX objects.
ScenePreview the runtime, inspect shapes, move objects, and control playback.
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.

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.

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.

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.