PixiJS attempt
This commit is contained in:
parent
3bbeae4499
commit
024db742c8
6 changed files with 55609 additions and 1 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2025 FreedTapestry21
|
||||
Copyright (c) 2025 Bo Jordans
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
|
29
index.html
Normal file
29
index.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!-- hai :3 -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Her Purpose</title>
|
||||
<link rel="stylesheet" href="/src/style.css">
|
||||
<link rel="icon" type="image/x-icon" href="/src/logo.png">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1>Her Purpose</h1>
|
||||
</div>
|
||||
|
||||
<div class="window" id="game"></div>
|
||||
|
||||
<div>
|
||||
<p>Copyright (c) 2025 Bo Jordans</p>
|
||||
</div>
|
||||
|
||||
<!-- Imports assets -->
|
||||
<script src="/src/pixi.js"></script>
|
||||
<script src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
BIN
src/img/stella/back.png
Normal file
BIN
src/img/stella/back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 510 B |
25
src/main.js
Normal file
25
src/main.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Her Purpose
|
||||
* v1.0
|
||||
* Copyright (c) 2025 Bo Jordans
|
||||
*/
|
||||
|
||||
(async () => {
|
||||
const app = new PIXI.Application;
|
||||
await app.init({
|
||||
width: 640,
|
||||
height: 480,
|
||||
});
|
||||
|
||||
document.getElementById("game").appendChild(app.canvas);
|
||||
|
||||
const stellaBack = await PIXI.Assets.load('/src/img/stella/back.png');
|
||||
const stella = new PIXI.Sprite(stellaBack);
|
||||
|
||||
stella.anchor.set(0.5);
|
||||
stella.position.set(100, 100);
|
||||
stella.scale.set(2);
|
||||
|
||||
/* Here I wanted to add a keyboard event, that is before I realized that PixiJS is more a render library then a game engine.
|
||||
* I will go with Godot from here. */
|
||||
})();
|
55529
src/pixi.js
Normal file
55529
src/pixi.js
Normal file
File diff suppressed because one or more lines are too long
25
src/style.css
Normal file
25
src/style.css
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
*
|
||||
* Her Purpose
|
||||
* Version 1.0
|
||||
* Copyright (c) 2025 Bo Jordans
|
||||
*
|
||||
*/
|
||||
|
||||
/* Set text size for entire webpage */
|
||||
h1 {font-size: 32px;}
|
||||
p {font-size: 12px;}
|
||||
|
||||
body {
|
||||
font-family: "Noto sans";
|
||||
text-align: center;
|
||||
/* color: #E9F1F7; */
|
||||
/* background-color: #131B23; */
|
||||
color: #b4befe;
|
||||
background-color: #191724;
|
||||
}
|
||||
|
||||
.window {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue