like2d 1.0.0 → 2.0.1

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.
Files changed (99) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +74 -42
  3. package/assets/logo-banner.svg +188 -0
  4. package/assets/logo-icon.svg +88 -0
  5. package/assets/logo.svg +188 -0
  6. package/dist/adapters/callback/index.d.ts +43 -0
  7. package/dist/adapters/callback/index.d.ts.map +1 -0
  8. package/dist/adapters/callback/index.js +80 -0
  9. package/dist/adapters/scene/index.d.ts +42 -0
  10. package/dist/adapters/scene/index.d.ts.map +1 -0
  11. package/dist/adapters/scene/index.js +112 -0
  12. package/dist/adapters/scene/scene.d.ts +18 -0
  13. package/dist/adapters/scene/scene.d.ts.map +1 -0
  14. package/dist/adapters/scene/startup-scene.d.ts +17 -0
  15. package/dist/adapters/scene/startup-scene.d.ts.map +1 -0
  16. package/dist/adapters/scene/startup-scene.js +41 -0
  17. package/dist/core/audio.d.ts +61 -0
  18. package/dist/core/audio.d.ts.map +1 -0
  19. package/dist/core/audio.js +226 -0
  20. package/dist/core/canvas-config.d.ts +22 -0
  21. package/dist/core/canvas-config.d.ts.map +1 -0
  22. package/dist/core/canvas-config.js +14 -0
  23. package/dist/core/canvas-manager.d.ts +26 -0
  24. package/dist/core/canvas-manager.d.ts.map +1 -0
  25. package/dist/core/canvas-manager.js +197 -0
  26. package/dist/core/events.d.ts +52 -0
  27. package/dist/core/events.d.ts.map +1 -0
  28. package/dist/core/gamepad-button-map.d.ts.map +1 -0
  29. package/dist/core/gamepad-buttons.d.ts +23 -0
  30. package/dist/core/gamepad-buttons.d.ts.map +1 -0
  31. package/dist/core/gamepad-buttons.js +36 -0
  32. package/dist/core/gamepad-db.d.ts.map +1 -0
  33. package/dist/{gamepad-mapping.d.ts → core/gamepad-mapping.d.ts} +3 -15
  34. package/dist/core/gamepad-mapping.d.ts.map +1 -0
  35. package/dist/core/gamepad-mapping.js +223 -0
  36. package/dist/{gamepad.d.ts → core/gamepad.d.ts} +22 -17
  37. package/dist/core/gamepad.d.ts.map +1 -0
  38. package/dist/{gamepad.js → core/gamepad.js} +91 -70
  39. package/dist/{graphics.d.ts → core/graphics.d.ts} +2 -8
  40. package/dist/core/graphics.d.ts.map +1 -0
  41. package/dist/{graphics.js → core/graphics.js} +4 -41
  42. package/dist/core/input-state.d.ts.map +1 -0
  43. package/dist/{input.d.ts → core/input.d.ts} +11 -14
  44. package/dist/core/input.d.ts.map +1 -0
  45. package/dist/{input.js → core/input.js} +31 -41
  46. package/dist/core/keyboard.d.ts +15 -0
  47. package/dist/core/keyboard.d.ts.map +1 -0
  48. package/dist/core/keyboard.js +70 -0
  49. package/dist/core/mouse.d.ts +29 -0
  50. package/dist/core/mouse.d.ts.map +1 -0
  51. package/dist/core/mouse.js +130 -0
  52. package/dist/{rect.d.ts → core/rect.d.ts} +1 -2
  53. package/dist/core/rect.d.ts.map +1 -0
  54. package/dist/{rect.js → core/rect.js} +24 -28
  55. package/dist/{timer.d.ts → core/timer.d.ts} +0 -1
  56. package/dist/core/timer.d.ts.map +1 -0
  57. package/dist/{timer.js → core/timer.js} +0 -1
  58. package/dist/{vector2.d.ts → core/vector2.d.ts} +4 -10
  59. package/dist/core/vector2.d.ts.map +1 -0
  60. package/dist/{vector2.js → core/vector2.js} +40 -40
  61. package/dist/engine.d.ts +42 -0
  62. package/dist/engine.d.ts.map +1 -0
  63. package/dist/engine.js +154 -0
  64. package/dist/index.d.ts +38 -44
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +24 -250
  67. package/package.json +9 -23
  68. package/dist/audio.d.ts +0 -52
  69. package/dist/audio.d.ts.map +0 -1
  70. package/dist/audio.js +0 -250
  71. package/dist/events.d.ts +0 -36
  72. package/dist/events.d.ts.map +0 -1
  73. package/dist/gamepad-button-map.d.ts.map +0 -1
  74. package/dist/gamepad-db.d.ts.map +0 -1
  75. package/dist/gamepad-mapping.d.ts.map +0 -1
  76. package/dist/gamepad-mapping.js +0 -191
  77. package/dist/gamepad.d.ts.map +0 -1
  78. package/dist/graphics.d.ts.map +0 -1
  79. package/dist/input-state.d.ts.map +0 -1
  80. package/dist/input.d.ts.map +0 -1
  81. package/dist/keyboard.d.ts +0 -9
  82. package/dist/keyboard.d.ts.map +0 -1
  83. package/dist/keyboard.js +0 -33
  84. package/dist/mouse.d.ts +0 -20
  85. package/dist/mouse.d.ts.map +0 -1
  86. package/dist/mouse.js +0 -84
  87. package/dist/rect.d.ts.map +0 -1
  88. package/dist/scene.d.ts +0 -10
  89. package/dist/scene.d.ts.map +0 -1
  90. package/dist/timer.d.ts.map +0 -1
  91. package/dist/vector2.d.ts.map +0 -1
  92. /package/dist/{scene.js → adapters/scene/scene.js} +0 -0
  93. /package/dist/{events.js → core/events.js} +0 -0
  94. /package/dist/{gamepad-button-map.d.ts → core/gamepad-button-map.d.ts} +0 -0
  95. /package/dist/{gamepad-button-map.js → core/gamepad-button-map.js} +0 -0
  96. /package/dist/{gamepad-db.d.ts → core/gamepad-db.d.ts} +0 -0
  97. /package/dist/{gamepad-db.js → core/gamepad-db.js} +0 -0
  98. /package/dist/{input-state.d.ts → core/input-state.d.ts} +0 -0
  99. /package/dist/{input-state.js → core/input-state.js} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Samuel Pagenkopf
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md CHANGED
@@ -1,66 +1,98 @@
1
- # LÏKE2D Framework Library
1
+ # LÏKE2D
2
2
 
