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