kitao / pyxel

A retro game engine for Python
MIT License
14.67k stars 824 forks source link

html does not work when specifying 3 btnp arguments. #561

Closed sanbunno-ichi closed 1 month ago

sanbunno-ichi commented 1 month ago

[ BUG ] btnpの引数を3個指定した時のhtmlが動作しない

Pyxelの入力APIのbtnpの引数の [hold], [repeat]を指定した状態でhtml化すると動作させたブラウザがエラー停止します。 引数の [hold], [repeat]を指定しない場合は問題ありません。

https://github.com/sanbunno-ichi/btnp_test に詳細記述、および、サンプルプログラムを置いてあります。

動作環境: mac mini 2023(M2) Google Chrome, Microsoft Edgeで確認(mac, or windows on mac)

English翻訳文(Google翻訳使用) [ BUG ] html does not work when specifying 3 btnp arguments.

If you specify the [hold] and [repeat] arguments of Pyxel's input API btnp and convert it to HTML, the browser will stop with an error. There is no problem if you do not specify the [hold] and [repeat] arguments.

https://github.com/sanbunno-ichi/btnp_test Detailed descriptions and sample programs are provided here.

kitao commented 1 month ago

ご連絡ありがとうございます。

最新のPyxelはキーワード引数の名前を明示する仕様になっており(元々そうだったのですが利用しているライブラリの不具合で省略可能になってしまっていたのが、そのバージョンアップに伴い正しく処理されるようになりました)、hold=, repeat=で指定すると動作するかと思います。

Web版は自動的に最新のPyxelが使われるようになっているため、そこでその差分が見える形になったのではないでしょうか。

2024年8月18日(日) 15:44 sanbunnoichi @.***>:

[ BUG ] btnpの引数を3個指定した時のhtmlが動作しない

Pyxelの入力APIのbtnpの引数の [hold], [repeat]を指定した状態でhtml化すると動作させたブラウザがエラー停止します。 引数の [hold], [repeat]を指定しない場合は問題ありません。

https://github.com/sanbunno-ichi/btnp_test に詳細記述、および、サンプルプログラムを置いてあります。

動作環境: mac mini 2023(M2) Google Chrome, Microsoft Edgeで確認(mac, or windows on mac)

English翻訳文(Google翻訳使用) [ BUG ] html does not work when specifying 3 btnp arguments.

If you specify the [hold] and [repeat] arguments of Pyxel's input API btnp and convert it to HTML, the browser will stop with an error. There is no problem if you do not specify the [hold] and [repeat] arguments.

https://github.com/sanbunno-ichi/btnp_test Detailed descriptions and sample programs are provided here.

— Reply to this email directly, view it on GitHub https://github.com/kitao/pyxel/issues/561, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFFXEQ3GCW2VZEJ2A44ZRLZSA7FRAVCNFSM6AAAAABMWC3OFKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3TCOBSGA3TSMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sanbunno-ichi commented 1 month ago

回答ありがとうございます。

init()がそのようになっていたのでもしやとは思いましたが、そのままで動いてしまっていたため試すことはありませんでした。また、当初の動作確認時には動いていたのにその後動かなくなってた理由もわかりました。 すでにupしたPyxelInvadersでは引数無しで対応できたためそのままとして、次作にて対応しようと思います。

kitao commented 1 month ago

お手数おかけしました。 引き続きよろしくお願いいたします!

2024年8月18日(日) 17:28 sanbunnoichi @.***>:

回答ありがとうございます。

init()がそのようになっていたのでもしやとは思いましたが、そのままで動いてしまっていたため試すことはありませんでした。また、当初の動作確認時には動いていたのにその後動かなくなってた理由もわかりました。 すでにupしたPyxelInvadersでは引数無しで対応できたためそのままとして、次作にて対応しようと思います。

— Reply to this email directly, view it on GitHub https://github.com/kitao/pyxel/issues/561#issuecomment-2295176392, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFFXEWR2RQO5ZSH7BSTRLLZSBLMNAVCNFSM6AAAAABMWC3OFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGE3TMMZZGI . You are receiving this because you commented.Message ID: @.***>