mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
+1
-1
@@ -90,7 +90,7 @@ module.exports = class CanvasUtil {
|
||||
const dist = Math.sqrt((dx * dx) + (dy * dy));
|
||||
const x2 = Math.round((frame.width / 2) - (dx * Math.sin(dist / (level * Math.PI) / 2)));
|
||||
const y2 = Math.round((frame.height / 2) - (dy * Math.sin(dist / (level * Math.PI) / 2)));
|
||||
const i2 = (y2 * frame.width) + (x2 * 4);
|
||||
const i2 = ((y2 * frame.width) + x2) * 4;
|
||||
frame.data[i] = source[i2];
|
||||
frame.data[i + 1] = source[i2 + 1];
|
||||
frame.data[i + 2] = source[i2 + 2];
|
||||
|
||||
Reference in New Issue
Block a user