{"action":"created","issue":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3823","repository_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3823/labels{/name}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3823/comments","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3823/events","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3823","id":147004445,"number":3823,"title":"Missing Textures Fix","user":{"login":"lasalvavida","id":2489570,"avatar_url":"https://avatars.githubusercontent.com/u/2489570?v=3","gravatar_id":"","url":"https://api.github.com/users/lasalvavida","html_url":"https://github.com/lasalvavida","followers_url":"https://api.github.com/users/lasalvavida/followers","following_url":"https://api.github.com/users/lasalvavida/following{/other_user}","gists_url":"https://api.github.com/users/lasalvavida/gists{/gist_id}","starred_url":"https://api.github.com/users/lasalvavida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasalvavida/subscriptions","organizations_url":"https://api.github.com/users/lasalvavida/orgs","repos_url":"https://api.github.com/users/lasalvavida/repos","events_url":"https://api.github.com/users/lasalvavida/events{/privacy}","received_events_url":"https://api.github.com/users/lasalvavida/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-08T18:35:56Z","updated_at":"2016-04-26T19:16:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3823","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3823","diff_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3823.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3823.patch"},"body":"This is a fix for #3730, though technically it is also a fix for #2997. It seems like #3730 was actually caused by #3011 breaking the resizing behavior of the ```TextureAtlas```. \r\n\r\nI included the contents of the ```TextureAtlas``` in the top left corner of the screenshots here to illustrate the failures.\r\n\r\nThe symptom of #2997 was the first letter disappearing.\r\n![missing-letters](https://cloud.githubusercontent.com/assets/2489570/14393583/b77f8d84-fd95-11e5-9c21-15770c60ccb4.PNG)\r\n\r\nThe cause of this issue was actually the creation of the initial texture in the constructor. The font-size in the reported issue is important to note, because if the image being added was larger than the initial texture, it was re-generated and everything was fine.\r\n\r\n#3011 fixed this, but caused issues when textures needed to be resized.\r\nThe resize failure can be seen below.\r\n\r\nBefore resize:\r\n![before-resize](https://cloud.githubusercontent.com/assets/2489570/14393777/a7cb8c8e-fd96-11e5-9fd0-b3883effbbd1.PNG)\r\n\r\nAfter resize:\r\n![after-resize](https://cloud.githubusercontent.com/assets/2489570/14393780/aaa122fc-fd96-11e5-9ae0-c0e33353a1a8.PNG)\r\n\r\nI suspect the underlying cause is something to do with the state when the constructor is called. This can be resolved by creating the initial texture when the first image is added.\r\n\r\nHere are the examples shown with the fix applied:\r\n![fixed1](https://cloud.githubusercontent.com/assets/2489570/14393821/f1a8f68e-fd96-11e5-955d-bab849ba4830.PNG)\r\n![fixed2](https://cloud.githubusercontent.com/assets/2489570/14393823/f3420d5a-fd96-11e5-9a0d-da68be177abd.PNG)\r\n"},"comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments/214856318","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3823#issuecomment-214856318","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3823","id":214856318,"user":{"login":"lasalvavida","id":2489570,"avatar_url":"https://avatars.githubusercontent.com/u/2489570?v=3","gravatar_id":"","url":"https://api.github.com/users/lasalvavida","html_url":"https://github.com/lasalvavida","followers_url":"https://api.github.com/users/lasalvavida/followers","following_url":"https://api.github.com/users/lasalvavida/following{/other_user}","gists_url":"https://api.github.com/users/lasalvavida/gists{/gist_id}","starred_url":"https://api.github.com/users/lasalvavida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasalvavida/subscriptions","organizations_url":"https://api.github.com/users/lasalvavida/orgs","repos_url":"https://api.github.com/users/lasalvavida/repos","events_url":"https://api.github.com/users/lasalvavida/events{/privacy}","received_events_url":"https://api.github.com/users/lasalvavida/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T19:16:55Z","updated_at":"2016-04-26T19:16:55Z","body":"The second screenshot is from this [CZML example](http://localhost:8080/Apps/Sandcastle/index.html?src=CZML%20Billboard%20and%20Label.html&label=CZML) which also seems to behave correctly."}}