本文整理汇总了TypeScript中bounce.js.default类的典型用法代码示例。如果您正苦于以下问题:TypeScript js.default类的具体用法?TypeScript js.default怎么用?TypeScript js.default使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了js.default类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test_chaining_transformations
function test_chaining_transformations() {
var bounce = new Bounce();
bounce
.scale({
from: { x: 0, y: 0 },
to: { x: 2, y: 2 },
duration: 1000
})
.rotate({
from: 0,
to: 360,
delay: 500
})
.translate({
from: { x: 0, y: -100 },
to: { x: 0, y: 0 },
stiffness: 1,
bounces: 4
})
.skew({
from: { x: 1, y: 0.8 },
to: { x: 0.8, y: 1 },
easing: 'bounce'
});
}
示例2: test_apply_promise
function test_apply_promise () {
var bounce = new Bounce();
var element = document.createElement('div');
bounce.applyTo($('div')).then(() => {});
var options = {
loop: true,
remove: true
};
bounce.applyTo($('div')).then(() => {});
}
示例3: test_apply
function test_apply () {
var bounce = new Bounce();
var element = document.createElement('div');
bounce.applyTo(element);
bounce.applyTo([element]);
bounce.applyTo($('div'));
var options = {
loop: true,
remove: true,
onComplete: () => {}
};
bounce.applyTo(element, options);
bounce.applyTo([element], options);
bounce.applyTo($('div'), options);
}
示例4: test_remove
function test_remove() {
var bounce = new Bounce();
bounce.remove();
}
示例5: test_define
function test_define() {
var bounce = new Bounce();
bounce.define('named-animation');
}
示例6: test_serialization
function test_serialization() {
var b1 = new Bounce();
var serialized = b1.serialize();
var b2 = new Bounce();
b2.deserialize(serialized);
}