Skip to content

Commit d655168

Browse files
committed
feat(ng-pixijs): first version
first version BREAKING CHANGE: first version
1 parent 0b7ed7b commit d655168

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

apps/example-ng-pixijs/ng-doc/pages/add-default-pixijs-primitive/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
keyword: AddDefaultPixijsPrimitivePage
33
---
44

5-
**NgPixiJS** - provide several component which allow work with PixiJs primitive in Angular way:
5+
**NgPixiJS** - provides several components that allow working with PixiJs primitive in Angular way:
66

77

88
```typescript
@@ -16,10 +16,10 @@ export interface HTMLElementTagNameMap {
1616
'pixi-graphics': Graphics;
1717
}
1818
```
19-
These primitives you can use in your stages components:
19+
The following primitives you can use in your stage components:
2020

2121
> **Warning**
22-
> There shouldn't be **HTML** components!!!
22+
> They shouldn't be **HTML** components!!!
2323
2424

2525

apps/example-ng-pixijs/ng-doc/pages/create-scene/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To create a scene using PixiJS within your Angular application, you can utilize
88
Import the `PixiSceneComponent` into the Angular component where you want to create your PixiJS scene.
99

1010
> **Note**
11-
> When using Angular's server-side rendering (SSR), it's important to add [ngSkipHydration](https://angular.dev/guide/hydration#how-to-skip-hydration-for-particular-components) to prevent server-side rendering of components that require direct access to browser APIs, like those using PixiJS.
11+
> When using Angular's server-side rendering (SSR), it's important to add [ngSkipHydration](https://angular.dev/guide/hydration#how-to-skip-hydration-for-particular-components) to prevent server-side rendering for the components that require direct access to browser APIs, like those using PixiJS.
1212
1313
```typescript group="create-scene" file="../../../src/app/example-doc/scene/scene.component.ts" name="scene.component.ts"
1414

apps/example-ng-pixijs/ng-doc/pages/create-stage-component/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
keyword: CreateStageComponentPage
33
---
44

5-
To add a stage in PixiJS within your Angular application, you will work with the stage property of the [Application](https://pixijs.download/release/docs/app.Application.html#stage) class.
6-
A PixiJS stage is essentially a container that holds all the display objects (sprites, graphics, etc.) that you want to render.
5+
To add a stage in PixiJS within your Angular application, you will need to work with the stage property of the [Application](https://pixijs.download/release/docs/app.Application.html#stage) class.
6+
A PixiJS stage is essentially a container that holds all display objects (sprites, graphics, etc.) that you want to render.
77
In this setup, you can have multiple stages, each represented by an Angular component.
88

99
> **Note**
10-
> Ensure that add [**CUSTOM_ELEMENTS_SCHEMA**](https://angular.dev/guide/components/advanced-configuration#custom-element-schemas) to the component's schemas.
10+
> Ensure to add [**CUSTOM_ELEMENTS_SCHEMA**](https://angular.dev/guide/components/advanced-configuration#custom-element-schemas) to the component's schemas.
1111
1212
The stage property of the Application class can be used to manage multiple stages.
1313
Each Angular component can represent a separate stage, allowing you to modularize and organize your PixiJS application effectively.

apps/example-ng-pixijs/ng-doc/pages/custom-ng-pixijs-component/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
keyword: CreateCustomNgPixiJSComponentPage
33
---
44

5-
You can add additional [container](https://pixijs.download/release/docs/scene.Container.html) component and use it in inside of stage or other container component.
6-
You can add your owner providers. The template can be empty or contain other **NgPixiJS** component
5+
You can add additional [container](https://pixijs.download/release/docs/scene.Container.html) component and use it inside of stage or other container component.
6+
You can add your own providers. The template can be empty or contain other **NgPixiJS** component
77
```typescript group="additional-contayner" name="app-some-contayner.component.ts"
88
import { PixiContainer } from '@klerick/ng-pixijs';
99
import { Container } from 'pixi.js';
@@ -21,8 +21,8 @@ export class AppSomeContaynerComponent extends PixiComponent<Container> {
2121
}
2222
```
2323

24-
You can create your owner primitive with custom logic and use PixiJs primitive as base. This type of component must not contain a template.
25-
So, because you need to use a [@Directive](https://angular.dev/api/core/Directive)
24+
You can create your own primitive with the custom logic and use PixiJs primitive as basis. This type of component must not contain a template.
25+
So, because of this you need to use a [@Directive](https://angular.dev/api/core/Directive)
2626

2727

2828
```typescript group="additional-contayner" name="app-some-contayner.component.ts"
@@ -39,10 +39,10 @@ export class AppSomeRectDirective extends PixiComponent<Graphics>{
3939
}
4040
```
4141

42-
`PixiComponent<T extend Container>` - has several additional lifecycle hooks and properties
42+
`PixiComponent<T extend Container>` - has several additional lifecycle hooks and properties.
4343

44-
**onPixiInit** - This callback is used after init pixijs application. You should implement interface `OnPixiInit`
44+
**onPixiInit** - This callback is used after initialization of PixiJS application. You should implement interface `OnPixiInit`
4545
**onRender** - This callback is used when the container is [rendered](https://pixijs.download/release/docs/scene.Container.html#onRender).
4646

47-
**pixiApp** - This property contain instance of [Application](https://pixijs.download/release/docs/app.Application.html)
48-
**pixiElement** - This property contain instance of base class
47+
**pixiApp** - This property contains the instance of [Application](https://pixijs.download/release/docs/app.Application.html)
48+
**pixiElement** - This property contains the instance of base class

apps/example-ng-pixijs/ng-doc/pages/what-is-ng-pixijs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ By utilizing a custom [RendererFactory2](https://angular.dev/api/core/RendererFa
88
#### Key Features
99

1010
1. PixiJS Integration in Angular:
11-
- Enables the use of standard primitives and features of PixiJS within an Angular application, ensuring smooth integration and interaction between the two frameworks.
11+
- Enables the utilization of standard primitives and features of PixiJS within an Angular application, ensuring smooth integration and interaction between the two frameworks.
1212

1313
2. Custom RendererFactory2:
1414
- Implements a custom RendererFactory2 that manages the rendering of the PixiJS scene. This allows developers to use PixiJS for creating complex graphics and animations while staying within the Angular ecosystem.
@@ -17,7 +17,7 @@ By utilizing a custom [RendererFactory2](https://angular.dev/api/core/RendererFa
1717
- Provides the ability to define custom Angular components that act as wrappers for PixiJS objects. This allows using Angular's component and template approach to manage graphics.
1818

1919
4. Support for Dependency Injection (DI):
20-
- Full support for Angular DI within components, simplifying state management and interactions between components based on PixiJS.
20+
- Full support for Angular DI within components, simplifing state management and interactions between components based on PixiJS.
2121

2222
5. Control Flow in Templates:
2323
- Support for Angular control flow directives in templates, enabling the use of constructs like *ngIf, *ngFor, and others for dynamically managing elements in the PixiJS scene.
-14.7 KB
Binary file not shown.

apps/example-ng-pixijs/src/app/main/main.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h1 ng-doc-text>
77

88
Use PixiJS in Angular way</h1>
9-
<p class="description" ng-doc-text>PixiJS primitives as Angular components!</p>
9+
<p class="description" ng-doc-text>PixiJS primitives as Angular components</p>
1010
<div class="greeting-buttons">
1111
<a [rounded]="true" [routerLink]="['docs']" ng-doc-button-flat size="large">
1212
<span ng-doc-text>
@@ -15,17 +15,17 @@ <h1 ng-doc-text>
1515
</a>
1616
</div>
1717
<div class="greeting-shields">
18-
<a href="https://www.npmjs.com/package/@ng-doc/builder" target="_blank">
19-
<img src="https://img.shields.io/npm/v/@ng-doc/builder.svg?style=for-the-badge" />
18+
<a href="https://www.npmjs.com/package/@klerick/ng-pixijs" target="_blank">
19+
<img src="https://img.shields.io/npm/v/@klerick/ng-pixijs.svg?style=for-the-badge" />
2020
</a>
2121

22-
<a href="https://github.com/ng-doc/ng-doc/stargazers" target="_blank">
23-
<img src="https://img.shields.io/github/stars/ng-doc/ng-doc?style=for-the-badge" />
22+
<a href="https://github.com/klerick/ng-pixijs/stargazers" target="_blank">
23+
<img src="https://img.shields.io/github/stars/klerick/ng-pixijs?style=for-the-badge" />
2424
</a>
2525

26-
<a href="https://github.com/ng-doc/ng-doc/blob/main/LICENSE" target="_blank">
26+
<a href="https://github.com/klerick/ng-pixijs/blob/main/LICENSE" target="_blank">
2727
<img
28-
src="https://img.shields.io/github/license/ng-doc/ng-doc.svg?style=for-the-badge" />
28+
src="https://img.shields.io/github/license/klerick/ng-pixijs.svg?style=for-the-badge" />
2929
</a>
3030
</div>
3131
</div>

0 commit comments

Comments
 (0)