42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
import FileUtils from '../../../utils/FileUtils';
|
||
import { examJudgeMapSetParam, examJudgeMapSetScaling } from '../api/index';
|
||
|
||
import FileModel from './fileModel';
|
||
|
||
const judgeTag = 'SURENJUN_JUDGE'
|
||
|
||
export default class JudgeImg {
|
||
private judgeUI
|
||
private modelPath: string
|
||
private fileModel: FileModel
|
||
private fileUtil: FileUtils
|
||
private plcData: any
|
||
|
||
constructor(judgeUI) {
|
||
this.modelPath = 'models/model_enc'
|
||
this.judgeUI = judgeUI
|
||
this.fileUtil = new FileUtils(judgeUI.context)
|
||
this.fileModel = new FileModel(judgeUI.context)
|
||
this.init()
|
||
}
|
||
|
||
async init() {
|
||
const isJudgeInitBool = AppStorage.get('isJudgeInitBool');
|
||
const { judgeUI } = this;
|
||
|
||
//TODO 临时处理
|
||
setTimeout(async () => {
|
||
console.info(judgeTag, '1.进入评判入口')
|
||
await examJudgeMapSetParam(640, 480); //设置参数宽、高
|
||
await examJudgeMapSetScaling(100); //设置缩放比例,一般默认填100(就是100%的意思) ,数字越大视野越大,数字越小视野越小,不能为0
|
||
})
|
||
|
||
judgeUI.draw = true
|
||
|
||
}
|
||
|
||
//获取评判初始化数据
|
||
getInitInfo = () => {
|
||
|
||
}
|
||
} |