|
@@ -339,6 +339,7 @@ The pingpong modes run the animation first forward, then backward. A set of corr
|
|
Easing defines how the animated value changes over time. The images below describe the functions applied over time to create the easing.
|
|
Easing defines how the animated value changes over time. The images below describe the functions applied over time to create the easing.
|
|
|
|
|
|
The following are valid easing values for `go.animate()`:
|
|
The following are valid easing values for `go.animate()`:
|
|
|
|
+
|
|
| | |
|
|
| | |
|
|
|---|---|
|
|
|---|---|
|
|
| go.EASING_LINEAR | |
|
|
| go.EASING_LINEAR | |
|
|
@@ -364,6 +365,7 @@ The following are valid easing values for `go.animate()`:
|
|
| go.EASING_INOUTQUINT | go.EASING_OUTINQUINT |
|
|
| go.EASING_INOUTQUINT | go.EASING_OUTINQUINT |
|
|
|
|
|
|
The following are valid easing values for `gui.animate()`:
|
|
The following are valid easing values for `gui.animate()`:
|
|
|
|
+
|
|
| | |
|
|
| | |
|
|
|---|---|
|
|
|---|---|
|
|
| gui.EASING_LINEAR | |
|
|
| gui.EASING_LINEAR | |
|
|
@@ -389,53 +391,33 @@ The following are valid easing values for `gui.animate()`:
|
|
| gui.EASING_INOUTQUINT | gui.EASING_OUTINQUINT |
|
|
| gui.EASING_INOUTQUINT | gui.EASING_OUTINQUINT |
|
|
|
|
|
|
<div id="game-container" class="game-container">
|
|
<div id="game-container" class="game-container">
|
|
- <img id="game-preview" src="//storage.googleapis.com/defold-doc/assets/easier/preview.jpg"/>
|
|
|
|
- <canvas id="game-canvas" tabindex="1" width="640" height="512">
|
|
|
|
- </canvas>
|
|
|
|
- <button id="game-button">
|
|
|
|
- SHOW EXAMPLE <span class="icon"></span>
|
|
|
|
- </button>
|
|
|
|
- <script src="//storage.googleapis.com/defold-doc/assets/easier/dmloader.js">
|
|
|
|
- </script>
|
|
|
|
- <script>
|
|
|
|
- document.getElementById("game-button").onclick = function (e) {
|
|
|
|
- var extra_params = {
|
|
|
|
- archive_location_filter: function( path ) {
|
|
|
|
- return ('//storage.googleapis.com/defold-doc/assets/easier/archive' + path + '');
|
|
|
|
- },
|
|
|
|
- splash_image: '//storage.googleapis.com/defold-doc/assets/easier/preview.jpg',
|
|
|
|
- custom_heap_size: 268435456,
|
|
|
|
- disable_context_menu: true,
|
|
|
|
- game_start: function() {
|
|
|
|
- var e = document.getElementById("game-preview");
|
|
|
|
- e.parentElement.removeChild(e);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- Module['onRuntimeInitialized'] = function() {
|
|
|
|
- Module.runApp("game-canvas", extra_params);
|
|
|
|
- };
|
|
|
|
- Module['locateFile'] = function(path, scriptDirectory)
|
|
|
|
- {
|
|
|
|
- if (path == "dmengine.wasm" || path == "dmengine_release.wasm" || path == "dmengine_headless.wasm") {
|
|
|
|
- path = "easier.wasm";
|
|
|
|
- }
|
|
|
|
- return scriptDirectory + path;
|
|
|
|
- };
|
|
|
|
- function load_engine() {
|
|
|
|
- var engineJS = document.createElement('script');
|
|
|
|
- engineJS.type = 'text/javascript';
|
|
|
|
- if (Module['isWASMSupported']) {
|
|
|
|
- engineJS.src = '//storage.googleapis.com/defold-doc/assets/easier/easier_wasm.js';
|
|
|
|
- } else {
|
|
|
|
- engineJS.src = '//storage.googleapis.com/defold-doc/assets/easier/easier_asmjs.js';
|
|
|
|
- }
|
|
|
|
- document.head.appendChild(engineJS);
|
|
|
|
- }
|
|
|
|
- load_engine();
|
|
|
|
- document.getElementById("game-button").style.display = 'none';
|
|
|
|
- document.getElementById("game-button").onclick = null;
|
|
|
|
- };
|
|
|
|
- </script>
|
|
|
|
|
|
+<canvas id="game-canvas" tabindex="1" width="640" height="512"></canvas>
|
|
|
|
+<script src="//storage.googleapis.com/defold-doc/assets/easier/dmloader.js"></script>
|
|
|
|
+<script>
|
|
|
|
+ var extra_params = {
|
|
|
|
+ archive_location_filter: function( path ) { return ('//storage.googleapis.com/defold-doc/assets/easier/archive' + path + ''); },
|
|
|
|
+ splash_image: '//storage.googleapis.com/defold-doc/assets/easier/preview.jpg',
|
|
|
|
+ custom_heap_size: 268435456,
|
|
|
|
+ disable_context_menu: true,
|
|
|
|
+ game_start: function() {}
|
|
|
|
+ };
|
|
|
|
+ Module['onRuntimeInitialized'] = function() { Module.runApp("game-canvas", extra_params); };
|
|
|
|
+ Module['locateFile'] = function(path, scriptDirectory) {
|
|
|
|
+ if (path == "dmengine.wasm" || path == "dmengine_release.wasm" || path == "dmengine_headless.wasm") { path = "easier.wasm"; }
|
|
|
|
+ return scriptDirectory + path;
|
|
|
|
+ };
|
|
|
|
+ function load_engine() {
|
|
|
|
+ var engineJS = document.createElement('script');
|
|
|
|
+ engineJS.type = 'text/javascript';
|
|
|
|
+ if (Module['isWASMSupported']) {
|
|
|
|
+ engineJS.src = '//storage.googleapis.com/defold-doc/assets/easier/easier_wasm.js';
|
|
|
|
+ } else {
|
|
|
|
+ engineJS.src = '//storage.googleapis.com/defold-doc/assets/easier/easier_asmjs.js';
|
|
|
|
+ }
|
|
|
|
+ document.head.appendChild(engineJS);
|
|
|
|
+ }
|
|
|
|
+ load_engine();
|
|
|
|
+</script>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{.inline}
|
|
{.inline}
|