Jump to content

Access to renderer.backgroundColor in TypeScript


yahiko
 Share

Recommended Posts

I am wondering why the renderer.backgroundColor property is not public in TypeScript.

In order to get directly access to this useful property, I needed to create a helper class to expose this attribute:

class GameRenderer extends PIXI.WebGLRenderer {
    public backgroundColor: number;
}


If anyone has an explanation, I would be interested to read it.

Thanks! :)

Link to comment
Share on other sites

9 hours ago, yahiko said:

Your declaration file seems more accurate than the one I can get from: npm install --save-dev @types/pixi.js.

It would be great if the npm registry could be up to date :)

Thanks anyway for your helpful answer.

We have problems with it, each time it involves some magic with new tests for ts definition to satisfy definitelytyped daemon.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...