modern-canvas 0.6.13 → 0.7.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.
package/README.md CHANGED
@@ -39,7 +39,7 @@ npm i modern-canvas
39
39
  ## 🦄 Usage
40
40
 
41
41
  ```javascript
42
- import { Animation, Engine, Image2D, Text2D, Video2D } from 'modern-canvas'
42
+ import { Animation, Element2D, Engine, Image2D, Video2D } from 'modern-canvas'
43
43
  import { fonts } from 'modern-font'
44
44
 
45
45
  async function loadFallbackFont() {
@@ -70,12 +70,14 @@ loadFallbackFont().then(() => {
70
70
  { offset: 1, rotate: 180 },
71
71
  ],
72
72
  }),
73
- new Text2D({
74
- fonts,
73
+ new Element2D({
75
74
  style: {
76
75
  fontSize: 30,
77
76
  },
78
- content: '/example.png',
77
+ text: {
78
+ fonts,
79
+ content: '/example.png',
80
+ },
79
81
  }),
80
82
  new Video2D({
81
83
  style: {