Git Product home page Git Product logo

pixi-ts-def's People

Contributors

clark-stevenson avatar natelong avatar whizzkid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pixi-ts-def's Issues

Need to be able to set scaleModes.DEFAULT to another value.

Hi, thanks for this useful definition file. I just had a minor issue using it that I thought I'd share.

I'm using pixel art in my game, and I'm setting the scaleMode with this line at the beginning of my application:

PIXI.scaleModes.DEFAULT = PIXI.scaleModes.NEAREST;

This makes NEAREST the default for all textures. It seems that because the definition uses enum, it's impossible to set later.

For now I'm using the trick of creating an untyped alias:

var PIXI_alias: any = PIXI;
PIXI_alias.scaleModes.DEFAULT = PIXI.scaleModes.NEAREST;

I'm still just getting the hang of TypeScript, so I'm not sure what the solution is right now. If I figure it out I'll let you know.

Thanks again :)

-Lee

some small errors

autoDetectRenderer params transparent and antialias are in the wrong order

in pixi.d.ts

export function autoDetectRenderer(width: number, height: number, view?: HTMLCanvasElement, antialias?, transparent?): IPixiRenderer;

in pixi.js

PIXI.autoDetectRenderer = function(width, height, view, transparent, antialias)

also touchmove is missing from export class DisplayObject

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.