Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jonobr1/react-two.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: jonobr1/react-two.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6-react-native
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 14 files changed
  • 1 contributor

Commits on Nov 19, 2025

  1. Add React Native bindings and iOS Metal renderer

    Introduces native bindings for React Native, including Swift-based Metal renderer for iOS (TwoMetalView, TwoRenderer, TwoViewManager), TypeScript bridge components (lib/native.ts, Provider), and supporting types. Updates package configuration and build to support native exports, adds documentation for native integration, and updates dependencies for React Native and Two.js.
    jonobr1 committed Nov 19, 2025
    Configuration menu
    Copy the full SHA
    cc2d2a0 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2025

  1. Configuration menu
    Copy the full SHA
    faacc50 View commit details
    Browse the repository at this point in the history
  2. Refactor ref callbacks for LinearGradient and Texture

    Updated ref callbacks to use explicit if statements for setting refs in LinearGradient and Texture components, improving readability and consistency.
    jonobr1 committed Dec 4, 2025
    Configuration menu
    Copy the full SHA
    fd60d26 View commit details
    Browse the repository at this point in the history
  3. WIP: Add Metal renderer integration for iOS

    Introduces a Metal shader (Shaders.metal) and updates TwoRenderer.swift to render Two.js scene graphs using Metal. TwoMetalView.swift now passes draw commands to the renderer. The React Native Provider implementation is enhanced to serialize the Two.js scene graph and send it to the native side, with improved type safety and event shape registration. Minor fixes in Provider.tsx improve child validation.
    jonobr1 committed Dec 4, 2025
    Configuration menu
    Copy the full SHA
    23e77c6 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2025

  1. Configuration menu
    Copy the full SHA
    a3880c4 View commit details
    Browse the repository at this point in the history
  2. [WIP] Add Objective-C TwoViewManager

    Added TwoViewManager.m for React Native integration and updated Package.swift to include new source files. Enhanced TwoRenderer.swift to support hierarchical 2D transforms (translation, rotation, scale) and hex color parsing for shapes.
    jonobr1 committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    1291987 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2026

  1. Configuration menu
    Copy the full SHA
    aabeacc View commit details
    Browse the repository at this point in the history
  2. Add draw call handling and richer scene serialization

    iOS renderer: introduce DrawCall and drawCalls array, replace parseShape with parseNode to handle groups, transforms, fills (fan triangulation), strokes (lineStrip), and per-shape opacity; expand parseHexColor to support 3-digit hex and opacity; use drawCalls to issue Metal drawPrimitives instead of a single draw. JS provider: replace serializeScene with recursive serializeNode, include more shape properties (cap, join, miter, closed, curved, automatic, beginning, ending, linewidth), serialize vertex control points, and serialize specific shape attributes (radius, width, height) to provide richer data for the native renderer.
    jonobr1 committed Feb 3, 2026
    Configuration menu
    Copy the full SHA
    bfb0f1c View commit details
    Browse the repository at this point in the history
Loading