@rive-app/webgl-single 1.0.89 → 1.0.91

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 +12 -1
  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.89",
3
+ "version": "1.0.91",
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
@@ -167,7 +167,7 @@ if(h.preInit)for("function"==typeof h.preInit&&(h.preInit=[h.preInit]);0<h.preIn
167
167
  /* 2 */
168
168
  /***/ ((module) => {
169
169
 
170
- module.exports = JSON.parse('{"name":"@rive-app/webgl-single","version":"1.0.89","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}}');
170
+ module.exports = JSON.parse('{"name":"@rive-app/webgl-single","version":"1.0.91","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}}');
171
171
 
172
172
  /***/ }),
173
173
  /* 3 */
@@ -232,8 +232,15 @@ const registerTouchInteractions = ({
232
232
  const transformedX = transformedVector.x();
233
233
  const transformedY = transformedVector.y();
234
234
 
235
+ transformedVector.delete();
236
+ invertedMatrix.delete();
237
+ canvasCoordinatesVector.delete();
238
+ forwardMatrix.delete();
239
+
235
240
  switch (event.type) {
236
241
  // Pointer moving/hovering on the canvas
242
+ case "mouseover":
243
+ case "mouseout":
237
244
  case "mousemove": {
238
245
  for (const stateMachine of stateMachines) {
239
246
  stateMachine.pointerMove(transformedX, transformedY);
@@ -258,10 +265,14 @@ const registerTouchInteractions = ({
258
265
  }
259
266
  };
260
267
  const callback = mouseCallback.bind(undefined);
268
+ canvas.addEventListener("mouseover", callback);
269
+ canvas.addEventListener("mouseout", callback);
261
270
  canvas.addEventListener("mousemove", callback);
262
271
  canvas.addEventListener("mousedown", callback);
263
272
  canvas.addEventListener("mouseup", callback);
264
273
  return () => {
274
+ canvas.removeEventListener("mouseover", callback);
275
+ canvas.removeEventListener("mouseout", callback);
265
276
  canvas.removeEventListener("mousemove", callback);
266
277
  canvas.removeEventListener("mousedown", callback);
267
278
  canvas.removeEventListener("mouseup", callback);