0.2.78 • Published 5 years ago

coat-pixi v0.2.78

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

coa_tools importer for pixi, details about coa_tools.

Usage

import coa from 'pixi_coa_importer';

coa.loader(
    '/res/samples/', //absolute path to resourses, may be url or anything
    require('/res/samples/test.json')) //json with config
  .then((conf) => {
		let properties = {
			debugTree: true, //print node tree in console
			debugTreeVerbose: true, //print verbose tree
			debugBounds: true, //draw debug bounds
			fonts:{} //fonts ids
		}

		let ui = new coa.ui(conf, properties); //create window
		wind.position.set(width / 2, height / 2);

		ui.layer_name; //Access to exportet layers
		ui.group_name.layer_name; //Access to nested groups

		ui.button.on('pointerdown', ()=>{console.log('click')}); //buttons works with all pixi events
		ui.progress.binding = 0.5; //Set progress bar to half

		ui.gnodes.label_text; //Access to nodes with flag --global

		ui.gbinds.label_text = "Your label"; //Set value of global nodes bind
		ui.gnodes.label_text.updateBinding("Another label"); //You can access to that prop manually

		ui.gbinds.close_btn = function(){}; //Buttons callbacks

		ui.gbinds.list = [{text_area:"text", sprite_area:"srite", btn:function(){}}]; //geterate lists for `list --global type=container`
		ui.gbinds.list.push({...}); //push, pop, insert itc.
		ui.gbinds.list.push({$elementCreated: function(child){}}); //you can handle element creation
		ui.gbinds.siplestList = [true, false, 123] //for nodes without binds counts only array length

		//You can't push in your own array like:
		//let a = [true, true];
		//binds.node = a;
		//a.push(true); //not gonna work
		//binds.node.push(true) //gonna work

});

Text pattenrs

You can draw custom sprites inside text_area and btn text

	PIXI.loader.add('devIcon', 'res/develop.png').load(callback); //preload pixi texture first

	//some abstract coa window
	let wind = new ui(conf, {
		customTextSymbols: { testIcon: PIXI.Texture.from('res/develop.png') }
	});

	//pass <{symbolName}> into text to print that sprite
	window.gbinds.your_text_area = 'some text and inserted icon: <{testIcon}>'

	//will print 11 inside symbol
	window.gbinds.your_text_area1 = 'some text and inserted icon with text: <{testIcon}[11]>'

	//you can combine it whatever you like
	window.gbinds.your_text_area1 = 'some text and inserted icon with text: <{testIcon}[text]{anotherIcon}> <[text under icon]{anotherIcon1}>'
0.2.78

5 years ago

0.2.77

5 years ago

0.2.76

5 years ago

0.2.75

5 years ago

0.2.74

5 years ago

0.2.73

5 years ago

0.2.72

5 years ago

0.2.71

5 years ago

0.2.70

5 years ago

0.2.69

5 years ago

0.2.68

5 years ago

0.2.67

5 years ago

0.2.66

5 years ago

0.2.65

5 years ago

0.2.64

5 years ago

0.2.63

5 years ago

0.2.62

5 years ago

0.2.61

5 years ago

0.2.60

5 years ago

0.2.59

5 years ago

0.2.58

5 years ago

0.2.57

5 years ago

0.2.56

5 years ago

0.2.55

5 years ago

0.2.54

5 years ago

0.2.53

5 years ago

0.2.52

5 years ago

0.2.51

5 years ago

0.2.50

5 years ago

0.2.49

5 years ago

0.2.48

5 years ago

0.2.47

5 years ago

0.2.46

5 years ago

0.2.45

5 years ago

0.2.44

5 years ago

0.2.43

5 years ago

0.2.42

5 years ago

0.2.41

5 years ago

0.2.40

5 years ago

0.2.39

5 years ago

0.2.38

5 years ago

0.2.37

5 years ago

0.2.36

5 years ago

0.2.35

5 years ago

0.2.34

5 years ago

0.2.33

5 years ago

0.2.32

5 years ago

0.2.31

5 years ago

0.2.30

5 years ago

0.2.29

5 years ago

0.2.28

5 years ago

0.2.27

5 years ago

0.2.26

5 years ago

0.2.25

5 years ago

0.2.24

5 years ago

0.2.23

5 years ago

0.2.22

5 years ago

0.2.21

5 years ago

0.2.20

5 years ago

0.2.19

5 years ago

0.2.18

5 years ago

0.2.17

5 years ago

0.2.16

5 years ago

0.2.15

5 years ago

0.2.14

5 years ago

0.2.13

5 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago