canvasengine 2.0.0-beta.1 → 2.0.0-beta.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/dist/index.d.ts +94 -19
- package/dist/index.js +89 -478
- package/dist/index.js.map +1 -1
- package/package.json +9 -53
- package/src/components/index.ts +2 -3
- package/src/components/types/DisplayObject.ts +1 -0
- package/src/directives/KeyboardControls.ts +1 -1
- package/src/directives/Scheduler.ts +0 -11
- package/src/index.ts +4 -4
- package/.cursorrules +0 -0
- package/README.md +0 -71
- package/dist/compiler/vite.js +0 -119
- package/dist/compiler/vite.js.map +0 -1
- package/logo.png +0 -0
- package/src/compiler/grammar.pegjs +0 -180
- package/src/compiler/vite.ts +0 -166
- package/src/components/DrawMap/index.ts +0 -65
- package/src/components/Tilemap/Tile.ts +0 -79
- package/src/components/Tilemap/TileGroup.ts +0 -207
- package/src/components/Tilemap/TileLayer.ts +0 -163
- package/src/components/Tilemap/TileSet.ts +0 -41
- package/src/components/Tilemap/index.ts +0 -80
- package/src/presets/Bar.ts +0 -89
- package/src/presets/Button.ts +0 -0
- package/src/presets/Joystick.ts +0 -286
- package/src/presets/NightAmbiant.ts +0 -122
- package/src/presets/Particle.ts +0 -53
- package/starter/assets/logo.png +0 -0
- package/starter/components/app.ce +0 -18
- package/starter/components/hello.ce +0 -34
- package/starter/index.html +0 -21
- package/starter/main.ts +0 -4
- package/starter/package.json +0 -16
- package/starter/vite.config.ts +0 -12
- package/tsconfig.json +0 -32
- package/tsconfig.node.json +0 -10
- package/tsup.config.ts +0 -28
- package/vitest.config.ts +0 -12
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<Container flexDirection="column" width="500px">
|
|
2
|
-
<Sprite
|
|
3
|
-
image="/assets/logo.png"
|
|
4
|
-
anchor="0.5"
|
|
5
|
-
rotation
|
|
6
|
-
scale
|
|
7
|
-
@pointerenter={onEnter}
|
|
8
|
-
@pointerleave={onLeave}
|
|
9
|
-
/>
|
|
10
|
-
<Text text size="70" fontFamily="Helvetica" x="90" y="-30" />
|
|
11
|
-
</Container>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
import { signal, tick, animatedSignal, Easing } from "canvasengine";
|
|
15
|
-
|
|
16
|
-
const { text } = defineProps();
|
|
17
|
-
const rotation = signal(0);
|
|
18
|
-
const scale = animatedSignal(1, {
|
|
19
|
-
duration: 300,
|
|
20
|
-
ease: Easing.easeInOut,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
tick(() => {
|
|
24
|
-
rotation.update(rotation => rotation + 0.01);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const onEnter = () => {
|
|
28
|
-
scale.set(1.5);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const onLeave = () => {
|
|
32
|
-
scale.set(1);
|
|
33
|
-
};
|
|
34
|
-
</script>
|
package/starter/index.html
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Canvas Engine</title>
|
|
7
|
-
<style>
|
|
8
|
-
body, html, #root {
|
|
9
|
-
margin: 0;
|
|
10
|
-
padding: 0;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100vw;
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
}
|
|
15
|
-
</style>
|
|
16
|
-
</head>
|
|
17
|
-
<body>
|
|
18
|
-
<div id="root"></div>
|
|
19
|
-
<script type="module" src="/main.ts"></script>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
package/starter/main.ts
DELETED
package/starter/package.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "template",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite"
|
|
8
|
-
},
|
|
9
|
-
"keywords": [],
|
|
10
|
-
"author": "",
|
|
11
|
-
"license": "ISC",
|
|
12
|
-
"type": "module",
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"vite": "^6.0.3"
|
|
15
|
-
}
|
|
16
|
-
}
|
package/starter/vite.config.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import vitePluginCe from 'canvasengine/compiler'
|
|
3
|
-
|
|
4
|
-
// https://vitejs.dev/config/
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [vitePluginCe()],
|
|
7
|
-
resolve: {
|
|
8
|
-
alias: {
|
|
9
|
-
path: 'rollup-plugin-node-polyfills/polyfills/path',
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"lib": ["dom", "esnext"],
|
|
5
|
-
"module": "ES2020",
|
|
6
|
-
"outDir": "./lib",
|
|
7
|
-
"rootDir": "src",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"strictNullChecks": true,
|
|
11
|
-
"strictPropertyInitialization": false,
|
|
12
|
-
"moduleResolution": "Bundler",
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"removeComments": false,
|
|
15
|
-
"noUnusedParameters": false,
|
|
16
|
-
"noUnusedLocals": false,
|
|
17
|
-
"noImplicitThis": false,
|
|
18
|
-
"noImplicitAny": false,
|
|
19
|
-
"noImplicitReturns": false,
|
|
20
|
-
"declaration": true,
|
|
21
|
-
"experimentalDecorators": true,
|
|
22
|
-
"emitDecoratorMetadata": false,
|
|
23
|
-
"stripInternal": true,
|
|
24
|
-
"skipLibCheck": true,
|
|
25
|
-
"types": ["node"]
|
|
26
|
-
},
|
|
27
|
-
"include": [
|
|
28
|
-
"src",
|
|
29
|
-
"sample"
|
|
30
|
-
],
|
|
31
|
-
|
|
32
|
-
}
|
package/tsconfig.node.json
DELETED
package/tsup.config.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'tsup'
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
defineConfig({
|
|
5
|
-
format: ['esm'],
|
|
6
|
-
target: 'es2020',
|
|
7
|
-
splitting: true,
|
|
8
|
-
clean: true,
|
|
9
|
-
shims: false,
|
|
10
|
-
dts: true,
|
|
11
|
-
sourcemap: true,
|
|
12
|
-
entry: ['src/index.ts'],
|
|
13
|
-
outDir: 'dist'
|
|
14
|
-
}),
|
|
15
|
-
|
|
16
|
-
defineConfig({
|
|
17
|
-
format: ['esm'],
|
|
18
|
-
target: 'node20',
|
|
19
|
-
splitting: true,
|
|
20
|
-
clean: false,
|
|
21
|
-
shims: false,
|
|
22
|
-
dts: true,
|
|
23
|
-
sourcemap: true,
|
|
24
|
-
entry: ['src/compiler/vite.ts'],
|
|
25
|
-
outDir: 'dist/compiler',
|
|
26
|
-
external: ['vite', 'acorn', 'peggy', 'typescript'],
|
|
27
|
-
})
|
|
28
|
-
]
|
package/vitest.config.ts
DELETED