Skip to content

Instantly share code, notes, and snippets.

View jrmoulton's full-sized avatar

Jared Moulton jrmoulton

  • Utah
  • 10:01 (UTC -07:00)
View GitHub Profile
@jrmoulton
jrmoulton / transform-encoder.rs
Created December 4, 2025 10:34
Transform EnCoder
// Copyright 2025 the Transform Encoder Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT
//! # Transform Encoder
//!
//! This crate provides a comprehensive system for handling input events and converting them
//! into affine transformations for 2D graphics applications. It supports mouse, touch, and
//! gesture inputs with configurable behavior patterns.
//!
//! ## Features
@jrmoulton
jrmoulton / floem-style-docs.md
Created October 27, 2025 00:45
Floem Style Docs

The Floem Style

I'll try to write up some in the official docs but I'll write some here as well. It is a bit complicated but the complexity is what gives such high flexibility.

The Style struct

The style system is centered around a Style struct. Style internally is just a hashmap (although one from the im crate so it is cheap to clone). It maps from a StyleKey to Rc<dyn Any>.

@jrmoulton
jrmoulton / localization-api.rs
Created October 26, 2025 21:13
floem localization api
```rust
use floem::prelude::*;
fn main() {
floem::launch(app_view);
}
fn app_view() -> impl IntoView {
// Create bundles for all supported languages
let bundles = vec![