Skip to content

Commit

Permalink
v1.0.1: Fix visual bug when wrapping particle coordinates.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicross committed Apr 25, 2023
1 parent 3613bcb commit 7aa9cba
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ gulp.task('dist-electron', async () => {
arch: 'x64',
asar: true,
dir: '.',
icon: '../assets/icon/favicon',
icon: 'assets/icon/favicon',
ignore: [
'.gitignore',
'dist',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fishyphus",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"license": "Unlicense",
"main": "electron/main.js",
Expand Down
6 changes: 3 additions & 3 deletions src/js/content/video/particles.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void main(void) {

const camera = content.camera.computedVector(),
delta = engine.loop.delta() / 2,
drawDistance = content.gl.drawDistance(),
drawDistance2 = content.gl.drawDistance() * 2,
lifes = [],
offsets = []

Expand All @@ -185,8 +185,8 @@ void main(void) {
return particles
}

particle.x = engine.fn.wrap(particle.x, camera.x - drawDistance, camera.x + drawDistance)
particle.y = engine.fn.wrap(particle.y, camera.y - drawDistance, camera.y + drawDistance)
particle.x = camera.x + ((particle.x - camera.x) % drawDistance2)
particle.y = camera.y + ((particle.y - camera.y) % drawDistance2)
particle.z = content.surface.value(particle)

lifes.push(particle.life)
Expand Down

0 comments on commit 7aa9cba

Please sign in to comment.