feat: Init
This commit is contained in:
parent
2c79551f80
commit
acbc157694
26
src/index.ts
26
src/index.ts
@ -1 +1,27 @@
|
|||||||
export * from "./command";
|
export * from "./command";
|
||||||
|
|
||||||
|
import {
|
||||||
|
FONTMUL,
|
||||||
|
FONTTYPE,
|
||||||
|
LabelCommand,
|
||||||
|
ROTATION,
|
||||||
|
EEC,
|
||||||
|
} from "@/command/Label";
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
let label = new LabelCommand(50, 30, 0);
|
||||||
|
label.addText(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
FONTTYPE.FONT_1,
|
||||||
|
ROTATION.ROTATION_0,
|
||||||
|
FONTMUL.MUL_1,
|
||||||
|
FONTMUL.MUL_1,
|
||||||
|
"Hello World"
|
||||||
|
);
|
||||||
|
label.addQRCode(0, 0, EEC.LEVEL_L, 5, ROTATION.ROTATION_0, "taoya.art");
|
||||||
|
var command = label.getCommand();
|
||||||
|
console.log(command); // 获取字节码
|
||||||
|
console.log(label.getCommandStr(command));
|
||||||
|
}
|
||||||
|
main();
|
||||||
|
Loading…
Reference in New Issue
Block a user