This commit is contained in:
sergio
2026-05-13 02:17:40 +00:00
parent 52acaabcf4
commit 88051d220a
37 changed files with 1664 additions and 0 deletions
@@ -0,0 +1,13 @@
[package]
name = "lapaloma-heatmap"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — heatmap. Matriz [width × height] de f32 → imagen pre-encodeada que se rendea con un sólo drawImageRect."
[dependencies]
lapaloma-core = { path = "../../libs/lapaloma-core" }
lapaloma-render = { path = "../lapaloma-render" }
gpui = { workspace = true }
@@ -0,0 +1,21 @@
//! `lapaloma-heatmap` — matriz `[width × height]` de `f32` → imagen.
//!
//! Para matrices grandes (4096² = 67 MB de pixels), encodear la
//! imagen una vez al cambiar la data y renderear con un solo
//! `drawImageRect` (o equivalente GPUI). Eso convierte el coste
//! de cada frame en "blit de una textura", sub-millisecond.
//!
//! - **`matrix`** — `HeatmapMatrix { data: Vec<f32>, width, height,
//! revision }`.
//! - **`palette`** — color ramps (viridis, plasma, gray…).
//! - **`encoder`** — convierte la matrix a un buffer ARGB para
//! subir como textura.
//! - **`element`** — `Element` GPUI.
#![forbid(unsafe_code)]
#![allow(dead_code)]
pub mod matrix {}
pub mod palette {}
pub mod encoder {}
pub mod element {}