Skip to content

Commit 08ac2d6

Browse files
committedFeb 1, 2023
23.2 MD
1 parent 378bab6 commit 08ac2d6

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed
 

‎README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
instructions, it only takes adding <strong>one line of code to add Zephyr</strong>. No more installing
1414
packages, no more trying to figure out which plugins you need, just add Zephyr and you're ready to go.
1515
Simply call Zephyr's methods in your javascript to add webgl audio, mouse and keyboard control, and file io,
16-
and every piece you need is at your fingertips.</p> <br> <h2 id="getting-started">Getting Started</h2> <p>The <a href="https://pixijs.io/guides/basics/getting-started.html" class="pixi">PixiJS Getting Started</a>
16+
and every piece you need is at your fingertips.</p> <h2 id="getting-started">Getting Started</h2> <p>The <a href="https://pixijs.io/guides/basics/getting-started.html" class="pixi">PixiJS Getting Started</a>
1717
guide is very good, there's really nothing to expand upon in it.</p> <p>When you are loading PixiJS, you have a couple options. Following the instructions on the linked page, is
1818
reliable, but for speed (and to be considerate to their servers), link our hosted, minified versions or <a
1919
href="https://github.com/ZephyrJS-Project/ZephyrJS/releases">download</a> it. Immediately after the
@@ -25,4 +25,4 @@
2525
are listed at the top of the <a href="documentation/">documentation</a>. After that, you're ready to go!
2626
Feel free to download the <a
2727
href="https://github.com/ZephyrJS-Project/ZephyrJS/raw/main/quickstart/bundle.zip">quickstart bundle</a>
28-
if you'd like!</p> <br> <h2>Looking to Help?</h2> <p>If you'd like to help out, there's a few ways that you can!</p> <dl> <dt>Bug Reports/Feature Requests</dt> <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> <dt>Usage Poll</dt> <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> <dt>Contribute Directly</dt> <dd>Code is always welcome, just I'd appreciate some communication beforehand, or VERY well documented code.</dd> <dd>I'm also looking for someone who is experienced with creating/maintaining NPM packages to extend Zephyr's reach!</dd> </dl> </article>
28+
if you'd like!</p> <h2>Looking to Help?</h2> <p>If you'd like to help out, there's a few ways that you can!</p> <dl> <dt>Bug Reports/Feature Requests</dt> <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> <dt>Usage Poll</dt> <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> <dt>Contribute Directly</dt> <dd>Code is always welcome, just I'd appreciate some communication beforehand, or VERY well documented code.</dd> <dd>I'm also looking for someone who is experienced with creating/maintaining NPM packages to extend Zephyr's reach!</dd> </dl> </article>

