Has anyone successfully made a custom easing function and wouldn’t mind sharing an example? The relevant documentation isn’t working with Babylon 4, but I’m not sure if it’s just a syntax problem (I’m not 100% sure exactly what the little FunnyEase snippet is doing) or genuinely isn’t valid in Babylon 4.
Any help is appreciated. Thanks!
Specifically, I’m trying to use Perlin Noise for a camera shake animation, and it seems to make most sense to make a custom easing function for that. Open to other approaches though.
Ease function are used to do the interpolation between animation keyframes.
For screenshake, you can create an animation with random offsets and apply it to the camera. No need for ease in that case.
Hi guys. Just for fun, I thought I would attempt a “bouncy camera” animation (arc-cam target… y-axis only, so far). No keyframe animation, here. I’m letting my favorite band play it… Looper and The Cosines.
Click on canvas. Ya can’t start another animation until first is finished. (yawn). This is a “diminishing” bounce… like what might happen when your space station is hit by a photon torpedo. It has a serious drawback… not putting camera .target.y and/or .beta at same position when the anim started. It will be somewhat different… but that’s what a strong torpedo hit might do, too.
The chances of this animation… running at the same speed… on all devices… I dunno about that. Generally speaking… mix Wingnut and math, and ya better have BJS catastrophic scene-explosion insurance. heh.
Yeah, I know. Camera.target is not the same as camera.beta, but, I was lazy. At least I didn’t poke random small values at canvas.style.marginTop/marginLeft… which would have been SERIOUSLY lazy.