Commit 237c7a99 authored by 邱旭's avatar 邱旭

09.FlppyBird-节点树

parent aa9c2c59
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
} }
</script> </script>
<script> <script>
/** /**
* Bird * Bird
*/ */
...@@ -120,24 +119,6 @@ ...@@ -120,24 +119,6 @@
</script> </script>
<script> <script>
/**
* 异步加载图片方法
* @param src 图片路径
* @returns {Promise<HTMLImageElement | null>}
*/
function loadImgAsync(src) {
return new Promise((resolve) => {
const img = new Image();
img.onload = () => resolve(img);
img.onerror = () => {
console.error(`加载资源${src}失败`);
resolve(null);
};
img.src = src;
});
}
/** /**
* FlppyBird * FlppyBird
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment