Skip to content
CAI
Software that uses CAICheck a score

ScenicFramework/scenic

60.5

Adequate · 23 September 2026

21.1k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Scenic is a 2D vector graphics and UI framework for Elixir, providing a complete toolkit for building interactive graphical applications. It manages scene graphs, rendering pipelines, and input handling, while offering a rich set of built-in components such as buttons, sliders, and text fields. The system supports advanced visual features including alpha transparency, gradient fills, and matrix-based transformations, all backed by optimized native C code for performance.

How it got here

2017 — Scenic v0.11 refactor and native NIFs

20 changes.

This period focused on the major v0.11 refactor of the Scenic graphics framework, introducing a simplified driver model, new input handling, and a reorganized primitive and styling system. The work also integrated native C NIFs for low-level rendering and math operations, while simultaneously migrating the codebase from the legacy Exui module to Scenic and updating dependencies for Elixir 1.16 compatibility.

2018–2019 — Component and math library expansion

11 changes.

This period focused on expanding the Scenic library with new interactive input components, a button primitive, and 2D math utilities. The work also included comprehensive test coverage for these new features, alongside documentation updates and internal refactoring of the Mix task and paint validation.

2021 — asset management and graph compilation

9 changes.

This period focused on introducing new modules for managing static and streaming assets, including ETS-based runtime stores and build-time pipelines. It also added infrastructure for computing graph bounds and compiling graph structures into executable scripts, alongside comprehensive test coverage for these new features.

Features

Add 2D vector and line math utilities

Added new modules for 2D vector and line mathematics, including \Scenic.Math.Vector2\ with operations like add, sub, dot, cross, and rounding, as well as \Scenic.Math.Line\ for line-based calculations such as parallel lines and intersections.

lib/scenic/math · high confidence

Add Scenic.Button component with theme and style support

Introduced the Scenic.Button component, allowing users to add interactive buttons to their graphs. The component supports standard styles such as font, font size, and text alignment, and allows passing these via a :styles option. It also supports color themes (e.g., :primary, :warning) and custom theme maps for background, border, and active states. The button sends {:click, id} events on release, along with {:btn\_pressed, id} and {:btn\_released, id} events.

lib/scenic/component · high confidence

Add Scenic.Driver.KeyMap module for key state and modifier detection

A new Scenic.Driver.KeyMap module has been introduced to manage the mapping of physical keys to characters and detect the state of modifier keys. This module provides helper functions (e.g., \shift?\, \alt?\, \ctrl?\, \meta?\, \caps\_lock?\) to check if specific keys are currently pressed, and a \mods/1\ function that returns a list of active modifier keys. This supports the driver's input handling by standardizing how key states and modifiers are queried.

lib/scenic/driver · high confidence

Add dedicated error scene for handling init failures

A new error scene has been introduced to display debugging information (stack trace, error message, and scene arguments) when a scene crashes during its initialization phase. This prevents the application from entering a restart loop by providing a stable fallback UI with a 'Try Again' button to retry the failed scene.

lib/scenic/scenes · high confidence

Added graph bounds computation and compiler infrastructure

Added the \Scenic.Graph.Bounds\ module to calculate the bounding box of a graph by walking all primitives, accounting for transforms, and returning a \{left, top, right, bottom}\ coordinate box. Added the \Scenic.Graph.Compiler\ module to compile a graph into a list of scripts for the ViewPort, handling state management for styles and transforms. These changes introduce new capabilities for calculating graph bounds and compiling graph structures into executable scripts.

lib/scenic/graph · high confidence

Native C NIFs for bitmap, line, matrix, and texture operations

The c\_src directory now includes new C source files (bitmap.c, line.c, matrix.c, texture.c) that implement Erlang NIFs for low-level pixel manipulation, geometric calculations, and matrix math. These native functions provide optimized implementations for setting and clearing pixel data (G, GA, RGB, RGBA formats), computing line intersections and parallel lines, and performing 4x4 matrix operations such as multiplication, transpose, and determinant calculation. This introduces new internal capabilities for rendering and math that the Elixir side can call, supporting the broader Scenic graphics framework updates.

_c\src · high confidence

New asset management modules for static and streaming assets

