Skip to content

Is there a way to programmatically transition states of objects? #212

@saram-astutesoftwares

Description

@saram-astutesoftwares

Great Tool!

But I have been facing a problem. I'm using spline in my next js app. So the idea is this, i show my model in the background. The base state has a static animation that is always running. I have another state that changes the view of model.

At the same time, i have other elements animating in my next site.

I am detecting user scroll or swipe in either up or down direction. If the direction is down or up, I show appropriate sections on my next js website. The problem is, i also want to animate my spline model with these scrolls or swipes.

I have not been able to find any programatic way to transition states so I have been relying on a hack. I have added a key up and key down event for keys that the user will probably not press. In my scrolling and swiping logic, I am forcefully emiting these events to keep spline synced with my website's animation.

But as you can see, this is merely a hack begging to be blown up any minute.

So my question is this, is there any way to programatically transition state? Either by accessing the model ref obj or by some other way?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions