@rive-app/canvas-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.
- package/package.json +1 -1
- package/rive.js +5 -5
- package/rive.js.map +1 -1
package/package.json
CHANGED
package/rive.js
CHANGED
|
@@ -140,7 +140,7 @@ k.run=Dc;if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);
|
|
|
140
140
|
/* 2 */
|
|
141
141
|
/***/ ((module) => {
|
|
142
142
|
|
|
143
|
-
module.exports = JSON.parse('{"name":"@rive-app/canvas-single","version":"1.0.
|
|
143
|
+
module.exports = JSON.parse('{"name":"@rive-app/canvas-single","version":"1.0.57","description":"Rive\'s high-level canvas based web api all in one js file.","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}}');
|
|
144
144
|
|
|
145
145
|
/***/ }),
|
|
146
146
|
/* 3 */
|
|
@@ -178,17 +178,17 @@ const registerTouchInteractions = ({
|
|
|
178
178
|
if (!canvas || !stateMachines.length || !renderer || !rive || !artboard) {
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
|
|
182
182
|
const mouseCallback = (event) => {
|
|
183
|
-
const boundingRect = event.
|
|
183
|
+
const boundingRect = event.currentTarget.getBoundingClientRect();
|
|
184
184
|
|
|
185
185
|
const canvasX = event.clientX - boundingRect.left;
|
|
186
186
|
const canvasY = event.clientY - boundingRect.top;
|
|
187
187
|
const forwardMatrix = rive.computeAlignment(fit, alignment, {
|
|
188
188
|
minX: 0,
|
|
189
189
|
minY: 0,
|
|
190
|
-
maxX:
|
|
191
|
-
maxY:
|
|
190
|
+
maxX: boundingRect.width,
|
|
191
|
+
maxY: boundingRect.height,
|
|
192
192
|
}, artboard.bounds);
|
|
193
193
|
let invertedMatrix = new rive.Mat2D();
|
|
194
194
|
forwardMatrix.invert(invertedMatrix);
|