UNPKG

@spearwolf/twopoint5d

Version:

a library to create 2.5d realtime graphics and pixelart with three.js

34 lines 857 B
import { VertexObjectBuffer } from './VertexObjectBuffer.js'; import { voBuffer, voIndex } from './constants.js'; export class VOUtils { static set(vo, buffer, bufferIndex) { vo[voBuffer] = buffer; vo[voIndex] = bufferIndex; return vo; } static setIndex(vo, bufferIndex) { vo[voIndex] = bufferIndex; return vo; } static getIndex(vo) { return vo[voIndex]; } static getBuffer(vo) { return vo[voBuffer]; } static isBuffer(vo, buffer) { return vo[voBuffer] === buffer; } static hasBuffer(vo) { return vo[voBuffer] != null; } static setBuffer(vo, buffer) { vo[voBuffer] = buffer; return vo; } static clearBuffer(vo) { vo[voBuffer] = undefined; return vo; } } //# sourceMappingURL=VOUtils.js.map