Replies: 2 comments 4 replies
-
gsap is based on js {object} , so you can handle any object reference you want. or based on doc, i dont think TilingSprite have a props for margin ! const sprite = new PIXI.TilingSprite()
gsap.to(sprite, duration, { clampMargin:10} ); |
Beta Was this translation helpful? Give feedback.
4 replies
-
Ok, according to #7189, TilingSprite doesn't support gap/margin and not gonna add this feature. function generateGapTexture(texture, gap) {
const gapBox = new Pixi.Graphics()
const originSprite = new Pixi.Sprite(texture)
gapBox.drawRect(0, 0, originSprite.width + gap.x, originSprite.height + gap.y)
gapBox.addChild(originSprite)
return gapBox.generateCanvasTexture()
} If need negative margin, you need to create a shader or something to implement that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there any way to add some gaps in TilingSprite?
Like Spacing or Overlapping sprite?
Beta Was this translation helpful? Give feedback.
All reactions