Skip to content

Commit 8a292fe

Browse files
committed
23.2
1 parent c0ca0cf commit 8a292fe

File tree

8 files changed

+112
-88
lines changed

8 files changed

+112
-88
lines changed

demo/app.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ backdrop.height = app.view.height;
1818
backdrop.anchor = { x: 0, y: 0 };
1919
app.stage.addChild(backdrop);
2020

21-
const emitter = PIXI.Particles.from('/demo/assets/star.png', 250);
22-
emitter.life = app.view.width * 0.7071067812;
23-
emitter.direction = Math.PI * 1.5;
24-
emitter.spread = Math.PI;
21+
const emitter = PIXI.Particles.from('/demo/assets/star.png', 250, {
22+
life: app.view.width * 0.7071067812,
23+
direction: Math.PI * 1.5,
24+
spread: Math.PI,
25+
});
2526
emitter.x = app.view.width * 0.5;
2627
emitter.y = app.view.height;
27-
app.stage.addChild(emitter)
28+
app.stage.addChild(emitter);
2829

2930
let planet = new PIXI.Sprite(tex.planet);
3031
planet.anchor = { x: 0.5, y: 0.5 };

documentation.html

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,35 @@
99
<body>
1010
<header>ZephyrJS Documentation</header>
1111
<article>
12+
<br>
1213
<h1>How to Read the Documentation</h1>
13-
<p>Zephyr is designed to extend the functionality of <span id="compatibility" class="nightly">PixiJS</span>,
14-
rather
15-
than wrapping it so that you can always use Pixi without Zephyr.</p>
16-
<p>The <span class="return">Return</span> line below the function indicates the object type that is returned.
14+
<p><span class="warning">WARNINGS</span> are just general knowledge to be aware of when using a particular feature.</p>
15+
<p>Lines color coded as <span class="return">RETURN</span> below the function indicates the object type that is returned.
1716
</p>
18-
<p>The <span class="nightly">Nightly</span> features can only be found in the current nightly version of Zephyr.
17+
<p>Lines coded as <span class="nightly">NIGHTLY</span> can only be found in the current nightly version of Zephyr.
1918
Consider trying it out, and letting us know of any bugs you find!</p>
20-
<p>The <span class="deprecated">Deprecated</span> features are set to be removed in the next stable release.</p>
21-
<br>
19+
<p><span class="deprecated">DEPRECATED</span> lines specify features are set to be removed in the next stable release.</p>
2220
<h2>PIXI.Zephyr</h2>
2321
<dl>
2422
<dt>PIXI.Zephyr.useKeys()</dt>
23+
<dd><em>Enables <a href="#PIXI.Keys">PIXI.Keys</a></em></dd>
2524
<dd>Sets up the key tracking system for use</dd>
2625
<dt>PIXI.Zephyr.useMouse()</dt>
26+
<dd><em>Enables <a href="#PIXI.Mouse">PIXI.Mouse</a></em></dd>
2727
<dd>Sets up the mouse tracking system for use</dd>
2828
<dd><span class="warning">NOTE</span>: Please make sure you call PIXI.Mouse.setContainer() with an appended
2929
element afterward!</dd>
3030
<dt>PIXI.Zephyr.useAudio()</dt>
31+
<dd><em>Enables <a href="#PIXI.Audio">PIXI.Audio</a></em></dd>
3132
<dd>Sets up the WebAudio API for Pixi-style usage</dd>
3233
<dt>PIXI.Zephyr.useFile()</dt>
34+
<dd><em>Enables <a href="#PIXI.File">PIXI.File</a></em></dd>
3335
<dd>Sets up the File reading/writing system</dd>
34-
<dt class="nightly">PIXI.Zephyr.useParticles()</dt>
36+
<dt>PIXI.Zephyr.useParticles()</dt>
37+
<dd><em>Enables <a href="#PIXI.Particles">PIXI.Particles</a></em></dd>
3538
<dd>Sets up the Particle Emitter backend for Pixi-Style usage</dd>
3639
</dl>
37-
<br>
38-
<h2>PIXI.Keys</h2>
40+
<h2 id="PIXI.Keys">PIXI.Keys</h2>
3941
<p>keyName is a string that is returned by keyboardEvent.code. Check out the <a
4042
href="https://zephyrjs.netlify.app/keyname">Key Namer</a> to get specific key names.</p>
4143
<dl>
@@ -47,7 +49,6 @@ <h2>PIXI.Keys</h2>
4749
</dd>
4850
<dd class="return">Boolean</dd>
4951
</dl>
50-
<br>
5152
<h2 id="PIXI.Mouse">PIXI.Mouse</h2>
5253
<p>For button-related functions, the button names are 'Primary', 'Middle', and 'Secondary'</p>
5354
<dl>
@@ -74,38 +75,36 @@ <h2 id="PIXI.Mouse">PIXI.Mouse</h2>
7475
<dd>The last seen mouse Y coordinate, scaled to the mouseContainer vertically from top to bottom.</dd>
7576
<dd class="return">Number</dd>
7677
</dl>
77-
<br>
78-
<h2>PIXI.Audio</h2>
78+
<h2 id="PIXI.Audio">PIXI.Audio</h2>
7979
<dl>
8080
<dt>PIXI.Audio.from(src)</dt>
8181
<dd>Returns a "Pixi Audio" object. These can have .play() called on them to play their sound.</dd>
8282
<dd class="return">Pixi Audio object</dd>
8383
</dl>
84-
<br>
85-
<h2>PIXI.File</h2>
84+
<h2 id="PIXI.File">PIXI.File</h2>
8685
<dl>
8786
<dt>PIXI.File.write(object, fileName)</dt>
8887
<dd>Converts the passed object into JSON and prompting the user to download the resulting fileName.json</dd>
8988
<dt>PIXI.File.open()</dt>
9089
<dd>Prompts the user to select a file, which it then attempts to parse as JSON and return</dd>
9190
<dd class="return">Object</dd>
9291
</dl>
93-
<br>
94-
<h2 class="nightly">PIXI.Particles</h2>
92+
<h2 id="PIXI.Particles">PIXI.Particles</h2>
9593
<dl>
96-
<dt>PIXI.Particles.from(src, maxParticleCount)</dt>
94+
<dt>PIXI.Particles.from(src, maxParticleCount<em>, optionObject</em>)</dt>
9795
<dd>Returns a "PIXI Particle Emitter" which is a particleContainer with a built-in <strong>step()</strong>
9896
function to progress the animation. The different attributes of the container specify how the particles
9997
are emitted.</dd>
98+
<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>
10099
<dd class="return">Pixi Particle Emitter</dd>
101100
<dd>.life = how far the particles can move away from the emitter's location, in pixels (default 128)
102101
<br>.speed = quickly the particles move to their end of life distance (default 1)
103102
<br>.direction = specifies the direction (in radians) that the particles will move (default 0)
104-
<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)
103+
<br>.spread = the angle (in radians) of how closely particles should follow the direction. 0 is no
104+
deviation, 2 PI is in a full circle (default is 2 PI)
105105
<br>.step() = a shared function that moves and updates all particles
106106
</dd>
107107
</dl>
108-
<br>
109108
<h2>PIXI.collision</h2>
110109
<dl>
111110
<dt>PIXI.collision.aabb(Sprite, Sprite)</dt>
@@ -121,13 +120,11 @@ <h2>PIXI.collision</h2>
121120
</dd>
122121
<dd class="return">Boolean</dd>
123122
</dl>
124-
<br>
125123
<h2>PIXI.utils</h2>
126124
<dl>
127125
<dt>PIXI.utils.requestFullScreen(domElement)</dt>
128-
<dd>The element passed in (typically use the Application view) will attempt to go fullscreen</dd>
126+
<dd>The element passed in (typically the Application view) will attempt to go fullscreen</dd>
129127
</dl>
130-
<br>
131128
<h2>Added Functions</h2>
132129
<dl>
133130
<dt>PIXI.clamp(x, min, max)</dt>

