From 76bce045dd21a165b552a4a20e2100317a598444 Mon Sep 17 00:00:00 2001 From: Braden Rich Date: Tue, 9 Dec 2025 15:54:09 -0500 Subject: [PATCH 1/2] Fix Rerender issue --- package.json | 2 +- src/ImageDiff.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 18de712..3c599d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rolemodel/image-diff", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "Image Difference tool that compares pixel by pixel", "packageManager": "yarn@4.12.0", "type": "module", diff --git a/src/ImageDiff.js b/src/ImageDiff.js index 26d9c18..bf5ec37 100644 --- a/src/ImageDiff.js +++ b/src/ImageDiff.js @@ -198,6 +198,12 @@ export default class ImageDiff { this.#backgroundTexture ??= this.#createTexture(gl, this.backgroundSource) this.#overlayTexture ??= this.#createTexture(gl, this.overlaySource) + gl.bindTexture(gl.TEXTURE_2D, this.#backgroundTexture) + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.backgroundSource) + + gl.bindTexture(gl.TEXTURE_2D, this.#overlayTexture) + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.overlaySource) + // Set up vertex attributes this.#setupAttribute(gl, 'a_position', this.#positionBuffer, 2) this.#setupAttribute(gl, 'a_texCoord', this.#texCoordBuffer, 2) From c5c2a28260ffb5279ccb782041a554cb3abceae8 Mon Sep 17 00:00:00 2001 From: Braden Rich Date: Tue, 9 Dec 2025 15:55:27 -0500 Subject: [PATCH 2/2] Add PR templates --- .github/pull_request_template.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..240ba23 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,7 @@ +## Why? + +## Changes + +- [ ] + +## Screenshots