This repository has been archived by the owner on Jul 11, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32822e4
commit d40a31b
Showing
6 changed files
with
546 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (c) 2015, Michael Mitterer (office@mikemitterer.at), | ||
* IT-Consulting and Development Limited. | ||
* | ||
* All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* MdlAnimation of was strongly by influenced by | ||
* Dan Parnhams CssAnimation (https://github.com/parnham/css_animation.dart) | ||
* So part of the tribute goes to him! | ||
*/ | ||
|
||
library mdlanimation; | ||
|
||
import 'dart:html' as dom; | ||
import 'dart:html_common'; | ||
import 'dart:async'; | ||
|
||
import 'package:logging/logging.dart'; | ||
import 'package:validate/validate.dart'; | ||
|
||
part 'src/animation/keyframes.dart'; | ||
part 'src/animation/animation.dart'; | ||
part 'src/animation/StockAnimation.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright (c) 2015, Michael Mitterer (office@mikemitterer.at), | ||
* IT-Consulting and Development Limited. | ||
* | ||
* All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
part of mdlanimation; | ||
|
||
/** | ||
* Predefined animations. | ||
* | ||
* If you want to define your own keyframes this site could be helpful: | ||
* https://coveloping.com/tools/css-animation-generator | ||
* | ||
* Usage: | ||
* final MdlAnimation bounceInRight = new MdlAnimation.fromStock(StockAnimation.BounceInRight); | ||
* ... | ||
* bounceInRight(element).then((_) => _logger.info("Animation completed!")); | ||
*/ | ||
class StockAnimation { | ||
/// Specifies the length of the animation | ||
final Duration duration; | ||
|
||
/// The keyframes for the animation | ||
final Map<int, Map<String, Object>> keyframes; | ||
|
||
final AnimationTiming timing; | ||
|
||
/// Specify your set of [keyframes] | ||
const StockAnimation(this.duration, this.keyframes,this.timing); | ||
|
||
static const StockAnimation BounceInRight = | ||
const StockAnimation(const Duration(milliseconds: 500), _BounceInRight,AnimationTiming.EASE_IN_OUT); | ||
|
||
static const StockAnimation FadeIn = | ||
const StockAnimation(const Duration(milliseconds: 500), _FadeIn,AnimationTiming.EASE_IN_OUT); | ||
|
||
static const StockAnimation FadeOut = | ||
const StockAnimation(const Duration(milliseconds: 500), _FadeOut,AnimationTiming.EASE_IN_OUT); | ||
|
||
} |
Oops, something went wrong.