modern-canvas 0.2.1 → 0.2.3

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
@@ -27,7 +27,7 @@ npm i modern-canvas
27
27
  ## 🦄 Usage
28
28
 
29
29
  ```javascript
30
- import { Animation, Engine, Image2D, Text2D } from 'modern-canvas'
30
+ import { Animation, Engine, Image2D, Text2D, Video2D } from 'modern-canvas'
31
31
  import { fonts } from 'modern-font'
32
32
 
33
33
  async function loadFallbackFont() {
@@ -65,6 +65,16 @@ loadFallbackFont().then(() => {
65
65
  },
66
66
  content: '/example.png',
67
67
  }),
68
+ new Video2D({
69
+ style: {
70
+ left: 200,
71
+ top: 200,
72
+ width: 100,
73
+ height: 100,
74
+ maskImage: '/example.png',
75
+ },
76
+ src: '/example.mp4',
77
+ }),
68
78
  ])
69
79
  )
70
80