Parameters - LucasCGG/animation-handler-for-rive GitHub Wiki

Parameters

The Rive Animation Handler plugin offers several parameters to customize the integration of Rive animations within your WordPress site using Elementor. Below is a detailed overview of each parameter:

Parameter Type Default Value Description
canvas_id String uniqid('rive-canvas-') The unique identifier for the canvas element where the animation is rendered.
rive_file String None The URL or path to the .riv animation file. This file contains the Rive animation you wish to display.
state_machine String 'State Machine 1' The name of the state machine within the Rive file to control the animation's interactive states.
viewport String null The viewport object used to check the IntersectionObserver. This determines when the animation enters or exits the viewport.
threshold Float 0.7 The threshold value for the IntersectionObserver. It specifies the proportion of the canvas element that must be visible in the viewport before the animation starts. A value of 0.0 triggers the animation as soon as any part is visible, while 1.0 requires the entire element to be visible.
layout_fit ENUM Contain Defines how the animation fits within its container. Options include: 'Contain', 'Cover', 'Fill', 'Fit Width', 'Fit Height', 'None', 'Scale Down'.

By configuring these parameters, you can tailor how Rive animations behave and appear on your WordPress site, providing an engaging and interactive experience for your users.