gorlorn 1.0.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 +56 -0
- package/assets/bullet.png +0 -0
- package/assets/bullet_combo.png +0 -0
- package/assets/button_about.png +0 -0
- package/assets/button_play.png +0 -0
- package/assets/button_quit.png +0 -0
- package/assets/button_statistics.png +0 -0
- package/assets/death_text.png +0 -0
- package/assets/enemy.png +0 -0
- package/assets/heart.png +0 -0
- package/assets/hero.png +0 -0
- package/assets/left_button.png +0 -0
- package/assets/right_button.png +0 -0
- package/assets/space.png +0 -0
- package/assets/title.png +0 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1459 -0
- package/dist/index.mjs +1432 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# gorlorn
|
|
2
|
+
|
|
3
|
+
A browser-based arcade shooter game, packaged as a React component.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install gorlorn
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Peer Dependencies
|
|
12
|
+
|
|
13
|
+
- `react` ^18.0.0 || ^19.0.0
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { GorlornGame } from "gorlorn";
|
|
19
|
+
|
|
20
|
+
function App() {
|
|
21
|
+
return <GorlornGame />;
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Props
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Default | Description |
|
|
28
|
+
|------|------|---------|-------------|
|
|
29
|
+
| `assetBasePath` | `string` | `"/gorlorn"` | Base URL path where gorlorn image assets are served |
|
|
30
|
+
|
|
31
|
+
The component renders an 800x600 canvas that automatically scales to fit its container while preserving aspect ratio.
|
|
32
|
+
|
|
33
|
+
### Serving Assets
|
|
34
|
+
|
|
35
|
+
Copy the `assets/` folder from this package to your public directory so they are served at the configured `assetBasePath`:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cp -r node_modules/gorlorn/assets public/gorlorn
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Controls
|
|
42
|
+
|
|
43
|
+
- **Arrow keys** — move left/right
|
|
44
|
+
- **Pointer/touch** — on-screen controls
|
|
45
|
+
- **Escape** — pause/menu
|
|
46
|
+
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run dev # watch mode
|
|
51
|
+
npm run build # production build
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
MIT
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/enemy.png
ADDED
|
Binary file
|
package/assets/heart.png
ADDED
|
Binary file
|
package/assets/hero.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/space.png
ADDED
|
Binary file
|
package/assets/title.png
ADDED
|
Binary file
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface GorlornGameProps {
|
|
4
|
+
/** Base URL path where gorlorn image assets are served (default: "/gorlorn") */
|
|
5
|
+
assetBasePath?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function GorlornGame({ assetBasePath }?: GorlornGameProps): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { GorlornGame, type GorlornGameProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface GorlornGameProps {
|
|
4
|
+
/** Base URL path where gorlorn image assets are served (default: "/gorlorn") */
|
|
5
|
+
assetBasePath?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function GorlornGame({ assetBasePath }?: GorlornGameProps): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { GorlornGame, type GorlornGameProps };
|