@3dsource/angular-unreal-module
Version:
Angular Unreal module for connect with unreal engine stream
108 lines (78 loc) • 2.48 kB
Markdown
# @3dsource/angular-unreal-module
A standalone Angular component for integrating Unreal Engine scenes into web applications. This module facilitates
communication between Angular applications and Unreal Engine, enabling interactive 3D experiences.
## Overview
The Angular Unreal Module provides:
- Seamless integration of Unreal Engine content in Angular applications
- Communication bridge between Angular and Unreal Engine
- State management for 3D scene interactions
- Configurators for customizing Unreal Engine applications
## Installation
### Prerequisites
- Angular 19+
- NgRx store and effects
### Peer Dependencies
This library requires the following peer dependencies:
```json
{
"@3dsource/source-ui-native": "^1.0.7",
"@3dsource/types-unreal": "^0.0.1",
"@3dsource/utils": "^1.0.13",
"@angular/cdk": "^19.2.0",
"@angular/common": "^19.2.0",
"@angular/core": "^19.2.0",
"@angular/forms": "^19.2.0",
"@ngrx/effects": "^19.1.0",
"@ngrx/operators": "^19.1.0",
"@ngrx/store": "^19.1.0"
}
```
### Library Installation
```shell
npm i @3dsource/angular-unreal-module
```
## Usage
### Basic Integration
1. Import the UnrealModule in your Angular application:
```typescript
import { UnrealModule } from '@3dsource/angular-unreal-module';
@NgModule({
imports: [
UnrealModule.forRoot({
// Configuration options
}),
],
})
export class AppModule {}
```
2. Use the Unreal scene component in your templates:
```html
<unreal-scene [config]="unrealConfig" (sceneReady)="onSceneReady($event)"> </unreal-scene>
```
### Communication with Unreal Engine
The module provides services for sending commands to and receiving events from Unreal Engine:
```typescript
import { UnrealService } from '@3dsource/angular-unreal-module';
@Component({ ... })
export class MyComponent {
constructor(private unrealService: UnrealService) {
}
sendCommand() {
this.unrealService.sendCommand({
command: 'SomeCommand',
parameters: { /* command parameters */ }
});
}
}
```
## Features
- **Unreal Scene Component**: Embed Unreal Engine content in Angular applications
- **Command API**: Send commands to Unreal Engine
- **Event Handling**: React to events from Unreal Engine
- **State Management**: NgRx integration for managing 3D scene state
- **Configuration Options**: Customize the Unreal Engine integration
## Examples
Check the demo application for complete usage examples:
```shell
npm run demo:start
```