3
- You've reached the more detailed docs for this framework.
4
- For now, the source code is the best API docs we have.
3
+ <p align="center">
4
+ <img src="./assets/logo-banner.svg" alt="Like2D Logo" width="400">
5
+ </p>
5
6
 
6
- ## Features of LIKE
7
+ A web-native 2D game framework inspired by [LÖVE](https://love2d.org/), built for simplicity and the modern web.
7
8
 
8
- **Stateless Canvas API**
9
+ ## What it is
9
10
 
10
- JS canvas has state to keep track of like color and line width.
11
- LIKE abstracts that away so it's easy to reason about.
11
+ Like2D is a thin, performant wrapper around the browser's Canvas and Web Audio APIs. It provides:
12
+ - **Stateless Graphics:** No more `ctx.save()` and `ctx.restore()` for colors and transforms.
13
+ - **Fire-and-forget Assets:** Synchronous handles for images and audio that load in the background.
14
+ - **Unified Input:** Normalized keyboard, mouse, and gamepad support with action mapping.
15
+ - **Scaling Modes:** Built-in support for "fixed" resolution with pixel-perfect stretching.
16
+ - **Flexible Patterns:** Use Love2D-style global callbacks or class-based scenes.
12
17
 
13
- **Fire-and-forget asset loading**
18
+ ## Installation
14
19
 
15
- Loading sound and images in Vanilla JS is clunky and can interrupt your game loop.
16
- LIKE has synchronous asset handles and abstracts away the clunkiness.
20
+ ```bash
21
+ npm install like2d
22
+ # or
23
+ pnpm add like2d
24
+ ```
17
25
 
18
- **Zero boilerplate, physical game input**
26
+ ## Quick Start
19
27
 
20
- LIKE does the input boilerplate for you.
21
- - Keeping track of what's held/pressed.
22
- - Controller mapping by physical location. Not every A is in the same spot.
23
- - Mapping inputs into actions for easy remapping.
28
+ ### Callback Pattern (Love2D-style)
24
29
 
25
- **Declarative event system**
30
+ Ideal for small games, jams, or prototyping.
26
31
 
27
- Don't bother juggling stateful listeners.
28
- LIKE keeps event handling simple by running it all through a single callback.
32
+ ```typescript
33
+ import { love, graphics, input } from 'like2d/callback';
29
34
 
30
- **Build it how you want it**
35
+ love.load = () => {
36
+ love.setScaling({ mode: 'fixed', size: [800, 600] });
37
+ input.map('jump', ['Space', 'ButtonBottom']);
38
+ };
31
39
 
32
- It's not an engine, it's a framework.
33
- For new developers, this means making simple games easily: no engine, no problem!
34
- For others, get to work faster making your own specialized tooling, engine, and more,
35
- all without banging your head on browser APIs.
40
+ love.update = (dt) => {
41
+ if (input.justPressed('jump')) {
42
+ console.log('Jump!');
43
+ }
44
+ };
36
45
 
37
- ## Getting started
46
+ love.draw = () => {
47
+ graphics.clear([0.1, 0.1, 0.1, 1]);
48
+ graphics.circle('fill', 'dodgerblue', [400, 300], 50);
49
+ graphics.print('white', 'Hello Like2D!', [20, 20]);
50
+ };
38
51
 
39
- TODO: fill this in.
52
+ love.init(document.body);
53
+ ```
40
54
 
41
- Then run:
42
- ```bash
43
- pnpm install
44
- pnpm run dev
55
+ ### Scene Pattern (Class-based)
56
+
57
+ Ideal for larger projects with menus, levels, and explicit state management.
58
+
59
+ ```typescript
60
+ import { SceneRunner, type Scene, Vec2 } from 'like2d/scene';
61
+
62
+ class MyScene implements Scene {
63
+ load() {
64
+ console.log('Scene loaded!');
65
+ }
66
+
67
+ update(dt: number) {
68
+ // update logic
69
+ }
70
+
71
+ draw(canvas: HTMLCanvasElement) {
72
+ // draw logic
73
+ }
74
+ }
75
+
76
+ const runner = new SceneRunner(document.body);
77
+ await runner.start(new MyScene());
45
78
  ```
46
79
 
47
- ## For LOVE developers
80
+ ## API Overview
48
81
 
49
- LIKE is not compatible with LOVE.
82
+ Like2D exports pure library functions for math and geometry that work with native arrays.
50
83
 
51
- To summarize the differences:
52
- - We don't keep track of color etc. as state (via setColor, etc.), so it gets passed in each draw call.
53
- - We use objects for optional arguments, and avoid function overloading.
54
- - We make use of tuples for passing around colors, coordinates, and rects.
55
- - In LOVE, Callbacks such as `love.keypressed` needed to be wrapped in order to make Scenes. This pattern is part of LIKE.
56
- - 2d Canvas so, no shaders.
57
- - No built-in physics.
84
+ - **Vec2:** Vector operations using `[number, number]` tuples.
85
+ - **Rect:** Rectangle operations using `[x, y, w, h]` tuples.
86
+ - **Graphics:** Stateless drawing commands.
87
+ - **Audio:** Simple source/playback management.
88
+ - **Input:** Action-based input mapping.
58
89
 
59
- ## Full Disclosure about AI
90
+ See the [PHILOSOPHY.md](./docs/PHILOSOPHY.md) for the principles behind the design.
60
91
 
61
- Yes, this framework was created with the help of heavily supervised AI.
92
+ ## Quick Start Template
62
93
 
63
- Virtually every design decision was made by me, and I have micro-managed the code output.
94
+ Get started quickly with the [Like2D Starter](https://github.com/44100hertz/Like2D-starter) template!
64
95
 
65
- Over time, I will rewrite parts of it by hand as desired. Possibly the whole thing.
96
+ ## License
66
97
 
98
+ MIT
@@ -0,0 +1,188 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="300mm"
6
+ height="105mm"
7
+ viewBox="0 0 300 105"
8
+ version="1.1"
9
+ id="svg1"
10
+ inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
11
+ sodipodi:docname="logo-banner.svg"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ xmlns:svg="http://www.w3.org/2000/svg">
16
+ <sodipodi:namedview
17
+ id="namedview1"
18
+ pagecolor="#ffffff"
19
+ bordercolor="#000000"
20
+ borderopacity="0.25"
21
+ inkscape:showpageshadow="2"
22
+ inkscape:pageopacity="0.0"
23
+ inkscape:pagecheckerboard="0"
24
+ inkscape:deskcolor="#d1d1d1"
25
+ inkscape:document-units="mm"
26
+ showgrid="false"
27
+ inkscape:zoom="0.86565679"
28
+ inkscape:cx="542.94035"
29
+ inkscape:cy="116.09682"
30
+ inkscape:window-width="1864"
31
+ inkscape:window-height="1163"
32
+ inkscape:window-x="0"
33
+ inkscape:window-y="0"
34
+ inkscape:window-maximized="1"
35
+ inkscape:current-layer="layer1">
36
+ <inkscape:grid
37
+ id="grid1"
38
+ units="mm"
39
+ originx="0"
40
+ originy="0"
41
+ spacingx="10"
42
+ spacingy="10"
43
+ empcolor="#0099e5"
44
+ empopacity="0.30196078"
45
+ color="#0099e5"
46
+ opacity="0.14901961"
47
+ empspacing="5"
48
+ enabled="true"
49
+ visible="false" />
50
+ </sodipodi:namedview>
51
+ <defs
52
+ id="defs1" />
53
+ <g
54
+ inkscape:label="Layer 1"
55
+ inkscape:groupmode="layer"
56
+ id="layer1">
57
+ <rect
58
+ style="fill:#e48080;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
59
+ id="rect6"
60
+ width="280"
61
+ height="83.543648"
62
+ x="10.000002"
63
+ y="14.404639" />
64
+ <rect
65
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
66
+ id="rect7"
67
+ width="52.516361"
68
+ height="46.237232"
69
+ x="97.483658"
70
+ y="14.404639" />
71
+ <rect
72
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.999998;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
73
+ id="rect7-0"
74
+ width="35.010902"
75
+ height="46.237232"
76
+ x="150"
77
+ y="14.404639" />
78
+ <rect
79
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
80
+ id="rect7-0-4"
81
+ width="52.516361"
82
+ height="46.237232"
83
+ x="185.01091"
84
+ y="14.404639" />
85
+ <rect
86
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
87
+ id="rect7-9"
88
+ width="52.516361"
89
+ height="46.237232"
90
+ x="237.52722"
91
+ y="14.404639" />
92
+ <rect
93
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
94
+ id="rect8"
95
+ width="17.505455"
96
+ height="27.460892"
97
+ x="132.49457"
98
+ y="14.404639" />
99
+ <rect
100
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
101
+ id="rect9"
102
+ width="8.7527285"
103
+ height="18.776356"
104
+ x="150"
105
+ y="32.477341" />
106
+ <rect
107
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
108
+ id="rect9-0"
109
+ width="8.7527285"
110
+ height="18.776356"
111
+ x="176.25818"
112
+ y="32.47736" />
113
+ <rect
114
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.999998;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
115
+ id="rect11"
116
+ width="17.505453"
117
+ height="8.6845322"
118
+ x="150"
119
+ y="14.404639" />
120
+ <rect
121
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.999998;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
122
+ id="rect11-4"
123
+ width="17.505453"
124
+ height="8.6845322"
125
+ x="167.50545"
126
+ y="14.404639" />
127
+ <path
128
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999998;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
129
+ d="m 237.52727,41.865535 -17.50544,-9.388181 v 0 l 17.50544,-18.072708 z"
130
+ id="path11"
131
+ sodipodi:nodetypes="ccccc" />
132
+ <rect
133
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999998;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
134
+ id="rect12-9"
135
+ width="16.771759"
136
+ height="9.388155"
137
+ x="202.88322"
138
+ y="51.253693" />
139
+ <rect
140
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999998;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
141
+ id="rect12-9-9"
142
+ width="16.771759"
143
+ height="9.388155"
144
+ x="272.53812"
145
+ y="23.44101" />
146
+ <rect
147
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999998;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
148
+ id="rect12-9-9-9"
149
+ width="16.771759"
150
+ height="9.388155"
151
+ x="272.53812"
152
+ y="41.865543" />
153
+ <path
154
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999998;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
155
+ d="m 202.51637,32.477354 0.36685,-18.072708 h 17.13859 z"
156
+ id="path12" />
157
+ <path
158
+ id="rect3"
159
+ style="fill:#80c3e4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
160
+ d="m 64.077715,4.179157 -33.374839,33.374834 -0.01743,0.0174 a 23.611767,23.611767 0 0 0 0,33.392271 23.611767,23.611767 0 0 0 30.012041,2.802217 23.611767,23.611767 0 0 1 0.007,0.570339 23.611767,23.611767 0 0 1 -23.612067,23.612061 h 53.96995 a 23.611767,23.611767 0 0 1 -23.611369,-23.612061 23.611767,23.611767 0 0 1 0.007,-0.570339 23.611767,23.611767 0 0 0 30.012033,-2.802919 23.611767,23.611767 0 0 0 -6.88e-4,-33.392257 z" />
161
+ <circle
162
+ style="fill:none;stroke:#000000;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1"
163
+ id="path1"
164
+ cx="-18.742947"
165
+ cy="-95.488525"
166
+ r="23.611769"
167
+ transform="rotate(135)" />
168
+ <circle
169
+ style="fill:none;stroke:#000000;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1"
170
+ id="path1-8"
171
+ cx="4.8688235"
172
+ cy="-71.87674"
173
+ r="23.611769"
174
+ transform="rotate(135)" />
175
+ <circle
176
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1"
177
+ id="path1-8-2"
178
+ cx="91.062447"
179
+ cy="74.336197"
180
+ r="23.611767" />
181
+ <circle
182
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1"
183
+ id="path1-8-2-3"
184
+ cx="37.092701"
185
+ cy="74.336197"
186
+ r="23.611767" />
187
+ </g>
188
+ </svg>
@@ -0,0 +1,88 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="100mm"
6
+ height="100mm"
7
+ viewBox="0 0 100 100"
8
+ version="1.1"
9
+ id="svg1"
10
+ inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
11
+ sodipodi:docname="logo-icon.svg"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ xmlns:svg="http://www.w3.org/2000/svg">
16
+ <sodipodi:namedview
17
+ id="namedview1"
18
+ pagecolor="#d98383"
19
+ bordercolor="#000000"
20
+ borderopacity="0.25"
21
+ inkscape:showpageshadow="2"
22
+ inkscape:pageopacity="0.0"
23
+ inkscape:pagecheckerboard="0"
24
+ inkscape:deskcolor="#d1d1d1"
25
+ inkscape:document-units="mm"
26
+ showgrid="false"
27
+ inkscape:zoom="1.3509661"
28
+ inkscape:cx="196.89613"
29
+ inkscape:cy="207.62919"
30
+ inkscape:window-width="1864"
31
+ inkscape:window-height="1163"
32
+ inkscape:window-x="0"
33
+ inkscape:window-y="0"
34
+ inkscape:window-maximized="1"
35
+ inkscape:current-layer="layer1">
36
+ <inkscape:grid
37
+ id="grid1"
38
+ units="mm"
39
+ originx="0"
40
+ originy="0"
41
+ spacingx="10"
42
+ spacingy="10"
43
+ empcolor="#0099e5"
44
+ empopacity="0.30196078"
45
+ color="#0099e5"
46
+ opacity="0.14901961"
47
+ empspacing="5"
48
+ enabled="true"
49
+ visible="false" />
50
+ </sodipodi:namedview>
51
+ <defs
52
+ id="defs1" />
53
+ <g
54
+ inkscape:label="Layer 1"
55
+ inkscape:groupmode="layer"
56
+ id="layer1">
57
+ <path
58
+ id="rect3"
59
+ style="fill:#80c3e4;fill-opacity:1;stroke:#000000;stroke-width:1.33333;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
60
+ d="m 49.999985,3.0742116 -32.981179,32.9811744 -0.01723,0.0172 a 23.333265,23.333265 0 0 0 0,32.998405 23.333265,23.333265 0 0 0 29.658047,2.769165 23.333265,23.333265 0 0 1 0.007,0.563613 23.333265,23.333265 0 0 1 -23.333534,23.333556 h 53.333356 a 23.333265,23.333265 0 0 1 -23.332873,-23.333558 23.333265,23.333265 0 0 1 0.007,-0.563613 23.333265,23.333265 0 0 0 29.658039,-2.769857 23.333265,23.333265 0 0 0 -6.81e-4,-32.998393 z" />
61
+ <circle
62
+ style="fill:none;stroke:#000000;stroke-width:0.666665;stroke-dasharray:none;stroke-opacity:1"
63
+ id="path1"
64
+ cx="-9.8483047"
65
+ cy="-84.19574"
66
+ r="23.333265"
67
+ transform="rotate(135)" />
68
+ <circle
69
+ style="fill:none;stroke:#000000;stroke-width:0.666665;stroke-dasharray:none;stroke-opacity:1"
70
+ id="path1-8"
71
+ cx="13.484962"
72
+ cy="-60.862465"
73
+ r="23.333265"
74
+ transform="rotate(135)" />
75
+ <circle
76
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.666665;stroke-dasharray:none;stroke-opacity:1"
77
+ id="path1-8-2"
78
+ cx="76.666428"
79
+ cy="72.40374"
80
+ r="23.333265" />
81
+ <circle
82
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.666665;stroke-dasharray:none;stroke-opacity:1"
83
+ id="path1-8-2-3"
84
+ cx="23.333265"
85
+ cy="72.40374"
86
+ r="23.333265" />
87
+ </g>
88
+ </svg>
@@ -0,0 +1,188 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="100mm"
6
+ height="105mm"
7
+ viewBox="0 0 100 105"
8
+ version="1.1"
9
+ id="svg1"
10
+ inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
11
+ sodipodi:docname="logo.svg"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ xmlns:svg="http://www.w3.org/2000/svg">
16
+ <sodipodi:namedview
17
+ id="namedview1"
18
+ pagecolor="#ffffff"
19
+ bordercolor="#000000"
20
+ borderopacity="0.25"
21
+ inkscape:showpageshadow="2"
22
+ inkscape:pageopacity="0.0"
23
+ inkscape:pagecheckerboard="0"
24
+ inkscape:deskcolor="#d1d1d1"
25
+ inkscape:document-units="mm"
26
+ showgrid="false"
27
+ inkscape:zoom="1.3509661"
28
+ inkscape:cx="196.89613"
29
+ inkscape:cy="207.62919"
30
+ inkscape:window-width="1864"
31
+ inkscape:window-height="1163"
32
+ inkscape:window-x="0"
33
+ inkscape:window-y="0"
34
+ inkscape:window-maximized="1"
35
+ inkscape:current-layer="layer1">
36
+ <inkscape:grid
37
+ id="grid1"
38
+ units="mm"
39
+ originx="0"
40
+ originy="0"
41
+ spacingx="10"
42
+ spacingy="10"
43
+ empcolor="#0099e5"
44
+ empopacity="0.30196078"
45
+ color="#0099e5"
46
+ opacity="0.14901961"
47
+ empspacing="5"
48
+ enabled="true"
49
+ visible="false" />
50
+ </sodipodi:namedview>
51
+ <defs
52
+ id="defs1" />
53
+ <g
54
+ inkscape:label="Layer 1"
55
+ inkscape:groupmode="layer"
56
+ id="layer1">
57
+ <rect
58
+ style="fill:#e48080;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
59
+ id="rect6"
60
+ width="80"
61
+ height="83.543648"
62
+ x="10.000003"
63
+ y="14.404639" />
64
+ <path
65
+ id="rect3"
66
+ style="fill:#80c3e4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
67
+ d="m 49.999951,4.1791571 -24.73596,24.7359569 -0.01292,0.0129 a 17.500002,17.500002 0 0 0 0,24.74888 17.500002,17.500002 0 0 0 22.243603,2.07688 17.500002,17.500002 0 0 1 0.0052,0.42271 17.500002,17.500002 0 0 1 -17.500224,17.50022 h 40.000139 a 17.500002,17.500002 0 0 1 -17.499707,-17.50022 17.500002,17.500002 0 0 1 0.0052,-0.42271 17.500002,17.500002 0 0 0 22.243597,-2.0774 17.500002,17.500002 0 0 0 -5.1e-4,-24.74887 z" />
68
+ <circle
69
+ style="fill:none;stroke:#000000;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1"
70
+ id="path1"
71
+ cx="-14.90022"
72
+ cy="-73.310486"
73
+ r="17.500002"
74
+ transform="rotate(135)" />
75
+ <circle
76
+ style="fill:none;stroke:#000000;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1"
77
+ id="path1-8"
78
+ cx="2.5997834"
79
+ cy="-55.810471"
80
+ r="17.500002"
81
+ transform="rotate(135)" />
82
+ <circle
83
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1"
84
+ id="path1-8-2"
85
+ cx="69.999847"
86
+ cy="56.176464"
87
+ r="17.500002" />
88
+ <circle
89
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1"
90
+ id="path1-8-2-3"
91
+ cx="29.999849"
92
+ cy="56.176464"
93
+ r="17.500002" />
94
+ <rect
95
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
96
+ id="rect7"
97
+ width="21.818182"
98
+ height="19.209486"
99
+ x="10.000003"
100
+ y="78.870033" />
101
+ <rect
102
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.999997;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
103
+ id="rect7-0"
104
+ width="14.545453"
105
+ height="19.209486"
106
+ x="31.818186"
107
+ y="78.870033" />
108
+ <rect
109
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
110
+ id="rect7-0-4"
111
+ width="21.818182"
112
+ height="19.209486"
113
+ x="46.36364"
114
+ y="78.870033" />
115
+ <rect
116
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
117
+ id="rect7-9"
118
+ width="21.818182"
119
+ height="19.209486"
120
+ x="68.181816"
121
+ y="78.870033" />
122
+ <rect
123
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
124
+ id="rect8"
125
+ width="7.272728"
126
+ height="11.408763"
127
+ x="24.545458"
128
+ y="78.870033" />
129
+ <rect
130
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
131
+ id="rect9"
132
+ width="3.6363642"
133
+ height="7.8007298"
134
+ x="31.818186"
135
+ y="86.378426" />
136
+ <rect
137
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
138
+ id="rect9-0"
139
+ width="3.6363642"
140
+ height="7.8007298"
141
+ x="42.727276"
142
+ y="86.378433" />
143
+ <rect
144
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.999997;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
145
+ id="rect11"
146
+ width="7.272727"
147
+ height="3.6080317"
148
+ x="31.818186"
149
+ y="78.870033" />
150
+ <rect
151
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.999997;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
152
+ id="rect11-4"
153
+ width="7.272727"
154
+ height="3.6080317"
155
+ x="39.090912"
156
+ y="78.870033" />
157
+ <path
158
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999997;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
159
+ d="m 68.181821,90.278798 -7.272727,-3.900366 v 0 l 7.272726,-7.508396 z"
160
+ id="path11"
161
+ sodipodi:nodetypes="ccccc" />
162
+ <rect
163
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999997;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
164
+ id="rect12-9"
165
+ width="6.9679103"
166
+ height="3.9003553"
167
+ x="53.788776"
168
+ y="94.179153" />
169
+ <rect
170
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999997;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
171
+ id="rect12-9-9"
172
+ width="6.9679103"
173
+ height="3.9003553"
174
+ x="82.727272"
175
+ y="82.624237" />
176
+ <rect
177
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999997;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
178
+ id="rect12-9-9-9"
179
+ width="6.9679103"
180
+ height="3.9003553"
181
+ x="82.727272"
182
+ y="90.278801" />
183
+ <path
184
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.999997;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
185
+ d="m 53.636366,86.378432 0.15241,-7.508396 h 7.120316 z"
186
+ id="path12" />
187
+ </g>
188
+ </svg>
@@ -0,0 +1,43 @@
1
+ import { Graphics } from '../../core/graphics';
2
+ import { Audio } from '../../core/audio';
3
+ import { Input } from '../../core/input';
4
+ import { Timer } from '../../core/timer';
5
+ import { Keyboard } from '../../core/keyboard';
6
+ import { Mouse } from '../../core/mouse';
7
+ import { Gamepad } from '../../core/gamepad';
8
+ import type { CanvasConfig } from '../../core/canvas-config';
9
+ import type { Like2DEvent } from '../../core/events';
10
+ import type { Vector2 } from '../../core/vector2';
11
+ export { ImageHandle } from '../../core/graphics';
12
+ export { getGPName, GP } from '../../core/gamepad';
13
+ export { Vec2 } from '../../core/vector2';
14
+ export { Rect } from '../../core/rect';
15
+ export { calcFixedScale } from '../../core/canvas-config';
16
+ export declare let graphics: Graphics;
17
+ export declare const audio: Audio;
18
+ export declare const timer: Timer;
19
+ export declare let keyboard: Keyboard;
20
+ export declare let mouse: Mouse;
21
+ export declare let gamepad: Gamepad;
22
+ export declare let input: Input;
23
+ export declare const like: {
24
+ load: (() => void) | undefined;
25
+ update: ((dt: number) => void) | undefined;
26
+ draw: ((canvas: HTMLCanvasElement) => void) | undefined;
27
+ resize: ((size: Vector2, pixelSize: Vector2, fullscreen: boolean) => void) | undefined;
28
+ keypressed: ((scancode: string, keycode: string) => void) | undefined;
29
+ keyreleased: ((scancode: string, keycode: string) => void) | undefined;
30
+ mousepressed: ((x: number, y: number, button: number) => void) | undefined;
31
+ mousereleased: ((x: number, y: number, button: number) => void) | undefined;
32
+ gamepadpressed: ((i: number, b: number, n: string) => void) | undefined;
33
+ gamepadreleased: ((i: number, b: number, n: string) => void) | undefined;
34
+ actionpressed: ((action: string) => void) | undefined;
35
+ actionreleased: ((action: string) => void) | undefined;
36
+ handleEvent: ((event: Like2DEvent) => void) | undefined;
37
+ toggleFullscreen(): void;
38
+ setScaling(config: CanvasConfig): void;
39
+ init(container: HTMLElement): Promise<void>;
40
+ dispose(): void;
41
+ };
42
+ export { like as love };
43
+ //# sourceMappingURL=index.d.ts.map