apply cyclic only if we have information about pattern width or height
add z-buffer to pixi.js based on layers