feedback7 R22-RENDER: closed eyes stay closed without the stencil masks — the eyelid clips' covered slots hide when their centre leaves the clip polygon (GitHub #177, re-implemented from PR #384 by @Convey123); golden: unchanged
The eyelids of 佩佩, 仇白, 隐德来希, 琳琅诗怀雅 and other models are Spine clipping attachments: the polygon is the eye's opening and the eyeball / eye-white meshes drawn after it are clipped to it, so a blink or a knock-down closes the eye through the mask. render/app.js pickClipping keeps the masks only for a lone clipped skeleton at high quality, so in a battle the eyeballs showed through the closed lids. SpineActor._eyeMaskFallback now runs after each update while the masks are off: it walks the draw order like pixi-spine (from a slot whose attachment in force is a clip, to its endSlot — any skin) and hides the slot container of a covered slot whose drawn centre (a mesh's mean vertex, a region's quad centre) lies outside the clip polygon [ASSUMED: all or nothing per slot]; turning the masks on shows them again. PR #384's version hid `slot.currentSprite`, which pixi-spine leaves null on a mesh slot — every covered slot of the 417 local operator skeletons' 73 clipped ones is a mesh (313) or a region (54; regions have no worldVerticesLength, so it never measured them) — and its test stubbed a currentSprite onto every slot, so nothing was hidden in the game. Kept from it: the diagnosis, the ray-casting pointInPolygon and the key-frame expectations. Tests: test/render/eyemask.test.js (new, 7, on real runtime objects — the official skeletons in @pixi-spine/runtime-3.8's real Spine, @pixi/core display objects with a 16 px canvas stand-in, the real SpineActor: the eyeballs are meshes in the clip's container; 佩佩 / 仇白 Die and 隐德来希 / 琳琅诗怀雅 Idle hide exactly the eye slots in the closed frames and nothing open; a 30 Hz sweep of six clips; masks on hide nothing, turning them on shows all) 7/7 — the five skeleton tests skip without public/assets (not committed; npm run assets), and fail on PR #384's code; render unitview, enemy attack clips, texas skill clip 45/45.
This commit is contained in:
1 parent
dd23572b4a
commit
1e78648ad4
3 files changed
+230
-9
No files matched your search
@@ -1569,8 +1569,9 @@ export async function createFieldView(host, options = {}) {
|
||||
// Crowded fields render skeletons through staggered RenderTexture impostors (units.js): the interval grows with
|
||||
// the number of Spine units so the per-frame vertex work stays roughly constant (hysteresis: re-evaluated
|
||||
// every 30 frames). Prep and ordinary fields keep full-rate direct rendering.
|
||||
// Spine clipping masks (only eyeball clips on the current roster, invisible at chibi scale) each cost a stencil
|
||||
// render-pass break (~2–5 ms of GPU on tiled GPUs): kept only for a lone clipped skeleton at high quality
|
||||
// Spine clipping masks (the eyelids on the current roster) each cost a stencil render-pass break (~2–5 ms of GPU on
|
||||
// tiled GPUs): kept only for a lone clipped skeleton at high quality; without them SpineActor hides the eyeball slots a
|
||||
// closed lid would cut (GitHub #177, spine.js _eyeMaskFallback)
|
||||
let clipAllowed = true;
|
||||
function pickClipping() {
|
||||
let n = 0;
|
||||
|
||||
Reference in new issue
Block a user