# createjs-module

> Collection of libraries in the CreateJS suite for Angular and Ionic.

Latest version **0.8.3** (published 2017-10-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install createjs-module
pnpm add createjs-module
yarn add createjs-module
bun add createjs-module
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.3 |
| Published | 2017-10-09 |
| First published | 2017-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | AJ Barry |
| Maintainers | ajbarry3 |
| Keywords | createjs, easeljs, angular, angular2, angular4, angular 2, angular 4, ionic, ionic2, ionic3, ionic 2, ionic 3, easeljs, tweenjs, soundjs, preloadjs |

## Links

- npm: https://www.npmjs.com/package/createjs-module
- Repository: https://github.com/ajbarry3/createjs-module
- Homepage: https://github.com/ajbarry3/createjs-module#readme
- Issues: https://github.com/ajbarry3/createjs-module/issues
- npm.io page: https://npm.io/package/createjs-module

## Recent versions

- 0.8.3 (latest) — 2017-10-09
- 0.8.2-beta — 2017-08-14
- 0.8.2-27 — 2017-07-25
- 0.8.2-26 — 2017-07-25
- 0.8.2-25 — 2017-07-25
- 0.8.2-24 — 2017-07-23
- 0.8.2-23 — 2017-07-16
- 0.8.2-22 — 2017-07-16
- 0.8.2-21 — 2017-07-16
- 0.8.2-20 — 2017-07-16
- 0.8.2-19 — 2017-07-15
- 0.8.2-18 — 2017-07-15
- 0.8.2-16 — 2017-07-15
- 0.8.2-15 — 2017-07-15
- 0.8.2-14 — 2017-07-15
- … 14 more at https://npm.io/package/createjs-module/versions

## README

# CreateJS library module for Angular and Ionic

This is the createjs-0.8.2 collection.
***Now with typings!!!***

* EaselJS
* TweenJS
* SoundJS
* PreloadJS

You can find documentation at [CreateJS](http://blog.createjs.com/).



## Install

```bash
npm install createjs-module --save
```

**Angular**
```ts
import { Component, AfterViewInit } from '@angular/core';
import * as createjs from 'createjs-module';

@Component({
  selector: 'app-root',
  template: '<canvas width="500" height=500 id="demoCanvas"></canvas>'
})
export class AppComponent implements AfterViewInit {

  ngAfterViewInit() {
    var stage = new createjs.Stage("demoCanvas");
    var circle = new createjs.Shape();
    circle.graphics.beginFill("DeepSkyBlue").drawCircle(0, 0, 50);
    circle.x = 10;
    circle.y = 10;
    stage.addChild(circle);

    stage.update();

    createjs.Tween.get(circle, { loop: true })
    .to({ x: 400 }, 1000, createjs.Ease.getPowInOut(4))
    .to({ alpha: 0, y: 175 }, 500, createjs.Ease.getPowInOut(2))
    .to({ alpha: 0, y: 225 }, 100)
    .to({ alpha: 1, y: 200 }, 500, createjs.Ease.getPowInOut(2))
    .to({ x: 100 }, 800, createjs.Ease.getPowInOut(2));

    createjs.Ticker.setFPS(60);
    createjs.Ticker.addEventListener("tick", stage);
  }

}
```

**Ionic**
```ts
import {Component} from '@angular/core';
import * as createjs from 'createjs-module';

@Component({
  selector: 'project-name-app',
  template: `
    <ion-content padding>
     <canvas width="500" height=500 id="demoCanvas"></canvas>
    </ion-content>
  `
})
export class MyApp {
  ionViewDidEnter() {
    var stage = new createjs.Stage("demoCanvas");
    var circle = new createjs.Shape();
    circle.graphics.beginFill("DeepSkyBlue").drawCircle(0, 0, 50);
    circle.x = 10;
    circle.y = 10;
    stage.addChild(circle);

    stage.update();

    createjs.Tween.get(circle, { loop: true })
    .to({ x: 400 }, 1000, createjs.Ease.getPowInOut(4))
    .to({ alpha: 0, y: 175 }, 500, createjs.Ease.getPowInOut(2))
    .to({ alpha: 0, y: 225 }, 100)
    .to({ alpha: 1, y: 200 }, 500, createjs.Ease.getPowInOut(2))
    .to({ x: 100 }, 800, createjs.Ease.getPowInOut(2));

    createjs.Ticker.setFPS(60);
    createjs.Ticker.addEventListener("tick", stage);
  }
  
  constructor(){
  }
}
```

Credit Matt Balmer

---
_Source: https://npm.io/package/createjs-module · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
