drop() は、ファイルが要素に読み込まれるたびにコールバックを登録するp5.jsの要素メソッドです。 アップロードされたファイルは p5.File クラスに変換されます。 drop() コールバックを使用してファイルタイプを確認し、その後ファイルタイプに応じた条件文を書くことができます。
画像ドロップ: Revised by Kasey Lichtlyter. Edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.
You can find the code history of these examples here: 2023 code, pre-2023 code. You can suggest improvements by contributing to the current website!