MCPcopy
hub / github.com/4ian/GDevelop / addLayoutValueTween

Function addLayoutValueTween

Extensions/TweenBehavior/tweentools.ts:273–297  ·  view source on GitHub ↗
(
        runtimeScene: RuntimeScene,
        identifier: string,
        fromValue: float,
        toValue: float,
        easing: string,
        duration: float,
        useExponentialInterpolation: boolean
      )

Source from the content-addressed store, hash-verified

271 * It's useful for values that are factors like a scale or a zoom.
272 */
273 export const addLayoutValueTween = (
274 runtimeScene: RuntimeScene,
275 identifier: string,
276 fromValue: float,
277 toValue: float,
278 easing: string,
279 duration: float,
280 useExponentialInterpolation: boolean
281 ): void => {
282 getTweensMap(runtimeScene).addSimpleTween(
283 identifier,
284 runtimeScene,
285 duration,
286 easing,
287 useExponentialInterpolation
288 ? exponentialInterpolation
289 : linearInterpolation,
290 fromValue,
291 toValue,
292 tweenLayoutValueSetter,
293 {
294 type: 'layoutValue',
295 }
296 );
297 };
298
299 /**
300 * Add a layer value tween. The layer time scale is taken into account.

Callers

nothing calls this directly

Calls 2

getTweensMapFunction · 0.85
addSimpleTweenMethod · 0.80

Tested by

no test coverage detected