{"action":"created","issue":{"url":"https://api.github.com/repos/KTXSoftware/KodeStudio/issues/34","repository_url":"https://api.github.com/repos/KTXSoftware/KodeStudio","labels_url":"https://api.github.com/repos/KTXSoftware/KodeStudio/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/KTXSoftware/KodeStudio/issues/34/comments","events_url":"https://api.github.com/repos/KTXSoftware/KodeStudio/issues/34/events","html_url":"https://github.com/KTXSoftware/KodeStudio/issues/34","id":197823591,"number":34,"title":"Error: Cannot cast HTMLImageElement to WebGLImage in Debug mode","user":{"login":"malublu","id":14329224,"avatar_url":"https://avatars.githubusercontent.com/u/14329224?v=3","gravatar_id":"","url":"https://api.github.com/users/malublu","html_url":"https://github.com/malublu","followers_url":"https://api.github.com/users/malublu/followers","following_url":"https://api.github.com/users/malublu/following{/other_user}","gists_url":"https://api.github.com/users/malublu/gists{/gist_id}","starred_url":"https://api.github.com/users/malublu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malublu/subscriptions","organizations_url":"https://api.github.com/users/malublu/orgs","repos_url":"https://api.github.com/users/malublu/repos","events_url":"https://api.github.com/users/malublu/events{/privacy}","received_events_url":"https://api.github.com/users/malublu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-28T09:34:24Z","updated_at":"2016-12-28T17:49:57Z","closed_at":null,"body":"- VSCode Version (Kode Studio): 16.11.1\r\n- OS Version: Windows 10 pro\r\n\r\nSteps to Reproduce:\r\n1. Code:\r\n```\r\npublic function new() {\r\n\tAssets.loadEverything(loaded);\r\n}\r\n\r\npublic function loaded() {\r\n\t_notLoaded = false;\r\n\t_ship = Assets.images.playerShip;\r\n}\r\n\r\npublic function render(framebuffer: Framebuffer) {\r\n\tif(_notLoaded) return;\r\n\tvar g =framebuffer.g2;\r\n\tg.begin();\r\n\tg.drawImage(_ship, 0, 0);\r\n\tg.end();\r\n}\r\n```\r\n2. F5\r\n\r\nError:\r\n```\r\nError: Cannot cast {\r\n\tg2canvas : null, \r\n\tmyWidth : 99, \r\n\tmyHeight : 75, \r\n\tformat : RGBA32, \r\n\trenderTarget : false, \r\n\timage : [object HTMLImageElement], \r\n\tvideo : null\r\n} to {\r\n\t__name__ : [kha,WebGLImage], \r\n\tinit : <function>, \r\n\tupperPowerOfTwo : <function>, \r\n\tformatByteSize : <function>\r\n}\r\n```\r\n\r\nIt works on the html5 target, but not in the debug html5 target with electron.\r\nHow to fix that?\r\nWhere is the target of this? (Source code) to help you out? i don't find it in kha or KodeStudio.\r\n\r\nThanks for your answer."},"comment":{"url":"https://api.github.com/repos/KTXSoftware/KodeStudio/issues/comments/269513222","html_url":"https://github.com/KTXSoftware/KodeStudio/issues/34#issuecomment-269513222","issue_url":"https://api.github.com/repos/KTXSoftware/KodeStudio/issues/34","id":269513222,"user":{"login":"malublu","id":14329224,"avatar_url":"https://avatars.githubusercontent.com/u/14329224?v=3","gravatar_id":"","url":"https://api.github.com/users/malublu","html_url":"https://github.com/malublu","followers_url":"https://api.github.com/users/malublu/followers","following_url":"https://api.github.com/users/malublu/following{/other_user}","gists_url":"https://api.github.com/users/malublu/gists{/gist_id}","starred_url":"https://api.github.com/users/malublu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malublu/subscriptions","organizations_url":"https://api.github.com/users/malublu/orgs","repos_url":"https://api.github.com/users/malublu/repos","events_url":"https://api.github.com/users/malublu/events{/privacy}","received_events_url":"https://api.github.com/users/malublu/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T17:49:57Z","updated_at":"2016-12-28T17:49:57Z","body":"Okay sorry i fix in my own code:\r\nAfter some time (8h) i found the solution:\r\nI created the Project before the window was avaible (before the callback: System.init(options, function () {).\r\nI was wondering thats work on the html5 target but not in the debug mode of kode studio.\r\nNow it works both.\r\n\r\nThank you for your help.\r\nThe Error message was a bit defficult to figure out what it means (where it comes from).\r\n"}}
{"actor":{"display_login":"malublu"}}