mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
move all interfaces to utils.ts
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
interface ImageData {
|
||||
index: string
|
||||
url: string
|
||||
imgH: string
|
||||
imgW: string
|
||||
}
|
||||
import { type ImageData } from './utils'
|
||||
|
||||
// fetch images info from JSON
|
||||
const imageArrayElement = document.getElementById('images_array') as HTMLScriptElement
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
import { overlayEnable } from './overlay'
|
||||
import { posCache, FIFO, layersPosSet, center } from './utils'
|
||||
import { posCache, FIFO, layersPosSet, center, type position } from './utils'
|
||||
import { thresholdSensitivityArray, thresholdIndex } from './thresholdCtl'
|
||||
import { imgIndexSpanUpdate } from './indexDisp'
|
||||
import { imagesArrayLen, imagesArray } from './dataFetch'
|
||||
|
||||
export interface position {
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
|
||||
// get layer divs
|
||||
const layer5 = document.getElementById('layer5') as HTMLDivElement
|
||||
const layer4 = document.getElementById('layer4') as HTMLDivElement
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
export interface ImageData {
|
||||
index: string
|
||||
url: string
|
||||
imgH: string
|
||||
imgW: string
|
||||
}
|
||||
|
||||
export interface position {
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
|
||||
// cache a xy position to array
|
||||
export const posCache = (x: number, y: number, xyArray: string[][]): void => {
|
||||
// pop element if length surpass limitation
|
||||
|
||||
Reference in New Issue
Block a user