modern-canvas 0.2.5 → 0.3.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 +4 -4
- package/dist/index.cjs +1572 -565
- package/dist/index.d.cts +229 -14
- package/dist/index.d.mts +229 -14
- package/dist/index.d.ts +229 -14
- package/dist/index.js +40 -39
- package/dist/index.mjs +1571 -565
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ async function loadFallbackFont() {
|
|
|
49
49
|
loadFallbackFont().then(() => {
|
|
50
50
|
const engine = new Engine({ width: 500, height: 500 }).start()
|
|
51
51
|
|
|
52
|
-
engine.root.
|
|
52
|
+
engine.root.appendChild(
|
|
53
53
|
new Image2D({
|
|
54
54
|
style: {
|
|
55
55
|
left: 100,
|
|
@@ -103,7 +103,7 @@ See all [preset special effects](./src/scene/effects)
|
|
|
103
103
|
```typescript
|
|
104
104
|
import { EmbossEffect, Image2D } from 'modern-canvas'
|
|
105
105
|
|
|
106
|
-
engine.root.
|
|
106
|
+
engine.root.appendChild(
|
|
107
107
|
new Image2D({
|
|
108
108
|
src: '/example.png',
|
|
109
109
|
}, [
|
|
@@ -119,7 +119,7 @@ See all [preset transitions](./src/scene/transitions)
|
|
|
119
119
|
```typescript
|
|
120
120
|
import { Image2D, TiltShiftTransition } from 'modern-canvas'
|
|
121
121
|
|
|
122
|
-
engine.root.
|
|
122
|
+
engine.root.appendChild(
|
|
123
123
|
new Image2D({
|
|
124
124
|
src: '/example.png',
|
|
125
125
|
}),
|
|
@@ -136,7 +136,7 @@ Use https://github.com/gl-transitions/gl-transitions with `vite`
|
|
|
136
136
|
import bounceGLSL from 'gl-transitions/transitions/Bounce.glsl?raw'
|
|
137
137
|
import { Image2D, Transition } from 'modern-canvas'
|
|
138
138
|
|
|
139
|
-
engine.root.
|
|
139
|
+
engine.root.appendChild(
|
|
140
140
|
new Image2D({
|
|
141
141
|
src: '/example.png',
|
|
142
142
|
}),
|