GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - zhanghedong/impact-pixi: Pixi.js renderer module for Impact

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
benchmarks
benchmarks
 
 
examples
examples
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
pixi.js
pixi.js
 
 

Repository files navigation

ImpactPixi

Pixi.js renderer module for Impact

Demo

http://kelokorpi.com/impactpixi/example/

Module

Install

Copy pixi.js to your lib/plugins/ folder and require plugins.pixi on your game main module.

Example

  • See examples folder

Usage

  • Your main stage is at ig.system.stage.
  • Always first call this.parent(); on your ig.Game class init function.
  • Load assets with ig.Asset().

Loader

You can make your own loader by extending ig.Loader class, there are few new functions on the loader.

  • initStage init your loader graphcis here.
  • onPercentChange called when loader percent changes.
  • draw put your drawing functions here.

Example

MyLoader = ig.Loader.extend({
	initStage: function() {
		var canvas = document.createElement("canvas");
		canvas.width = 100;
		canvas.height = 100;
		var ctx = canvas.getContext("2d");
		ctx.fillStyle = "#ffffff";
		ctx.fillRect(0,0,100,100);

		this.sprite = new PIXI.Sprite(PIXI.Texture.fromCanvas(canvas));
		this.sprite.anchor.x = this.sprite.anchor.y = 0.5;
		this.sprite.position.x = ig.system.width / 2;
		this.sprite.position.y = ig.system.height / 2;
		ig.system.stage.addChild(this.sprite);
	},

	draw: function() {
		this.sprite.rotation += 0.2;
	}
});

About

Pixi.js renderer module for Impact

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.