如果图片没有合图的话可以用
/**写入动态图 */
function writeToAtlas(rt: dynamicatlas.IRenderTexture, image: Uint8ClampedArray | Uint8Array,
x: number, y: number, width: number, height: number, premultiplyAlpha: boolean) {
let objUpdate = rt._texture,
level = 0,
flipY = false;
if (cc.dynamicAtlasManager.textureBleeding) {
if (width <= 8 || height <= 8) {
objUpdate.updateSubImage({ image, x: x - 1, y: y - 1, width, height, level, flipY, premultiplyAlpha });
objUpdate.updateSubImage({ image, x: x - 1, y: y + 1, width, height, level, flipY, premultiplyAlpha });
objUpdate.updateSubImage({ image, x: x + 1, y: y - 1, width, height, level, flipY, premultiplyAlpha });
objUpdate.updateSubImage({ image, x: x + 1, y: y + 1, width, height, level, flipY, premultiplyAlpha });
}
objUpdate.updateSubImage({ image, x: x - 1, y: y, width, height, level, flipY, premultiplyAlpha });
objUpdate.updateSubImage({ image, x: x + 1, y: y, width, height, level, flipY, premultiplyAlpha });
objUpdate.updateSubImage({ image, x: x, y: y - 1, width, height, level, flipY, premultiplyAlpha });
objUpdate.updateSubImage({ image, x: x, y: y + 1, width, height, level, flipY, premultiplyAlpha });
}
objUpdate.updateSubImage({ image, x: x, y: y, width, height, level, flipY, premultiplyAlpha });
}