The Scenic library introduces new modules to manage application assets. \Scenic.Assets.Static\ and its helpers (\Scenic.Assets.Static.Font\, \Scenic.Assets.Static.Image\) provide a build-time pipeline for static assets like fonts and images, including hashing and metadata parsing. \Scenic.Assets.Stream\ introduces a global, runtime-accessible store for streaming assets (images and bitmaps) using an ETS table, allowing scenes and viewports to subscribe to updates. These changes restructure how assets are compiled, stored, and accessed at runtime.

lib/scenic/assets · high confidence

New input components: Caret, Checkbox, Dropdown, RadioGroup, Slider, TextField, and Toggle

Added new input components to the Scenic library, including a blinking text-input caret, checkboxes, dropdowns, radio groups, sliders, text fields, and toggles. Each component supports theming via inherited styles, allowing for consistent visual appearance across the application. The text field component includes features like password masking, character filtering, and hint text. The dropdown component supports opening/closing events and hover states. The slider component supports both numerical ranges and discrete value lists. The radio group manages selection state across multiple buttons. These components integrate with the new primitive helpers and style inheritance system.

lib/scenic/component/input · high confidence

New transform primitives for position, rotation, and scaling

The Scenic library introduces new transform primitives that allow users to position, rotate, scale, and apply arbitrary matrices to graphical primitives. This includes the \Translate\ module for moving primitives via \{x, y}\ coordinates, the \Rotate\ module for applying rotation in radians, the \Scale\ module for resizing with optional independent x/y multipliers, and the \Matrix\ module for applying a 4x4 transformation matrix. These are wired into the central \Scenic.Primitive.Transform\ module, which provides a \combine\ function to calculate the combined transformation matrix from individual transform options. The implementation also introduces a \Pin\ module to define the pivot point for rotation and scaling operations.

lib/scenic/primitive/transform · high confidence

New validation utilities and map helpers

A new Scenic.Utilities.Validators module was added to provide structured validation for coordinate pairs (xy), dimensions (wh), scene modules, and ViewPort structs, each returning detailed error messages. The Scenic.Utilities.Map module was updated to include a delete\_in convenience wrapper around Kernel.pop\_in, and the difference/3 and apply\_difference/3 functions were refactored with improved formatting and credo configuration. The Scenic.Utilities.Enum module was removed.

lib/utilities · high confidence

Removals

Removed legacy Scenic primitives and styles

Deleted the \Scenic.Graph\ module and all associated primitive modules (\Scenic.Primitive.\\ such as \Line\, \Rectangle\, \Quad\, \Group\, \Immediate\) and style modules (\Scenic.Primitive.Style.\\ such as \Color\, \Hidden\, \BorderColor\). This removes the previous graph-based rendering and styling system from the \lib/exui\ library.

lib/exui · high confidence

Behavioural changes

Configured Credo static analysis and updated Elixir config syntax

The project now includes a comprehensive Credo configuration file (.credo.exs) that enables a wide range of consistency, design, readability, and warning checks for the codebase. Additionally, the main configuration file (config/config.exs) has been updated to use the modern Elixir Config module syntax (import Config) instead of the deprecated Mix.Config, and a test-specific configuration (config/test.exs) has been added to set up test assets and disable the logger.

config · high confidence

Documented and validated new paint types for fills

The \Scenic.Primitive.Style.Paint\ modules have been expanded to include dedicated modules for \Color\, \Image\, \LinearGradient\, \RadialGradient\, and \Stream\ paints. Each module now provides explicit validation logic and comprehensive documentation explaining the data format, valid color specifications, and usage examples for filling primitives. This change introduces structured validation for each paint type, ensuring that invalid color specifications, missing static assets, or incorrect stream keys are caught early with helpful error messages.

lib/scenic/primitive/style/paint · high confidence

Major update to Scenic primitives with new data formats and styles

The Scenic primitives have been updated to v0.11, introducing a new, simpler data format for Arc and Sector (now {radius, angle} instead of {radius, start\_angle, end\_angle}). All primitives now support the :scissor style for clipping, and the Component primitive has been added to support child scenes. Additionally, the Sprite primitive now supports an optional alpha channel for transparency effects.

lib/scenic/primitive · high confidence

Major v0.11 refactor of Scenic core architecture

