This commit is contained in:
2026-05-19 17:39:03 +07:00
parent bf0ebe447d
commit 5da832bb57
559 changed files with 69543 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
namespace Rive
{
/// <summary>
/// Interface for logging debug messages.
/// </summary>
public interface IDebugLogger
{
void Log(string message);
void LogWarning(string message);
void LogError(string message);
void LogException(System.Exception exception);
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: ab144a42fd94c4224b0670daa57549c7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 350858
packageName: Rive
packageVersion: 0.4.2
assetPath: Packages/app.rive.rive-unity/Runtime/Interfaces/IDebugLogger.cs
uploadId: 896810

View File

@@ -0,0 +1,9 @@
namespace Rive
{
public interface IFileAssetLoader
{
bool LoadContents(EmbeddedAssetReference assetReference);
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 45bbc017863f948cf8da7418f520968a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 350858
packageName: Rive
packageVersion: 0.4.2
assetPath: Packages/app.rive.rive-unity/Runtime/Interfaces/IFileAssetLoader.cs
uploadId: 896810

View File

@@ -0,0 +1,93 @@
using UnityEngine.Rendering;
namespace Rive
{
/// <summary>
/// Interface for rendering Rive content to a render queue
/// </summary>
public interface IRenderer
{
/// <summary>
/// Clear the commands in the render queue
/// </summary>
void Clear();
/// <summary>
/// Draw the given artboard to the render queue
/// </summary>
/// <param name="artboard">The artboard to draw</param>
void Draw(Artboard artboard);
/// <summary>
/// Draw the given path and paint to the render queue
/// </summary>
/// <param name="path">The path to draw</param>
/// <param name="paint">The paint to apply to the path</param>
void Draw(Path path, Paint paint);
/// <summary>
/// Clip the render queue to the given path
/// </summary>
/// <param name="path">The path to use as a clip mask</param>
void Clip(Path path);
/// <summary>
/// Save the current render queue state
/// </summary>
void Save();
/// <summary>
/// Restore the last saved render queue state
/// </summary>
void Restore();
/// <summary>
/// Transform the render queue by the given translation
/// </summary>
/// <param name="translation">The translation vector to apply</param>
void Translate(System.Numerics.Vector2 translation);
/// <summary>
/// Transform the render queue by the given translation
/// </summary>
/// <param name="x">The x translation</param>
/// <param name="y">The y translation</param>
void Translate(float x, float y);
/// <summary>
/// Transform the render queue by the given matrix
/// </summary>
/// <param name="matrix">The transformation matrix to apply</param>
void Transform(System.Numerics.Matrix3x2 matrix);
/// <summary>
/// Align the artboard to the given fit and alignment
/// </summary>
/// <param name="fit">The fit mode to use</param>
/// <param name="alignment">The alignment to apply</param>
/// <param name="artboard">The artboard to align</param>
/// <param name="scaleFactor">Optional scale factor to apply (defaults to 1.0)</param>
void Align(Fit fit, Alignment alignment, Artboard artboard, float scaleFactor = 1.0f);
/// <summary>
/// Align the artboard to the given fit and alignment, with the given frame
/// </summary>
/// <param name="fit">The fit mode to use</param>
/// <param name="alignment">The alignment to apply</param>
/// <param name="artboard">The artboard to align</param>
/// <param name="frame">The frame to align within</param>
/// <param name="scaleFactor">Optional scale factor to apply (defaults to 1.0)</param>
void Align(Fit fit, Alignment alignment, Artboard artboard, AABB frame, float scaleFactor = 1.0f);
/// <summary>
/// Add the render queue commands to an existing command buffer
/// </summary>
/// <param name="commandBuffer">The command buffer to add commands to</param>
/// <param name="release">Whether to release resources after execution (defaults to false)</param>
void AddToCommandBuffer(UnityEngine.Rendering.CommandBuffer commandBuffer, bool release = false);
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 40ed18ea8606644d08690cc74afe9f32
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 350858
packageName: Rive
packageVersion: 0.4.2
assetPath: Packages/app.rive.rive-unity/Runtime/Interfaces/IRenderer.cs
uploadId: 896810