GithubHelp home page GithubHelp logo

gameui-for-pixi-js's Introduction

Hola Cantk是一个功能强大的游戏引擎,它拥有丰富的GUI控件,配合Hola Studio可以快速开发出游戏的UI界面。PIXI是一个流行而且强大的游戏引擎,但是它的GUI控件很少,而且缺乏界面编辑器,导出开发游戏UI界面比较低效。gameui-for-pixi-js就是为了发挥两者的长处,让你可以用Hola StudioUI界面,用PIXI开发游戏,然后把两者无缝结合起来。

集成到PIXI项目

1.创建PIXI项目。

2.把本项目的gameui目录中的文件拷贝到PIXI项目中。

3.用Hola Studio创建游戏的UI。

4.在Hola Studio的文件菜单中导出『HTML文件』。

5.把导出的zip文件中的myapp.js,assets目录拷贝到PIXI项目。

6.在index.html中添加下列脚本:

    <script src="myapp.js"></script>
    <script src="cantk-pixi/cantk-core.js"></script>
    <script src="cantk-pixi/pixi-widget.js"></script>
    <script src="cantk-pixi/pixi-cantk.js"></script>

7.初始化。

	var game = {stage:stage, width:renderer.width, height:renderer.height};
	PIXI.CanTK.init(game, guiData);

8.打开窗口。

	PIXI.CanTK.openWindow("dialog", 0, 0, game.width, game.height, function(retInfo) {
		console.log("dialog closed, and return " + retInfo);
	});

gameui-for-pixi-js's People

Contributors

drawapp8 avatar

Watchers

James Cloos avatar  avatar

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.