Failed to execute 'texImage2D' on 'WebGLRenderingContext ...

文章推薦指數: 80 %
投票人數:10人

Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin pixi.js:2367 image at file:///C:/Users/x/ ... Jumptocontent Wearehappytoinformyouthatforumisactiveback!;)ThenewownerofbrandHtml5GameDevsisGameMonetize.com × Browse Forums Staff OnlineUsers More Activity MyActivityStreams AllActivity UnreadContent ContentIStarted Search More Leaderboard Marketplace ContactUs Twitter More More SearchIn Everywhere Topics ThisForum ThisTopic Moreoptions... Findresultsthatcontain... Anyofmysearchtermwords Allofmysearchtermwords Findresultsin... Contenttitlesandbody Contenttitlesonly Pixi.js AllActivity Home Frameworks Pixi.js Failedtoexecute'texImage2D'on'WebGLRenderingContext'Error Failedtoexecute'texImage2D'on'WebGLRenderingContext'Error By OhNoItsATornahdo, August30,2017inPixi.js  Share Moresharingoptions... Followers 0 Replytothistopic Startnewtopic RecommendedPosts OhNoItsATornahdo PostedAugust30,2017 OhNoItsATornahdo Members 16 Report Share PostedAugust30,2017 SoItreidusingPixi.jsforthefirsttimeandItriedloadinganimageontoawebpage.WhenItrieddoingso,Igotthiserror: UncaughtDOMException:Failedtoexecute'texImage2D'on'WebGLRenderingContext':Thecross-originpixi.js:2367imageatfile:///C:/Users/x/Desktop/Projects/project/img/bck1.pngmaynotbeloaded. Here'sthecodetomyproject: PIXI.utils.sayHello(); varrenderer=PIXI.autoDetectRenderer(800,600,{ transparent:true, resolution:1 }); document.getElementById('main').appendChild(renderer.view); varstage=newPIXI.Container(); PIXI.loader .add('image','img/bck1.png') .load(setup); varimage; functionsetup(){ image=newPIXI.Sprite(PIXI.loader.resources['image'].texture); stage.addChild(image); renderer.render(stage); } Whatistheproblem? Quote Linktocomment Shareonothersites Moresharingoptions... ivan.popelyshev PostedAugust30,2017 ivan.popelyshev Members 5.4k @ivanpopelyshev Location:Moscow,Russia Report Share PostedAugust30,2017 Startaweb-server.   Asanexample:installnode.js,run"npminstall-ghttp-server",andinthedirectorywithyourapptype"http-server-c-1",web-pagewillbeaccessibleathttp://localhost:8080 OhNoItsATornahdo 1 Quote Linktocomment Shareonothersites Moresharingoptions... Jointheconversation Youcanpostnowandregisterlater. Ifyouhaveanaccount,signinnowtopostwithyouraccount. Note:Yourpostwillrequiremoderatorapprovalbeforeitwillbevisible. Replytothistopic... ×  Pastedasrichtext.  Pasteasplaintextinstead  Only75emojiareallowed. ×  Yourlinkhasbeenautomaticallyembedded.  Displayasalinkinstead ×  Yourpreviouscontenthasbeenrestored.  Cleareditor ×  Youcannotpasteimagesdirectly.UploadorinsertimagesfromURL. Loading... × Desktop Tablet Phone SubmitReply  Share Moresharingoptions... Followers 0 Gototopiclisting RecentlyBrowsing   0members Noregisteredusersviewingthispage. HTML5GameDevsForum AllActivity Home Frameworks Pixi.js Failedtoexecute'texImage2D'on'WebGLRenderingContext'Error × Existinguser?SignIn SignUp Browse Back Forums Staff OnlineUsers Activity Back MyActivityStreams AllActivity UnreadContent ContentIStarted Search Leaderboard Marketplace ContactUs Twitter × CreateNew...



請為這篇文章評分?