- Compatible with WebAssembly. One build for every platforms!
- Fast & simple.
- No dependencies: everything is fetched using cmake FetchContent.
- WebAssembly demo from the ./examples directory.
- documentation
- starter project
- tutorial
auto window = smk::Window(640, 480, "Title");
window.ExecuteMainLoop([&] {
window.Clear(smk::Color::Black);
[...] // Draw stuff
window.Display();
});
Load textures:
auto ball_texture = smk::Texture("./ball.png");
Display images:
auto ball_sprite = smk::Sprite(ball_texture);
ball_sprite.SetPosition({200,200});
window.Draw(ball_sprite);
Load font:
auto font_arial = smk::Font("./arial.ttf", 32);
Display text:
auto text = smk::Text(font_arial, "hello world");
text.SetPosition({200,200});
window.Draw(text);
Load sound:
auto sound_buffer = smk:SoundBuffer("./boing.ogg");
Play sound:
auto sound = smk::Sound(sound_buffer);
sound.Play();
auto view = smk::View();
view.SetCenter({200, 200});
view.SetSize(320,240);
window.SetView(view);
- smkflow => A node editor library.
Please add yours.
I needed to port several games made using the SFML to WebAssembly. SFML isn't supporting WebAssembly (yet), so I had to reimplement it myself. If you know the SFML, then SMK must be very familiar to you.
They should already be installed. If they aren't you need to execute:
sudo apt install xorg-dev libgl1-mesa-dev libpulse-dev
SMK depends directly on many great projects listed below:
SMK is also made possible thanks to: