Jump to content

Render texture bigger pixels.


Recommended Posts

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(0010001000);
    this.input.on('pointermove'function (pointer) {
        if (pointer.isDown)
    }, this);
Link to comment
Share on other sites

  • 2 weeks later...

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

// then later in the mouse pointermove handler...
rt.draw(pixel, pointer.x, pointer.y)


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...