Skip to content

Instantly share code, notes, and snippets.

@leefsmp
Created July 29, 2016 23:05
Show Gist options
  • Save leefsmp/a02918af99d7bda3439a0024eaf93fdd to your computer and use it in GitHub Desktop.
Save leefsmp/a02918af99d7bda3439a0024eaf93fdd to your computer and use it in GitHub Desktop.
WebIDl bindings definition file for Emscripten SDK
interface Vector {
void Vector(double x, double y, double z);
void set(double x, double y, double z);
double getX();
double getY();
double getZ();
};
interface ParticleEmitter {
void ParticleEmitter(long id);
Vector getPosition();
Vector getOffset();
void setEmissionRate(double emissionRate);
void setVelocity(double velocity);
void setSpread(double spread);
void setCharge(double charge);
};
interface MagneticField {
void MagneticField(long id);
Vector getPosition();
Vector getOffset();
void setForce(double force);
};
interface Particle {
void Particle();
Vector getAcceleration();
Vector getVelocity();
Vector getPosition();
Vector getDof();
};
interface ParticleSystem {
void ParticleSystem(long maxParticles);
void pushRecycle(Particle particle);
void initParticleLoop();
Particle nextParticle();
void step(double dt);
MagneticField addMagneticField(long id);
ParticleEmitter addEmitter(long id);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment