mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
+2
-2
@@ -108,8 +108,8 @@ class Util {
|
||||
const stride = width * strideLevel;
|
||||
for (let i = 0; i < width; i++) {
|
||||
for (let j = 0; j < height; j++) {
|
||||
const xs = Math.round(amplitude * Math.sin(2 * Math.PI * 3 * (y / height)));
|
||||
const ys = Math.round(amplitude * Math.cos(2 * Math.PI * 3 * (x / width)));
|
||||
const xs = Math.round(amplitude * Math.sin(2 * Math.PI * 3 * (j / height)));
|
||||
const ys = Math.round(amplitude * Math.cos(2 * Math.PI * 3 * (i / width)));
|
||||
const dest = (j * stride) + (i * strideLevel);
|
||||
const src = (j + ys) * (stride + (i + xs)) * strideLevel;
|
||||
data.data[dest] = temp.data[src];
|
||||
|
||||
Reference in New Issue
Block a user