@rive-app/webgl-single 1.0.56 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/rive.js +5 -5
  3. package/rive.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/webgl-single",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "description": "Rive's webgl based web api with bundled wasm.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.js CHANGED
@@ -176,7 +176,7 @@ k.run=wd;if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);
176
176
  /* 2 */
177
177
  /***/ ((module) => {
178
178
 
179
- module.exports = JSON.parse('{"name":"@rive-app/webgl-single","version":"1.0.56","description":"Rive\'s webgl based web api with bundled wasm.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
179
+ module.exports = JSON.parse('{"name":"@rive-app/webgl-single","version":"1.0.57","description":"Rive\'s webgl based web api with bundled wasm.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
180
180
 
181
181
  /***/ }),
182
182
  /* 3 */
@@ -214,17 +214,17 @@ const registerTouchInteractions = ({
214
214
  if (!canvas || !stateMachines.length || !renderer || !rive || !artboard) {
215
215
  return;
216
216
  }
217
-
217
+
218
218
  const mouseCallback = (event) => {
219
- const boundingRect = event.target.getBoundingClientRect();
219
+ const boundingRect = event.currentTarget.getBoundingClientRect();
220
220
 
221
221
  const canvasX = event.clientX - boundingRect.left;
222
222
  const canvasY = event.clientY - boundingRect.top;
223
223
  const forwardMatrix = rive.computeAlignment(fit, alignment, {
224
224
  minX: 0,
225
225
  minY: 0,
226
- maxX: canvas.width,
227
- maxY: canvas.height,
226
+ maxX: boundingRect.width,
227
+ maxY: boundingRect.height,
228
228
  }, artboard.bounds);
229
229
  let invertedMatrix = new rive.Mat2D();
230
230
  forwardMatrix.invert(invertedMatrix);