Skip to content

Commit 2ab8a99

Browse files
committed
Documentation stuff
1 parent 43b0ecd commit 2ab8a99

File tree

18 files changed

+488
-27590
lines changed

18 files changed

+488
-27590
lines changed

README.md

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,20 @@
11
<div class="github">
2-
<p><a href="https://github.com/ZephyrStudio/ZephyrJS/blob/main/docs/STARTGUIDE.md">Getting Started Guide</a> | <a href="https://github.com/ZephyrStudio/ZephyrJS/blob/main/docs/CONTRIBUTE.md">Looking to help?</a> | <a href="https://github.com/ZephyrStudio/ZephyrJS/tree/main/docs/documentation">Documentation</a> | <a href="https://discord.gg/ncP4cdVztQ">Discord Server</a></p>
2+
<p><a href="https://github.com/ZephyrStudio/ZephyrJS/blob/main/docs/STARTGUIDE.md">Getting Started Guide</a> | <a href="https://github.com/ZephyrStudio/ZephyrJS/blob/main/docs/CONTRIBUTE.md">Looking to help?</a> | <a href="https://github.com/ZephyrStudio/ZephyrJS/tree/main/docs/documentation">Documentation</a> | <a href="https://discord.gg/NFXKE5kxXN">Discord Server</a></p>
33
</div>
44

5-
<p class="pixi">Compatible with PixiJS 7.2.4!</p>
5+
<p class="pixi">Compatible with any stack, tested with PixiJS 7.2.4</p>
66

7-
<h1>We've undergone some changes!</h1>
8-
<p>ZephyrJS is now under the official purview of <a href="https://zephyrstudios.pages.dev">Zephyr Studios</a>, our startup indie game studio launched from the original Zephyr Project team! We wanted a chance to flex our game design muscles with all of the work we've done with the project. So what does this mean?</p>
9-
10-
<p>Nothing has changed in the "behind the scenes" of Zephyr, it's still free and open source for all. We'll continue to build up ZephyrJS as we discover new features to add, and we'll eventually be building out into a less Pixi-specific system. <strong>We now also have a <a href="https://discord.gg/ncP4cdVztQ">Discord Server</a></strong> where you can show off what you're doing with Zephyr, ask questions, and much more!</p>
7+
<h1>What is ZephyrJS</h2>
8+
<p>ZephyrJS is a Free and Open Source Software (FOSS) javascript library that adds game-engine features like input handling, file io, audio and music, and more. There's tons of web renderers out there (we started with building with <a href="https://github.com/pixijs/pixijs">PixiJS</a>) so there's no sense reinventing the wheel. We provide what other libraries don't: a focus on commonly needed and often neglected (or poorly implemented) features. REGARDLESS of your graphics stack.</p>
119

12-
<p><strong>We're still here!</strong> PixiJS is undergoing some <a href="https://github.com/pixijs/pixijs/releases/tag/v8.0.0-alpha.0">BIG CHANGES</a> as of late, and working to keep up with the alpha development is taxing. We'll be back to our monthly release schedule once Pixi returns.</p>
10+
<p>The project is maintained by <a href="https://zephyrstudios.pages.dev/">Zephyr Studios</a>, which is a small but passionate indie development team. We test our work with ZephyrJS through actual game development and compatibility testing with PixiJS. Consider joining our <a href="https://discord.gg/NFXKE5kxXN">Discord Server</a> to keep up with ZephyrJS or our studio's projects!</p>
1311

12+
<h1>Zephyr is Open-Source</h1>
1413

