gioser

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 614Markdown 274TOML 149RON 310606 Sutichaykuna

⎇ main shared/foreign-lottie/src/schema/helpers/bezier.rs Rust · 27 siq'ikuna · 851 B Ñawpa willay Pi imata llamkarqan ch'uya

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

1// Copyright 2024 the Velato Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4use serde::{Deserialize, Serialize};
5
6/// This represents a cubic bezier path.
7/// Note that for interpolation to work correctly all bezier values in a
8/// property's keyframe must have the same number of points.
9#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
10pub struct Bezier {
11    /// Whether the bezier forms a closed loop
12    #[serde(rename = "c")]
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub closed: Option<bool>,
15
16    /// Points along the curve
17    #[serde(rename = "v")]
18    pub vertices: Vec<[f64; 2]>,
19
20    /// Cubic control points, incoming tangent
21    #[serde(rename = "i")]
22    pub in_tangents: Vec<[f64; 2]>,
23
24    /// Cubic control points, outgoing tangent
25    #[serde(rename = "o")]
26    pub out_tangents: Vec<[f64; 2]>,
27}