pfautrero / xia

xia is a small tool to convert svg files into html5 ressources
https://xia.funraiders.org
37 stars 6 forks source link

XIA

This tool is used to generate html5 resources. Thanks to it, you can generate three kinds of resources :

Just have a look here to see samples :

XIA Examples

XIA comes with a set of tools:

1. How to use Inkscape extension?

see the dedicated french documentation using inkscape extension see the dedicated english documentation using inkscape extension

2. How to use xiajs?

This is the developer corner. xiajs is a javascript library based on KonvaJS for building interactives images. Here a first example:

var XiaInstance = new Xia({
    'targetID' : 'my_div',
    'scene' : {
      'image' : 'img/background.png'
    },
    'details' : [
      {
        path : "m 50,50 h 100 v 100 H 100 Z"
      }
    ]
  })

Here, we call Xia object giving these 3 mandatories parameters:

Here is a complete example:

<!doctype html>
<html>
 <head>
   <meta charset="utf-8">
   <title>XIA 3</title>
   <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/konva/3.1.7/konva.min.js"></script>
   <script type="text/javascript" src="https://xia.funraiders.org/cdn/xia30/js/xia.js"></script>
 </head>
 <body style="width:50%;margin:0 auto;">
  <h1>Example XIA</h1>
  <div id="my_div" style="width:100%;height:500px;"></div>
  <script>
    var XiaInstance = new Xia({
      'targetID' : 'my_div',
      'scene' : {
        'image' : 'img/background.png'
      },
      'details' : [
        {
          path : "m 50,50 h 100 v 100 H 100 Z"
        }
      ]
    })
  </script>
 </body>
</html>

more complex examples there: dev corner

How to build

See de dedicated documentation Building xia