A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat(editor): a hunter's attack range, a perceiver's sight cone and a third-person camera's boom and probe are drawn in the viewport
yhhb9bbc3a9c83f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex f1f4c40a7..42f1a6b94 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -16,7 +16,7 @@ published separately; it ships inside the editor.### Changed-- **Gizmos are redrawn.** The transform handles are larger and clearer: arrows have filled heads, rings dim on their far side, the scale handles are solid cubes, and the part under the cursor turns yellow while the others fall back as you drag. A chip beside the cursor reads the offset, angle or factor being applied (`X +120.0`, `Y 42.5°`, `X ×1.35`), a rotate drag fills the swept angle, a move leaves a ghost where it started and, with snapping on, ticks at each increment. The entity under the cursor is outlined faintly before you click it, and a selected entity's outline is a little heavier. A selected mesh shows corner brackets with the length of three edges and its triangle and vertex count in the readout, the Show menu can draw its wireframe and normals, and a skinned mesh or one of its bones shows the skeleton as bones with the chosen joint in yellow. A decal projector shows its box and the line it projects along, a light probe volume the grid of probes a bake would lay, a LOD group the level it is showing and the share of the screen it takes, and the Gizmo menu has a handle-size slider. A selected UI node shows its margin and padding as bands, the pinned insets of an absolutely placed node as dashed lines with their values, and a flex container's direction and the gaps between its children. The six faces of a light probe volume, reflection probe or decal projector are handles: drag one and that half of the box follows the cursor. A selected mesh is outlined along its own silhouette rather than a box, up to 80,000 triangles. The Show menu can draw wireframe on every mesh at once, and choosing a bone paints the surface it moves from blue to red, the rest left grey; convex colliders now draw with the other 3D colliders. The Show menu also picks how the viewport shades meshes: as authored, as neutral clay (shape, without anyone's colours) or as flat albedo (base colour, no light); the engine takes it as per-view state, so a camera preview in the same frame keeps the authored look. A fourth shading, wireframe, draws every triangle edge on a dark surface with the hidden ones hidden; the engine's pipelines now carry a primitive topology, WebGL2 and WebGPU alike, and each mesh the editor loads keeps a line list of its distinct edges.+- **Gizmos are redrawn.** The transform handles are larger and clearer: arrows have filled heads, rings dim on their far side, the scale handles are solid cubes, and the part under the cursor turns yellow while the others fall back as you drag. A chip beside the cursor reads the offset, angle or factor being applied (`X +120.0`, `Y 42.5°`, `X ×1.35`), a rotate drag fills the swept angle, a move leaves a ghost where it started and, with snapping on, ticks at each increment. The entity under the cursor is outlined faintly before you click it, and a selected entity's outline is a little heavier. A selected mesh shows corner brackets with the length of three edges and its triangle and vertex count in the readout, the Show menu can draw its wireframe and normals, and a skinned mesh or one of its bones shows the skeleton as bones with the chosen joint in yellow. A decal projector shows its box and the line it projects along, a light probe volume the grid of probes a bake would lay, a LOD group the level it is showing and the share of the screen it takes, and the Gizmo menu has a handle-size slider. A selected UI node shows its margin and padding as bands, the pinned insets of an absolutely placed node as dashed lines with their values, and a flex container's direction and the gaps between its children. The six faces of a light probe volume, reflection probe or decal projector are handles: drag one and that half of the box follows the cursor. A selected mesh is outlined along its own silhouette rather than a box, up to 80,000 triangles. The Show menu can draw wireframe on every mesh at once, and choosing a bone paints the surface it moves from blue to red, the rest left grey; convex colliders now draw with the other 3D colliders. A Hunter's attack range is drawn as a red ball, a Perceiver's sight as the cone it actually tests (a ball when its field of view is all round), and a ThirdPersonCamera's boom as a line from the point it looks at to where it ends up, with the probe swept along it as a ball at the end. The Show menu also picks how the viewport shades meshes: as authored, as neutral clay (shape, without anyone's colours) or as flat albedo (base colour, no light); the engine takes it as per-view state, so a camera preview in the same frame keeps the authored look. A fourth shading, wireframe, draws every triangle edge on a dark surface with the hidden ones hidden; the engine's pipelines now carry a primitive topology, WebGL2 and WebGPU alike, and each mesh the editor loads keeps a line list of its distinct edges.- **A material's preview is a real shape.** Selecting a material shows it on a sphere, cube or plane (lit materials open on the sphere, sprite shaders on the plane), over a dark, checker or light background, with a sample image for shaders that sample a texture; the choice is remembered per kind. The header carries the ball as its icon and the name with a faint extension, the shader is a plain section with a link to make it unique, and the Content Browser's material thumbnails use the same preview. The engine's offscreen preview target now has a depth buffer, so a mesh drawn there is no longer drawn inside out.- **The 2D animation editors are redrawn.** In the sprite animation editor the view's tools float over its corner, playback and the timeline are one panel, frame events are flags on an event track (click one to rename, move or remove it), the frame source folds into a strip that opens on an empty clip, and frame rate, loop and Save no longer appear a second time in the inspector. The animator controller shows states as cards with their clip and speed, wires between a pair of states run side by side with a pill for the condition (dashed when it waits for the exit time), and its inspector puts the selected state or transition first, with the controller's layers, typed parameters and a folded constraints section below.- **The tile editor matches its design.** The layer and tileset menus sit on the raised surface, a picked tile has a 2px frame and shows its id on hover, the brush column shows the tile id, the replace dialog's button says Replace, and the tileset inspector shows one-way and trigger as switches, the layer opacity is a slim slider, and a collision layer's friction and bounce fields are flat with their own heading.diff --git a/desktop b/desktopindex 9162c013c..45caf75fe 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit 9162c013c6249a3b8ea3b58efc13079e34cbb777+Subproject commit 45caf75feb115e910e6afa8c9389c16326809b95diff --git a/tools/check-gizmo-coverage.mjs b/tools/check-gizmo-coverage.mjsindex 902a14b08..6e1959cc9 100644--- a/tools/check-gizmo-coverage.mjs+++ b/tools/check-gizmo-coverage.mjs@@ -62,6 +62,10 @@ const NUMERIC = /^(number|Vec2|Vec3|Vec4)$/;const DISPOSITION = {// A region of world nothing renders — the viewport has to outline it.'BoxCollider2D.halfExtents': 'extent',+ 'Hunter.attackRange': 'extent',+ 'Perceiver.range': 'extent',+ 'ThirdPersonCamera.distance': 'extent',+ 'ThirdPersonCamera.obstructionRadius': 'extent','BoxCollider2D.radius': 'extent','BoxCollider3D.halfExtents': 'extent','CapsuleCollider2D.radius': 'extent',@@ -145,14 +149,6 @@ const DISPOSITION = {'LODGroup.lod2Size': ['not-world', 'a fraction of SCREEN height — a property of the view, not of the entity'],'LODGroup.lod3Size': ['not-world', 'a fraction of SCREEN height — a property of the view, not of the entity'],'LODGroup.cullSize': ['not-world', 'a fraction of SCREEN height — a property of the view, not of the entity'],-- // Each of these IS a region of world and nothing draws it. An entry leaves this- // block by being drawn, never by being explained; adding one is a visible diff,- // which is the only ratchet there is.- 'Hunter.attackRange': ['owed', 'the reach it closes to before swinging — MeleeAttack.radius is drawn, this twin is not'],- 'Perceiver.range': ['owed', 'how far it can see; the cone it sees through is not drawn either'],- 'ThirdPersonCamera.distance': ['owed', 'the boom length — where the camera actually ends up'],- 'ThirdPersonCamera.obstructionRadius': ['owed', 'the probe swept along the boom'],};const components = JSON.parse(readFileSync(SNAPSHOT, 'utf8')).components;diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 855cb00b1..51013cf8e 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -118,6 +118,8 @@ export const NOTED = {{ note: 'Gizmos are redrawn.' },"feat(render): the viewport colours a chosen joint's skin weights on the surface of its mesh":{ note: 'Gizmos are redrawn.' },+ "feat(editor): a hunter's attack range, a perceiver's sight cone and a third-person camera's boom and probe are drawn in the viewport":+ { note: 'Gizmos are redrawn.' },'feat(editor): an asset header names its kind and size, and a segmented switch is used only when its words fit':{ note: "An asset's header names its kind and size." },"feat(editor): asset inspectors take the board's finish — a card preview, ruled key-value rows, tinted actions, a kind icon in the header":