arkntools / depot-recognition Goto Github PK
View Code? Open in Web Editor NEWArknights depot recognition. 明日方舟仓库识别
Home Page: https://www.npmjs.com/package/@arkntools/depot-recognition
License: MIT License
Arknights depot recognition. 明日方舟仓库识别
Home Page: https://www.npmjs.com/package/@arkntools/depot-recognition
License: MIT License
文档中给出的材料json和pkg文件路径已经失效,请问是否能提供一个自动化同步远程仓库到本地例如Arknights-Bot-Resource以拉取最新资源的方式呢
node: v18.16.0
OS: win11
在运行文档中给出的示例后,提示如下错误
PS C:\Users\DazeCake\Development\LittleHandy> node "c:\Users\DazeCake\Development\LittleHandy\app.js"
c:\Users\DazeCake\Development\LittleHandy\node_modules\@arkntools\depot-recognition\dist\index.js:380
const imgData = new ImageData(new Uint8ClampedArray(img.bitmap.data), img.bitmap.width, img.bitmap.height);
^
ReferenceError: ImageData is not defined
at c:\Users\DazeCake\Development\LittleHandy\node_modules\@arkntools\depot-recognition\dist\index.js:380:19
at Array.map (<anonymous>)
at recognizeNumbers (c:\Users\DazeCake\Development\LittleHandy\node_modules\@arkntools\depot-recognition\dist\index.js:378:57)
at DeportRecognizer.recognize (c:\Users\DazeCake\Development\LittleHandy\node_modules\@arkntools\depot-recognition\dist\index.js:546:30)
at async c:\Users\DazeCake\Development\LittleHandy\app.js:29:22
Node.js v18.16.0
在vsc中尝试跳转可以跳转到位于本地路径~\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\lib.dom.d.ts
中的此类型定义如下
/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
interface ImageData {
readonly colorSpace: PredefinedColorSpace;
/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
readonly data: Uint8ClampedArray;
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
readonly height: number;
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
readonly width: number;
}
declare var ImageData: {
prototype: ImageData;
new(sw: number, sh: number, settings?: ImageDataSettings): ImageData;
new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData;
};
或许可以手动实现此类型?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.