generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
The WebJS Documentation uses different variable names to do the same thing as the data binding web documentation making it hard to follow.
The data binding documentation also uses the variable name rive for the rive instance which as far as i can tell is not possible to do as it tries to access that variable in the same line.
Data binding documentation:
const rive = new rive.Rive({
autoBind: false, // This should be set to false (default)
onLoad: () => {
const vm = rive.viewModelByName("My View Model");
const vmi = vm.instanceByName("My Instance");
// Manually bind by applying the instance to the state machine and artboard
rive.bindViewModelInstance(vmi);
}
});
WebJS documentation:
const r = new rive.Rive({
src: "https://cdn.rive.app/animations/vehicles.riv",
// OR the path to a discoverable and public Rive asset
// src: '/public/example.riv',
canvas: document.getElementById("canvas"),
autoplay: true,
// artboard: "Artboard", // Optional. If not supplied the default is selected
stateMachines: "bumpy",
onLoad: () => {
r.resizeDrawingSurfaceToCanvas();
},
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels