You can use the u/vOffset and u/vScale of the Texture object:
However, for this to work in your case, you need both textures to point to the same underlying internal texture (the one of the dynamic texture). To do this, I have cloned the dynamic texture and changed the
_texture property of the clones to point to the internal texture held by the dynamic texture.
_texture is not meant to be used by end user, but it is still a public property, so it’s only half a hack…
As I can see it, there’s no way to create a texture by passing an existing internal texture… So, changing the
_texture property is the way to do it, after all (+ also incrementing the reference count of the internal texture)? @Deltakosh?
Also, I’m not quite sure why:
this._texture = this._getFromCache(this.url, noMipmap, samplingMode, invertY);
in the Texture constructor does not retrieve the existing internal texture created by the dynamic texture… If it would work, the
.clone() call would be enough to make it work as it would create a texture instance with the same internal texture than the dynamic texture.