Compare commits
No commits in common. "main" and "deployed" have entirely different histories.
36
.github/workflows/build.yml
vendored
@ -1,36 +0,0 @@
|
|||||||
name: Build and Deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '23.3.0' # Specify the Node.js version
|
|
||||||
|
|
||||||
# Step 3: Install dependencies and build
|
|
||||||
- name: Install Dependencies and Build
|
|
||||||
run: |
|
|
||||||
npm install
|
|
||||||
npm run build # Adjust to your build command
|
|
||||||
|
|
||||||
- name: Save commit id to file
|
|
||||||
run: echo "$(git rev-parse --short HEAD)" > dist/latest_commit
|
|
||||||
|
|
||||||
# Step 4: Deploy to GitHub Pages
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./dist # Replace with your build output directory
|
|
||||||
publish_branch: deployed # Deploy to the `gh-pages` branch
|
|
24
.gitignore
vendored
@ -1,24 +0,0 @@
|
|||||||
# Logs
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
pnpm-debug.log*
|
|
||||||
lerna-debug.log*
|
|
||||||
|
|
||||||
node_modules
|
|
||||||
dist
|
|
||||||
dist-ssr
|
|
||||||
*.local
|
|
||||||
|
|
||||||
# Editor directories and files
|
|
||||||
.vscode/*
|
|
||||||
!.vscode/extensions.json
|
|
||||||
.idea
|
|
||||||
.DS_Store
|
|
||||||
*.suo
|
|
||||||
*.ntvs*
|
|
||||||
*.njsproj
|
|
||||||
*.sln
|
|
||||||
*.sw?
|
|
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"trailingComma": "es5",
|
|
||||||
"tabWidth": 4,
|
|
||||||
"semi": true,
|
|
||||||
"singleQuote": true,
|
|
||||||
"printWidth": 120
|
|
||||||
}
|
|
18
README.md
@ -1,18 +0,0 @@
|
|||||||
# Bastion
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
Please read [setup](/docs/setup.md) to see how to setup a development environment or how to build and play.
|
|
||||||
You can click [here](https://bastion.overflow.fun) to play the latest build of main, published via CI/CD + Github Pages.
|
|
||||||
|
|
||||||
## Design
|
|
||||||
|
|
||||||
The [design document](/docs/design.md) contains the starting idea which was initially written for the game before discussing how to make it.
|
|
||||||
|
|
||||||
## Todos
|
|
||||||
|
|
||||||
Todos are available [here](/docs/todos.md) which contain self-made tasks which should get done or are already done.
|
|
||||||
|
|
||||||
## Extra documentation
|
|
||||||
|
|
||||||
Extra documentation is available [here](/docs)
|
|
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
311
assets/SharedSystems-Bu8-b11f.js
Normal file
156
assets/WebGLRenderer-B6t6FMSV.js
Normal file
41
assets/WebGPURenderer-BBLdxcb9.js
Normal file
1
assets/browserAll-B7E4lTU2.js
Normal file
31
assets/colorToUniform-BrndAOXx.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import{T as _,a as M,n as g}from"./index-C74jkVpW.js";const P={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},u=0,h=1,c=2,d=3,f=4,p=5,x=class b{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<u)}set blend(t){!!(this.data&1<<u)!==t&&(this.data^=1<<u)}get offsets(){return!!(this.data&1<<h)}set offsets(t){!!(this.data&1<<h)!==t&&(this.data^=1<<h)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<c)}set culling(t){!!(this.data&1<<c)!==t&&(this.data^=1<<c)}get depthTest(){return!!(this.data&1<<d)}set depthTest(t){!!(this.data&1<<d)!==t&&(this.data^=1<<d)}get depthMask(){return!!(this.data&1<<p)}set depthMask(t){!!(this.data&1<<p)!==t&&(this.data^=1<<p)}get clockwiseFrontFace(){return!!(this.data&1<<f)}set clockwiseFrontFace(t){!!(this.data&1<<f)!==t&&(this.data^=1<<f)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=P[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new b;return t.depthTest=!1,t.blend=!0,t}};x.default2d=x.for2d();let w=x,T=0;class S{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1}createTexture(t,o,e){const r=new _({...this.textureOptions,width:t,height:o,resolution:1,antialias:e,autoGarbageCollect:!0});return new M({source:r,label:`texturePool_${T++}`})}getOptimalTexture(t,o,e=1,r){let n=Math.ceil(t*e-1e-6),l=Math.ceil(o*e-1e-6);n=g(n),l=g(l);const a=(n<<17)+(l<<1)+(r?1:0);this._texturePool[a]||(this._texturePool[a]=[]);let s=this._texturePool[a].pop();return s||(s=this.createTexture(n,l,r)),s.source._resolution=e,s.source.width=n/e,s.source.height=l/e,s.source.pixelWidth=n,s.source.pixelHeight=l,s.frame.x=0,s.frame.y=0,s.frame.width=t,s.frame.height=o,s.updateUvs(),this._poolKeyHash[s.uid]=a,s}getSameSizeTexture(t,o=!1){const e=t.source;return this.getOptimalTexture(t.width,t.height,e._resolution,o)}returnTexture(t){const o=this._poolKeyHash[t.uid];this._texturePool[o].push(t)}clear(t){if(t=t!==!1,t)for(const o in this._texturePool){const e=this._texturePool[o];if(e)for(let r=0;r<e.length;r++)e[r].destroy(!0)}this._texturePool={}}}const k=new S,m={name:"local-uniform-bit",vertex:{header:`
|
||||||
|
|
||||||
|
struct LocalUniforms {
|
||||||
|
uTransformMatrix:mat3x3<f32>,
|
||||||
|
uColor:vec4<f32>,
|
||||||
|
uRound:f32,
|
||||||
|
}
|
||||||
|
|
||||||
|
@group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;
|
||||||
|
`,main:`
|
||||||
|
vColor *= localUniforms.uColor;
|
||||||
|
modelMatrix *= localUniforms.uTransformMatrix;
|
||||||
|
`,end:`
|
||||||
|
if(localUniforms.uRound == 1)
|
||||||
|
{
|
||||||
|
vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
||||||
|
}
|
||||||
|
`}},F={...m,vertex:{...m.vertex,header:m.vertex.header.replace("group(1)","group(2)")}},O={name:"local-uniform-bit",vertex:{header:`
|
||||||
|
|
||||||
|
uniform mat3 uTransformMatrix;
|
||||||
|
uniform vec4 uColor;
|
||||||
|
uniform float uRound;
|
||||||
|
`,main:`
|
||||||
|
vColor *= uColor;
|
||||||
|
modelMatrix = uTransformMatrix;
|
||||||
|
`,end:`
|
||||||
|
if(uRound == 1.)
|
||||||
|
{
|
||||||
|
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
||||||
|
}
|
||||||
|
`}};class U{constructor(){this.batcherName="default",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}}function v(i,t,o){const e=(i>>24&255)/255;t[o++]=(i&255)/255*e,t[o++]=(i>>8&255)/255*e,t[o++]=(i>>16&255)/255*e,t[o++]=e}export{U as B,w as S,k as T,m as a,O as b,v as c,F as l};
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 296 KiB After Width: | Height: | Size: 296 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 851 KiB After Width: | Height: | Size: 851 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 267 KiB After Width: | Height: | Size: 267 KiB |
298
assets/index-C74jkVpW.js
Normal file
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 183 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |