-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
211 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,21 @@ | ||
import { useState } from 'react' | ||
import reactLogo from './assets/react.svg' | ||
import viteLogo from '/vite.svg' | ||
import './App.css' | ||
|
||
import { | ||
createWorld, | ||
Types, | ||
defineComponent, | ||
defineQuery, | ||
addEntity, | ||
addComponent, | ||
pipe | ||
} from 'bitecs' | ||
|
||
function App() { | ||
const [count, setCount] = useState(0) | ||
|
||
return ( | ||
return | ||
<> | ||
<div> | ||
<a href="https://vitejs.dev" target="_blank"> | ||
<img src={viteLogo} className="logo" alt="Vite logo" /> | ||
</a> | ||
<a href="https://react.dev" target="_blank"> | ||
<img src={reactLogo} className="logo react" alt="React logo" /> | ||
</a> | ||
</div> | ||
<h1>Vite + React</h1> | ||
<div className="card"> | ||
<button onClick={() => setCount((count) => count + 1)}> | ||
count is {count} | ||
</button> | ||
<p> | ||
Edit <code>src/App.tsx</code> and save to test HMR | ||
</p> | ||
</div> | ||
<p className="read-the-docs"> | ||
Click on the Vite and React logos to learn more | ||
</p> | ||
|
||
</> | ||
) | ||
} | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Sprite } from "pixi.js" | ||
|
||
/** | ||
* Here we declare a Sprite that can be attached to any 0.1x0.1m object | ||
* in the game world. A FullSprite is a 2d 1x1m object. | ||
*/ | ||
class AnchoredSprite extends Sprite { | ||
anchor: SpriteAnchor | ||
|
||
constructor(anchor: SpriteAnchor = { x: 0.5, y: 0.8 }) { | ||
this.anchor = anchor | ||
} | ||
} | ||
|
||
export interface SpriteAnchor { | ||
x: number | ||
y: number | ||
} | ||
|
||
export default AnchoredSprite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
class Background { | ||
|
||
} | ||
|
||
export default Background |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
import { Sprite } from "@pixi/react" | ||
|
||
class CharacterSplash { | ||
sprite: typeof Sprite | ||
|
||
constructor(sprite: typeof Sprite) { | ||
this.sprite = sprite | ||
} | ||
} | ||
|
||
export default CharacterSplash |
Empty file.
Oops, something went wrong.