l8figure Posted May 3, 2020 Share Posted May 3, 2020 How to make a renderTexture with bigger pixels? i want the "pixel" to be the actual size of the pixel, is that possible? let rt = this.add.renderTexture(0, 0, 1000, 1000); this.input.on('pointermove', function (pointer) { if (pointer.isDown) { rt.draw('pixel', pointer.x, pointer.y); } }, this); Link to comment Share on other sites More sharing options...
supertommy Posted May 12, 2020 Share Posted May 12, 2020 What is your 'pixel' key referring to? It doesn't look like the RenderTexture's draw method takes a string for the first argument. You can create an Image or Sprite with the 'pixel' key if it refers to a loaded texture. You should then be able to adjust the scale and pass that instance into rt.draw() Something like: // created in create() const pixel = this.make.image({ key: 'pixel' }, false) // update the scale to get the size you want pixel.setScale(2) // then later in the mouse pointermove handler... rt.draw(pixel, pointer.x, pointer.y) Link to comment Share on other sites More sharing options...
Recommended Posts