Improve bubble animation effect

This commit is contained in:
Jason Zimdars
2024-11-01 09:32:12 -05:00
parent fa808e8970
commit c74e2ecd1d
5 changed files with 36 additions and 21 deletions
@@ -3,6 +3,13 @@ import { nextFrame } from "helpers/timing_helpers"
export default class extends Controller {
static classes = [ "play" ]
static values = { playOnLoad: { type: Boolean, default: false } }
connect() {
if (this.playOnLoadValue) {
this.play()
}
}
async play() {
await nextFrame()