Scenic has been refactored for version 0.11, introducing a simplified driver model, improved scene and graph management, and updated input handling. The driver model now uses a single set of callbacks for active logic, deferring updates for better performance and fixing long-standing bugs, particularly in the GLFW driver on Linux. Input events now use standard Linux-like button atoms (e.g., :btn\_left) and numeric press/release states, with modifier keys represented as lists of atoms. The graph module gains new functions like \Graph.add\_to\ and \Graph.modify\ with filter functions, and scene initialization is simplified. Components and primitives have updated specs and documentation, and the \Scenic.Color\ module now includes a map of named colors. Dynamic viewports and nested scenes are better supported, with improved crash recovery and event routing.

lib/scenic · high confidence

Migrate from Exui to Scenic with updated supervisor API

The library has been renamed from Exui to Scenic, with the old Exui module removed. The Scenic module now implements a Supervisor that manages Scenes, ViewPorts, and Drivers, providing a new child\_spec for easier integration into application supervision trees. This change aligns with the v0.11 upgrade, requiring users to update their code to use the new Scenic module and its associated child specifications.

lib · high confidence

New and updated documentation for Scenic v0.11

The guides directory has been reorganized and expanded to reflect the v0.11 release, including new documentation for custom fonts, assets, caching, drivers, and scene structure. The getting started guide now includes instructions for Ubuntu, Fedora, Archlinux, and Nerves. The assets guide explains the new static and streaming asset pipelines. The driver overview highlights the unified \scenic\_driver\_local\ for local rendering. The cache overview details the new cache-per-type system. The scene structure guide explains the new component system and event handling. The general overview provides an updated architectural overview. The graph, primitives, styles, and transforms guides have been updated to reflect the new API.

guides · high confidence

Refactored Scenic primitive styles into dedicated modules

The Scenic library has reorganized its styling system by moving each style type (such as Cap, Fill, Font, Stroke, Theme, etc.) into its own dedicated module under \Scenic.Primitive.Style\. This change introduces a new, structured API for applying styles to primitives, with each style type now having its own validation and documentation. Users will interact with these styles through the updated \Scenic.Primitive.Style\ module, which provides a consistent interface for all style-related operations.

lib/scenic/primitive/style · high confidence

Refactored input handling into a dedicated module

Input processing logic has been extracted from the main ViewPort module into a new Scenic.ViewPort.Input module. This change introduces a clearer separation of concerns, allowing scenes to explicitly request or capture specific input types (such as :cursor\_button or :cursor\_pos) via the new API. The refactoring simplifies the ViewPort's internal structure and improves maintainability by isolating input routing and validation logic.

_lib/scenic/view\port · high confidence

Renamed Mix task from Ui.Run to Scenic.Run

The Mix task previously located at lib/mix/tasks/ui.run.ex has been renamed to lib/mix/tasks/run.ex, and the Elixir module has been renamed from Mix.Tasks.Ui.Run to Mix.Tasks.Scenic.Run. This change also updates the task's short description to 'Starts the UI application' and adjusts the invocation of Mix.Tasks.Run to use explicit parentheses. Additionally, the internal helper function iex\_running? now explicitly calls IEx.started?() with parentheses.

lib/mix · high confidence

Scenic 0.12.0-rc.0: Elixir 1.16 support and new input events

This release requires Elixir 1.16 and introduces several new input events (\:btn\_pressed\, \:btn\_released\, \:dropdown\_opened\, \:dropdown\_closed\, \:dropdown\_item\_hover\, \:focus\, \:blur\), alpha channel support for sprites, script arc functions, and extended rounded rectangle drawing. The changelog also notes CI improvements, a development Nix flake, and various bug fixes and deprecation warnings.

(repo-wide) · high confidence

Split image streaming into Bitmap and Image modules

The Scenic.Assets.Stream module now provides distinct modules for different image types: Scenic.Assets.Stream.Bitmap for mutable pixel data (supporting RGB/RGBA depths and fast per-pixel updates) and Scenic.Assets.Stream.Image for pre-compressed formats like JPEG and PNG. This separation clarifies the API by distinguishing between raw bitmap manipulation and compressed image streaming.

lib/scenic/assets/stream · high confidence

Test coverage

Add tests for Scenic module and update test helper; Added comprehensive test coverage for Scenic core modules; Added comprehensive test coverage for Scenic primitives; Added comprehensive test coverage for the Scenic Button component; Added comprehensive tests for Scenic input components; Added test coverage for Scenic transform primitives; Added test coverage for the Error scene; Added test support modules for assertions and viewports; Added tests for Scenic asset loading and streaming; Added tests for Scenic graph bounds and compiler; Added tests for Scenic.Assets.Stream.Bitmap and Scenic.Assets.Stream.Image; Added tests for ViewPort input capture, request, and style-based filtering; Added tests for map and validator utilities; Added unit tests for Scenic math modules; Added unit tests for Scenic primitive styles; Added unit tests for static asset parsing; Removed obsolete Exui test suite.

