font-awesome-for-phaser 0.3.7 → 0.4.0

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.
Files changed (2) hide show
  1. package/README.md +8 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -60,9 +60,16 @@ const iconText = scene.add.text(0, 0, char, {
60
60
  color: '#ffffff',
61
61
  });
62
62
  iconText.setOrigin(0.5);
63
+ scene.add.existing(iconText);
63
64
 
64
65
  // Or you can use our component
65
66
  import { IconText } from 'font-awesome-for-phaser';
66
67
 
67
- const iconText = new IconText(this, 10, 10, 'facebook', { fontSize: 42 });
68
+ // PS: `this` is the scene
69
+ const icon = new IconText(this, 90, 90, 'gamepad', 64, {
70
+ color: '#0066cc',
71
+ });
72
+ this.add.existing(icon); // Don't forget to add in scene
68
73
  ```
74
+
75
+ <img src="data/image.png" alt="example of button">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "font-awesome-for-phaser",
3
- "version": "0.3.7",
3
+ "version": "0.4.0",
4
4
  "description": "Font Awesome icons integration for Phaser games",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",