Flame3D is a browser-based 3D level editor and game engine built with Three.js. It combines block placement, object sculpting, terrain modeling, texture painting, skeleton animation, copy/paste/duplicate workflows, teleport blocks, media objects (text, screens, cameras), multi-world editing, a full atmosphere system, and in-editor playtesting into a single-file application.
- Overview
- Files
- Running Flame3D
- Main Menu
- Top Bar
- Sidebar Menus
- Block Types
- Object Properties
- Movement Paths
- Editing Controls
- Terrain System
- Texture Paint
- Custom Objects
- Sculpt Editor
- Skeleton Animation Editor
- Playtest Controls
- Player Systems
- Control Systems
- Variables And Booleans
- Functions Panel
- Multi-World System
- Atmosphere And Sky
- Saving And Loading
- Runtime Mode
- Building The Editor
- Tips And Workflow
- Troubleshooting
- Current Scope
- Tips And Workflow
- Troubleshooting
- Current Scope
Flame3D lets you:
- Create block-based 3D levels in a live 3D viewport.
- Place walls, floors, terrain, targets, lights, spawn points, teleport blocks, and control blocks.
- Place 3D primitives (cube, sphere, cylinder, cone, pyramid, prism, torus) and 2D shapes (square, triangle, circle, polygon) with configurable sides and depth.
- Sculpt terrain with raise, lower, flatten, and smooth brushes.
- Paint object surfaces with color brushes and texture patterns (checker, brick, stripe, grid, noise, gradient).
- Copy, paste, and duplicate objects with Ctrl+C, Ctrl+V, and Ctrl+D.
- Save selections as reusable custom objects and place them from the sidebar.
- Select, move, rotate, scale, group, and ungroup objects with transform gizmos.
- Edit per-object properties such as color, solidity, groups, label, visibility, light emission, target health, switch behavior, traction, and control rules/functions.
- Add teleport blocks that transport the player between paired locations, including across different worlds.
- Place media objects: flat text panels, extruded 3D text, screen displays (color, image, video, URL, or HTML content), and in-world cameras.
- Adjust per-object metalness and roughness for shiny or matte surfaces.
- Create and edit skeleton animations with a dedicated skeleton editor.
- Create custom sculpted objects with a dedicated sculpt editor and CSG operations.
- Configure sun, moon, stars, clouds, fog, sky color, day cycle, grid visuals, render quality, and player movement rules.
- Define project-level variables and booleans for use in conditional logic.
- Build conditional player logic such as health checks, position checks, and touching a named object or group.
- Organize levels across multiple worlds with a tabbed world switcher.
- Play the level immediately in a first-person test mode.
- Save projects to browser storage or export/import JSON files.
- Export standalone game HTML or a multi-game loader HTML.
index.html: UI layout, styling, and all sidebar/topbar structure.main.js: Editor logic, rendering, object systems, saving/loading, playtest logic, controls/switches, and UI wiring.build-editor.js: Node.js build script that bundlesindex.htmlandmain.jsinto a single standaloneflame3d-editor.htmlfile.flame3d-editor.html: Pre-built standalone editor HTML (generated bybuild-editor.js).README.md: Project documentation.
Because Flame3D uses ES modules and remote imports, run it through a local web server instead of opening the file directly.
Example:
python3 -m http.server 8000Then open:
http://localhost:8000
The main menu appears when the app starts or when you return from the editor.
- Starts a fresh scene.
- Clears placed objects.
- Resets undo and redo history.
- Loads a previously exported level file.
- Restores objects, lighting settings, game rules, grid settings, and conditional triggers.
- Shows projects saved in local browser storage.
- Lets you reopen a project directly.
- Lets you delete saved projects.
The top bar is the primary editing command strip.
Block: Object placement and transform workflow.Light: Light and sun settings.Grid: Grid display and render distance settings.Player: Player movement, health, fall damage, spawn protection, and conditional triggers.Vars: Project-level numeric variables.Bools: Project-level boolean flags.Worlds: Multi-world management.Files: Save, load, and export options.
Visible when the top menu is set to Block.
Place: Place the currently selected block type.Select: Select and transform existing objects.Delete: Delete objects by clicking them.Paint: Paint surfaces with the active brush color.Erase: Erase objects using a configurable shape and size.
Available while in Place mode.
Sides: Number of polygon sides for shape placement (3–64).Depth: Thickness for 2D shape extrusions.Opacity: Opacity of the placed object (0–1).
Move: Translation gizmo.Rot: Rotation gizmo.Scale: Scale gizmo.
Available while scaling.
X: Choose+Xor-Xgrowth direction.Y: Choose+Yor-Ygrowth direction.Z: Choose+Zor-Zgrowth direction.
Select All: Select all placeable scene objects at once.Group: Create an editor group from the current selection.Ungroup: Remove editor grouping.
- Sets translation snap size.
- Also drives surface and ground placement snapping.
Available while in Paint mode.
Color: Active brush color.Mode:Draw,Erase Paint, orFill.Pick: Eyedropper tool to sample a color from an existing object.Pattern: Texture pattern to paint (checker, brick, stripe, grid, noise, gradient).Color 2: Secondary color for texture patterns.Scale: Texture pattern scale.
Copy: Copy selected objects (alsoCtrl+C).Paste: Paste copied objects (alsoCtrl+V).Duplicate: Duplicate selected objects in place (alsoCtrl+D).
Save Selection as Custom Object: Save the current selection as a reusable template.- Saved templates are listed below and can be placed by clicking them.
Available while in Erase mode.
Shape: Eraser cutter shape (box, sphere, cylinder, prism, square 2D, triangle 2D, circle 2D, polygon 2D).Size: Eraser radius.
Undo: Reverse the latest editor action.Redo: Reapply the latest undone action.
Clear: Delete all placed objects.Save: Save the current project to browser storage.Export: Download level JSON.Game HTML: Export a standalone, self-running game HTML file from the current level.Loader HTML: Export a runtime HTML launcher that can import and store multiple game JSON files, then play any of them without editor tools.Load: Load a JSON file.Play: Enter playtest mode.Stop: Exit playtest mode.Menu: Return to the main menu.
- The sidebar can be resized by dragging its edge.
- The sidebar can be collapsed and expanded.
- The sidebar has two library panes: Objects and Audio.
The Block menu is a categorized library of placeable objects.
Objects / Blocks:Wall,Floor,Terrain3D Primitives:Cube,Sphere,Cylinder,Cone,Pyramid,Prism,Torus2D Shapes:Square,Triangle,Circle,PolygonLighting:LightGameplay:Target,Checkpoint,Spawn,Joint,Skeleton,Pivot,TeleportControl:Control,KeypadMedia:Text,Text 3D,Screen,Camera
The selected block type is used by Place mode.
The Audio pane lets you import and manage audio clips for use in the project.
Import: Import audio files into the project library.- Imported clips are listed in the audio library panel.
The Light menu contains all lighting-related and atmosphere controls.
Brightness: Sets the default intensity for newly placed light blocks.
Time: Time of day.North: Rotates the sun’s north alignment.Intensity: Sun brightness.Haze: Atmospheric turbidity.Shadow: Sun shadow range.Size: Sun disk size in the sky.Day (s): Full day/night cycle duration during playtest.Cycle: Enables or disables automatic day progression during playtest.
Color: Direct sky color adjustment.
Enabled: Toggle cloud layer.Wind Speed: Cloud drift speed.Wind Dir: Wind direction in degrees (0–360).Opacity: Cloud opacity.
Enabled: Toggle star rendering.Count: Number of stars (100–5000).Brightness: Star brightness.
Enabled: Toggle moon rendering.Brightness: Moon brightness.Aura: Moon glow intensity.
Shadows: Global shadow quality preset.Light Dist: Distance at which point lights stay active.
The Grid menu now controls grid visuals and world visibility distance.
Range: Number of visible grid chunks around the camera.
Color: Fill color under the grid.Texture: Procedural ground texture overlay. Options:None,Grass,Dirt,Stone,Sand,Snow.Enabled: Show or hide the fill plane.
Render Dist: Maximum object visibility distance.
Enabled: Toggle distance fog.Color: Fog color.Density: Fog density.Brightness: Fog brightness multiplier.
Editor: Field of view for the editor camera (30–150).Playtest: Field of view for the playtest camera.
Enabled: Toggle player boundary enforcement.Min X/Max X: Horizontal boundary limits.Min Z/Max Z: Depth boundary limits.
The Player menu contains playtest rules and conditional player logic.
All playtest controls are fully rebindable.
- Click any keybind button and press a new key or mouse button to remap it.
- Default bindings:
W/A/S/D(move),Space(jump),R(sprint),Shift(crouch),LMB(shoot),T(free cursor),Esc(pause/exit). - Keybind configuration is saved with the project.
Jump: Jump force.Gravity: Downward acceleration.Gravity Enabled: Toggle gravity on or off.Height: Player height.Crouch Height: Player height while crouching (defaultShiftto hold).Sprint: Sprint speed.Sprint Duration: How long the player can sprint before needing to recharge (seconds).Sprint Recharge: Time to fully recharge sprint (seconds).Air Dash Enabled: Toggle mid-air dash ability.Air Dash Duration: Duration of an air dash (seconds).Allow Air Sprint: Allow sprinting in the air without prior ground momentum.
Name: Player display name.Groups: Assign the player to named groups for use in conditional logic.
Max HP: Maximum player health.
Enabled: Toggle fall damage.Min Height: Minimum fall height before damage starts.Vel. Mult.: Fall damage multiplier.
Timer (s): Protection duration after spawn.Conditions: What the protection blocks.All DamageFall OnlyUntil LandedNone
Ground Touch Fn: A function name to run when the player touches the ground.
Reset Checkpoints: Reset all checkpoint positions to defaults.Reset Values: Reset all game variables and booleans to defaults.
These are player-side logic rules evaluated during playtest.
Each trigger includes:
Priority: Higher runs first.Mode:IF,WHEN, orWHILE.- Condition selector.
- Action target.
- Action math.
- Optional else branch.
Supported condition sources:
HealthTouchingPos Y/Pos X/Pos ZGroundedLandedDistance: Distance between the player (or a named object) and a target object by name.Timer: Time elapsed since the trigger became active.Key: Whether a specific key is currently held.VarCmp: Compare a named project variable against a value or another variable.Bool: Check whether a named project boolean is true or false.FnDone: Whether a named control function has completed.
The Touching condition supports:
group: Match against block group names.name: Match against block labels.
The condition represents the player touching the matched object(s), and appears in the UI as Touching Player.
Objects can belong to multiple groups. A group match passes if any assigned group matches the condition value.
When group is selected, the input shows existing group suggestions while still allowing a new group value to be typed manually.
The Distance condition checks how far the player is from a named object.
- Target object is specified by label.
- Supports all comparison operators (
<,>,=,!=,<=,>=). - Value can be a literal number or a named project variable.
- Tall rectangular solid block.
- Solid by default.
- Good for structure and collision.
- Flat rectangular solid block.
- Solid by default.
- Good for walkable surfaces and platforms.
- Deformable terrain block with sculpting support.
- Solid by default.
- Supports raise, lower, flatten, and smooth brush operations.
- Vertex-based sculpting in Paint mode with sculpt enabled.
- 3D primitive shapes with configurable parameters.
- Can be solid or non-solid.
- Cylinder, cone, prism, and torus respect the
Sidessetting.
- Flat 2D shapes extruded to configurable depth.
- Circle and polygon respect the
Sidessetting. - Depth is set by the
2D Depthcontrol.
- Spherical target block.
- Supports target health.
- Can be shot during playtest.
- Small visible point-light marker.
- Carries a real point light.
- Hidden visually during playtest while the light remains active.
- Defines player spawn and respawn location.
- Supports
Groupsassignment. - First available spawn block is used for playtest start and death respawn.
- Includes a directional indicator showing which way the player will face on spawn.
- Saves the player's respawn position when touched during playtest.
- Activates on player overlap.
- Invisible connection point for linking objects together.
- Used for mechanical linkages and pivot systems.
- Animated skeleton model with keyframe-based bone animation.
- Edit bone structures and animations in the dedicated Skeleton Editor.
- Rotation pivot point for grouped objects.
- Objects in the same group rotate around the pivot during function-driven movement.
- Transports the player to a paired teleport block during playtest.
- Configured with a
Pairname in the Properties panel. - Two teleport blocks with the same pair name form a link.
- Player overlap triggers teleportation to the paired block.
- Includes a cooldown to prevent ping-pong teleportation.
- Supports
Cross-Worldteleportation: enable the toggle and select the target world to teleport to a paired block in a different world. View Destinationbutton snaps the editor camera to the paired block to preview the landing position.- Teleport blocks are hidden during playtest.
- A flat 2D panel that renders text as a texture.
- Properties:
Content(multi-line),Fontfamily (upload custom .ttf/.otf/.woff),Size,Color, background color,Align(left/center/right), bold, italic.
- A depth-extruded 3D text object.
- Same text properties as the flat Text block.
- A flat display panel that can show various content during playtest.
Mediatype options:Color(solid color fill),Image(upload),Video(upload),URL(embed external page via iframe),HTML(inline HTML content or uploaded file).Interact: When enabled, the player can click the screen during playtest to open a fullscreen interactive overlay.
- A placeable in-world camera object.
- Properties:
FOV,Nearclip,Farclip. - Listed under the Media category in the object library.
- A visible editor block that becomes hidden during playtest.
- Uses overlap detection with the player.
- Can apply control rules when entered.
- Can run named functions that move objects or change their lighting.
- Supports
Groupsassignment.
- An interactive keypad overlay that appears during playtest.
- Player enters a numeric code to trigger functions.
- Configurable with correct code, display style, and offset position.
The Properties panel appears when an object is selected.
TypeName: Label used by name-based touching conditions.PosRot°ScaleGroupinfo for editor groups when grouped.Groups: Comma-separated membership list for gameplay grouping.Visible: In-game visibility toggle. When off, the object is hidden during playtest but still functional.
Available on most placeable objects.
Metal: Metalness (0–1). Higher values give a mirror-like reflective surface.Rough: Roughness (0–1). Lower values produce a shinier, more specular surface.
Available on walls and floors.
Color
Available on placeable solid-capable objects.
Solid: Controls whether the player collides with the object.
Available on all placeable objects.
Groups: Suggests existing groups and accepts multiple values.- Enter multiple groups as a comma-separated list (example:
default, enemy, moving).
Available on solid-capable objects.
Traction: When enabled, a grounded player standing on the object is carried along the object movement onXandZduring playtest.
Available on teleport blocks.
Pair: A text label that links two teleport blocks together. Two teleports with the same pair name form a bidirectional link.Cross-World: Enable cross-world teleportation and select the target world.View Destination: Snap the editor camera to the paired teleport's position.
Available on targets.
Max HP:0means invincible.
Available on visible object/block types.
Switch: Makes the selected object shootable during playtest.Var: Chooses which runtime value gates the switch.Range: Inclusive min/max range that must be met before the switch fires its functions.Mode:One Shotstops after function completion,Repeatallows repeated runs.
Available on light-emitting objects.
Bright: Light intensity.Aura: Light distance.
Available on non-light blocks.
Emit: Adds or removes a point light from the selected object.
Available on control blocks, plus any object that has Switch enabled.
Control blocks can still add or remove player/game-rule overrides that fire on enter.
Functions support:
- Named function IDs such as
1,2, orraiseLift. IFchecks against another function name before the command runs.- Targeting by
grouporname. movecommands withFrom XYZandTo XYZ, both relative to the target object's original playtest-start position, plus animation style and duration.- Move coordinates are relative to the target object's playtest-start position, not world origin.
lightcommands that cantoggle,enable,disable, setintensity, or setdistanceon target objects.Copyso you can duplicate and tweak existing functions quickly.
Supported control rule targets:
healthjumpHeightgravityheightsprintSpeedmaxHealthfallDamagefallDamageMinHeightfallDamageMultiplier
Available on most object types (not spawn, checkpoint, or trigger).
Ready: Enable the path so it can be started by a control function.Draw: While checked, moving the object in the viewport places a new checkpoint at each position instead of shifting existing ones. Auto-unchecks on deselect.Speed: Default movement speed in units per second.Loop: Restart the path when the last checkpoint is reached.Front Axis: Which local axis (+Z,-Z,+X,-X) is treated as the object's forward face for rotation-based facing.+ Sel Pos: Add a checkpoint at the selected object's current position.+ Cam Pos: Add a checkpoint at the current editor camera position.Clear: Remove all checkpoints.
Each checkpoint row supports:
X / Y / Z: Position in world space.Face: Rotate the object toward this checkpoint during movement.Style: Movement style —glide(smooth interpolation),strict(linear constant speed),snap(instant).Spd: Per-checkpoint speed override (blank uses the path default).Wait: Seconds to pause at this checkpoint before continuing.Pause: Hold at this checkpoint until a function tells the path to resume.on-arrive fn: A control function to run when this checkpoint is reached.Sel/Pick: Set the checkpoint position from the current selection or by clicking in the viewport.
Movement paths are started with a path → start function action on a control block.
- Click in
Placemode: Place the selected block. - Click in
Selectmode: Select one object. Shift+ click inSelectmode: Multi-select.- Click in
Deletemode: Delete the clicked object. - Drag with transform gizmo: Move, rotate, or scale.
1: Move gizmo.2: Rotate gizmo.3: Scale gizmo.Ctrl+ZorCmd+Z: Undo.Ctrl+YorCmd+Y: Redo.Ctrl+CorCmd+C: Copy selected objects.Ctrl+VorCmd+V: Paste copied objects.Ctrl+DorCmd+D: Duplicate selected objects in place.Ctrl+GorCmd+G: Group selected objects.Ctrl+Shift+GorCmd+Shift+G: Ungroup selected objects.Ctrl+AorCmd+A: Select all placeable objects.DeleteorBackspace: Delete selected objects.Tabin Place mode: Sample hovered object scale for cloning.P: Start playtest.Escape: Stop playtest.
W A S D: Horizontal movement.SpaceorE: Move upward.ShiftLeftorQ: Move downward.
W A S Dor arrow keys: Move.R: Sprint.Space: Jump.Shift: Crouch.V: Toggle Dev View for normally hidden playtest blocks.- With Dev View
OFF, hidden playtest objects only hide their mesh display; lights and other gameplay systems still run. - Left click: Lock pointer or shoot.
T: Free cursor without pausing (toggle mouse capture).Escape: Exit playtest (editor) or pause game (runtime).P: Pause or resume game in runtime mode.
All keybinds above reflect default bindings and are fully remappable in the Player menu under Keybinds.
Flame3D includes a vertex-based terrain sculpting system.
- Select
Terrainfrom the Objects / Blocks category in the sidebar library. - Place terrain blocks in the scene like any other object.
- Switch to
Paintmode in the top bar. - Enable
Sculpt Modein the sidebar under Terrain Sculpt. - Select a brush type:
Raise,Lower,Flatten, orSmooth. - Adjust
RadiusandStrengthto control the brush size and effect intensity. - Click and drag on a placed terrain block to sculpt it.
Raise: Push vertices upward to create hills and ridges.Lower: Push vertices downward to create valleys and depressions.Flatten: Level vertices to a consistent height.Smooth: Average nearby vertex heights to reduce jagged surfaces.
Texture Paint lets you apply procedural patterns to object surfaces in addition to flat colors.
- Switch to
Paintmode. - In the sidebar under Texture Paint, select a
Pattern. - Optionally set
Color 2for the secondary pattern color. - Adjust
Scaleto control pattern density. - Click on objects to apply the texture.
None: Color only (default flat color painting).Checker: Alternating color checkerboard.Brick: Brick wall pattern.Stripe: Horizontal stripes.Grid: Grid line pattern.Noise: Procedural noise texture.Gradient: Smooth gradient between two colors.Wood: Wavy wood grain pattern.Cobblestone: Irregular rounded stones with mortar.Marble: Veined marble pattern.Custom Image: Upload any image file to use as a paint texture.
You can save object selections as reusable templates and place them later.
- Select one or more objects in the scene.
- Click
Save Selection as Custom Objectin the sidebar under Custom Objects. - Enter a name for the template.
- Saved templates appear in the Custom Objects list in the sidebar.
- Click a template to place a copy of it in the scene.
- Templates include all object properties, positions, rotations, and scales relative to the selection center.
- Custom objects are saved with the project.
- Delete templates from the list when no longer needed.
The Sculpt Editor is a dedicated overlay for creating custom sculpted objects using CSG (Constructive Solid Geometry) boolean operations.
- Select a terrain or sculpted object and open its sculpt editor from the Properties panel.
- Add primitive shapes (box, sphere, cylinder) as sculpt operations.
- Boolean operations: Union, Subtract, Intersect.
- Full TransformControls with Move, Rotate, and Scale gizmos (keyboard shortcuts
1,2,3). - Click to select primitives in the 3D viewport.
- Real-time preview of the combined CSG result.
- Undo support for transform changes.
The Skeleton Animation Editor lets you create bone-based character animations.
- Visual bone hierarchy editor with add/remove/rename controls.
- 3D preview of the skeleton with interactive bone manipulation.
- Timeline with keyframe support for bone rotations.
- Play, pause, and scrub through animations.
- Animations are saved with the skeleton object and exported with the project.
- Player starts with
Max HP. - Health updates live in the playtest HUD.
- If health reaches
0, the player respawns.
- A sprint meter appears below the health bar during playtest.
- Sprinting drains the meter; releasing sprint recharges it.
- Sprint cannot be used in the air unless the player was already sprinting before leaving the ground, or
Allow Air Sprintis enabled. - Air Dash allows a brief mid-air sprint burst when enabled.
- Respawn uses the current spawn block’s actual world position.
- If no spawn block exists, playtest falls back to the editor camera start position.
- Uses the configured minimum height and multiplier.
- Can be blocked by spawn protection depending on settings.
- Timer-based protection can block all damage, only fall damage, or stay active until the first landing.
- If the player is grounded on a moving, solid object with
Tractionenabled, the player is carried along the surface onXandZ. - Carry uses previous-frame support checks to stay more stable when platforms move quickly.
- Control blocks check player overlap using AABB overlap during playtest.
- On enter, they apply configured control rules.
- Controls can run multiple named functions across multiple target objects.
- Functions can move targets or change target lighting.
- Function dependencies let one function wait for another function to be met.
- A switch-enabled object can be pressed by shooting it.
- The switch only fires if its selected runtime variable is inside the configured min/max range.
- When fired, it runs the same function list used by control blocks.
- These run continuously during playtest.
- They can change player values and game rule values.
IF: Fires once when the condition becomes true.WHEN: Fires every frame while true.WHILE: Fires on a repeat interval while true.
Project-level variables and booleans can be defined in the Player menu and used across conditional triggers, control functions, and switch logic.
- Numeric values that persist during a playtest session.
- Add, rename, or remove variables from the Player panel.
- Can be read and written by conditional triggers and control functions.
- True/false flags that persist during a playtest session.
- Add, rename, or remove booleans from the Player panel.
- Useful for gating logic (e.g., "door unlocked", "boss defeated").
The Functions panel is a dedicated right-side panel for managing all control functions across the project.
- Searchable list of all functions defined on control blocks and switch-enabled objects.
- Functions can be organized into collapsible groups.
Add Function: Create a new function entry.Add Group: Create a new function group for organization.- Each function supports targeting by
grouporname, withmoveandlightcommands. - Functions can have
IFdependencies on other function names.
Flame3D supports multiple worlds within a single project, allowing you to build separate areas or levels.
- A tab bar at the top of the editor shows all worlds.
Add World: Create a new world tab.- Clicking a world tab switches the active editing world.
- Each world has its own set of objects.
- During playtest, all worlds are loaded together into a single scene.
- Objects remember which world they belong to through save/load.
- The sun updates lighting, sky appearance, and shadow behavior.
- Time can be fixed or animated during playtest.
- Sun size, sky color, and atmospheric haze are independently adjustable.
- The moon and stars appear during nighttime in the day cycle.
- Both can be toggled and configured for brightness.
- Star count is adjustable.
- A cloud layer can be toggled with wind speed, direction, and opacity controls.
- Distance fog with adjustable color, density, and brightness.
- Helps set atmosphere and hide pop-in at render distance boundaries.
- Dedicated light blocks create point lights.
- Other blocks can emit lights through properties.
- Point lights are distance-culled using
Light Dist.
Render Dist: How far blocks stay visible.Shadows: Shadow quality preset.Light Dist: Distance at which point lights render.
- Stores the current project in IndexedDB browser storage (migrated from localStorage for larger project support).
- Includes settings and placed objects.
- Auto-restore periodically saves editor state in the background so work can be recovered after unexpected closures.
- Downloads the current level as JSON.
- Builds a self-running HTML file that includes the current level and runtime.
- Runs in play mode with editor tools disabled.
- Includes an in-game runtime settings panel for quality and day-cycle tuning.
- In-game
Pkey or the⏸ PauseHUD button opens the pause menu.
- Builds a runtime-only HTML file with no editor tools.
- Provides a game library panel where multiple JSON files can be imported and kept in browser storage.
- Lets you launch any imported game from that library, similar to a lightweight game launcher flow.
- Each library entry stores the level name, object count, play duration, and last-played timestamp.
- Supports importing additional JSON files into the library at any time.
- Library data is stored using the key
flame3d_runtime_library_v1in browser local storage.
- Imports a previously saved JSON file.
- Scene objects (per world)
- Sun, moon, stars, clouds, and sky settings
- Fog settings
- Game rules (movement, health, fall damage, spawn protection, sprint, air dash)
- Grid fill and world border settings
- FOV settings
- Conditional triggers
- Variables and booleans
- Object labels, groups, control rules/functions, switch settings, light values, visibility, traction, and target health
- Audio library entries
Runtime mode is active when a standalone game HTML is opened. It hides all editor UI and switches the app to a pure gameplay experience.
The following globals control which runtime mode is active. They are set by the exported HTML before the main script runs.
| Flag | Type | Description |
|---|---|---|
__FLAME3D_RUNTIME_MODE__ |
boolean | Activates runtime mode and hides editor UI. |
__FLAME3D_RUNTIME_LOADER__ |
boolean | Shows the game library overlay instead of auto-starting. |
__FLAME3D_RUNTIME_AUTOSTART__ |
boolean | Immediately starts the embedded level on load. |
__FLAME3D_EMBEDDED_LEVEL__ |
object | Level JSON payload embedded in the page for autostart. |
In runtime mode, a minimal HUD replaces editor controls.
⏸ Pausebutton: Opens the pause menu.⚙ Runtimebutton: Toggles the runtime settings panel (quality and day cycle).📚 Librarybutton (loader mode only): Returns to the game library overlay.
Opened with P, Escape, or the ⏸ Pause HUD button. Pointer lock is released while the menu is shown.
- Resume: Closes the menu and re-locks the pointer.
- Save Progress: Saves the current position, health, hits, and optimizer state to the active library entry.
- Save and Quit: Saves progress and returns to the game library overlay.
- Quit Without Saving: Returns to the game library overlay without saving.
- Restart Level: Resets the level to its initial state and restarts without saving.
- Settings: Inline quality controls (shadow quality, render distance, light distance, auto-performance, auto-visual) available directly in the pause menu.
When saving progress, the following state is captured and can be restored on next launch:
- Player world position (X, Y, Z)
- Player look direction (yaw and pitch)
- Vertical velocity
- Current health
- Shot and target hit counts
- Adaptive optimizer state (current quality profile index)
Progress is stored per library entry and survives page refreshes as long as browser local storage is not cleared.
Accessible via the ⚙ Runtime HUD button or inside the pause menu. Controls:
- Shadow Quality: Off, Low, Medium, High.
- Render Distance: Block visibility cutoff in world units.
- Light Distance: Point light render cutoff in world units.
- Auto Performance: When enabled, the adaptive optimizer can lower quality to maintain frame rate.
- Auto Visual: When enabled, the adaptive optimizer can raise quality when performance is good.
When active, the optimizer monitors frame rate using an exponential moving average and automatically adjusts quality.
- Checks every 5 seconds (configurable via
RUNTIME_OPTIMIZER_CHECK_INTERVAL_MS). - After adjusting, waits at least 8 seconds before adjusting again (configurable via
RUNTIME_OPTIMIZER_COOLDOWN_MS). - Requires three consecutive low-FPS checks before stepping quality down (guards against brief spikes).
- Requires three consecutive high-FPS checks before stepping quality up.
- Quality profiles in order: Performance, Balanced, Quality, Ultra.
- Auto Performance and Auto Visual can be individually toggled.
- State is saved as part of the progress snapshot.
The game library overlay is shown in loader-mode exports and when returning from a level.
- Import JSON game files using the Import JSON button.
- Each entry shows the game name, object count, last-played date, and total play time.
- Play launches a fresh run; Continue restores saved progress if available.
- Remove deletes the entry and its progress from local storage.
- Library entries are stored in
flame3d_runtime_library_v1.
A Node.js build script bundles the editor into a single standalone HTML file.
node build-editor.jsThis reads index.html and main.js, inlines all code, and outputs flame3d-editor.html. The standalone file can be opened directly or hosted without needing a separate JS file.
- Start by choosing a block type from the Block menu.
- Build structure with walls and floors.
- Add a spawn block before playtesting.
- Use labels and groups early if you plan to use touching conditions.
- Use control blocks for zone-based player changes.
- Use conditional triggers for logic based on health, position, grounded state, or touching rules.
- Save to browser storage often and export JSON snapshots when needed.
- Make sure you are serving the files through a local web server.
- Do not open
index.htmldirectly as a file URL.
- Check the Light menu
Shadowssetting. - Increase
Light Distif point lights disappear too early. - Adjust sun
Intensity,Haze, andShadowrange.
- Make sure a spawn block exists.
- The first spawn block in the scene is used.
- Respawn now uses the spawn block’s actual world placement.
- Confirm the target object has the expected
GrouporName. - For group checks, verify the group text matches the condition.
- For name checks, verify the label is set in the Properties panel.
Flame3D currently focuses on:
- In-browser 3D level editing with multi-world support
- Immediate FPS playtesting with sprint, crouch, air dash, and world borders
- Block/object property editing including visibility, traction, and switches
- 3D primitive and 2D shape placement with configurable polygon sides and depth
- Terrain placement and vertex-based sculpting with multiple brush types
- Texture painting with procedural patterns (checker, brick, stripe, grid, noise, gradient)
- Copy, paste, and duplicate workflows for rapid level building
- Custom object templates for saving and reusing selections
- Sculpt editor with CSG boolean operations and full transform gizmos
- Skeleton animation editor with bone hierarchy and keyframe timeline
- Teleport blocks for player transportation between paired locations
- Paint and eraser tools for surface editing
- Full atmosphere system: sun, moon, stars, clouds, fog, sky color
- Project-level variables and booleans for game logic
- Functions panel with search, groups, and dependency chains
- Trigger and conditional logic authoring
- Audio library for importing and managing sound clips
- Media objects: flat text panels, extruded 3D text, screen displays (color/image/video/URL/HTML), and in-world cameras
- Per-object metalness and roughness material controls
- Procedural ground textures for the grid floor (grass, dirt, stone, sand, snow)
- Fully rebindable player control keybinds
- Cross-world teleportation between paired teleport blocks in different worlds
- Movement path draw mode for placing checkpoints by moving the object in the viewport
- Extended conditional trigger conditions: distance, timer, key press, variable comparison, boolean, and function-done checks
- Project save/load workflows backed by IndexedDB with auto-restore
- Standalone game export with full runtime mode
- Standalone editor export via build script
- Game library and loader workflow for distributing multiple levels
- Adaptive performance optimization during runtime gameplay