Dependencies

Update project dependencies and lockfile

The project's \mix.lock\ and \mix.exs\ have been updated to include specific versions for key dependencies such as \font\_metrics\ (0.5.1), \nimble\_options\ (0.5.2), and \truetype\_metrics\ (0.6.1), alongside tooling libraries like \ex\_doc\ (0.34.1) and \credo\ (1.7.13). These changes ensure the Scenic library builds correctly with the specified dependency versions, maintaining compatibility with Elixir 1.16 and supporting features like font rendering and input handling.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 54 → 60 (+6.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 92 → 96 (+3.9)
  • Architecture 100 → 99 (-0.5)
  • Maturity 38 → 38 (-0.1)
  • Readiness 50 → 66 (+16.6)
  • Security 81 → 92 (+11.1)

Resolved (34)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • Duplicated block (10 lines × 2) (lib/scenic/scene.ex)
  • Duplicated block (11 lines × 2) (lib/scenic/component/button.ex)
  • Duplicated block (11 lines × 2) (lib/scenic/component/input/checkbox.ex)
  • Duplicated block (11 lines × 2) (lib/scenic/component/input/dropdown.ex)
  • Duplicated block (11 lines × 4) (lib/scenic/script.ex)
  • Duplicated block (12 lines × 2) (lib/scenic/color.ex)
  • Duplicated block (12 lines × 2) (lib/scenic/component/input/dropdown.ex)
  • Duplicated block (17 lines × 3) (lib/scenic/driver.ex)
  • Duplicated block (5 lines × 2) (lib/scenic/graph/bounds.ex)
  • Duplicated block (5 lines × 2) (lib/scenic/math/matrix.ex)
  • Duplicated block (5 lines × 3) (lib/scenic/math/matrix.ex)
  • Duplicated block (6 lines × 2) (lib/scenic/component/input/checkbox.ex)
  • Duplicated block (7 lines × 2) (lib/scenic/scene.ex)
  • Duplicated block (7 lines × 2) (lib/scenic/script.ex)
  • Duplicated block (7 lines × 3) (lib/scenic/script.ex)
  • Duplicated block (8 lines × 4) (lib/scenic/script.ex)
  • Duplicated block (9 lines × 2) (lib/scenic/component/input/dropdown.ex)
  • Duplicated block (9 lines × 2) (lib/scenic/component/input/dropdown.ex)
  • …and 14 more

New (45)

  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (lib/scenic/component/input/checkbox.ex)
  • Duplicated block (10 lines × 4) (lib/scenic/component/input/checkbox.ex)
  • Duplicated block (11 lines × 2) (lib/scenic/color.ex)
  • Duplicated block (11 lines × 2) (lib/scenic/scene.ex)
  • Duplicated block (11–13 lines × 2) (lib/scenic/component/input/dropdown.ex)
  • Duplicated block (15 lines × 4) (lib/scenic/script.ex)
  • Duplicated block (16 lines × 2) (lib/scenic/component/button.ex)
  • Duplicated block (16 lines × 2) (lib/scenic/component/input/dropdown.ex)
  • Duplicated block (16 lines × 4) (lib/scenic/driver.ex)
  • Duplicated block (22 lines × 3) (lib/scenic/driver.ex)
  • Duplicated block (23 lines × 2) (lib/scenic/component/input/dropdown.ex)
  • Duplicated block (5 lines × 2) (lib/scenic/graph/bounds.ex)
  • Duplicated block (6 lines × 2) (lib/scenic/component/input/checkbox.ex)
  • Duplicated block (6 lines × 2) (lib/scenic/primitive/transform/pin.ex)
  • Duplicated block (6 lines × 2) (lib/scenic/scene.ex)
  • Duplicated block (6 lines × 2) (lib/scenic/script.ex)
  • Duplicated block (6–7 lines × 3) (lib/scenic/script.ex)
  • …and 25 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

ScenicFramework/scenic was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit e0ae569055d4a307ed510cec40c5938b3f31fb92 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.