repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/animation/animation.js
src/animation/animation.js
import { K, minValue, tweenTypes, valueTypes, compositionTypes, } from '../core/consts.js'; import { mergeObjects, cloneArray, isArr, isObj, isUnd, isKey, addChild, forEachChildren, clampInfinity, normalizeTime, isNum, round, isNil, } from '../core/helpers.js'; import { globals, ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/waapi/composition.js
src/waapi/composition.js
import { addChild, removeChild } from "../core/helpers.js"; /** * @import { * DOMTarget, * } from '../types/index.js' */ /** * @import { * WAAPIAnimation, * } from '../waapi/waapi.js' */ const WAAPIAnimationsLookups = { _head: null, _tail: null, } /** * @param {DOMTarget} $el * @param {String} [prop...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/waapi/index.js
src/waapi/index.js
export * from './waapi.js';
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/waapi/waapi.js
src/waapi/waapi.js
import { isArr, isKey, isNum, isObj, isStr, isUnd, isFnc, stringStartsWith, toLowerCase, isNil, round, } from '../core/helpers.js'; import { scope, globals, } from '../core/globals.js'; import { registerTargets, } from '../core/targets.js'; import { getFunctionValue, setValue, } from ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/animatable/index.js
src/animatable/index.js
export * from './animatable.js';
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/animatable/animatable.js
src/animatable/animatable.js
import { compositionTypes, noop } from '../core/consts.js'; import { scope, } from '../core/globals.js'; import { isKey, isObj, isStr, isUnd, mergeObjects, forEachChildren, isArr, stringStartsWith, } from '../core/helpers.js'; import { JSAnimation, } from '../animation/animation.js'; import ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/svg/index.js
src/svg/index.js
export { createMotionPath } from "./motionpath.js"; export { createDrawable } from "./drawable.js"; export { morphTo } from "./morphto.js";
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/svg/morphto.js
src/svg/morphto.js
import { morphPointsSymbol, } from '../core/consts.js'; import { round, } from '../core/helpers.js'; import { getPath, } from './helpers.js'; /** * @import { * TargetsParam, * FunctionValue * } from '../types/index.js' */ /** * @param {TargetsParam} path2 * @param {Number} [precision] * @return {...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/svg/motionpath.js
src/svg/motionpath.js
import { isSvgSymbol, } from '../core/consts.js'; import { atan2, PI, } from '../core/helpers.js'; import { getPath, } from './helpers.js'; /** * @import { * TargetsParam, * FunctionValue, * TweenObjectValue, * TweenModifier, * } from '../types/index.js' */ // Motion path animation /** * @pa...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/svg/helpers.js
src/svg/helpers.js
import { isSvg, } from '../core/helpers.js'; import { parseTargets } from '../core/targets.js'; /** * @import { * TargetsParam, * } from '../types/index.js' */ /** * @param {TargetsParam} path * @return {SVGGeometryElement|void} */ export const getPath = path => { const parsedTargets = parseTargets(pa...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/src/svg/drawable.js
src/svg/drawable.js
import { K, proxyTargetSymbol, } from '../core/consts.js'; import { sqrt, isFnc, } from '../core/helpers.js'; import { parseTargets, } from '../core/targets.js'; /** * @import { * TargetsParam, * DrawableSVGGeometry, * } from '../types/index.js' */ /** * @param {SVGGeometryElement} [$el] * @retu...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/setup.js
tests/setup.js
import '../node_modules/mocha/mocha.js'; export const testObject = {}; export const anOtherTestObject = {}; const rootEl = document.querySelector(':root'); const testsEl = document.querySelector('#tests'); mocha.setup({ ui: 'tdd', slow: 100, timeout: 2000, globals: ['___browserSync___'], rootHooks: { b...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/run.js
tests/run.js
import './suites/engine.test.js'; import './suites/seconds.test.js'; import './suites/build.test.js'; import './suites/draggables.test.js'; import './suites/scroll.test.js'; import './suites/waapi.test.js'; import './suites/scope.test.js'; import './suites/targets.test.js'; import './suites/animations.test.js'; import ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/utils.js
tests/utils.js
import '../node_modules/chai/chai.js'; import { addChild, removeChild, forEachChildren, } from '../dist/modules/core/helpers.js'; export const { expect } = chai; export const getChildAtIndex = (parent, index) => { let next = parent._head; let i = 0; while (next) { const currentNext = next._next; ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/values.test.js
tests/suites/values.test.js
import { expect, getChildAtIndex, forEachChildren, } from '../utils.js'; import { animate, utils, } from '../../dist/modules/index.js'; import { unitsExecRgx, valueTypes, } from '../../dist/modules/core/consts.js'; suite('Values', () => { const numberTypeTestTarget = { number: 1, decimals: 1...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/targets.test.js
tests/suites/targets.test.js
import { expect, getChildLength, } from '../utils.js'; import { testObject, anOtherTestObject, } from '../setup.js'; import { animate, } from '../../dist/modules/index.js'; suite('Targets', () => { test('Single element from CSS selector', () => { const animation = animate('#target-id', { x: 100...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/stagger.test.js
tests/suites/stagger.test.js
import { expect, getChildAtIndex, getTweenDelay, } from '../utils.js'; import { animate, stagger, createTimeline } from '../../dist/modules/index.js'; suite('Stagger', () => { test('Increase each values by a specific value for each elements', () => { const animation = animate('.target-class', { tran...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/keyframes.test.js
tests/suites/keyframes.test.js
import { expect, getChildAtIndex, getTweenDelay, } from '../utils.js'; import { animate, utils } from '../../dist/modules/index.js'; import { valueTypes, } from '../../dist/modules/core/consts.js'; suite('Keyframes', () => { test('An array of one raw value should be considered as a simple value', () => { ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/parameters.test.js
tests/suites/parameters.test.js
import { expect, getChildAtIndex, getTweenDelay, } from '../utils.js'; import { testObject, } from '../setup.js'; import { animate, createTimeline, createTimer, utils } from '../../dist/modules/index.js'; import { minValue } from '../../dist/modules/core/consts.js'; suite('Parameters', () => { const durati...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/utils.test.js
tests/suites/utils.test.js
import { utils, animate, createTimeline, } from '../../dist/modules/index.js'; import { expect, addChild, removeChild, getChildAtIndex, getChildLength, } from '../utils.js'; import { testObject, anOtherTestObject, } from '../setup.js'; suite('Utils', () => { test('Get a single DOM element', ()...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/promises.test.js
tests/suites/promises.test.js
import { expect, } from '../utils.js'; import { animate, createTimeline, createTimer, utils } from '../../dist/modules/index.js'; suite('Promises', () => { test('then() on timer', resolve => { createTimer({ duration: 30 }).then(anim => { expect(anim.currentTime).to.equal(30); resolve(); }); ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/scope.test.js
tests/suites/scope.test.js
import { expect, } from '../utils.js'; import { createScope, } from '../../dist/modules/index.js'; suite('Scope', () => { test('Default to global root with no params', () => { const $root = document; const scope = createScope(); expect(scope.root).to.equal($root); }); test('Default to global r...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/build.test.js
tests/suites/build.test.js
import { expect, } from '../utils.js'; import * as esmModules from '../../../dist/modules/index.js'; import * as esmBundle from '../../../dist/bundles/anime.esm.js'; import * as minifiedEsmBundle from '../../../dist/bundles/anime.esm.min.js'; const apiExports = [ 'animate', 'createTimer', 'createTimeline', ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/eases.test.js
tests/suites/eases.test.js
import { expect, } from '../utils.js'; import { animate, utils, eases, cubicBezier, spring, linear, steps, } from '../../dist/modules/index.js'; function createEasingParam(ease) { return { opacity: [0, 1], ease: ease, autoplay: false, duration: 100, } } function getOpacityValue() ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/animations.test.js
tests/suites/animations.test.js
import { expect, getChildAtIndex, forEachChildren, } from '../utils.js'; import { testObject, } from '../setup.js'; import { animate, createTimer, utils, } from '../../dist/modules/index.js'; import { minValue, tweenTypes, } from '../../dist/modules/core/consts.js'; suite('Animations', () => { ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/text.test.js
tests/suites/text.test.js
import { expect, browserIs, } from '../utils.js'; import { utils, splitText, animate, } from '../../dist/modules/index.js'; // Firefox detect Japanse words differently const wordsLength = browserIs.firefox ? 44 : 45; const charsLength = 229; suite('Text', () => { test('Defaults text split (words only)', ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/units.test.js
tests/suites/units.test.js
import { expect, getChildAtIndex, } from '../utils.js'; import { animate, utils, } from '../../dist/modules/index.js'; const validUnits = ['cm','mm','in','pc','pt','px','em','ex','ch','rem','vw','vh','vmin','vmax','q','lh','rlh','vb','vi','svw','svh','lvw','lvh','dvw','dvh']; suite('Units', () => { test('D...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/colors.test.js
tests/suites/colors.test.js
import { expect, getChildAtIndex, } from '../utils.js'; import { animate, utils, } from '../../dist/modules/index.js'; import { valueTypes, } from '../../dist/modules/core/consts.js'; const colors = { from: { rgb: { input: { HEX3: '#f99', HEX6: '#ff9999', RGB: 'rgb(255, ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/svg.test.js
tests/suites/svg.test.js
import { expect, getChildAtIndex, } from '../utils.js'; import { animate, utils, svg, } from '../../dist/modules/index.js'; suite('SVG', () => { test('svg.createDrawable', resolve => { const line1El = document.querySelector('#line1'); const line2El = document.querySelector('#line2'); const cir...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/draggables.test.js
tests/suites/draggables.test.js
import { expect, } from '../utils.js'; import { createTimer, createDraggable, utils, } from '../../dist/modules/index.js'; const createMouseEvent = ($target, name, x, y) => $target.dispatchEvent(new MouseEvent('mouse' + name, { clientX: x, clientY: y, bubbles: true, cancelable: true })); const create...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/function-based-values.test.js
tests/suites/function-based-values.test.js
import { expect, getChildAtIndex, getTweenDelay, } from '../utils.js'; import { animate, stagger, utils } from '../../dist/modules/index.js'; import { valueTypes, minValue, } from '../../dist/modules/core/consts.js'; suite('Function based values', () => { test('Basic function based values', () => { ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/timelines.test.js
tests/suites/timelines.test.js
import { expect, getChildAtIndex, } from '../utils.js'; import { createTimeline, eases, steps, utils, createTimer, animate, } from '../../dist/modules/index.js'; import { compositionTypes, minValue, } from '../../dist/modules/core/consts.js'; suite('Timelines', () => { function createTL() { ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/scroll.test.js
tests/suites/scroll.test.js
import { expect, } from '../utils.js'; import { onScroll, scrollContainers, animate, utils } from '../../dist/modules/index.js'; suite('Scroll', () => { test('Reverting an animation with onScroll should also revert the ScrollObserver', () => { const [ $container ] = utils.$('#css-tests'); const an...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/waapi.test.js
tests/suites/waapi.test.js
import { expect, } from '../utils.js'; import { waapi, utils, stagger, eases, } from '../../dist/modules/index.js'; suite('WAAPI', () => { CSS.registerProperty({ name: '--translateX', syntax: '<length-percentage>', inherits: false, initialValue: '0px' }); test('Calling registerProper...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/callbacks.test.js
tests/suites/callbacks.test.js
import { expect, } from '../utils.js'; import { animate, createTimeline, utils, } from '../../dist/modules/index.js'; function setupAnimationCallBack(callbackName, callbackFunc) { const parameters = { translateX: 100, autoplay: false, delay: 10, duration: 80, } parameters[callbackName] =...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
true
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/types.test.js
tests/suites/types.test.js
import { animate, createTimer, createTimeline, utils } from '../../dist/modules/index.js'; animate('.anime-css', { keyframes: { '0%' : { a: 100, b: 'string', c0: (el) => el.dataset.index, c1: (el, i) => el.dataset.index + i, c2: (el, i, t) => t - (el.dataset.index + i), }, '...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/animatables.test.js
tests/suites/animatables.test.js
import { expect, } from '../utils.js'; import { createAnimatable, createTimer, utils, } from '../../dist/modules/index.js'; suite('Animatables', () => { test('Get and animate animatable values', resolve => { const animatable = createAnimatable('#target-id', { x: 20, y: 30, rotate: 40,...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/controls.test.js
tests/suites/controls.test.js
import { expect, getChildAtIndex, forEachChildren, } from '../utils.js'; import { animate, createTimeline, createTimer, utils, } from '../../dist/modules/index.js'; import { minValue, } from '../../dist/modules/core/consts.js'; suite('Controls', () => { test('Alternate the direction of an animation...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/tweens.test.js
tests/suites/tweens.test.js
import { removeChild, expect, getChildAtIndex, } from '../utils.js'; import { utils, stagger, animate, createTimer, createTimeline, engine, } from '../../dist/modules/index.js'; import { compositionTypes, valueTypes, } from '../../dist/modules/core/consts.js'; suite('Tweens', () => { test('Si...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/directions.test.js
tests/suites/directions.test.js
import { expect, } from '../utils.js'; import { animate, utils, } from '../../dist/modules/index.js'; suite('Directions', () => { test('Direction normal should update from 0 to 1', resolve => { const [ target ] = utils.$('#target-id'); const animation = animate(target, { translateX: 100, d...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/timings.test.js
tests/suites/timings.test.js
import { expect, getChildAtIndex, } from '../utils.js'; import { animate, utils } from '../../dist/modules/index.js'; suite('Timings', () => { test('Specified timings parameters', resolve => { animate('#target-id', { translateX: 100, delay: 10, duration: 20, loop: 1, loopDe...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/leaks.test.js
tests/suites/leaks.test.js
import { expect, forEachChildren, } from '../utils.js'; import { engine, } from '../../dist/modules/index.js'; suite('Leaks', () => { test('Engine should not contain any active tickable', resolve => { setTimeout(() => { forEachChildren(engine, child => { console.warn('Active child id:', child....
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/node.test.js
tests/suites/node.test.js
import { expect } from 'chai'; import { animate, createTimer, createTimeline, engine } from '../../dist/modules/index.js'; import { render } from '../../dist/modules/core/render.js'; // import { animate } from '../visual/assets/anime.4.0.0.beta-29.js'; const totalInstances = 10000; const targets = []; for (let i = 0;...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/engine.test.js
tests/suites/engine.test.js
import { expect, } from '../utils.js'; import { animate, engine, utils, } from '../../dist/modules/index.js'; const defaultEnginePauseState = engine.paused; const defaultEngineReqId = engine.reqId; suite('Engine', () => { test('Initial offset position should be properly calculated on cold start', resolve ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/suites/seconds.test.js
tests/suites/seconds.test.js
import { expect, getChildAtIndex, } from '../utils.js'; import { minValue, } from '../../dist/modules/core/consts.js'; import { animate, createTimeline, createTimer, engine, } from '../../dist/modules/index.js'; suite('Seconds', () => { test('Calls added to a 0 duration timeline with a delay should...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/scope/index.js
tests/playground/scope/index.js
import { animate, utils, createScope, } from '../../../dist/modules/index.js'; const scope = createScope({ mediaQueries: { isSmall: '(max-width: 800px)' }, defaults: { ease: 'linear' }, root: '.scoped', }) .add(self => { const squares = utils.$('.square'); self.addOnce((scope) => { console.log('A...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/draggables/callbacks/index.js
tests/playground/draggables/callbacks/index.js
import { animate, createDraggable, utils, Draggable } from '../../../../dist/modules/index.js'; const [ $log1, $log2 ] = utils.$('.log'); const [ $container ] = /** @type {Array<HTMLElement>} */(utils.$('#container ')); const log = ($log, text) => { const $spans = $log.querySelectorAll('span'); const date...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/standalone.js
tests/playground/onscroll/assets/standalone.js
import { utils, onScroll, animate, } from '../../../../dist/modules/index.js'; const $logs = utils.$('.log'); const log = ($log, text) => { const $spans = $log.querySelectorAll('span'); if ($spans.length > 300) { for (let i = 0; i < 200; i++) { $log.removeChild($spans[i]); } } const $el = ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/sync-methods.js
tests/playground/onscroll/assets/sync-methods.js
import { utils, animate, onScroll, stagger, } from '../../../../dist/modules/index.js'; // Sync const sections = utils.$('section'); const methods = ['play', 'play pause', 'resume alternate resume reset', 'play reverse']; sections.forEach(($section, i) => { animate($section.querySelectorAll('.card'), { ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/horizontal-container.js
tests/playground/onscroll/assets/horizontal-container.js
import { utils, onScroll, createTimeline, animate, } from '../../../../dist/modules/index.js'; const tl = createTimeline({ autoplay: onScroll({ target: 'body', enter: 'top min+=100', leave: 'bottom max-=100', sync: 1, debug: true, }) }); utils.$('.card').forEach(($card, i) => { tl.ad...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/function-based-values.js
tests/playground/onscroll/assets/function-based-values.js
import { utils, animate, onScroll, stagger, } from '../../../../dist/modules/index.js'; const isLandscapeMedia = matchMedia('(orientation: landscape)'); utils.$('.section').forEach($section => { animate($section.querySelectorAll('.card'), { rotate: [stagger(utils.random(-1, 1, 2)), stagger(15)], tra...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/sticky-snap.js
tests/playground/onscroll/assets/sticky-snap.js
import { utils, onScroll, createTimeline, } from '../../../../dist/modules/index.js'; const tl = createTimeline({ defaults: { ease: 'inOut(1)', }, autoplay: onScroll({ target: '.sticky-container', sync: 1, enter: 'top', leave: 'bottom', debug: true, }), }); utils.$('.card').forEa...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/svg-target.js
tests/playground/onscroll/assets/svg-target.js
import { animate, onScroll, utils, } from '../../../../dist/modules/index.js'; utils.set('.section', { rotate: () => utils.random(-45, 45), }); utils.set('svg.logo', { scale: .5, }); animate('svg.logo', { scale: 2, ease: 'inOut(2)', autoplay: onScroll({ axis: 'y', enter: 'max-=25% start', ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/debug.js
tests/playground/onscroll/assets/debug.js
import { utils, onScroll, createTimeline, animate, } from '../../../../dist/modules/index.js'; animate('#edges .target', { rotate: 360, autoplay: onScroll({ container: '#edges .container', enter: 'bottom top', leave: 'top bottom', sync: 1, debug: true }) }) animate('#edges-inverted ....
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/min-max.js
tests/playground/onscroll/assets/min-max.js
import { utils, animate, onScroll, stagger, } from '../../../../dist/modules/index.js'; // Sync const sections = utils.$('section'); const colors = ['#FF4B4B', '#A4FF4F', '#33B3F1', '#FF4FCF']; sections.forEach(($section, i) => { animate($section.querySelectorAll('.card'), { z: [i * 10, i * 10], r...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/onscroll/assets/sync-modes.js
tests/playground/onscroll/assets/sync-modes.js
import { utils, animate, onScroll, stagger, } from '../../../../dist/modules/index.js'; const $logs = utils.$('.log'); const log = ($log, text) => { const $spans = $log.querySelectorAll('span'); if ($spans.length > 300) { for (let i = 0; i < 200; i++) { $log.removeChild($spans[i]); } } c...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/svg-motion-path/index.js
tests/playground/svg-motion-path/index.js
import { animate, svg } from '../../../dist/modules/index.js'; animate(['.no-specified-width .dom-el', '.no-specified-width .rect-el'], { duration: 3000, loop: true, ease: 'linear', ...svg.createMotionPath('#noSpecifiedWidth') }); animate(['.specified-width .dom-el', '.specified-width .rect-el'], { duration...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/benchmark/index.js
tests/playground/benchmark/index.js
import { waapi, animate, createTimer, utils, engine } from '../../../dist/modules/index.js'; import { Object3D, Vector3, Color, PerspectiveCamera, BoxGeometry, MeshBasicMaterial, InstancedMesh, Scene, WebGLRenderer, } from '../../../node_modules/three/build/three.module.min.js'; // engine.frameRate ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/threejs/instanced-mesh/index.js
tests/playground/threejs/instanced-mesh/index.js
import { animate, createTimer, createTimeline, utils, engine, stagger } from '../../../../dist/modules/index.js'; import { Object3D, Vector3, Color, PerspectiveCamera, BoxGeometry, SphereGeometry, MeshPhongMaterial, // Changed from MeshBasicMaterial for light interaction InstancedMesh, AmbientLight, ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/threejs/instanced-mesh/InstancedMeshProxy.js
tests/playground/threejs/instanced-mesh/InstancedMeshProxy.js
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/tl-seek-test/index.js
tests/playground/tl-seek-test/index.js
import { createTimeline, stagger, utils, } from '../../../dist/modules/index.js'; const count = 2000; const tl = createTimeline({ autoplay: false, }); for (let i = 0; i < count; i++) { const $el = document.createElement('div'); const hue = Math.round(360 / count * i); $el.style.opacity = '.5'; $el.st...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/keyframes/index.js
tests/playground/keyframes/index.js
import { animate, } from '../../../dist/modules/index.js'; const easeOut = 'cubicBezier(0, 0, 0.58, 1)'; const easeIn = 'cubicBezier(0.42, 0, 1, 1)'; // const easeOut = 'out(1.64)'; // const easeIn = 'in(1.64)'; // const easeOut = 'out'; // const easeIn = 'in'; const $css = document.querySelector('.css').classLis...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/timekeeper/index.js
tests/playground/timekeeper/index.js
import { utils, createScope, createTimeline, stagger } from '../../../dist/modules/index.js'; createScope({ mediaQueries: { minM: '(min-width: 800px)' } }).add(self => { self.keepTime(scope => { const isMinM = scope.matches.minM; document.body.classList.toggle('is-min-m', isMinM); return create...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/assets/js/anime.esm.js
tests/playground/assets/js/anime.esm.js
/** * anime.js - ESM * @version v4.0.0-beta.102.1 * @author Julian Garnier * @license MIT * @copyright (c) 2024 Julian Garnier * @see https://animejs.com */ /** @typedef {Animation} $Animation */ /** @typedef {Animatable} $Animatable */ /** @typedef {$Animation|Timeline} Renderable */ /** @typedef {Timer|Render...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
true
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/playback/index.js
tests/playground/playback/index.js
import { createTimeline, stagger, utils, engine, } from '../../../dist/modules/index.js'; const [$animPlay] = utils.$('#animation-play'); const [$animPause] = utils.$('#animation-pause'); const [$animReverse] = utils.$('#animation-reverse'); const [$animResume] = utils.$('#animation-resume'); const [$animToggl...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/sandbox/index.js
tests/playground/sandbox/index.js
import { waapi, animate, onScroll, $, set, stagger, spring, random, utils } from '../../../dist/modules/index.js'; async function animation() { await animate('test', { x: 100 }); }
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/timeline/test/index.js
tests/playground/timeline/test/index.js
import { createTimeline, stagger } from '../../../../dist/modules/index.js'; // import { inspect } from '../../../lib/gui/index.js'; const duration = 1000; const red = '#F64E4D'; const blue = '#61C3FF'; const green = '#18FF74'; const yellow = '#F6FF56'; const tl = createTimeline({ // beginDelay: 2000, loop: 3, ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/timeline/nested/index.js
tests/playground/timeline/nested/index.js
import { animate, createTimer, createTimeline, eases, stagger, utils } from '../../../../dist/modules/index.js'; // import { inspect } from '../../../lib/gui/index.js'; const A = animate('.square:nth-child(1)', { x: 200, onBegin: () => console.log('A BEGAN'), onComplete: () => console.log('A COMPLETE') }) const B = ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/timeline/test-sets/index.js
tests/playground/timeline/test-sets/index.js
import { createTimeline, stagger, utils, engine, animate } from '../../../../dist/modules/index.js'; // import { createTimeline, stagger, utils, engine, animate } from '../../assets/js/anime.esm.js'; // import { inspect } from '../../../lib/gui/index.js'; const [ $square ] = utils.$('.square'); // let call1Log = 0; ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/lerp/index.js
tests/playground/lerp/index.js
import { animate, createTimer, utils, } from '../../../dist/modules/index.js'; const [ $input ] = utils.$('.input'); const [ $damped ] = utils.$('.damped'); const [ $lerped ] = utils.$('.lerped'); animate($input, { x: [-200, 200], modifier: utils.snap(100), duration: 2000, loop: true, alternate: true,...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/waapi/playback/index.js
tests/playground/waapi/playback/index.js
import { waapi, stagger, utils, createTimer, createScope, onScroll } from '../../../../dist/modules/index.js'; const [$animResume] = utils.$('#animation-resume'); const [$animPlay] = utils.$('#animation-play'); const [$animPause] = utils.$('#animation-pause'); const [$animReverse] = utils.$('#animation-rev...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/waapi/composition/index.js
tests/playground/waapi/composition/index.js
import { waapi, animate, stagger, createSpring, utils, eases, engine } from '../../../../dist/modules/index.js'; let currentY = 0; let alternate = false; /** * @param {MouseEvent} e */ const animateSquares = (e) => { const X = e.offsetX; const Y = e.offsetY; const duration = alternate ? 500 : 3000; waapi.a...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/waapi/eases/index.js
tests/playground/waapi/eases/index.js
import { waapi, animate, stagger, createSpring, utils } from '../../../../dist/modules/index.js'; const $animation = document.querySelector('.animation'); const total = 36; for (let i = 0; i < total; i++) { const $square = document.createElement('div'); $square.classList.add('square', 'red'); utils.set($square,...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/tests/playground/waapi/values/index.js
tests/playground/waapi/values/index.js
import { waapi, animate, stagger, utils, createTimer } from '../../../../dist/modules/index.js'; let alternate = false; let x = utils.random(0, window.innerWidth - 800); let y = utils.random(0, window.innerHeight - 260); let bg = `rgb(255, 0, ${utils.random(0, 255)})`; let rotate = stagger(alternate ? [-180, 180] : [0...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/animejs-v4-logo-animation/index.js
examples/animejs-v4-logo-animation/index.js
import { createTimeline, stagger, svg, utils, cubicBezier, eases } from '../../dist/modules/index.js'; const [ $dot1 ] = utils.$('#dot-1'); const onions = []; for (let i = 0; i < 4; i++) { const $clone = $dot1.cloneNode(); $clone.id = 'dot-1-' + i; utils.set($clone, { opacity: 0 }); $dot1.parentNode.appendChi...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/onscroll-responsive-scope/index.js
examples/onscroll-responsive-scope/index.js
import { animate, onScroll, stagger, createScope, } from '../../dist/modules/index.js'; createScope({ mediaQueries: { landscape: '(orientation: landscape)' }, defaults: { ease: 'out(3)', duration: 500 }, }).add((scope) => { let cardsAnimation; if (scope.matches.landscape) { cardsAnimation = anima...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/timeline-50K-stars/index.js
examples/timeline-50K-stars/index.js
import { animate, createTimeline, utils, steps, cubicBezier } from '../../dist/modules/index.js'; const [$animation] = utils.$('#animation'); const [$button] = utils.$('.star-button'); const [$cursor] = utils.$('.cursor'); const [$count] = utils.$('.count'); const [$label] = utils.$('.label'); const [$star] = utils.$(...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/svg-line-drawing/index.js
examples/svg-line-drawing/index.js
import { svg, createTimeline, stagger, utils, } from '../../dist/modules/index.js'; function generateLines(numberOfLines) { const svgWidth = 1100; const svgHeight = 1100; const margin = 50; // Margin from the edges of the SVG const spacing = (svgWidth - margin * 2) / (numberOfLines - 1); let svgCont...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/advanced-grid-staggering/index.js
examples/advanced-grid-staggering/index.js
import { createTimeline, utils, stagger } from '../../dist/modules/index.js'; const staggerVisualizerEl = document.querySelector('.stagger-visualizer'); const fragment = document.createDocumentFragment(); const rows = +utils.get(document.body, '--rows'); const grid = [rows, rows]; const numberOfElements = rows * rows;...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/animatable-follow-cursor/index.js
examples/animatable-follow-cursor/index.js
import { createAnimatable, utils, stagger, } from '../../dist/modules/index.js'; // Setup const [ $particles ] = utils.$('.particles'); const rows = /** @type {Number} */(utils.get($particles, '--size', false)); let w = window.innerWidth; let h = window.innerHeight; let hw = w / 2; let hh = h / 2; for (let i ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/timeline-stress-test/index.js
examples/timeline-stress-test/index.js
import { createTimeline, stagger, utils, } from '../../dist/modules/index.js'; const count = 2024; const duration = 10000; const distance = 20; const angle = utils.mapRange(0, count, 0, Math.PI * 100); for (let i = 0; i < count; i++) { const $el = document.createElement('div'); const hue = utils.round(360 /...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/draggable-playground/index.js
examples/draggable-playground/index.js
import { animate, createTimer, createDraggable, createAnimatable, utils, stagger, eases, createSpring, createTimeline, engine, } from '../../dist/modules/index.js'; engine.timeUnit = 'ms'; // engine.timeUnit = 's'; const [ $log ] = utils.$('#log'); createDraggable('#fixed', { container: documen...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/svg-graph/index.js
examples/svg-graph/index.js
import { svg, animate, createTimeline, stagger, utils, } from '../../dist/modules/index.js'; const line = svg.createDrawable('line'); createTimeline({ loop: true, defaults: { ease: 'inOut(3)', duration: 2000, } }) .add('#views', { opacity: [0, 1], duration: 500, }, 0) .add('#b', { x: [0,...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/easings-visualizer/index.js
examples/easings-visualizer/index.js
import { animate, createTimeline, eases, createSpring, utils, stagger } from '../../dist/modules/index.js'; function bindInputsToObject(name, obj, onChange = () => {}) { const $bindedInputs = document.querySelectorAll(`[data-${ name }]`); $bindedInputs.forEach($input => $input.addEventListener('input', event => { ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/additive-fireflies/index.js
examples/additive-fireflies/index.js
import { animate, createTimer, utils } from '../../dist/modules/index.js'; const $animationWrapper = document.querySelector('#animation-wrapper'); const $circle = document.querySelector('#circle'); const viewport = {w: window.innerWidth * .5, h: window.innerHeight * .5}; const rows = 15; const baseRadius = $circle.off...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/timeline-seamless-loop/index.js
examples/timeline-seamless-loop/index.js
import { createTimeline, utils, stagger } from '../../dist/modules/index.js'; const wrapperEl = document.querySelector('#test-wrapper'); const numberOfEls = 500; const loopDuration = 6000; const animDuration = loopDuration * .2; const delay = loopDuration / numberOfEls; let tl = createTimeline({ defaults: { eas...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/timeline-refresh-starlings/index.js
examples/timeline-refresh-starlings/index.js
import { createTimeline, stagger, utils, } from '../../dist/modules/index.js'; const { random, cos, sin, sqrt, PI } = Math; const count = 2500; const duration = 3000; const win = { w: window.innerWidth * .26, h: window.innerHeight * .26 }; const target = { x: 0, y: 0, r: win.w * .25 }; const radius = Symbol(); c...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/draggable-infinite-auto-carousel/index.js
examples/draggable-infinite-auto-carousel/index.js
import { animate, createTimer, createDraggable, createAnimatable, utils, } from '../../dist/modules/index.js'; const [ $carousel ] = /** @type {Array<HTMLElement>} */(utils.$('.carousel')); $carousel.innerHTML += $carousel.innerHTML; // Clone the children for creating the illusion of infinity const carouselI...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/additive-creature/index.js
examples/additive-creature/index.js
import { animate, createTimeline, createTimer, stagger, utils } from '../../dist/modules/index.js'; const creatureEl = document.querySelector('#creature'); const viewport = { w: window.innerWidth * .5, h: window.innerHeight * .5 }; const cursor = { x: 0, y: 0 }; const rows = 13; const grid = [rows, rows]; const from =...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/canvas-2d/index.js
examples/canvas-2d/index.js
import { animate, createTimer, utils } from '../../dist/modules/index.js'; const canvasEl = document.querySelector('canvas'); const ctx = canvasEl.getContext('2d', { alpha: false }); const maxParticules = Number(location.href.split('?')[1]) || 4000; const colors = ['#FF4B4B','#FF8F42','#FFC730','#F6FF56']; const viewp...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/layered-css-transforms/index.js
examples/layered-css-transforms/index.js
import { createTimeline, utils, createSpring } from '../../dist/modules/index.js'; const shapeEls = document.querySelectorAll('.shape'); const triangleEl = document.querySelector('.layered-animations polygon'); const points = triangleEl.getAttribute('points').split(' ').map( v => +v ); const eases = ['inOutQuad', 'inO...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/clock-playback-controls/index.js
examples/clock-playback-controls/index.js
import { animate, createTimeline, utils, cubicBezier } from '../../dist/modules/index.js'; const [ $digitalClock ] = utils.$('#digital'); const s = 1000; const m = 60*s; const h = 60*m; const oneday = h * 24; const masterTL = createTimeline({ defaults: { ease: 'linear' }, autoplay: false }); [h * 10, h, 0, m * 10, ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/onscroll-sticky/index.js
examples/onscroll-sticky/index.js
import { utils, stagger, onScroll, createTimeline, animate, } from '../../dist/modules/index.js'; utils.set('.card', { rotate: () => utils.random(-1, 1, 2), rotateZ: () => utils.random(-1, 1, 2), y: stagger(-.5, { from: 'last' }), z: stagger(1), }); const brightness = v => `brightness(${v})`; utils...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/text/hover-effects/index.js
examples/text/hover-effects/index.js
import { animate, createScope, createSpring, createTimeline, stagger, splitText, utils, } from '../../../dist/modules/index.js'; createScope({ root: '#horizontal-split', defaults: { ease: 'outQuad', duration: 500, } }).add((scope) => { const { root, methods } = scope; splitText('h2', ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/text/split-playground/index.js
examples/text/split-playground/index.js
import { animate, createTimeline, createScope, stagger, splitText, utils, Scope, } from '../../../dist/modules/index.js'; let split; const form = document.getElementById('splitForm'); const $revert = document.getElementById('revert'); const $split = document.getElementById('split'); const config = { ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/text/split-effects/index.js
examples/text/split-effects/index.js
import { animate, createTimeline, stagger, splitText, utils, } from '../../../dist/modules/index.js'; const coords = []; const [ $revert ] = utils.$('#revert'); const [ $split ] = utils.$('#split'); const [ $reorder ] = utils.$('#reorder'); const [ $debug ] = utils.$('#debug'); $revert.disabled = true; $spl...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/draggable-mouse-scroll-snap-carousel/index.js
examples/draggable-mouse-scroll-snap-carousel/index.js
import { createTimer, createDraggable, utils, } from '../../dist/modules/index.js'; const carousel = { totalWidth: 0, itemWidth: 0, spacing: 0, released: false, deltaX: 0, deltaY: 0, prevX: 0, prevY: 0, wheeling: false, wheelable: true, }; const [ $carousel ] = /** @type {Array<HTMLElement>}...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/examples/irregular-playback-typewriter/index.js
examples/irregular-playback-typewriter/index.js
import { animate, createTimeline, utils, stagger, easings, } from '../../dist/modules/index.js'; const $spans = utils.$('span'); const $cursor = utils.$('.cursor'); const keystrokesSteps = $spans.length - 1; const keystrokesInterval = 125; createTimeline({ playbackEase: easings.irregular(keystrokesSteps, ...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
false
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/dist/bundles/anime.umd.min.js
dist/bundles/anime.umd.min.js
/** * Anime.js - UMD minified bundle * @version v4.2.2 * @license MIT * @copyright 2025 - Julian Garnier */
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
true
juliangarnier/anime
https://github.com/juliangarnier/anime/blob/b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d/dist/bundles/anime.umd.js
dist/bundles/anime.umd.js
/** * Anime.js - UMD bundle * @version v4.2.2 * @license MIT * @copyright 2025 - Julian Garnier */ // Global types /** * @typedef {Object} DefaultsParams * @property {Number|String} [id] * @property {PercentageKeyframes|DurationKeyframes} [keyframes] * @property {EasingParam} [playbackEase] * @property {Num...
javascript
MIT
b82b2c7fb54b7fda1d487e3aee885f70d4c1d46d
2026-01-04T14:56:49.711869Z
true