‎documentation/README.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
<article> <h1>How to Read the Documentation</h1> <p>Zephyr is designed to extend the functionality of <span id="compatibility" class="nightly">PixiJS</span>,
2-
rather
3-
than wrapping it so that you can always use Pixi without Zephyr.</p> <p>The <span class="return">Return</span> line below the function indicates the object type that is returned.
4-
</p> <p>The <span class="nightly">Nightly</span> features can only be found in the current nightly version of Zephyr.
5-
Consider trying it out, and letting us know of any bugs you find!</p> <p>The <span class="deprecated">Deprecated</span> features are set to be removed in the next stable release.</p> <br> <h2>PIXI.Zephyr</h2> <dl> <dt>PIXI.Zephyr.useKeys()</dt> <dd>Sets up the key tracking system for use</dd> <dt>PIXI.Zephyr.useMouse()</dt> <dd>Sets up the mouse tracking system for use</dd> <dd><span class="warning">NOTE</span>: Please make sure you call PIXI.Mouse.setContainer() with an appended
6-
element afterward!</dd> <dt>PIXI.Zephyr.useAudio()</dt> <dd>Sets up the WebAudio API for Pixi-style usage</dd> <dt>PIXI.Zephyr.useFile()</dt> <dd>Sets up the File reading/writing system</dd> </dl> <br> <h2>PIXI.Keys</h2> <p>keyName is a string that is returned by keyboardEvent.code. Check out the <a
1+
<article> <br> <h1>How to Read the Documentation</h1> <p><span class="warning">WARNINGS</span> are just general knowledge to be aware of when using a particular feature.</p> <p>Lines color coded as <span class="return">RETURN</span> below the function indicates the object type that is returned.
2+
</p> <p>Lines coded as <span class="nightly">NIGHTLY</span> can only be found in the current nightly version of Zephyr.
3+
Consider trying it out, and letting us know of any bugs you find!</p> <p><span class="deprecated">DEPRECATED</span> lines specify features are set to be removed in the next stable release.</p> <h2>PIXI.Zephyr</h2> <dl> <dt>PIXI.Zephyr.useKeys()</dt> <dd><em>Enables <a href="#PIXI.Keys">PIXI.Keys</a></em></dd> <dd>Sets up the key tracking system for use</dd> <dt>PIXI.Zephyr.useMouse()</dt> <dd><em>Enables <a href="#PIXI.Mouse">PIXI.Mouse</a></em></dd> <dd>Sets up the mouse tracking system for use</dd> <dd><span class="warning">NOTE</span>: Please make sure you call PIXI.Mouse.setContainer() with an appended
4+
element afterward!</dd> <dt>PIXI.Zephyr.useAudio()</dt> <dd><em>Enables <a href="#PIXI.Audio">PIXI.Audio</a></em></dd> <dd>Sets up the WebAudio API for Pixi-style usage</dd> <dt>PIXI.Zephyr.useFile()</dt> <dd><em>Enables <a href="#PIXI.File">PIXI.File</a></em></dd> <dd>Sets up the File reading/writing system</dd> <dt>PIXI.Zephyr.useParticles()</dt> <dd><em>Enables <a href="#PIXI.Particles">PIXI.Particles</a></em></dd> <dd>Sets up the Particle Emitter backend for Pixi-Style usage</dd> </dl> <h2 id="PIXI.Keys">PIXI.Keys</h2> <p>keyName is a string that is returned by keyboardEvent.code. Check out the <a
75
href="https://zephyrjs.netlify.app/keyname">Key Namer</a> to get specific key names.</p> <dl> <dt>PIXI.Keys.down(keyName)</dt> <dd>Returns true if the key is actively pressed down.</dd> <dd class="return">Boolean</dd> <dt>PIXI.Keys.fired(keyName)</dt> <dd>Returns true if this is the first time the key value has been accessed since the key has been pressed.
8-
</dd> <dd class="return">Boolean</dd> </dl> <br> <h2 id="PIXI.Mouse">PIXI.Mouse</h2> <p>For button-related functions, the button names are 'Primary', 'Middle', and 'Secondary'</p> <dl> <dt>PIXI.Mouse.setContainer(domElement)</dt> <dd>What the mouse’s coordinates should be scaled according to (Generally, this should be your Pixi
6+
</dd> <dd class="return">Boolean</dd> </dl> <h2 id="PIXI.Mouse">PIXI.Mouse</h2> <p>For button-related functions, the button names are 'Primary', 'Middle', and 'Secondary'</p> <dl> <dt>PIXI.Mouse.setContainer(domElement)</dt> <dd>What the mouse’s coordinates should be scaled according to (Generally, this should be your Pixi
97
app.view).
108
</dd> <dd class="warning"><strong>NOTE</strong>: Please ensure that this element has already been appended to the
119
DOM.
1210
As of version 23.1, calling this method with an unappended element will fail with a console error about
1311
using an "invalid element".</dd> <dt>PIXI.Mouse.down([mouse button])</dt> <dd>Returns true if the button is actively pressed down.</dd> <dd class="return">Boolean</dd> <dt>PIXI.Mouse.fired(mouseEvent.button)</dt> <dd>Returns true if this is the first time the button value has been accessed since the button has been
1412
pressed.
15-
</dd> <dd class="return">Boolean</dd> <dt>PIXI.Mouse.x</dt> <dd>The last seen mouse X coordinate, scaled to the mouseContainer horizontally from left to right.</dd> <dd class="return">Number</dd> <dt>PIXI.Mouse.y</dt> <dd>The last seen mouse Y coordinate, scaled to the mouseContainer vertically from top to bottom.</dd> <dd class="return">Number</dd> </dl> <br> <h2>PIXI.Audio</h2> <dl> <dt>PIXI.Audio.from(src)</dt> <dd>Returns a "Pixi Audio" object. These can have .play() called on them to play their sound.</dd> <dd class="return">Pixi Audio object</dd> </dl> <br> <h2>PIXI.File</h2> <dl> <dt>PIXI.File.write(object, fileName)</dt> <dd>Converts the passed object into JSON and prompting the user to download the resulting fileName.json</dd> <dt>PIXI.File.open()</dt> <dd>Prompts the user to select a file, which it then attempts to parse as JSON and return</dd> <dd class="return">Object</dd> </dl> <br> <h2>PIXI.Particles</h2> <dl> <dt>PIXI.Particles.from(src, maxParticleCount)</dt> <dd>Returns a "PIXI Particle Emitter" which is a particleContainer with a built-in <strong>step()</strong>
13+
</dd> <dd class="return">Boolean</dd> <dt>PIXI.Mouse.x</dt> <dd>The last seen mouse X coordinate, scaled to the mouseContainer horizontally from left to right.</dd> <dd class="return">Number</dd> <dt>PIXI.Mouse.y</dt> <dd>The last seen mouse Y coordinate, scaled to the mouseContainer vertically from top to bottom.</dd> <dd class="return">Number</dd> </dl> <h2 id="PIXI.Audio">PIXI.Audio</h2> <dl> <dt>PIXI.Audio.from(src)</dt> <dd>Returns a "Pixi Audio" object. These can have .play() called on them to play their sound.</dd> <dd class="return">Pixi Audio object</dd> </dl> <h2 id="PIXI.File">PIXI.File</h2> <dl> <dt>PIXI.File.write(object, fileName)</dt> <dd>Converts the passed object into JSON and prompting the user to download the resulting fileName.json</dd> <dt>PIXI.File.open()</dt> <dd>Prompts the user to select a file, which it then attempts to parse as JSON and return</dd> <dd class="return">Object</dd> </dl> <h2 id="PIXI.Particles">PIXI.Particles</h2> <dl> <dt>PIXI.Particles.from(src, maxParticleCount<em>, optionObject</em>)</dt> <dd>Returns a "PIXI Particle Emitter" which is a particleContainer with a built-in <strong>step()</strong>
1614
function to progress the animation. The different attributes of the container specify how the particles
17-
are emitted.</dd> <dd class="return">Pixi Particle Container
18-
<br>{
19-
<br>life: how far the particles can move away from the emitter's location, in pixels (default 128)
20-
<br>speed: quickly the particles move to their end of life distance (default 1)
21-
<br>direction: specifies the direction (in radians) that the particles will move (default 0)
22-
<br>spread: the angle (in radians) of how closely particles should follow the direction. 0 is no deviation, 2 PI is in a full circle (default is 2 PI)
23-
<br>step(): moves and updates all particles
24-
<br>}
25-
</dd> </dl> <br> <h2>PIXI.collision</h2> <dl> <dt>PIXI.collision.aabb(Sprite, Sprite)</dt> <dd>Checks if the two provided Sprites are colliding with the aabb algorithm - NOTE: Both a and b are
15+
are emitted.</dd> <dd>An object can optionally be passed in to specify life, speed, direction, and spread, where the attributes are the associated values, for example, {life: 30, speed: 0.5, direction: Math.PI, Math.PI * 0.5}.</dd> <dd class="return">Pixi Particle Emitter</dd> <dd>.life = how far the particles can move away from the emitter's location, in pixels (default 128)
16+
<br>.speed = quickly the particles move to their end of life distance (default 1)
17+
<br>.direction = specifies the direction (in radians) that the particles will move (default 0)
18+
<br>.spread = the angle (in radians) of how closely particles should follow the direction. 0 is no
19+
deviation, 2 PI is in a full circle (default is 2 PI)
20+
<br>.step() = a shared function that moves and updates all particles
21+
</dd> </dl> <h2>PIXI.collision</h2> <dl> <dt>PIXI.collision.aabb(Sprite, Sprite)</dt> <dd>Checks if the two provided Sprites are colliding with the aabb algorithm - NOTE: Both a and b are
2622
formatted
2723
as javascript objects with x, y, width, and height, and optionally anchor positions.</dd> <dd class="return">Boolean</dd> <dt>PIXI.collision.radius(Sprite, Sprite)</dt> <dd>Checks if the two provided Sprites are colliding with the standard point-radius method of circle
2824
collision -
2925
NOTE: Both a and b are formatted as javascript objects with x, y, and r, and optionally anchor
3026
positions.
31-
</dd> <dd class="return">Boolean</dd> </dl> <br> <h2>PIXI.utils</h2> <dl> <dt>PIXI.utils.requestFullScreen(domElement)</dt> <dd>The element passed in (typically use the Application view) will attempt to go fullscreen</dd> </dl> <br> <h2>Added Functions</h2> <dl> <dt>PIXI.clamp(x, min, max)</dt> <dd>Returns the value of x if it is between the bounds of min and max, or the closest bound if x is outside
27+
</dd> <dd class="return">Boolean</dd> </dl> <h2>PIXI.utils</h2> <dl> <dt>PIXI.utils.requestFullScreen(domElement)</dt> <dd>The element passed in (typically the Application view) will attempt to go fullscreen</dd> </dl> <h2>Added Functions</h2> <dl> <dt>PIXI.clamp(x, min, max)</dt> <dd>Returns the value of x if it is between the bounds of min and max, or the closest bound if x is outside
3228
</dd> <dd class="return">Number</dd> <dt>PIXI.mix(a, b, m)</dt> <dd>Linearly interpolate between values a and b</dd> <dd class="return">Number</dd> <dt>PIXI.rand(min, max)</dt> <dd>Generates a random integer between min and max, inclusive</dd> <dd class="return">Number</dd> </dl> </article>

0 commit comments

Comments
 (0)