[Material] how slice texture : uvScale & baseTexure. (for sprite)

I want sprite object. this sprite is rectangle(not square).
So, i’am searched.

  1. BABYLON.SpriteManager ref : I found Only square examples.
  2. uvScale ref : Property ‘uScale’ does not exist on type ‘BaseTexture’.

that is no.2 ref :
Sprite and BillboardMode of https://www.babylonjs-playground.com/#I4T59R#5

plz how make a rectangle sprites. :pray:

Could you not use cellWidth and cellHeight for this ???

Case cellHeight(width) was square mesh’s size when after sliced.

I could still solved the No.2. (used ‘as’ & ‘function’.).

let texture = BaseTextureObject as Texture;


function slice (texture: Texture) {
  texture.uScale = ...... ;

Thank you!

1 Like