15-
<h1>What is ZephyrJS?</h1>
16-
17-
<p>ZephyrJS is a Free and Open Source Software (FOSS) project that aims to provide <strong>a simple yet powerful expansion of <a href="https://github.com/pixijs/pixijs">PixiJS</a> for web game development, without wrapping</strong>. Since the team behind Pixi is devoted to making the fastest web renderer around, Zephyr adds onto it by supplying commonly used features such as:</p>
18-
<ul>
19-
<li>Efficient mouse and keyboard input tracking</li>
20-
<li>Easy-to-use implementation of the WebAudio API with volume/panning</li>
21-
<li>Fine-tunable particle emitters</li>
22-
</ul>
23-
<p>...and much more! Since Zephyr is an expansion (not a wrapper), every feature is written to feel right at home amongst PixiJS' other features, while you still have full access to all of Pixi</p>
24-
25-
<h2>Zephyr is Open-Source</h2>
26-
27-
<p>Because it makes sense: Zephyr is FOSS because Pixi is. It doesn't make sense to charge developers when they're creating their own projects, and why shouldn't they be able to tweak Zephyr to better fit their needs? Free and Open-Source Software (FOSS) is all about letting people choose what they want to use, and wrapping all of PixiJS just to add game development tools just hides the work of the team behind it. Zephyr <strong>adds</strong> functionality to PixiJS instead of wrapping it, allowing developers to work with the PixiJS they know and love while also letting them use fast and efficient game engine features.</p>
14+
<p>Zephyr is FOSS because there's no sense keeping it hidden. These are features that others could develop, and we value the ideas and contributions of others. It also doesn't make sense to slow down developers when they're creating their own projects, and they should be able to tweak Zephyr to better fit their needs. Free and Open-Source Software (FOSS) is about letting people choose what they want to use, and building a whole system just to add game development tools just dilutes the work of many talented teams building incredible renderers. Zephyr <strong>adds</strong> functionality to any stack instead of creating a new one, allowing developers to work with whatever system they know and love.</p>
2815

2916
<h1>Why Zephyr?</h1>
3017

31-
<p>Web-based content has been providing a way to access all sorts of entertainment, and being able to game on the web is the next step. While flash games existed in the past, browsers didn't have the kind of power to run full games. They do now though, and browsers have been able to directly leverage the available hardware to speed up rendering for some time now. PixiJS does this by using the WebGL API, letting anybody have access to the fast web renderer around.</p>
18+
<p>Web-based content has been providing a way to access all sorts of entertainment, and being able to game on the web is the next step. While flash games existed in the past, browsers didn't have the kind of power to run full games. They do now though, and browsers have been able to directly leverage the available hardware to speed up rendering for some time now. Many web renderers like PixiJS do this by using WebGL (and soon, <a href="https://github.com/pixijs/pixijs/releases/tag/v8.0.0-alpha.0">WebGPU</a>), letting anybody have access to speedy web renderers.</p>
3219

33-
<p>There are so many PixiJS game engine wrappers out there, but that's not Zephyr's goal. Pixi's team has provided incredible documentation and examples, so why re-engineer all of them? The ZephyrJS project adds the game engine features developers need, and doesn't touch what it shouldn't. Because of this, the Zephyr project only maintains documentation for its added features, meaning updates can get released faster while staying compatibile with the latest and greatest of versions of Pixi.</p>
20+
<p>There are so many WebGL renderers and wrappers out there, but that's not Zephyr's goal. Pixi's team and others have provided incredible documentation and examples, so why re-engineer them? ZephyrJS adds the game engine features developers need, and doesn't touch what it shouldn't. Because of this, the Zephyr project only maintains documentation for its added features, meaning updates can get released faster while staying compatibile with the latest and greatest in web technologies.</p>

docs/CONTRIBUTE.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
<p>If you'd like to help out, there's a few ways that you can!</p>
33
<dl>
44
<dt>Bug Reports/Feature Requests</dt>
5-
<dd>If you'd like to directly influence where I'll be focusing my efforts, <a href="https://github.com/ZephyrJS-Project/ZephyrJS/issues">submit an issue on Github</a>! It'll get added to the <a href="https://github.com/orgs/ZephyrJS-Project/projects/1">project board</a>, and you can track the progress there!</dd>
6-
<dt>Usage Poll</dt>
7-
<dd>For broader information, you can fill out <a href="https://forms.gle/hfR5pmJY9g51RPRL8">the usage poll</a>. It just has some general questions about PixiJS and should only take a couple minutes to fill out, but it is very useful.</dd>
5+
<dd>If you'd like to directly influence where I'll be focusing my efforts, <a href="https://github.com/ZephyrStudio/ZephyrJS/issues">submit an issue on Github</a>! It'll get added to the <a href="https://github.com/orgs/ZephyrStudio/projects/1">project board</a>, and you can track the progress there!</dd>
86
<dt>Contribute Directly</dt>
9-
<dd>Code is always welcome, just I'd appreciate some communication beforehand, or VERY well documented code. </dd>
10-
<dd>I'm also looking for someone who is experienced with creating/maintaining NPM packages to extend Zephyr's reach!</dd>
7+
<dd>Code is always welcome, we prefer to have communication beforehand, or VERY well documented code.</dd>
8+
<dd>We're also looking for someone who is experienced with creating/maintaining NPM packages to extend Zephyr's reach!</dd>
119
</dl>

