These are chat archives for pixijs/pixi.js

7th
Feb 2018
Ivan Vodopiviz
@ivodopiviz
Feb 07 2018 12:48
guys, does anyone have a pixi-spine example using TypeScript? I'm having issues importing classes using the included d.ts
that's how we test spine TS
Ivan Vodopiviz
@ivodopiviz
Feb 07 2018 12:51
webpack
Ivan Popelyshev
@ivanpopelyshev
Feb 07 2018 12:52

import 'pixi.js';
import 'pixi-spine';

then PIXI.spine is available . As for d.ts, i hope you know about ///<reference types="pixi-spine"/>

Ivan Vodopiviz
@ivodopiviz
Feb 07 2018 12:52
I'm trying this:
import { Spine } from 'pixi-spine';
Ivan Popelyshev
@ivanpopelyshev
Feb 07 2018 12:52
dont. Spine hacks global pixi
i have guarantee that checkpack works
you want to use import {Spine} => copy that d.ts into your lib folder and change it
i dont know how to make good d.ts that works both for webpack and for vanilla, that's why we use global stuff
however, we make sure that JS imports work :)
Ivan Popelyshev
@ivanpopelyshev
Feb 07 2018 12:57
also that's why I either use webpack and ES6 import/export either I use TS.
TS has namespaces mechanism, and its fast, i dont know why people need webpack and other things with it
Ivan Vodopiviz
@ivodopiviz
Feb 07 2018 13:20
to be honest, I'm using a premade template, I'll probably get rid of webpack
also, add +1 to your "Beers in Prague that the other Ivan owes you" :P
Ivan Popelyshev
@ivanpopelyshev
Feb 07 2018 14:13
:)
if you make a template without webpack I'll add it to our templates wiki list
Ivan Vodopiviz
@ivodopiviz
Feb 07 2018 14:54
if I ever get this in decent shape, sure
is there a way to get a list of all the animations contained in a spine? even if I have to go track by track
Ivan Popelyshev
@ivanpopelyshev
Feb 07 2018 15:00
in a spine model?
or current animations
Ivan Vodopiviz
@ivodopiviz
Feb 07 2018 15:13
let's say I load dragon.json and I want to know all the animations in it
Mark Knol
@markknol
Feb 07 2018 15:17
in pixi, do textures need to be power of two, and what happens if they arent?
Ivan Popelyshev
@ivanpopelyshev
Feb 07 2018 15:20
no mipmaps
if you need mipmaps, you need power-of-two
otherwise, meh :)
Mark Knol
@markknol
Feb 07 2018 15:22
ok so no performance hit, or automatic texture creation at that size or what so ever?
no need for mipmaps
Ivan Popelyshev
@ivanpopelyshev
Feb 07 2018 15:23
yep
except.. well.
if you need REPEAT
tilingSprite can be faster with REPEAT
it uses webgl texture options instead of %= in shader
Mark Knol
@markknol
Feb 07 2018 15:24
no i have big amount of tiles (separate images) with non-poweroftwo sizes , was wondering if that is an issue
Ivan Vodopiviz
@ivodopiviz
Feb 07 2018 15:24
any specific reason not to use a texture atlas?
Ivan Popelyshev
@ivanpopelyshev
Feb 07 2018 15:24
no, its the same as if they were pow2
Mark Knol
@markknol
Feb 07 2018 15:25
because the total size is 6300x2500 px
but I could end up making texture atlasses of those
Ivan Vodopiviz
@ivodopiviz
Feb 07 2018 15:26
fair enough