@spearwolf/twopoint5d
Version:
a library to create 2.5d realtime graphics and pixelart with three.js
18 lines • 604 B
JavaScript
import { VertexObjectBuffer } from './VertexObjectBuffer.js';
import { VertexObjectDescriptor } from './VertexObjectDescriptor.js';
import { voBuffer, voIndex, voInitialize } from './constants.js';
export const createVertexObject = (descriptor, buffer, objectIndex) => {
const vo = Object.create(descriptor.voPrototype, {
[voBuffer]: {
value: buffer,
writable: true,
},
[voIndex]: {
value: objectIndex,
writable: true,
},
});
vo[voInitialize]?.();
return vo;
};
//# sourceMappingURL=createVertexObject.js.map