Repository navigation
v0.3.0
-
Point lights picked per view (
pickLights): unlit lights and lights out of the frustum drop, and pastMAX_LIGHTSthe nearest to the eye win. Scenes with 8 or fewer lights in view are unchanged. -
Glow particles:
Environment.glowdraws billboards additively (PipelineOptions.additive, web and native), fading to nothing in fog;Emitter.colorsis a color ramp over the life andEmitter.radiusspawns inside a sphere. -
A material may define
fn vertex(position, time, params0, params1) -> vec3fto move its mesh's positions before the model transform and skinning, on static and skinned meshes. -
Static meshes are culled against the frustum and anything scaled to zero is skipped; skinned meshes are always drawn. The Ones' night 4 runs at 60 fps on an iPhone 15 Plus.
-
iOS keeps
Storagein the app's preferences (src/native/storage.ts, shared with macOS and Windows), so saves survive quitting the app. -
replay verify --nativereads each replay's inputs and checksums from files next to the binary instead of one huge literal: 33 replays verify in 15 s on scriptc 0.2.7, which never finished compiling the old entry. -
Limits that drop things warn once: spot lights past
MAX_SPOTS, fog volumes pastMAX_FOG_VOLUMES, joints pastMAX_JOINTS, iOS library mode past 28 of its 32 callbacks, and a planwaitthat hits its default 6000 frames. -
dotframe/src/rig: posing a skeleton by hand (createRig,solve,turn,aim,headLook,stare,snap,follow,twoBoneIk,lockRoot,eulerYXZ).twoBoneIkalso bends a leg that is straight at rest. -
Four music channels:
playMusic,stopMusic,pauseMusicandsetMusicVolumetake an optional channel (default 0, so existing games are unchanged), streamed together on web and mixed indf_audio.cnatively with no new iOS callback. -
UiStyle.align: "left"andpad: labels at the item's edge and a row's value with its arrows on the right, for settings lists. -
Fixed: on the web a key pressed and released between two frames was never seen; it now reads as down for one frame.
-
assets slim --decimate <ratio>or--decimate file.glb=ratio,...: quadric edge collapse in TypeScript for static and rigid-skinned meshes (welded across seams, rims slide along themselves, flips rejected, unused vertices dropped).dotframe.jsonassets.decimateapplies it to iOS bundles. The Ones' tripod went from 9.2 MB to 3.8 MB at 0.35. -
Volumetric fog stand-in:
Environment.fog.scatteradds the light the fog throws toward the eye, so point lights get halos (PointLight.fogscales each one, like Godot'slight_volumetric_fog_energy), andfog.volumesadds up toMAX_FOG_VOLUMESboxes of thicker fog with a height falloff (GodotFogVolume). Both are closed-form per fragment, no extra pass and no samples, so phones run the same code. Off by default; scenes without them render as before. -
Several spot lights:
Environment.spotslights together withspot, up toMAX_SPOTS(4). The first spot that asks for shadows gets the shadow map and the others light without shadows, on every platform, so phones pay one map as before; each extra spot costs a few ALU ops per fragment. The Ones lights the flashlight and the camcorder IR at once. -
Custom material shaders:
Renderer.createMaterial(wgsl)takes a WGSLfn surface(s: SurfaceIn) -> Surface(Godot'sfragment(): albedo and emission from the world position, normal, UV, view vector,MeshRef.color, eight floats ofMeshRef.params, time and the mesh texture), andMeshRef.materialdraws a mesh with it on static, skinned and instanced meshes. Built-in lighting, shadows, fog and exposure apply unchanged; meshes without a material keep the same shader and uniforms. One pipeline per material and mesh kind, made on first draw; phones run the same shader with no extra pass. The Ones portsone_skin.gdshaderwith it. -
Post passes render at 0.75 of the asked size on mobile (
gpu.mobile,POST_MOBILE_SCALE). On an iPhone 15 Plus, The Ones' camcorder viewfinder (a second full-screen pass) went from p95 21 ms with 146 ms spikes to p95 17.0 ms. -
perfsets the viewport before opening the game and draws 30 untimed frames at--framebefore measuring: runs used to start with up to nine one-second "hitches" from the resize and the first shader compiles. -
Fixed: one renderer drawing two worlds (an in-game TV's set and the scene) reused per-entity GPU buffers across them, since both number entities from 0; buffers are now keyed by
World.idtoo. -
Renderer.updateInstances(set, data)rewrites an instance set in place (same count).Camera.aspectdraws into a target of another shape than the surface,Camera.rollturns the view about its direction, andCamera.fixedkeeps a camera inside the scene (one filming an in-game TV) from being replaced bysnap --camera. -
Render layers:
MeshRef.layersandCamera.layers(bitmasks, default 1), like Godot's layers and cull mask. A mesh off layer 1 casts no shadow. The Ones uses it for what only the camcorder shows. -
replay record --plan plan.json: go, look, press, wait (frames or until astate()path has a value) and expect steps, each able to hold named buttons ("with": ["crouch"]), steered through the new optionalSim.pilotandSimRun.pose. Replaces hand-tuned inputs and per-replay route scripts (The Ones had five copies of one). A failed step names its frame and writes nothing. -
assets font --chars-fromcollects every character past Latin-1 (it skipped U+0100 to U+02FF, so ō, ā, ł and ş never baked: The Ones' "Gorō (shōbōdan)" drew as "Gor (shbdan)"), and the baker leaves out characters the font lacks instead of baking its .notdef box, and says how many. -
replay verify --nativecompiles the sim with scriptc and runs each replay there, one process per replay, reporting the frame an abort happened after.doctorruns it overreplays/*.jsonasnative-replays, and CI runs it on the templates. Bun replays had passed The Ones' 15 replays while the iPhone aborted in a dialog. -
MeshRef.emissiveglows with the texture (surface color times emissive), so a textured emitter keeps its pattern; untextured meshes look the same as before. -
fitFootprint(model, length)insrc/model: scales a flat prop by its longest horizontal side. -
The template's gitignore ignores only snaps in the repo root (
/*.png);*.pnghid every PNG asset, so a fresh clone lost the HUD font and textures.
From porting The Ones (Godot, first-person 3D horror) to dotframe.
-
Native sound effects stay 16-bit in their own channel count instead of float stereo, a quarter of the memory for mono files. The Ones' decoded audio went from about 159 MB to 40 MB.
-
Environment.sky: a procedural sky drawn behind the scene in its own pass: zenith to horizon gradient (Godot's sky_curve), ground, sun disc, a textured moon, twinkling stars, a Milky Way band and a low horizon glow, tonemapped like the scene. -
assets slim: copies assets for shipping, with GLBs cut to whatloadGlbreads (unused maps, tangents and UV sets dropped, 16-bit indices when they fit) and opaque PNG textures recoded as JPEG through ffmpeg. The web template and iOS builds use it. The Ones' models went from 15.2 MB to 8.7 MB with the sameloadGlboutput. -
deploylinks the build folder todeploy.projectbefore deploying, so vercel 60 no longer uploads the repo root or links a project named after the folder. The template'sbuild-web.tskeepsdist/web/.vercel. -
doctor:native-traps:<target>warns on code that aborts natively while web passes (unguardedRecordreads into a variable or argument,obj && expras a value; silence a line with// dotframe-allow-native).tool:xcodebuildrunsxcodebuild -version.build,deviceanddoctoruse Xcode when xcode-select points at Command Line Tools. -
snapfails with the WGSL error and line instead of a black frame (gpuErrorsinweb/run), uses one browser session per run (back-to-back snaps timed out), and a timeout prints the page console. -
Native mouse look: reading
input.look()arms capture; a click enters relative mode, Escape or focus loss releases. -
iOS launch screen:
launchColorand an optionallaunchimage, shown whileinitloads. -
devreportsPORT_IN_USE;desyncon a single-player sim points atdoctor; Windows builds name the runtime pack version mismatch and themacosskill;src/nativeis type-checked in CI. -
3D under a 2D HUD in one frame:
Renderer.draws()returns a scene's draws without presenting,Draw2D.scene(draws)queues them before the 2D batch, and both backends split a frame into passes when depth and non-depth pipelines mix (native:df_pass).Sim.render(draw)is unchanged, sosnapanddoctorwork for 3D games. -
Renderer: triplanar textures (
MeshRef.texture,tile),emissive, and an optionalEnvironment(ambient, sun, up to 8 point lights, a spot light, fog, ACESexposure);Camera.near/far. Without an environment the old look is kept. -
glTF:
loadGlbloads whole models (nodes, materials, embedded images, alpha modes, rest-pose skins);src/model.tsuploads and spawns them fitted to a height. -
Skeletal animation:
src/anim.ts(clip sampling with crossfade weights, joint matrices) and a GPU-skinned pipeline (addSkinnedMesh,MeshRef.joints). -
Audio: steerable looping voices (
start,setVoice,stopVoice) andspatial(). -
Post-processing:
gpu.createTargetandgpu.frame(clear, draws, target)render into textures;src/post.tsruns a full-screen pass with your WGSL.RenderGpu.createTargetanddestroyTextureare now required (scriptc cannot call optional functions): custom stub GPUs need both. -
Mipmaps (
createTexture/createImagemipmapsflag), instancing (addInstances,MeshRef.instances,sway,Environment.time) and spot light shadows (SpotLight.shadows, a 1024 shadow map with 4-tap PCF).bindtakes an optional second texture (bindings 3 and 4). -
src/retarget.ts: humanoid retargeting across Mixamo, Quaternius UAL and Character Creator 3 skeletons (ported from The Ones). -
Fixed:
worldMatricescomposed the wrong local matrix when a child node came before its parent in the file (UAL's Head is node 0), which skewed animated poses of such models. -
Input.look()withrun(..., { pointerLock: true })on the web, for first-person cameras. -
SimPlatform.image(decode for snap) andSim.clear(snap's clear color). -
Native decodes JPEG (stb_image was PNG-only).
-
dotframe newdepends on the CLI's own engine version (it pinned^0.1.0), and templates ship adiscordtarget.