docs/STARTGUIDE.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
<h1 id="getting-started">Getting Started</h1>
22

3-
<p>Selecting an appropriate version of Zephyr for your project is very important, and is the first thing you really have to do. Think about the scope of your project: if you're making a quick test that'll be done in a day or two, you're most likely good with just linking one of our hosted versions. If this is a larger project, consider downloading the version that works for you through the <a href="https://github.com/ZephyrJS-Project/ZephyrJS/releases">Github Releases</a> page.</p>
3+
<p>Selecting an appropriate version of Zephyr for your project is very important, and is the first thing you really have to do. Think about the scope of your project: if you're making a quick test that'll be done in a day or two, you're most likely good with just linking one of our hosted versions. If this is a larger project, consider downloading the version that works for you through the <a href="https://github.com/ZephyrStudio/ZephyrJS/releases">Github Releases</a> page.</p>
44

5-
<p>As of Zephyr 23.4.13, there's nothing you need to do to activate its features. Just link the needed files, and you're ready to go!</p>
5+
<p>That's it! All Zephyr features are automatically added, and you're ready to go.</p>
6+
7+
<h2>Standalone</h2>
8+
<p>If you already have your own stack in place, don't change a thing. Just add a script tag with Zephyr as the source, and it's ready to use.</p>
9+
10+
<code>&lt;script src="<strong class="zephyr">https://zephyrjs.pages.dev/src/zephyr.js</strong>"&gt;&lt;/script&gt;</code>
11+
12+
<p>If you <a href="https://raw.githubusercontent.com/ZephyrStudio/ZephyrJS/main/src/zephyr.js">download Zephyr</a> instead, replace the src of the script tag with the <strong class="bundle">path/to/zephyr.js</strong>.
613

714
<h2>The Bundle</h2>
815
<p>This is the easiest way to use Zephyr. Since Zephyr 23.4.13, we've distributed a version of Pixi and Zephyr combined and minified for ease of use.</p>
916

10-
<code>&lt;script src="<strong class="bundle">https://https://zephyrjs.pages.dev/bundle.js</strong>"&gt;&lt;/script&gt;</code>
17+
<code>&lt;script src="<strong class="bundle">https://zephyrjs.pages.dev/src/bundle.js</strong>"&gt;&lt;/script&gt;</code>
1118

12-
<p>If you <a href="https://raw.githubusercontent.com/ZephyrJS-Project/ZephyrJS/main/stable/bundle.js">download the bundle</a> instead, replace the src of the script tag with the <strong class="bundle">path/to/bundle.js</strong>.
19+
<p>If you <a href="https://raw.githubusercontent.com/ZephyrStudio/ZephyrJS/main/src/bundle.js">download the bundle</a> instead, replace the src of the script tag with the <strong class="bundle">path/to/bundle.js</strong>.
1320

1421
<h2>PIXI + Zephyr</h2>
1522
<p>If you're looking to keep Zephyr and Pixi separate (maybe you want to use a specific version combination of the two, etc), you can link each file independantly.</p>
1623

17-
<code>&lt;script src="<strong class="pixi">https://https://zephyrjs.pages.dev/pixi.js</strong>"&gt;&lt;/script&gt;<br>&lt;!-- Pixi must come before Zephyr --&gt;<br>&lt;script src="<strong class="zephyr">https://https://zephyrjs.pages.dev/zephyr.js</strong>"&gt;&lt;/script&gt;</code>
24+
<code>&lt;script src="<strong class="pixi">https://zephyrjs.pages.dev/pixi.js</strong>"&gt;&lt;/script&gt;<br>&lt;!-- Pixi must come before Zephyr --&gt;<br>&lt;script src="<strong class="zephyr">https://zephyrjs.pages.dev/zephyr.js</strong>"&gt;&lt;/script&gt;</code>
1825

