Skip to content

The disappearance of Keppler Particles issue #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
865 changes: 446 additions & 419 deletions build/spacekit.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/spacekit.js.map

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"name": "spacekit.js",
"version": "0.1.0",
"license": "MIT",
"main": "build/spacekit.cjs.js",
"module": "build/spacekit.esm.js",
"types": "build/typescript/index.d.ts",
"prepublish": "yarn build",
"scripts": {
"build": "tsc && yarn esbuild:browser && yarn esbuild:esm && yarn esbuild:cjs",
"esbuild:browser": "esbuild src/index.ts --bundle --minify --sourcemap --target=es2015 --global-name=Spacekit --tsconfig=tsconfig.json --outfile=build/spacekit.js",
"esbuild:esm": "esbuild src/index.ts --bundle --minify --sourcemap --target=es2015 --global-name=Spacekit --tsconfig=tsconfig.json --format=esm --outfile=build/spacekit.esm.js",
"esbuild:cjs": "esbuild src/index.ts --bundle --minify --sourcemap --target=es2015 --global-name=Spacekit --tsconfig=tsconfig.json --format=cjs --outfile=build/spacekit.cjs.js",
"build:watch": "esbuild src/index.ts --bundle --minify --sourcemap --target=es2015 --global-name=Spacekit --tsconfig=tsconfig.json --watch --outfile=build/spacekit.js",
"types": "tsc --watch",
"docs": "typedoc",
"format": "prettier --write --single-quote --trailing-comma all '{src,examples,test}/**/*.{js,ts}'",
"test": "jest"
},
"devDependencies": {
"@arkweid/lefthook": "^0.6.3",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/preset-typescript": "^7.15.0",
"@types/node": "^16.7.10",
"@types/three": "^0.131.0",
"@typescript-eslint/parser": "^4.14.0",
"babel-jest": "^25.5.1",
"esbuild": "^0.12.25",
"jest": "^25.4.0",
"prettier": "^2.3.2",
"typedoc": "^0.21.9",
"typescript": "^4.1.3"
},
"dependencies": {
"julian": "^0.2.0",
"postprocessing": "^6.22.5",
"three": "^0.137.0"
}
"name": "spacekit.js",
"version": "0.1.0",
"license": "MIT",
"main": "build/spacekit.cjs.js",
"module": "build/spacekit.esm.js",
"types": "build/typescript/index.d.ts",
"prepublish": "yarn build",
"scripts": {
"build": "tsc && yarn esbuild:browser && yarn esbuild:esm && yarn esbuild:cjs",
"esbuild:browser": "esbuild src/index.ts --bundle --minify --sourcemap --target=es2015 --global-name=Spacekit --tsconfig=tsconfig.json --outfile=build/spacekit.js",
"esbuild:esm": "esbuild src/index.ts --bundle --minify --sourcemap --target=es2015 --global-name=Spacekit --tsconfig=tsconfig.json --format=esm --outfile=build/spacekit.esm.js",
"esbuild:cjs": "esbuild src/index.ts --bundle --minify --sourcemap --target=es2015 --global-name=Spacekit --tsconfig=tsconfig.json --format=cjs --outfile=build/spacekit.cjs.js",
"build:watch": "esbuild src/index.ts --bundle --minify --sourcemap --target=es2015 --global-name=Spacekit --tsconfig=tsconfig.json --watch --outfile=build/spacekit.js",
"types": "tsc --watch",
"docs": "typedoc",
"format": "prettier --write --single-quote --trailing-comma all '{src,examples,test}/**/*.{js,ts}'",
"test": "jest"
},
"devDependencies": {
"@arkweid/lefthook": "^0.6.3",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/preset-typescript": "^7.15.0",
"@types/node": "^16.7.10",
"@types/three": "^0.131.0",
"@typescript-eslint/parser": "^4.14.0",
"babel-jest": "^25.5.1",
"esbuild": "^0.12.25",
"jest": "^25.4.0",
"prettier": "^2.3.2",
"typedoc": "^0.21.9",
"typescript": "^4.1.3"
},
"dependencies": {
"julian": "^0.2.0",
"postprocessing": "^6.22.5",
"three": "0.135.0"
}
}
4 changes: 4 additions & 0 deletions src/KeplerParticles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ export class KeplerParticles {
this.shaderMaterial = shader;
this.geometry = geometry;
this.particleSystem = new THREE.Points(geometry, shader);

if (this.get3jsObjects() && this.get3jsObjects()[0]) {
this.get3jsObjects()[0].frustumCulled = false;
}
Comment on lines +194 to +197
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be sufficient to set this.particleSystem.frustumCulled = false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi again ✋ I checked on a few examples and this change (this.particleSystem.frustumCulled = false) was sufficient to prevent disappearing of particles

}

/**
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4271,10 +4271,10 @@ test-exclude@^6.0.0:
glob "^7.1.4"
minimatch "^3.0.4"

three@^0.137.0:
version "0.137.0"
resolved "https://registry.yarnpkg.com/three/-/three-0.137.0.tgz#0ebd6ba66637a332c31f234bcdd35aeec071a6e3"
integrity sha512-rzSDhia6cU35UCy6y+zEEws6vSgytfHqFMSaBvUcySgzwvDO6vETyswtSNi/+aVqJw8WLMwyT1mlQQ1T/dxxOA==
three@0.135.0:
version "0.135.0"
resolved "https://registry.yarnpkg.com/three/-/three-0.135.0.tgz#cff4ec8edd3c51ce9bc7e88d13e8eafed4d0ddfc"
integrity sha512-kuEpuuxRzLv0MDsXai9huCxOSQPZ4vje6y0gn80SRmQvgz6/+rI0NAvCRAw56zYaWKMGMfqKWsxF9Qa2Z9xymQ==

throat@^5.0.0:
version "5.0.0"
Expand Down