-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
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
[Suggestion] Export the package as module #5
Comments
The newest version is compatible with nodejs. |
Can u add more documentation about how to download and and use this please? I have no idea how to use this, struggling more than an hour now :/ (I'm using React) |
It's simply meant to be included in the html page. Grab the PIXI.TextInput.min.js from the dist folder and include it via a script a tag. |
That's true, I already tried that =) |
How are you including pixi.js? |
Downloaded with NPM and including like: |
@Mwni My thought was to include it as npm package so you could be able to let's say
and then include it like that
Here is an example for a published project like that - https://github.com/jkanchelov/pixi-console |
@Mwni if you want invite to pixijs slack, send an email to [email protected] , i'll send an invite. There are people who can help with those kind of things. |
Okay first attempt of a npm package is online. Does it work? Can't test it inside node due to node not being a browser and don't have the browserify environment either. |
Lets meet in the middle. Its obviously that plugin creators who dont use React/Webpack and that stuff cnat get you everything. If we put something in npm and import kinda works - that's enough. Import the module after you import pixi.js. Do not import classes. Use |
I already tried almost everything Ivan, I think it doesn't inherit PIXI |
@buryo can you try and then confirm if let's say this package works for you https://github.com/jkanchelov/pixi-fps |
@jkanchelov Works like a charm! =) |
Later today or tomorrow I will push the things you need to make it work and will go with pull request and if @Mwni approves it and publish the package you won't have problems afterward |
@jkanchelov Thanks for the effort hero |
Any luck with people using this in a typescript project? |
@Kurt-Montanaro its not big, you can make typings for it. |
@Kurt-Montanaro i am using it from my fork but it’s still in a very ugly and early phase |
lets work on the npm module. someone already made it: https://github.com/jkanchelov/PIXI.TextInput |
no luck. i have got having:
"Uncaught TypeError: pixi_text_input__WEBPACK_IMPORTED_MODULE_1___default.a is not a constructor" |
@jjhesk I could publish it in its current state, but currently, I don't have time to improve it |
yes, try my new PR i took 2 hours to made it done. https://github.com/ONode/pixi-textinput |
This package is a good example on how to support a Node and a drop-in browser target: Note the two types of file in |
There is no module export in TextInput.js file. Has anyone else faced this issue? |
I have the same error, I am using pixi V5 (5.2.1). I installed "pixi-text-input" (now it is 1.0.4) feature, and created an instance of that and added to the stage, afterwards I run into that error related to rendering things. I think it is because now rendere was moved out of Display object? |
it wasnt , its still there. Also all objects are Containers, displayobject is base abstraction , not being used directly. |
It's clear, thanks! So, the question to the author then, will it be fixed? Because it is such a great feature! |
ok, will patch in a few hours. have to add something else anyways. |
@HusakYurii please check if 1.0.5 is working for you now. |
@Mwni Good morning! Sorry for the delay! I am building my bundle with pixi customize so, I added a few workarounds for my case, but in general it works !!! |
i am still facing the same issue, can you guys let me know the exact version which cause no issue? |
@muhammadhaseebsohail I used PIXI.js v5.2.1 . The project was packed up using webpack |
It would be really easy and convenient if this is exported as npm package and to be able to import it in a project via the esnext import statement for example
The text was updated successfully, but these errors were encountered: