Hacky projectile system
This commit is contained in:
41
js/projectile.js
Normal file
41
js/projectile.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import { LayeredTileFactory } from './layered_tile_factory.js';
|
||||
export function projectile(simple_tile_factory) {
|
||||
const copy = simple_tile_factory.copy();
|
||||
copy.add_animation('launch-x', [
|
||||
{
|
||||
'offset': 0.0,
|
||||
'easing': 'linear',
|
||||
'left': '0',
|
||||
'transform': 'rotate(0)',
|
||||
},
|
||||
{
|
||||
'offset': 1.0,
|
||||
'left': '1000%',
|
||||
'transform': 'rotate(720deg)',
|
||||
},
|
||||
], {
|
||||
'duration': 1500,
|
||||
'iterations': 1,
|
||||
});
|
||||
copy.add_animation('launch-y', [
|
||||
{
|
||||
'offset': 0.0,
|
||||
'easing': 'cubic-bezier(0.33, 0.66, 0.66, 1.00)',
|
||||
'top': '0',
|
||||
},
|
||||
{
|
||||
'offset': 0.50,
|
||||
'easing': 'cubic-bezier(0.33, 0.00, 0.66, 0.33)',
|
||||
'top': '-500%',
|
||||
},
|
||||
{
|
||||
'offset': 1.0,
|
||||
'top': '0',
|
||||
},
|
||||
], {
|
||||
'duration': 1500,
|
||||
'iterations': 1,
|
||||
});
|
||||
return new LayeredTileFactory([copy]);
|
||||
}
|
||||
//# sourceMappingURL=projectile.js.map
|
||||
Reference in New Issue
Block a user