alchemist0823 / three.quarks Goto Github PK
View Code? Open in Web Editor NEWThree.quarks is a general purpose particle system / VFX engine for three.js
Home Page: https://quarks.art
License: MIT License
Three.quarks is a general purpose particle system / VFX engine for three.js
Home Page: https://quarks.art
License: MIT License
Hello,
looks like maxParticle
is outdated / not used yet or anymore in the examples? And it seems like the internal property is not used?
https://github.com/Alchemist0823/three.quarks/search?q=maxParticles
Would you recommend handling this manually using the emitters over distance and life?
I get the following error in BatchedParticleRenderer materials when switching the threejs renderer to logarithmic depth:
THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false Program Info Log: Vertex shader is not compiled. VERTEX ERROR: 0:123: 'isPerspectiveMatrix' : no matching overloaded function found
Hello,
do you think you could update the changelog and push release tags to github? It would help with knowing when to update to which version / when new features are available 😊
Last release: 13 days ago, version 0.10.0
Changelog: almost a year ago, version 0.7.0
I would like to create an effect such as we currently have on the three.quark website - i.e. pressing a button triggers an effect, the next press triggers another, etc.
Currently, using addSystem will simply add an effect to me that executes once (if it is not looped)
this.quarksRenderer.addSystem(child.system);
but calling the function again and creating a new object will not trigger the effect a second time - only loading it and downloading the asset again will allow this.
So, how do you trigger effect after effect depending on the will of the user? (effect read from json file)
Hello,
could you clarify what you mean by localspace in the RenderMode enum?
export declare enum RenderMode {
BillBoard = 0,
StretchedBillBoard = 1,
LocalSpace = 2,
Trail = 3
}
was expecting something like this
export enum ParticleSystemRenderMode {
Billboard = 0,
// Stretch = 1,
// HorizontalBillboard = 2,
// VerticalBillboard = 3,
Mesh = 4,
// None = 5,
}
Hello,
prior to 0.10.6 (in version 0.7.3) we could create horizontal and vertical billboarding by modifying the mesh geometry. This doesn't work anymore. Is there a way to add this behaviour again?
Old code:
if (renderMode === ParticleSystemRenderMode.HorizontalBillboard) {
geo = new THREE.BoxGeometry(1, 1, 0);
}
else if (renderMode === ParticleSystemRenderMode.VerticalBillboard) {
geo = new THREE.BoxGeometry(1, 0, 1);
}
Hey,
is it possible to easily update and/or configure the Object3D.layers
mask to a batched system? I don't want to exclude particles from being hit when raycasting
Maybe here?
Line 12 in 7efd855
Hello! My project does not use TS nor compiling, it would be very convinient to have a jsm version where, similar to threejs, you can just drop the file in and import what you need, would it be possible to have such release downloadable for convenience ?
Hello
would it be possible to ad ktx2 for the particel textures?
I could not find a way to control the opacity of particles by analogy with ColorOverLife.
Are you planning to add this functionality?
I was investigating why we always get double versions of three in some applications. Turns out that three.quarks is the only package in the chain that is pulling in an actual version of three and not a peerDependency, which would correctly resolve to the actual intended three version.
Are you open to changing this? Should just be moving three from "dependency" to "peerDependency".
Thanks!
In the code example from README.md
, should the curly brackets be removed?
Existing code:
muzzle1 = new ParticleSystem({muzzle});
Proposition:
muzzle1 = new ParticleSystem(muzzle);
@Alchemist0823 DO NOT ABANDON PROJECT.
it has really enormous potential, and I see that you have abandoned work on it for 4 months...
Hello,
I recently noticed a huge performance difference on Quest using trail particles - trail particles are currently very slow on Quest to the point where I can't really use them easily in my scenario.
Could that be related to the default maxParticles size being 10x the size of a normal sprite batch? I'm also wondering why the max size is hardcoded for both of these cases? Would it be possible to expose this with the VFXBatchSettings interface?
E.g. in my case i want to render a single particle trail following an arrow so I surely don't need that many particles. Also in most cases I'm dealing with particle counts < 100 or < 200
three.quarks/src/TrailBatch.ts
Line 38 in dcb9136
three.quarks/src/SpriteBatch.ts
Line 43 in dcb9136
Hello,
I have a case where I have a one-shot effect with a duration of 1 and not looping. I still want to be able to call emit
on this effect and have the system emit the provided amount of particles that frame. Currently the internal emitEnded
flag prevents that.
What would you suggest on how to make this still work and force it to emit particles?
Here's a short video where I set emitEnded
to false before calling emit
in a 1 sec interval
Trails are not working in the latest threejs release
createParticleSystem = () => {
this.batchSystem = new BatchedParticleRenderer();
const texture = new TextureLoader().load("textures/star.png");
texture.encoding = sRGBEncoding;
const param = {
shape: new DonutEmitter({
radius: 2,
angle: Math.PI / 4,
arc: Math.PI,
}),
renderMode: RenderMode.BillBoard,
worldSpace: false,
renderOrder: 2,
looping: true,
duration: 5,
emissionOverTime: new ConstantValue(100),
startLife: new ConstantValue(5),
startSize: new IntervalValue(10, 15),
startSpeed: new ConstantValue(5),
material: new MeshBasicMaterial({ transparent: true, color: 0xff0000, map: texture, blending: AdditiveBlending, depthTest: false }),
onlyUsedByOther: false,
};
setTimeout(() => {
const texture = new TextureLoader().load("textures/1.jpg");
this.muzzle.texture = texture;
}, 5000);
this.muzzle = new ParticleSystem(param);
this.muzzle.addBehavior(new SizeOverLife(new PiecewiseBezier([[new Bezier(.3, .5, .6, .3), 0]])));
this.muzzle.addBehavior(new ColorOverLife(new ColorRange(new Vector4(0, 0, 0, 1), new Vector4(1, 1, 1, .3))));
this.muzzle.emitter.name = 'muzzle1';
this.batchSystem.addSystem(this.muzzle);
this.muzzle.emitter.rotateX(-Math.PI / 2);
this.scene.add(this.muzzle.emitter);
this.scene.add(this.batchSystem);
};
The above dynamic modify texture is not effective, Version is 0.10.2 ,Where I do wrong?
The system will reach a CPU bottleneck pretty fast when using complex effects, way sooner than any GPU bottleneck.
Implement a way to offload the physics calculations to a worker. Ideally, when a particle is first created the first couple frames are calculated on the main thread while calculations of multiple frames are requested to the worker which can generate the simulation in advance.
Obviously requesting the calculations every frame to the worker would not be possible since you would be bottlenecked by the transfer between threads so the only way i see this working is if the worker calculates multiple frames in advance per request.
Hello,
is there a good way to get the died
state of a particle from a behaviour? How should events be implemented that happen on particle death?
My workaround for now is adding the current delta time and checking if it is above the life.
But that is quite hacky and unstable I would say :)
const willDie = particle.age + delta >= particle.life
When using the loader to load a particle system from a json, the particle system is added to the scene without any code that explicitly adds it to the scene. See fiddle
https://codesandbox.io/s/three-quarks-atom-particle-system-forked-lqtg38?file=/index.html
the scene.add() is commented out but the effect is still visible
Right now it seems either "transparent" or "opaque" are supported. In some cases "opaque + alphaClip" would be desirable, e.g. to have circular or bokeh particles that properly render depth.
hello,
does looping property in particle system configuration work well?
In example muzzleFlashDemo animation, effect is constantly looping on the demo, even though each instance of the System has looping on false.
*but if we read effect from .json file, then looping work well
also you should remove console.log(this.subEmissions.length, this.subParticleSystem.system.particleNum);
Im looking to create rain and snow
Implement a loader for a unity prefab loader for Shuriken Particle System. many developer want to use Unity asset in their web game.
MeshStandardMaterial seems to only be working with Trails, this means that THREE.Fog cannot be used since it does not work with the MeshBasicMaterial
Importing a json that has world space effects, then applying a scale to the container of the particle systems does not reflect on the object. This can also be verified in the visual editor by changing the scale of the “plasma projectile” example and observing it does nothing
Follow-up to #63
We've had a few people voice confusion as to why their entire website is "powered by three.quarks" according to the logs.
Would it be possible to adjust the messaging to read "Particle Systems powered by three.quarks" or similar?
Thank you!
After importing a json, adding it to the scene and then removing it, accomplishes nothing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.