Skip to content

Commit

Permalink
1.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quinton-ashley committed Dec 7, 2024
1 parent dc48aad commit 563e264
Show file tree
Hide file tree
Showing 47 changed files with 1,053 additions and 670 deletions.
46 changes: 0 additions & 46 deletions LICENSING.md

This file was deleted.

12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ dev

## Licensing

See the [LICENSING.md][] file.
p5play software is multi-licensed for use under the p5play Personal License, p5play Educational License, and p5play Professional License.

Typical use of p5play by educators and commercial game developers requires a proprietary license. See the [Pro][] and [Teach][] pages for more information.

q5.js is LGPLv3 licensed. The Ace editor is BSD-3-Clause licensed. planck and marked are MIT licensed.

The example code and non-logo images shown in the mini editors on the p5play website are public domain works licensed under the CC0 license. You are free to copy and modify them for use in your own projects without attribution.

Everything else in this repository, "p5play-web", is owned by Quinton Ashley, all rights reserved. This content and its source is publicly available, but you may not copy the content to a greater extent than fair use allows.

## Credits

Expand Down Expand Up @@ -135,3 +143,5 @@ https://www.pexels.com/video/skater-girl-meeting-with-her-friends-5200356/
[p5play project planning page]: https://github.com/users/quinton-ashley/projects/5
[mie]: https://github.com/quinton-ashley/mie
[translations]: /lang/instructions.md
[Pro]: https://p5play.org/pro/
[Teach]: https://p5play.org/teach/
14 changes: 7 additions & 7 deletions docs/-_Contros.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/-_KeyBoard.html

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/-_Mouse.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/-_SpriteMouse.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/-_Touch.html

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions docs/Ani.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/Anis.html

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions docs/Camera.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/Canvas.html

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions docs/Contro.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/DistanceJoint.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/GlueJoint.html

Large diffs are not rendered by default.

157 changes: 118 additions & 39 deletions docs/Group.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/GroupSprite.html

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/HingeJoint.html

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/InputDevice.html

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions docs/Joint.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/P5Play.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/RopeJoint.html

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/SliderJoint.html

Large diffs are not rendered by default.

260 changes: 117 additions & 143 deletions docs/Sprite.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/Subgroup.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/Tiles.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/WheelJoint.html

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions docs/World.html

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions docs/global.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html

Large diffs are not rendered by default.

225 changes: 125 additions & 100 deletions docs/p5play.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lang/en/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"Draw and Update"
],
"input": ["Detecting Input", "Keyboard", "Mouse", "Sprite Mouse", "Game Controllers", "Touch"],
"joints": ["GlueJoint", "DistanceJoint", "WheelJoint", "HingeJoint", "SliderJoint"],
"joints": ["GlueJoint", "DistanceJoint", "WheelJoint", "HingeJoint", "SliderJoint", "GrabberJoint"],
"sound": ["Using Sounds"],
"sprite": [
"Basic Properties",
Expand Down
16 changes: 16 additions & 0 deletions lang/en/learn/joints.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,19 @@ The joint's `range` determines how far apart the connected sprites can be from e
By default the joint's motor is enabled with a `speed` of 0, so `maxPower` determines how much the joint can resist sliding.

Try dropping boxes on the scale by clicking with your mouse. How many boxes can you stack on the scale before it reaches its limit? Try changing its angle too.

# 5-0

## GrabberJoint

Grab sprites and move them with a max force towards a target position using a `GrabberJoint`.

Try clicking and dragging sprites around the canvas in this example.

Note the use of `world.getSpriteAt` to get the sprite at the mouse position, if any.

Continuously set the `target` property to move the sprite towards a target position. This can be any object with x and y properties.

Remove the joint to release the sprite that was grabbed.

Try changing `maxForce` from the default value of 1000.
2 changes: 1 addition & 1 deletion lang/es/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"Dibujar y actualizar"
],
"input": ["Detección de Entrada", "Teclado", "Ratón", "Ratón de Sprite", "Controladores de Juego", "Táctil"],
"joints": ["pegamento", "distancia", "rueda", "bisagra", "deslizador"],
"joints": ["pegamento", "distancia", "rueda", "bisagra", "deslizador", "agarrador"],
"sound": ["Usando sonidos"],
"sprite": [
"Propiedades Básicas",
Expand Down
54 changes: 49 additions & 5 deletions lang/es/learn/joints.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ <h2 id="distancejoint">DistanceJoint</h2>
</p>
</md>
<script type="mie/p5" id="paddle-ball" lines="14">
let sA, sB, j;
let spA, spB, j;
function setup() {
new Canvas(500, 500);
world.gravity.y = 10;

sA = new Sprite(250, 0, 300, 20, 'k');
sB = new Sprite(200, 20, 40);
spA = new Sprite(250, 0, 300, 20, 'k');
spB = new Sprite(200, 20, 40);

j = new DistanceJoint(sA, sB);
j = new DistanceJoint(spA, spB);
j.offsetA.y = 10;
j.collideConnected = true;

Expand All @@ -133,7 +133,7 @@ <h2 id="distancejoint">DistanceJoint</h2>

function draw() {
clear();
sA.moveTowards(mouse);
spA.moveTowards(mouse);
}
</script>
</div>
Expand Down Expand Up @@ -266,6 +266,49 @@ <h2 id="sliderjoint">SliderJoint</h2>

</script>
</div>
<div id="page-5" class="page">
<md id="md5-0">
<h2 id="grabberjoint">GrabberJoint</h2>
<p>Agarra sprites y muévelos con una fuerza máxima hacia una posición objetivo usando un
<code>GrabberJoint</code>.</p>
<p>Intenta hacer clic y arrastrar sprites por el lienzo en este ejemplo.</p>
<p>Ten en cuenta el uso de <code>world.getSpriteAt</code> para obtener el sprite en la posición del
ratón, si existe.</p>
<p>Establece continuamente la propiedad <code>target</code> para mover el sprite hacia una posición
objetivo. Esto puede ser cualquier objeto con propiedades x e y.</p>
<p>Elimina el joint para soltar el sprite que fue agarrado.</p>
<p>Intenta cambiar <code>maxForce</code> desde su valor predeterminado de 1000.</p>
</md>
<script type="mie/p5" id="grab and throw">
let j;

function setup() {
new Canvas(500, 400);
world.gravity.y = 10;
new Sprite(250, 390, 400, 10, 's');
}

function draw() {
background(200);

if (frameCount % 10 == 0) {
new Sprite(random(canvas.w), 0, 30, 30);
}

if (mouse.presses()) {
let s = world.getSpriteAt(mouse);
if (s) {
j = new GrabberJoint(s);
j.maxForce = 1000;
}
}

if (mouse.pressing() && j) j.target = mouse;

if (mouse.released() && j) j.remove();
}
</script>
</div>

<div class="break"></div>
<div id="toc">
Expand All @@ -276,6 +319,7 @@ <h2 id="sliderjoint">SliderJoint</h2>
<a data-page="2" href="joints.html?page=2">rueda</a>
<a data-page="3" href="joints.html?page=3">bisagra</a>
<a data-page="4" href="joints.html?page=4">deslizador</a>
<a data-page="5" href="joints.html?page=5">agarrador</a>
</div>
<a id="nextPage" class="navLink">Siguiente página</a>
</div>
Expand Down
16 changes: 16 additions & 0 deletions lang/es/learn/joints.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,19 @@ El `range` (rango) de la articulación determina cuán separados pueden estar lo
Por defecto, el motor de la articulación está activado con una `speed` (velocidad) de 0, por lo que `maxPower` (poder maximo) determina cuánto puede resistir la articulación al deslizamiento.

Prueba soltar cajas en la balanza haciendo clic con el ratón. ¿Cuántas cajas puedes apilar en la balanza antes de que alcance su límite? Intenta cambiar su ángulo también.

# 5-0

## GrabberJoint

Agarra sprites y muévelos con una fuerza máxima hacia una posición objetivo usando un `GrabberJoint`.

Intenta hacer clic y arrastrar sprites por el lienzo en este ejemplo.

Ten en cuenta el uso de `world.getSpriteAt` para obtener el sprite en la posición del ratón, si existe.

Establece continuamente la propiedad `target` para mover el sprite hacia una posición objetivo. Esto puede ser cualquier objeto con propiedades x e y.

Elimina el joint para soltar el sprite que fue agarrado.

Intenta cambiar `maxForce` desde su valor predeterminado de 1000.
9 changes: 8 additions & 1 deletion lang/ja/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@
"グループの描画と画面更新"
],
"input": ["入力の検知", "キーボード", "マウス", "スプライトマウス", "ゲームコントローラー", "タッチ"],
"joints": ["グルージョイント", "ディスタンスジョイント", "ホイールジョイント", "ヒンジジョイント", "スライダージョイント"],
"joints": [
"グルージョイント",
"ディスタンスジョイント",
"ホイールジョイント",
"ヒンジジョイント",
"スライダージョイント",
"グラバージョイント"
],
"sound": ["サウンド"],
"sprite": [
"基本的なプロパティ",
Expand Down
51 changes: 46 additions & 5 deletions lang/ja/learn/joints.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ <h2 id="ディスタンスジョイント">ディスタンスジョイント</h2
<p><code>collideConnected</code> を true に設定して、接続されたスプライトが互いに衝突するようにします。</p>
</md>
<script type="mie/p5" id="paddle-ball" lines="14">
let sA, sB, j;
let spA, spB, j;
function setup() {
new Canvas(500, 500);
world.gravity.y = 10;

sA = new Sprite(250, 0, 300, 20, 'k');
sB = new Sprite(200, 20, 40);
spA = new Sprite(250, 0, 300, 20, 'k');
spB = new Sprite(200, 20, 40);

j = new DistanceJoint(sA, sB);
j = new DistanceJoint(spA, spB);
j.offsetA.y = 10;
j.collideConnected = true;

Expand All @@ -129,7 +129,7 @@ <h2 id="ディスタンスジョイント">ディスタンスジョイント</h2

function draw() {
clear();
sA.moveTowards(mouse);
spA.moveTowards(mouse);
}
</script>
</div>
Expand Down Expand Up @@ -252,6 +252,46 @@ <h2 id="スライダージョイント">スライダージョイント</h2>

</script>
</div>
<div id="page-5" class="page">
<md id="md5-0">
<h2 id="grabberjoint">GrabberJoint</h2>
<p><code>GrabberJoint</code>を使用して、スプライトを掴んで最大の力で目標位置まで移動させることができます。</p>
<p>この例では、スプライトをクリックしてドラッグしてみましょう。</p>
<p>マウス位置にあるスプライトを取得するために<code>world.getSpriteAt</code>を使用していることに注目してください。</p>
<p>スプライトを目標位置に移動させるために、継続的に<code>target</code>プロパティを設定します。これは x と y のプロパティを持つどのようなオブジェクトでも可能です。</p>
<p>掴んだスプライトを解放するには、ジョイントを削除します。</p>
<p>デフォルト値 1000 から<code>maxForce</code>を変更してみましょう。</p>
</md>
<script type="mie/p5" id="grab and throw">
let j;

function setup() {
new Canvas(500, 400);
world.gravity.y = 10;
new Sprite(250, 390, 400, 10, 's');
}

function draw() {
background(200);

if (frameCount % 10 == 0) {
new Sprite(random(canvas.w), 0, 30, 30);
}

if (mouse.presses()) {
let s = world.getSpriteAt(mouse);
if (s) {
j = new GrabberJoint(s);
j.maxForce = 1000;
}
}

if (mouse.pressing() && j) j.target = mouse;

if (mouse.released() && j) j.remove();
}
</script>
</div>

<div class="break"></div>
<div id="toc">
Expand All @@ -262,6 +302,7 @@ <h2 id="スライダージョイント">スライダージョイント</h2>
<a data-page="2" href="joints.html?page=2">ホイールジョイント</a>
<a data-page="3" href="joints.html?page=3">ヒンジジョイント</a>
<a data-page="4" href="joints.html?page=4">スライダージョイント</a>
<a data-page="5" href="joints.html?page=5">グラバージョイント</a>
</div>
<a id="nextPage" class="navLink">次へ</a>
</div>
Expand Down
16 changes: 16 additions & 0 deletions lang/ja/learn/joints.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,19 @@ Joint はコンストラクタ引数として、 2 つのスプライトを受
デフォルトでは、このジョイントのモーターは有効で、 `speed` は 0 です。 `maxPower` は、このジョイントがスライドにどれだけ抵抗できるかを決定します。

コードサンプルでマウスをクリックし、ばね秤に箱を落としてみてください。ばね秤が限界に達するまでに、あなたは箱をいくつ積み重ねることができるでしょうか? angle を変えることも試してくださいね。

# 5-0

## GrabberJoint

`GrabberJoint`を使用して、スプライトを掴んで最大の力で目標位置まで移動させることができます。

この例では、スプライトをクリックしてドラッグしてみましょう。

マウス位置にあるスプライトを取得するために`world.getSpriteAt`を使用していることに注目してください。

スプライトを目標位置に移動させるために、継続的に`target`プロパティを設定します。これは x と y のプロパティを持つどのようなオブジェクトでも可能です。

掴んだスプライトを解放するには、ジョイントを削除します。

デフォルト値 1000 から`maxForce`を変更してみましょう。
Loading

0 comments on commit 563e264

Please sign in to comment.