@nova-lab/core 1.2.1-dev.258 → 1.2.2-dev.272
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/dist/2d/effects.js +165 -404
- package/dist/2d/lighting.d.ts +2 -0
- package/dist/2d/lighting.js +483 -227
- package/dist/2d/lottie.js +1 -1
- package/dist/2d/meshes.js +2 -2
- package/dist/2d/render-textures.js +3 -537
- package/dist/2d.js +3 -3
- package/dist/{NovaNode-CBZ-Ol-W.js → NovaNode-CshmSV9Y.js} +21 -21
- package/dist/{NovaRenderCommandWriter-CWQRa42y.js → NovaRenderCommandWriter-DeHyKjke.js} +272 -251
- package/dist/NovaRenderTexture-Desjl5-m.js +539 -0
- package/dist/{NovaTextSelectionService-Bdi0AqZ5.js → NovaTextSelectionService-CWJKn7TW.js} +3658 -3216
- package/dist/{NovaWebGLProgram-BO250QNF.js → NovaWebGLProgram-ytnblA5d.js} +28 -25
- package/dist/core.js +3 -3
- package/dist/model/lighting/LightingFields2D.d.ts +35 -0
- package/dist/model/lighting/LightingRenderer2D.d.ts +11 -18
- package/dist/model/lighting/LightingScene2D.d.ts +43 -0
- package/dist/model/lighting/NovaLighting2D.d.ts +18 -33
- package/dist/model/lighting/NovaLightingEffect2D.d.ts +46 -0
- package/dist/model/lighting/lighting-effect.d.ts +24 -0
- package/dist/model/lighting/lighting-shaders.d.ts +2 -2
- package/dist/model/lighting/lighting.types.d.ts +5 -1
- package/dist/model/render/backends/webgl/NovaWebGLCompositionPass.d.ts +2 -1
- package/dist/model/render/backends/webgl/NovaWebGLFrameRenderer.d.ts +29 -3
- package/dist/model/render/backends/webgl/NovaWebGLPathClipPass.d.ts +3 -2
- package/dist/model/render/backends/webgl/NovaWebGLProgram.d.ts +1 -1
- package/dist/model/render/graph/nova-render-dirty-items.d.ts +12 -0
- package/dist/model/runtime/cursor/NovaCursorManager.d.ts +7 -0
- package/dist/shader-effect-CHXZBHrO.js +247 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2235,3 +2235,58 @@ Prepared strokes retain contours without retaining their temporary outline Path
|
|
|
2235
2235
|
2D HUD and 3D scene endpoints on separate canvases. Build Core first, then run
|
|
2236
2236
|
`pnpm example:courier`. It demonstrates picking/keyboard navigation, camera
|
|
2237
2237
|
projection, animated glTF, pause/save/load and teardown.
|
|
2238
|
+
|
|
2239
|
+
### Native text staging during zoom
|
|
2240
|
+
|
|
2241
|
+
The WebGL device-space run path keeps one CPU staging Canvas per renderer and
|
|
2242
|
+
grows its backing only when the current ink rectangle no longer fits. Every
|
|
2243
|
+
paint clears the backing and restores its drawing/clip state; atlas uploads use
|
|
2244
|
+
only the current ink rectangle, including initial cell allocation. Capacity is
|
|
2245
|
+
bounded by the existing text atlas cell limit and released with the renderer.
|
|
2246
|
+
Native shaping, pixel phase, clipping and text quality settings are unchanged.
|
|
2247
|
+
|
|
2248
|
+
2D lighting also has a local app-owned effect candidate:
|
|
2249
|
+
`createLightingEffect2D(app, options)` and `lighting.createEffect(app)` compose
|
|
2250
|
+
same-app RTT sources without materializing them on CPU. See
|
|
2251
|
+
[lighting guide](docs/lighting-2d.md#app-owned-effect-and-render-textures-local-candidate).
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
### Resize and native text reuse
|
|
2255
|
+
|
|
2256
|
+
`resize` updates CSS dimensions and DPR while preserving unchanged physical canvas
|
|
2257
|
+
axes. Repeating the current size does not clear its drawing buffer. Use renderer
|
|
2258
|
+
redraw/clear operations when repainting is required. Native text keeps the same
|
|
2259
|
+
ink when only the destination extent changes and its physical affine map and
|
|
2260
|
+
pixel phase stay equal; DPR, fractional phase and shaping changes still invalidate it.
|
|
2261
|
+
A complete left-aligned plain label with ellipsis enabled can reuse its native
|
|
2262
|
+
run in a wider box. Narrowing below its measured advance still applies native
|
|
2263
|
+
ellipsis. Measurement metadata is bounded and follows font/resource invalidation
|
|
2264
|
+
and renderer destruction.
|
|
2265
|
+
|
|
2266
|
+
Left-aligned ellipsis runs keep at most eight resident exact pixel phases per
|
|
2267
|
+
existing occurrence slot, within the unchanged atlas budget. Affine and other
|
|
2268
|
+
single-phase paths retain their prior ownership. The existing raster CPU budget
|
|
2269
|
+
continues to exclude GPU uploads; the reusable staging allocation is fully
|
|
2270
|
+
cleared before painting the next run.
|
|
2271
|
+
|
|
2272
|
+
Retained glyph/MSDF batches with ellipsis still use complete native runs. Their
|
|
2273
|
+
fallback shares the resident native stream instead of submitting each label as a
|
|
2274
|
+
primitive. LOD/admission is rechecked every frame, and adjacent texture groups
|
|
2275
|
+
preserve source order (including A/B/A pages). Disabling retained glyph batches
|
|
2276
|
+
keeps the previous primitive path. Axis-aligned batch preflight skips inverse
|
|
2277
|
+
affine checks only until an affine native cell has been published; atlas reset
|
|
2278
|
+
clears that guard. Native grid validation and advance keys avoid temporary arrays
|
|
2279
|
+
without changing finite-coordinate or font/direction/content identity checks.
|
|
2280
|
+
|
|
2281
|
+
Native texture and texture-rect sampling use highp float so pixel-grid positions
|
|
2282
|
+
and atlas UVs keep Float32 precision at high DPR and large atlas offsets.
|
|
2283
|
+
|
|
2284
|
+
Current native device-grid text copies use the existing nearest sampler: the bitmap already includes final physical pixel phase and must not be bilinearly filtered again when its atlas placement changes. Previous-scale/local fallbacks and ordinary run/glyph atlas resampling retain their existing filters. The sampler is shared per renderer, unbound after drawing and released with the renderer.
|
|
2285
|
+
|
|
2286
|
+
Retained native/run text streams reconcile current source indices, instance counts and atlas bindings into their existing buffers and VAO. Existing buffer arenas handle storage growth; newly required lanes allocate and removed lanes release immediately. Count, style, LOD, clipping and atlas-generation changes still rebuild the current layout. Atlas/raster/memory budgets are unchanged, and no additional resident cache is introduced.
|
|
2287
|
+
|
|
2288
|
+
Native text warm hits compare their exact finite device phase key without serializing the diagnostic JSON signature again. The original diagnostic signature remains attached to published ink. A retained batch with scalar font, alignment and color compiles that style once per current layout; per-item style channels retain individual compilation. No new retained cache is introduced.
|
|
2289
|
+
|
|
2290
|
+
The bounded native phase-cell reuse also applies to centered/right-aligned plain axis text, including time-scale labels without ellipsis. The base key continues to include box/alignment constraints; affine and baked-clip paths keep their existing slot. Renderer raster quota, atlas byte limit and visible quality remain unchanged.
|
|
2291
|
+
|
|
2292
|
+
Repeated zoom is no longer limited to two cached native phases: eligible plain axis runs retain at most eight exact phase cells in the existing atlas. This covers a five-state zoom cycle without continuous rerasterization. The global atlas byte cap and raster quota are unchanged; ordinary left non-ellipsis and affine/baked clips keep their established slot behavior. The same bound applies to centered/right labels. Memory acceptance still uses the original JS/backing/cold/destroy limits.
|