Skip to main content
ExodeUI

EXODEUI DESKTOP

A little space for good ideas.

Choose your platform to get the official ExodeUI installer.

Looking for Intel Mac or other builds? Explore the web studio or check all download options.

Prefer the browser? Try for free in your browser →
Rive集群10 分钟阅读·ExodeUI 团队

状态机 UI 架构:超越 Rive WebAssembly

探索状态机 UI 架构。视觉状态机、布局和物理如何从一个文件传送到 React、Vue 和本机应用程序。

直接总结和定义

核心要点

虽然 Rive 开创了交互式矢量图形的视觉有限状态机,但它对独立 WebGL/Skia 画布的依赖为生产 Web 应用程序带来了可访问性和包大小瓶颈。现代状态机 UI 将视觉状态图保存在应用程序通过输入和事件驱动的一个文件中。

为什么状态机改变了运动设计

在状态机出现之前,交互逻辑是一个由布尔变量组成的混乱网络(isHovered、isClicked、isExpanded、isError)。状态机提供了形式上的数学清晰度:组件具有定义的状态、离散转换和确定性触发器。

生产实施片段

交互组件实现
import { ExodeUICanvas } from 'exodeui';

// Springs, states and timing live in the .exode file (designed in the
// editor). Your code passes inputs in and hears events back.
export function CheckoutButton() {
  return (
    <ExodeUICanvas
      src="/checkout.bexode"
      onTrigger={(name) => console.log('ExodeUI event:', name)}
    />
  );
}

相关指南和示例

交互式 UI 只需设计一次,交付同一个文件。

在 ExodeUI 中可视化地构建状态、弹簧物理和逻辑,并在 React、SwiftUI、Flutter 等中播放同一个文件。免费开始。

免费试用