npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pixi-flash

v0.4.0

Published

A library for bridging CreateJS animations from Flash for use in Pixi.js. Publish Flash content like you normally would for CreateJS (with an HTML5 Canvas document), but export for Pixi.js instead. While there are some [known issues](https://github.com/Cl

Downloads

39

Readme

PIXI Flash Build Status Dependency Status GitHub version

A library for bridging CreateJS animations from Flash for use in Pixi.js. Publish Flash content like you normally would for CreateJS (with an HTML5 Canvas document), but export for Pixi.js instead. While there are some known issues with this approach, it produces fast animation playback for WebGL and is superior to using Flash's WebGL document.

Game Examples

The animation in these games has been created and exported with PixiFlash.

Examples

Animated examples are from Fizzy's Lunch Lab and used with permission from Lunch Lab, LLC

Flash Publishing

Install Publishing Helper (optional)

Install the post-publish tool by running tools/install.jsfl. This provides some error checking when publishing for PIXI Flash, including error checking images and symbol namespaces.

Flash Setup

  1. Make sure you use a Flash "HTML5 Canvas" document type
  2. Change the publishing settings under JavaScript Namespaces
  • Symbols: pixiflash_lib
  • Images: pixiflash_images
  • CreateJS: pixiflash
  1. Publishing document

Running Content

Installing Library

To run content exported with PixiFlash, you must load the JavaScript library within your project. You can install using Bower or NPM:

Bower

bower install pixi-flash

NPM

npm install pixi-flash

Dependencies

  • Pixi.js is required
  • TweenJS is a dependency for doing timeline animation

Usage

Here's a example using PIXI where the images were assembled using TexturePacker. See the example folder for an example which uses the Flash SpriteSheet exporting.

var renderer = new PIXI.autoDetectRenderer(800, 500);
var stage = new PIXI.Container();

// Load the atlas for the character
var loader = new PIXI.loaders.Loader();

// This atlas is created with TexturePacker from the 
// output individual images from Flash publishing
loader.add('CharacterAtlas',"CharacterAtlas.json");
loader.once('complete',function(loader, resources)
{
	// Assign the atlas to global images in pixiflash_images
	pixiflash.utils.addImages(resources.CharacterAtlas);

	// Create the character, all library symbols live
	// on the pixiflash_lib window object
	var character = new pixiflash_lib.Character();
	character.framerate = 30;
	character.play();

	// Add to stage
	stage.addChild(character);
});
loader.load();

// Normal render
update();
function update()
{
    requestAnimationFrame(update);
    renderer.render(stage);
}

##Known Issues

  • Abutting vector shapes create a small seams which make it possible to see the color underneath (similar to EaselJS)
  • Complex shapes with a negative shape inside of it only render the outer-most shape. For example, a donut shape would only render the outer circle and not the hole.
  • Cannot "Test Movie" in side of Flash to preview the animation
  • Flash Color Effects are supported only for Advanced style multiplicative color changes (RGB percents) by translating to PIXI 'tint' property. Additive color effects such as Tint, and the additive RGB modifiers in the Advanced Color Effect style will be ignored. The Brightness effect is only capable of darkening the symbol (Brightened symbols will be rendered darker than original). Keyframes and tweening of Color Effects are not supported.

##License

Copyright (c) 2015 CloudKid

Released under the MIT License.