We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Thx for the development of pixi-tiledmap... But i'm not able of using it.
Here is my simple code :
_import { Component, OnInit, ElementRef } from '@angular/core'; import { Map } from '../../model/Map.model'; import { MapService } from '../../services/map/map.service'; import { GameService } from '../../services/game/game.service'; import { Application } from 'pixi.js'; import { TiledMap } from 'pixi-tiledmap';
@component({ selector: 'app-world', templateUrl: './world.component.html', styleUrls: ['./world.component.css'] }) export class WorldComponent implements OnInit {
private map: Map; public app: any;
constructor(private gameService: GameService, private mapService: MapService, private elementRef: ElementRef) { const app = new Application({ width: 800, height: 600 }); this.app = app; this.elementRef.nativeElement.appendChild(app.view);
app.loader .add('assets/maps/map1.tmx') .load(function () { app.renderer.render(new TiledMap('assets/maps/map1.tmx')); });
}
ngOnInit() {
this.gameService.getGameOnEvent().subscribe(game => { this.map = game.Map; });
}_
And i got a compilation problem :
error TS2306 : File 'pixi-tiledmap.d.ts' is not a module
And in the console :
core.js:7187 ERROR TypeError: pixi_tiledmap__WEBPACK_IMPORTED_MODULE_4__.TiledMap is not a constructor
I guess I'm doing something wrong but can't know what :(
Would you please help me ?
Quentin
The text was updated successfully, but these errors were encountered:
I have exact the same issue. @qmidy, did you solve it?
Sorry, something went wrong.
No branches or pull requests
Hi,
Thx for the development of pixi-tiledmap... But i'm not able of using it.
Here is my simple code :
_import { Component, OnInit, ElementRef } from '@angular/core';
import { Map } from '../../model/Map.model';
import { MapService } from '../../services/map/map.service';
import { GameService } from '../../services/game/game.service';
import { Application } from 'pixi.js';
import { TiledMap } from 'pixi-tiledmap';
@component({
selector: 'app-world',
templateUrl: './world.component.html',
styleUrls: ['./world.component.css']
})
export class WorldComponent implements OnInit {
private map: Map;
public app: any;
constructor(private gameService: GameService, private mapService: MapService, private elementRef: ElementRef) {
const app = new Application({
width: 800,
height: 600
});
this.app = app;
this.elementRef.nativeElement.appendChild(app.view);
}
ngOnInit() {
}
}_
And i got a compilation problem :
error TS2306 : File 'pixi-tiledmap.d.ts' is not a module
And in the console :
core.js:7187 ERROR TypeError: pixi_tiledmap__WEBPACK_IMPORTED_MODULE_4__.TiledMap is not a constructor
I guess I'm doing something wrong but can't know what :(
Would you please help me ?
Quentin
The text was updated successfully, but these errors were encountered: