Code Monkey home page Code Monkey logo

qml-box2d-liquidfunexamples's Introduction

Premade Qt project to quickly test qml-box2d together with Googles LiquidFun on desktop and mobile

Overview:

This project is intended to allow you to quickly try out the examples provided by the qml-box plugin together with Googles LiquidFun without installing the lib and without using qmlscene. Instead, qml-box2d gets compiled as a static plugin, so that the qml-box2d-examples can also be tested on Apple iPad and Android tablets without hassle.

The project is similar to the project: https://github.com/ThomasVogelpohl/qml-box2d-examples only this project also incorporates Googles LiquidFun C++ libary. The qml-box2d code has been adapted to support LiquidFun. You can check out the example 'Wavemachine'.

Warning:

Both Box2D sources and qml-box2d sources have been changed during the merge of the LiquidFun libary. Also qml-box2d plugin needs new code to display the LiquidFun particles. So this software is work in progress and not production ready !!!
The code should be used as fast way of testing further LiquidFun integrations.

LiquidFun libary:

LiquidFun is an extension of Box2D. It adds a particle based fluid and soft body simulation to the rigid body functionality of Box2D.
http://google.github.io/liquidfun/

Caveats:

  • The iPads Retina display does still use 1024x768 pixels and therefore the examples are full screen. Android tablets address the full resolution and therefore the examples are currently shown half size on android tablets.
  • Included the qml-box2d in this repo instead of just adding the qml-box2d repo as submodule. Reason: As the plugin/plugin has been linked statically, to avoid collision with existing qml-box2d libaries on your system, the static version has been called Box2DStatic. Therefore I changed the includes to pull in Box2DStatic.
  • The qml-box2d and Box2D code are not changed, but I changed the examples to be better displayed on 1024x768 iPad screen.

The qml-box2d plugin:

qml-box2d is a full-featured Qt plugin allowing access to the powerful C++ Box2D physics libary from Qt-QML. Use simple QML commands to create Box2D bodies, joints, sensors etc. The qml-box2d plugin is very user friendly, just try it out !

Find the qml-box2d plugin here: https://github.com/qml-box2d/qml-box2d

Build the project:

Just load the qml-box2d-example.pro file into QtCreator and compile for desktop, iOS or Android. start the examples with clicking RUN in QtCreator.

iPad screenshots:

Output sample

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.