Skip to content

Commit

Permalink
1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
quinton-ashley committed Jul 24, 2023
1 parent 3ed6f8c commit bf2e886
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 76 deletions.
4 changes: 3 additions & 1 deletion lang/en/learn/sprite.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,11 @@ Note that inside the sprite's draw function the center of the sprite is translat

This mini example rotates the sprite's ellipse to the direction it's moving and makes the ellipse stretch in that direction proportional to it's speed. Kind of complicated!

# 12-1

## Custom Update

You can also define a custom update function for a sprite that runs at the end of the draw loop or when updateSprites is called. You can put any sprite specific behavior you want in there.
You can also define a custom `update` function for a sprite that runs at the end of the draw loop or when updateSprites is called. You can put any sprite specific behavior you want in there.

# 13-0

Expand Down
60 changes: 33 additions & 27 deletions lang/es/learn/sprite.html
Original file line number Diff line number Diff line change
Expand Up @@ -1608,33 +1608,39 @@
</script>
</div>
<div id="page-12" class="page">
<md id="md12-0"><h2 id="dibujo-personalizado">Dibujo personalizado</h2>
<p>
A veces no podrás usar animaciones predibujadas para obtener el tipo
de efecto visual que quieres para un sprite en movimiento.
</p>
<p>
Afortunadamente, puedes personalizar la función
<code>draw</code> del sprite y hacer que muestre cualquier cosa que
quieras!
</p>
<p>
Ten en cuenta que dentro de la función de dibujo del sprite, el
centro del sprite se traduce a la posición (0, 0).
</p>
<p>
Este mini ejemplo rota la elipse del sprite en la dirección en la
que se está moviendo y hace que la elipse se estire en esa dirección
proporcionalmente a su velocidad. ¡Un poco complicado!
</p>
<h2 id="actualización-personalizada">Actualización personalizada</h2>
<p>
También puedes definir una función de actualización personalizada
para un sprite que se ejecuta al final del bucle de dibujo o cuando
se llama a updateSprites. Puedes poner cualquier comportamiento
específico del sprite que quieras allí.
</p>
</md>
<div class="minis horiz">
<md id="md12-0"><h2 id="dibujo-personalizado">Dibujo personalizado</h2>
<p>
A veces no podrás usar animaciones predibujadas para obtener el
tipo de efecto visual que quieres para un sprite en movimiento.
</p>
<p>
Afortunadamente, puedes personalizar la función
<code>draw</code> del sprite y hacer que muestre cualquier cosa
que quieras!
</p>
<p>
Ten en cuenta que dentro de la función de dibujo del sprite, el
centro del sprite se traduce a la posición (0, 0).
</p>
<p>
Este mini ejemplo rota la elipse del sprite en la dirección en la
que se está moviendo y hace que la elipse se estire en esa
dirección proporcionalmente a su velocidad. ¡Un poco complicado!
</p>
</md>
<md id="md12-1"><h2 id="actualización-personalizada">
Actualización personalizada
</h2>
<p>
También puedes definir una función <code>update</code> de
actualización personalizada para un sprite que se ejecuta al final
del bucle de dibujo o cuando se llama a updateSprites. Puedes
poner cualquier comportamiento específico del sprite que quieras
allí.
</p>
</md>
</div>
<script type="mie/p5" id="custom-draw">
let face, stretchy;

Expand Down
4 changes: 3 additions & 1 deletion lang/es/learn/sprite.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,11 @@ Ten en cuenta que dentro de la función de dibujo del sprite, el centro del spri

Este mini ejemplo rota la elipse del sprite en la dirección en la que se está moviendo y hace que la elipse se estire en esa dirección proporcionalmente a su velocidad. ¡Un poco complicado!

# 12-1

## Actualización personalizada

También puedes definir una función de actualización personalizada para un sprite que se ejecuta al final del bucle de dibujo o cuando se llama a updateSprites. Puedes poner cualquier comportamiento específico del sprite que quieras allí.
También puedes definir una función `update` de actualización personalizada para un sprite que se ejecuta al final del bucle de dibujo o cuando se llama a updateSprites. Puedes poner cualquier comportamiento específico del sprite que quieras allí.

# 13-0

Expand Down
44 changes: 24 additions & 20 deletions lang/ja/learn/sprite.html
Original file line number Diff line number Diff line change
Expand Up @@ -1502,26 +1502,30 @@
</script>
</div>
<div id="page-12" class="page">
<md id="md12-0"><h2 id="カスタム描画">カスタム描画</h2>
<p>
スプライトの動きに対して求める視覚効果を得るために、事前に描かれたアニメーションを使用できない場合があります。
</p>
<p>
幸いなことに、スプライトの<code>draw</code>関数をカスタマイズして、任意の表示を行うことができます!
</p>
<p>
スプライトの draw 関数内部では、スプライトの中心が位置(0,
0)に移動されることに注意してください。
</p>
<p>
このミニ例では、スプライトの楕円を移動方向に回転させ、その方向に比例して楕円を伸ばします。これはちょっと複雑です!
</p>
<h2 id="カスタムアップデート">カスタムアップデート</h2>
<p>
また、描画ループの終わりまたは updateSprites
が呼ばれたときに実行されるスプライトのカスタムアップデート関数を定義することもできます。そこには、任意のスプライト固有の振る舞いを入れることができます。
</p>
</md>
<div class="minis horiz">
<md id="md12-0"><h2 id="カスタム描画">カスタム描画</h2>
<p>
スプライトの動きに対して求める視覚効果を得るために、事前に描かれたアニメーションを使用できない場合があります。
</p>
<p>
幸いなことに、スプライトの<code>draw</code>関数をカスタマイズして、任意の表示を行うことができます!
</p>
<p>
スプライトの draw 関数内部では、スプライトの中心が位置(0,
0)に移動されることに注意してください。
</p>
<p>
このミニ例では、スプライトの楕円を移動方向に回転させ、その方向に比例して楕円を伸ばします。これはちょっと複雑です!
</p>
</md>
<md id="md12-1"><h2 id="カスタムアップデート">カスタムアップデート</h2>
<p>
また、描画ループの終わりまたは
<code>update</code>
が呼ばれたときに実行されるスプライトのカスタムアップデート関数を定義することもできます。そこには、任意のスプライト固有の振る舞いを入れることができます。
</p>
</md>
</div>
<script type="mie/p5" id="custom-draw">
let face, stretchy;

Expand Down
4 changes: 3 additions & 1 deletion lang/ja/learn/sprite.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,11 @@ line モードのチェインの(x, y)位置は、全ての頂点の平均に位

このミニ例では、スプライトの楕円を移動方向に回転させ、その方向に比例して楕円を伸ばします。これはちょっと複雑です!

# 12-1

## カスタムアップデート

また、描画ループの終わりまたは updateSprites が呼ばれたときに実行されるスプライトのカスタムアップデート関数を定義することもできます。そこには、任意のスプライト固有の振る舞いを入れることができます。
また、描画ループの終わりまたは `update` が呼ばれたときに実行されるスプライトのカスタムアップデート関数を定義することもできます。そこには、任意のスプライト固有の振る舞いを入れることができます。

# 13-0

Expand Down
54 changes: 29 additions & 25 deletions learn/sprite.html
Original file line number Diff line number Diff line change
Expand Up @@ -1586,31 +1586,35 @@
</script>
</div>
<div id="page-12" class="page">
<md id="md12-0"><h2 id="custom-draw">Custom draw</h2>
<p>
Sometimes you won't be able to use pre-drawn animations to get the
kind of visual effect you want for a sprite in motion.
</p>
<p>
Fortunately, you can customize the sprite's
<code>draw</code> function and make it display anything you want!
</p>
<p>
Note that inside the sprite's draw function the center of the sprite
is translated to position (0, 0).
</p>
<p>
This mini example rotates the sprite's ellipse to the direction it's
moving and makes the ellipse stretch in that direction proportional
to it's speed. Kind of complicated!
</p>
<h2 id="custom-update">Custom Update</h2>
<p>
You can also define a custom update function for a sprite that runs
at the end of the draw loop or when updateSprites is called. You can
put any sprite specific behavior you want in there.
</p>
</md>
<div class="minis horiz">
<md id="md12-0"><h2 id="custom-draw">Custom draw</h2>
<p>
Sometimes you won't be able to use pre-drawn animations to get the
kind of visual effect you want for a sprite in motion.
</p>
<p>
Fortunately, you can customize the sprite's
<code>draw</code> function and make it display anything you want!
</p>
<p>
Note that inside the sprite's draw function the center of the
sprite is translated to position (0, 0).
</p>
<p>
This mini example rotates the sprite's ellipse to the direction
it's moving and makes the ellipse stretch in that direction
proportional to it's speed. Kind of complicated!
</p>
</md>
<md id="md12-1"><h2 id="custom-update">Custom Update</h2>
<p>
You can also define a custom <code>update</code> function for a
sprite that runs at the end of the draw loop or when updateSprites
is called. You can put any sprite specific behavior you want in
there.
</p>
</md>
</div>
<script type="mie/p5" id="custom-draw">
let face, stretchy;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@
"make": "electron-forge make",
"publish": "electron-forge publish"
},
"version": "1.2.2"
"version": "1.2.3"
}

0 comments on commit bf2e886

Please sign in to comment.