19-
<p>If you <a href="https://raw.githubusercontent.com/ZephyrJS-Project/ZephyrJS/main/stable/pixi.js">download PixiJS</a> instead, replace the src of the script tag with the <strong class="pixi">path/to/pixi.js</strong>.</p>
20-
<p>Likewise with Zephyr, if you <a href="https://raw.githubusercontent.com/ZephyrJS-Project/ZephyrJS/main/stable/pixi.js">download ZephyrJS</a>, replace the src of the script tag with the <strong class="zephyr">path/to/zephyr.js</strong>.</p>
26+
<p>If you <a href="https://raw.githubusercontent.com/ZephyrStudio/ZephyrJS/main/src/pixi.js">download PixiJS</a> instead, replace the src of the script tag with the <strong class="pixi">path/to/pixi.js</strong>.</p>
27+
<p>Likewise, <a href="https://raw.githubusercontent.com/ZephyrStudio/ZephyrJS/main/src/pixi.js">download ZephyrJS</a> and replace the src of the script tag with the <strong class="zephyr">path/to/zephyr.js</strong>.</p>

docs/documentation/DirectAudio.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1>PIXI.DirectAudio</h1>
1+
<h1>ZEPHYR.DirectAudio</h1>
22
<p><strong>DirectAudio</strong> adds sound effects and music that you (the developer) can start/stop, set gain and pan, looping, speed, etc. Zephyr sets up an efficient WebAudio API backend, and only exposes useful features for the developer. Zephyr also processes audio files once and keeps the buffers in memory, so that audio is as responsive as possible.</p>
33

