A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/apis/web_animations/Animation/clone below:

clone ยท WebPlatform Docs

clone Summary

Creates a copy of an Animation object.

Method of apis/web animations/Animationapis/web animations/Animation

Syntax
var myMiniMe = myAnimation.clone();
Return Value

Returns an object of type

Return a new Animation object created by calling the Animation constructor with parameters Animation(source.target, cloned effect, cloned timing).

Examples

This example creates an instance of the AnimationPlayer that animates an object horizontally and vertically using computed values, and runs for 1500ms (1.5 seconds), and then creates a copy of the player for later use.

var player = snowFlake.animate([
  {transform: 'translate(' + snowLeft + 'px, -100%)'},
  {transform: 'translate(' + snowLeft + 'px, ' + window.innerHeight + 'px)'}
], 1500);
var player2 = player.clone();
Related specifications
Web Animations 1.0
W3C Working Draft
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4