index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ <h2>Why Zephyr?</h2>
4545
Simply call Zephyr's methods in your javascript to add webgl audio, mouse and keyboard control, and file io,
4646
and every piece you need is at your fingertips.</p>
4747

48-
<br>
4948
<h2 id="getting-started">Getting Started</h2>
5049
<p>The <a href="https://pixijs.io/guides/basics/getting-started.html" class="pixi">PixiJS Getting Started</a>
5150
guide is very good, there's really nothing to expand upon in it.</p>
@@ -65,7 +64,6 @@ <h2 id="getting-started">Getting Started</h2>
6564
Feel free to download the <a
6665
href="https://github.com/ZephyrJS-Project/ZephyrJS/raw/main/quickstart/bundle.zip">quickstart bundle</a>
6766
if you'd like!</p>
68-
<br>
6967
<h2>Looking to Help?</h2>
7068
<p>If you'd like to help out, there's a few ways that you can!</p>
7169
<dl>

keyName.html

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
<!DOCTYPE html><html lang="en"><head><title>ZephyrJS | Home</title><link rel="stylesheet" href="style.css"><style>input{display:block;margin:auto;line-height:64px;font-size:24px;color:#000;text-align: center}</style></head><body onkeydown="keyCodeGetter(event)"><input id="input" type="text" value="Type Here"><script>let input = document.getElementById("input");function keyCodeGetter(e) {input.value = e.code}</script></body></html>
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<title>ZephyrJS | Home</title>
6+
<link rel="stylesheet" href="style.css">
7+
<style>
8+
input {
9+
display: block;
10+
margin: auto;
11+
line-height: 64px;
12+
font-size: 24px;
13+
color: #000;
14+
text-align: center
15+
}
16+
</style>
17+
</head>
18+
19+
<body onkeydown="keyCodeGetter(event)"><input id="input" type="text" value="Type Here">
20+
<script>
21+
let input = document.getElementById("input");
22+
function keyCodeGetter(e) {
23+
e.preventDefault();
24+
input.value = e.code
25+
}
26+
</script>
27+
</body>
28+
29+
</html>

nightly/pixi.js

Lines changed: 51 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nightly/pixi.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nightly/zephyr.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ PIXI.Particles = {};
77
// ZEPHYR FUNCTIONALITY //
88

99
PIXI.Zephyr = {
10-
version: "ZephyrJS 23.1.31",
11-
compatible: "PixiJS v7.1.1",
10+
version: "ZephyrJS 23.2",
11+
compatible: "PixiJS v7.1.2",
1212
_spriteFix: (s) => { // Returns the actual x/y width/height of a scaled and anchored Sprite
1313
let w = s.width * (s.scale ? s.scale.x : 1);
1414
let h = s.height * (s.scale ? s.scale.y : 1);

style.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ html {
2727
font-family: Helvetica;
2828
}
2929

30-
body {
31-
padding-top: 48px;
30+
h1,h2 {
31+
padding-top: 64px;
3232
}
3333

3434
* {
@@ -146,7 +146,7 @@ a.button.pixi:hover {
146146
}
147147

148148
article {
149-
padding: 64px 0;
149+
padding-bottom: 64px;
150150
width: calc(100% - 128px);
151151
max-width: 1600px;
152152
margin: 0 auto;

0 commit comments

Comments
 (0)