{"action":"created","issue":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/3460","repository_url":"https://api.github.com/repos/pixijs/pixi.js","labels_url":"https://api.github.com/repos/pixijs/pixi.js/issues/3460/labels{/name}","comments_url":"https://api.github.com/repos/pixijs/pixi.js/issues/3460/comments","events_url":"https://api.github.com/repos/pixijs/pixi.js/issues/3460/events","html_url":"https://github.com/pixijs/pixi.js/pull/3460","id":195309428,"number":3460,"title":"Adds tintRgb property to Sprite (#3229)","user":{"login":"jojuntune","id":23663590,"avatar_url":"https://avatars.githubusercontent.com/u/23663590?v=3","gravatar_id":"","url":"https://api.github.com/users/jojuntune","html_url":"https://github.com/jojuntune","followers_url":"https://api.github.com/users/jojuntune/followers","following_url":"https://api.github.com/users/jojuntune/following{/other_user}","gists_url":"https://api.github.com/users/jojuntune/gists{/gist_id}","starred_url":"https://api.github.com/users/jojuntune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojuntune/subscriptions","organizations_url":"https://api.github.com/users/jojuntune/orgs","repos_url":"https://api.github.com/users/jojuntune/repos","events_url":"https://api.github.com/users/jojuntune/events{/privacy}","received_events_url":"https://api.github.com/users/jojuntune/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-13T17:00:04Z","updated_at":"2016-12-19T14:51:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pixijs/pixi.js/pulls/3460","html_url":"https://github.com/pixijs/pixi.js/pull/3460","diff_url":"https://github.com/pixijs/pixi.js/pull/3460.diff","patch_url":"https://github.com/pixijs/pixi.js/pull/3460.patch"},"body":"Compute hex2rgb of Sprite when set tint\r\n\r\nCurrently setter for tint in Sprite class sets variable _tintRGB, which is an integer. As requested in #3229, this commit adds a getter for _tintRgb, which is an array of three floats representing the rgb value of tint. This corresponds the _tintRgb value in Mesh class.\r\n\r\nThe tint can only be set through _tint, which has setter and getter. _tintRgbInt has only getter which returns an integer by value (not by reference!). Also only getter for _tintRgb is provided, which returns an immutable array of three floats. The reasoning for this is as follows. If for example tintRgb returned a reference to the array, the contents of the array could be changed by assigning a new value to an individual element of the array (e.g. tintRgb()[2] = 0.5). But changing the contents of _tintRgb array should in that case require that the values of _tint and _tintRgbInt are also updated in order to keep the tint values consistent. Implementing that would be tricky and made the implementation of the class difficult."},"comment":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/comments/267982622","html_url":"https://github.com/pixijs/pixi.js/pull/3460#issuecomment-267982622","issue_url":"https://api.github.com/repos/pixijs/pixi.js/issues/3460","id":267982622,"user":{"login":"jojuntune","id":23663590,"avatar_url":"https://avatars.githubusercontent.com/u/23663590?v=3","gravatar_id":"","url":"https://api.github.com/users/jojuntune","html_url":"https://github.com/jojuntune","followers_url":"https://api.github.com/users/jojuntune/followers","following_url":"https://api.github.com/users/jojuntune/following{/other_user}","gists_url":"https://api.github.com/users/jojuntune/gists{/gist_id}","starred_url":"https://api.github.com/users/jojuntune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojuntune/subscriptions","organizations_url":"https://api.github.com/users/jojuntune/orgs","repos_url":"https://api.github.com/users/jojuntune/repos","events_url":"https://api.github.com/users/jojuntune/events{/privacy}","received_events_url":"https://api.github.com/users/jojuntune/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T14:51:35Z","updated_at":"2016-12-19T14:51:35Z","body":"Yes, to me it seems tint is common to Sprite/Mesh/TilingSprite, as they have a common parent class, Container."}}
{"actor":{"display_login":"jojuntune"}}