Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rikora/ParticleEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

37 Commits

Repository files navigation

Particle Editor

Particle editor based on the Thor library extension to SFML.

Features

The editor covers most of the features provided by the particle module from Thor. There is also support for:

  • Save particle data to a json file
  • Open an existing json file with particle data
  • Change particle texture with file browsing

Screenshot

screenshot

How-to

Setting up:

  • Build the provided Visual Studio 2017 solution (sln) as x86 (Debug)
  • Copy the contents of the dll folder to your Debug folder
  • Run the program

How-to integrate

  • Add json to your project include settings
  • Add ParticleLoader.hpp and ParticleLoader.cpp to your project

Example code

#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Window/Event.hpp>
#include <SFML/System/Clock.hpp>
#include "ParticleLoader.hpp"
int main()
{
 sf::RenderWindow window(sf::VideoMode(800, 600), "Particles");
 px::ParticleLoader system("src/res/data/example.json", sf::Vector2f(400.f, 400.f));
 sf::Clock clock;
 while (window.isOpen())
 {
 sf::Event event;
 while (window.pollEvent(event))
 {
 if (event.type == sf::Event::Closed)
 window.close();
 }
		
 system.update(clock.restart());
 window.clear();
 window.draw(system);
 window.display();
 }
 return 0;
}

Remarks

  • The size of a particle is uniform and thus ranges from a particle size to another
  • Trying to manipulate a range input field with invalid input will cause the range to reset

Dependencies

License

This library is licensed under the MIT License, see LICENSE for more information.

About

Particle editor for SFML/Thor based applications

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /