Comments (13)
@NintendoBen This will be fixed in the next release of pixi.js (pixijs/pixi.js). Each scoped @pixi/ package will ship with its own typings.
from tilemap.
@NintendoBen Here's the PR btw: pixijs/pixijs#6849
from tilemap.
Wait, the index.d.ts file isn't in the shipped npm package?
from tilemap.
@NintendoBen 2.1.3 was just released, can you try again?
from tilemap.
I think the problem I'm having is just the nature of TypeScript not working well with the existing pixi plugin architecture which benefits from JavaScript's flexibility. I'll probably just have to find a way to make TypeScript happy ๐
from tilemap.
As a temporary workaround, I created a copy of the pixi-tilemap.d.ts type definitions in my own source/types and retargeted the @pixi module imports to point at "pixi.js" instead and smoothed out a couple warnings here and there like changing "String" to "string", etc... So far things seem to be working ok!
from tilemap.
Thanks for the info @SukantPal ! ๐
That will definitely solve the pixi type definition issue(s), but I think that the pixi-tilemap definitions will still be missing until they get bundled within the pixi-tilemap npm package root? Unless Iโm missing something - I donโt consider myself a TypeScript expert!
from tilemap.
Thatโs right I believe ๐
from tilemap.
https://github.com/pixijs/pixi-tilemap/blob/master/index.d.ts
How could that be? @ivanpopelyshev ^^
from tilemap.
@NintendoBen Dod you figure out why the index.d.ts is missing?
from tilemap.
Iโm not sure to be honest - just running npm install, it seems like the index.d.ts file doesnโt exist in the node_modules/pixi-tilemap folder. Iโm not that familiar with the npm package publish process, so Iโm not sure what could be going wrong.
from tilemap.
Will do - Iโll try it shortly ๐
from tilemap.
@SukantPal - looks like the index.d.ts file is included now! When I swap out my custom pixi-tilemap.d.ts definitions with the bundled pixi-tilemap/index.d.ts definitions, they're now picked up automatically by Visual Studio Code. The next trick will be to have the @pixi package typings generated and included ๐
Thanks for responding so quickly to this ๐
from tilemap.
Related Issues (20)
- Import `PIXI` instead of requiring it to exist globally. HOT 11
- Missing textures crash the renderer HOT 6
- pixi-tilemap assigns wrong width and height to the object when there are empty tiles HOT 8
- LDtk Json support HOT 4
- Feature request: Applying tint HOT 2
- id for tile HOT 7
- CanvasRenderer using incorrect asset from spritesheet HOT 11
- newest pixi-tilemap fails with renderer.plugins.tilemap undefined HOT 16
- CompositeTilemap has no `add` method, despite the example HOT 1
- tileAnim does not work for negative offsets HOT 1
- Tiles are reset to original, after x amount of changes HOT 2
- collision
- Update to newer PIXI version HOT 1
- Not working with new `cullable` property from `PIXI 6.3.0`. HOT 4
- Not working since PIXI 6.4.0 HOT 2
- Not compatible with Pixi 7 HOT 9
- Importing pixi tilemap does not work HOT 3
- Missing dependencies
- Texture ID is only set when composite parent is true.
- Request for the updating of rpgmaker.js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tilemap.