UNPKG

laya-coreui-es

Version:

laya核心库、ui库es版本,剔除了媒体、TTF等功能。基于 LayaAir-release_2.12.0 修改

25 lines (24 loc) 888 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SkinMeshBuffer = void 0; const IndexBuffer2D_1 = require("../../../utils/IndexBuffer2D"); const VertexBuffer2D_1 = require("../../../utils/VertexBuffer2D"); const LayaGL_1 = require("../../../../layagl/LayaGL"); class SkinMeshBuffer { constructor() { var gl = LayaGL_1.LayaGL.instance; this.ib = IndexBuffer2D_1.IndexBuffer2D.create(gl.DYNAMIC_DRAW); this.vb = VertexBuffer2D_1.VertexBuffer2D.create(8); } static getInstance() { return SkinMeshBuffer.instance = SkinMeshBuffer.instance || new SkinMeshBuffer(); } addSkinMesh(skinMesh) { skinMesh.getData2(this.vb, this.ib, this.vb._byteLength / 32); } reset() { this.vb.clear(); this.ib.clear(); } } exports.SkinMeshBuffer = SkinMeshBuffer;