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.
@@ -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>
@@ -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
@@ -1,4 +0,0 @@
1
- import App from './components/app.ce'
2
- import { bootstrapCanvas } from 'canvasengine';
3
-
4
- await bootstrapCanvas(document.getElementById("root"), App);
@@ -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
- }
@@ -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
- }
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true
8
- },
9
- "include": ["vite.config.ts"]
10
- }
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
@@ -1,12 +0,0 @@
1
- /// <reference types="vitest" />
2
- import { defineConfig } from 'vite'
3
-
4
- export default defineConfig(async () => {
5
- return {
6
- test: {
7
- environment: 'jsdom',
8
- pool: 'forks',
9
- setupFiles: ['./tests/setup/canvas.ts']
10
- }
11
- }
12
- })