@makefully/platypus 4.1.13 → 4.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makefully/platypus",
3
- "version": "4.1.13",
3
+ "version": "4.1.14",
4
4
  "description": "2D tile-based HTML5 game engine with a component-based entity model",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -339,6 +339,9 @@ const
339
339
  */
340
340
  stop () {
341
341
  this.paused = true;
342
+ if (this._animation?.stop) {
343
+ this._animation.stop();
344
+ }
342
345
  };
343
346
 
344
347
  /**
@@ -348,6 +351,9 @@ const
348
351
  */
349
352
  play () {
350
353
  this.paused = false;
354
+ if (this._animation?.play) {
355
+ this._animation.play();
356
+ }
351
357
  };
352
358
 
353
359
  /**
@@ -430,15 +430,20 @@ export default createComponentClass(/** @lends platypus.components.RenderSprite.
430
430
  events: {
431
431
  "handle-render": function (renderData) {
432
432
  if (this.sprite) {
433
+ const
434
+ playing = !this.sprite.paused;
435
+
433
436
  /**
434
437
  * This event is triggered each tick to check for animation updates.
435
438
  *
436
439
  * @event platypus.Entity#update-animation
437
440
  * @param playing {Boolean} Whether the animation is in a playing or paused state.
438
441
  */
439
- this.owner.triggerEvent('update-animation', true);
442
+ this.owner.triggerEvent('update-animation', playing);
440
443
 
441
- this.sprite.update(renderData.delta);
444
+ if (playing) {
445
+ this.sprite.update(renderData.delta);
446
+ }
442
447
  }
443
448
  },
444
449
 
package/src/platypus.css CHANGED
@@ -1,8 +1,6 @@
1
1
  div#captions {
2
- user-select: none;
3
- -moz-user-select: none;
4
2
  -webkit-user-select: none;
5
- -ms-user-select: none;
3
+ user-select: none;
6
4
  -webkit-touch-callout: none;
7
5
  }
8
6
 
@@ -11,11 +9,10 @@ canvas.platypus-canvas {
11
9
  position: relative;
12
10
  width: 100%;
13
11
 
14
- user-select: none;
15
- -moz-user-select: none;
16
12
  -webkit-user-select: none;
17
- -ms-user-select: none;
13
+ user-select: none;
18
14
  -webkit-touch-callout: none;
15
+ touch-action: none;
19
16
  }
20
17
 
21
18
  .platypus-debugging {
@@ -28,6 +25,7 @@ canvas.platypus-canvas {
28
25
  z-index: 2;
29
26
  font-family: "Lucida Console", Monaco, monospace;
30
27
  -webkit-touch-callout: none;
28
+ -webkit-user-select: none;
31
29
  user-select: none;
32
30
  cursor: default;
33
31
  margin: 0;