44
<p><pre><code>{
@@ -16,16 +16,16 @@
1616
<em>A standard DirectAudio Sprite.</em></p>
1717

1818
<dl>
19-
<dt>PIXI.DirectAudio.from(src)</dt>
19+
<dt>ZEPHYR.DirectAudio.from(src)</dt>
2020
<dd>Creates a DirectAudio object with the desired audio source. An example for this usage is below:
21-
<pre><code>let normalAttackSound = PIXI.DirectAudio.from('sfx/attack.wav', function () {
21+
<pre><code>let normalAttackSound = ZEPHYR.DirectAudio.from('sfx/attack.wav', function () {
2222
console.log("Normal attack loaded!");
2323
});</code></pre>
2424
</dd>
2525
<dd><strong class="return">RETURN </strong> A DirectAudio Sprite</dd>
26-
<dt>PIXI.DirectAudio.from(srcObject)</dt>
26+
<dt>ZEPHYR.DirectAudio.from(srcObject)</dt>
2727
<dd>Creates a DirectAudio object with the desired attributes. This can have any of the values of the standard DirectAudio Sprite shown above. An example for this usage is below:
28-
<pre><code>let heavyAttackSound = PIXI.DirectAudio.from({
28+
<pre><code>let heavyAttackSound = ZEPHYR.DirectAudio.from({
2929
src: 'sfx/attack.wav',
3030
gain: 1.2,
3131
speed: 0.8,

docs/documentation/File.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1>PIXI.File</h1>
1+
<h1>ZEPHYR.File</h1>
22
<p>Adds file writing/downloading/opening.</p>
33

44
<p><pre><code>{
@@ -10,24 +10,24 @@
1010
<em>Standard File structure.</em></p>
1111

1212
<dl>
13-
<dt>PIXI.File.write(content, <em>fileName</em>)</dt>
13+
<dt>ZEPHYR.File.write(content, <em>fileName</em>)</dt>
1414
<dd>Prompts the user to download a file <em>with the default fileName</em> with the provided text content. Example usage:
15-
<pre><code>PIXI.File.write("Hello, filesystem!");</code></pre>
15+
<pre><code>ZEPHYR.File.write("Hello, filesystem!");</code></pre>
1616
</dd>
1717
<dd><strong class="warning">NOTE </strong>The content parameter must be of the string type. Check out <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify">JSON.stringify()</a> for how to turn objects into strings.</dd>
18-
<dt>PIXI.File.open(<em>extension</em>, <em>onload</em>)</dt>
18+
<dt>ZEPHYR.File.open(<em>extension</em>, <em>onload</em>)</dt>
1919
<dd>Prompts the user to select a file of an optional type, with the additional option of setting a function to run when it is loaded. Example usage:
20-
<pre><code>let saveData = PIXI.File.open('*', function () {
20+
<pre><code>let saveData = ZEPHYR.File.open('*', function () {
2121
console.log(data.result);
2222
});</code></pre>
2323
</dd>
24-
<dd><strong class="return">RETURN </strong>A standard PIXI.File object</dd>
25-
<dt>PIXI.File.open(<em>optionObject</em>)</dt>
24+
<dd><strong class="return">RETURN </strong>A standard ZEPHYR.File object</dd>
25+
<dt>ZEPHYR.File.open(<em>optionObject</em>)</dt>
2626
<dd>Prompts the user to select a file, using any parameters specified in the optionObject. This optionObject should be in the format of the standard File structure. Example usage:
27-
<pre><code>let saveData = PIXI.File.open({
27+
<pre><code>let saveData = ZEPHYR.File.open({
2828
onload: function () { console.log(data.result),
2929
type: '*'
3030
});</code></pre>
3131
</dd>
32-
<dd><strong class="return">RETURN </strong>A standard PIXI.File object</dd>
32+
<dd><strong class="return">RETURN </strong>A standard ZEPHYR.File object</dd>
3333
</dl>

docs/documentation/Keys.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<h1>PIXI.Keys</h1>
2-
<p><strong>PIXI.Keys</strong> keeps track of user keyboard presses</p>
1+
<h1>ZEPHYR.Keys</h1>
2+
<p><strong>ZEPHYR.Keys</strong> keeps track of user keyboard presses</p>
33
<p><strong class="warning">NOTE </strong>keyName is a string that is returned by keyboardEvent.code. Check out the <a href="keyName.html">Key Namer</a> to get specific key names.</p>
44

55
<dl>
6-
<dt>PIXI.Keys.down(keyName)</dt>
6+
<dt>ZEPHYR.Keys.down(keyName)</dt>
77
<dd>Returns true if the key is actively pressed down.</dd>
88
<dd><strong class="return">RETURN </strong>Boolean</dd>
9-
<dt>PIXI.Keys.fired(keyName)</dt>
9+
<dt>ZEPHYR.Keys.fired(keyName)</dt>
1010
<dd>Returns true if this is the first time the key value has been accessed since the key has been pressed. </dd>
1111
<dd><strong class="return">RETURN </strong>Boolean</dd>
1212
</dl>

docs/documentation/Mouse.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
<h1>PIXI.Mouse</h1>
2-
<p><strong>PIXI.Mouse</strong> keeps track of the mouse position, as well as its buttons.</p>
1+
<h1>ZEPHYR.Mouse</h1>
2+
<p><strong>ZEPHYR.Mouse</strong> keeps track of the mouse position, as well as its buttons.</p>
33
<p><strong class="warning">NOTE </strong>For all "mouseButton" parameters, the button names are 'Primary' (typically left), 'Middle' (typically the scroll), and 'Secondary' (typically right)</p>
44

55
<dl>
6-
<dt>PIXI.Mouse.setContainer(domElement)</dt>
7-
<dd>What the mouse’s coordinates should be scaled according to (Generally, this should be your Pixi app.view).</dd>
6+
<dt>ZEPHYR.Mouse.setContainer(domElement)</dt>
7+
<dd>What the mouse’s coordinates should be scaled according to (Generally, this should be your app viewport).</dd>
88
<dd><strong class="warning">NOTE</strong> To get properly scaled mouse coordinates, this should be called as soon as your element is appended to the DOM.</dd>
9-
<dt>PIXI.Mouse.down(mouseButton)</dt>
9+
<dt>ZEPHYR.Mouse.down(mouseButton)</dt>
1010
<dd>Returns true if the button is actively pressed down.</dd>
1111
<dd class="return">Boolean</dd>
12-
<dt>PIXI.Mouse.fired(mouseButton)</dt>
12+
<dt>ZEPHYR.Mouse.fired(mouseButton)</dt>
1313
<dd>Returns true if this is the first time the button value has been accessed since the button has been pressed.</dd>
1414
<dd class="return">Boolean</dd>
15-
<dt>PIXI.Mouse.x</dt>
15+
<dt>ZEPHYR.Mouse.x</dt>
1616
<dd>The last seen mouse X coordinate, scaled to the mouseContainer horizontally from left to right.</dd>
1717
<dd class="return">Number</dd>
18-
<dt>PIXI.Mouse.y</dt>
18+
<dt>ZEPHYR.Mouse.y</dt>
1919
<dd>The last seen mouse Y coordinate, scaled to the mouseContainer vertically from top to bottom.</dd>
2020
<dd class="return">Number</dd>
2121
</dl>

0 commit comments

Comments
 (0)