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

phaser-ui-comps

v1.1.2

Published

Phaser 3 UI Components Framework and JSFL builder for Adobe Animate

Downloads

624

Readme

Phaser 3 UI Components, built by Adobe Animate

ComponentClip build itself with provided JSON and atlases, and UIComponentPrototype Will help to control them, switch states, listen to click, drag and other events.

In addition, UIComponentPrototype and it's children classes don't mind, if they have a real clip instance in current state or at all, so nothing bad happens, for example, if you remove some button instance in your window in Animate document and keep it's UIComponentPrototype instance.

All bitmaps are exported to png files with the same folder structure as in the Animate document library. Pack them to atlases using TexturePacker or other tool you like.

Main framework repo

Docs, tutorials, examples

Live example

Issues, bugs, new components ideas

Animate document example

To install the latest version from npm locally and save it in your package.json file:

npm install --save phaser-ui-comps

or if you are using yarn

yarn add phaser-ui-comps

Or you can download minified version from https://github.com/xense/phaser-ui-comps/tree/master/dist

Or use jsdelivr cdn version

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser-ui-comps-with-underscore.min.js"></script>

Note! PhaserComps uses underscore.js There are two builds in the /dist folder, one with underscore included and other without it, so you need to load it before loading PhaserComps

<script src="path/to/scripts/phaser.js"></script>
<script src="path/to/scripts/phaser-ui-comps-with-underscore.min.js"></script>
const COMPONENT_CONFIG = "comp-config";
const TEXTURE_CONFIG = "my_texture";


var game = new Phaser.Game({
    type: Phaser.AUTO,
    parent: "phaser-example",
    width: 800,
    height: 600,
    scene: {
        preload: preload,
        create: create
    }
});


function preload() {
    this.load.json(COMPONENT_CONFIG, "assets/my_component.json");
    this.load.multiatlas(TEXTURE_CONFIG, "assets/atlases/my_atlas.json", "assets/atlases/");
}

function create() {
    let clip = new PhaserComps.ComponentClip(
        this, 
        this.cache.json.get(COMPONENT_CONFIG), 
        [ TEXTURE_CONFIG ]
    );
    
    let component = new PhaserComps.UIComponents.UIComponentPrototype();
    component.appendClip(clip);
}