jjwallace Posted March 22, 2016 Share Posted March 22, 2016 Wow, I cannot get past this error. What is causing this? Quote TypeError: texture.baseTexture.on is not a function {stack: (...), message: "texture.baseTexture.on is not a function"} message: "texture.baseTexture.on is not a function" stack: (...) get stack: function () { [native code] } arguments: null caller: null length: 0 name: "" prototype: StackTraceGetter constructor: function () { [native code] } __proto__: Object __proto__: function Empty() {} <function scope> set stack: function () { [native code] } arguments: null caller: null length: 1 name: "" prototype: StackTraceSetter __proto__: function Empty() {} <function scope> __proto__: Error f.onload @ phaser.js:73591 Link to comment Share on other sites More sharing options...
fillmoreb Posted March 22, 2016 Share Posted March 22, 2016 Well, it looks like you're trying to attach an event listener to a texture (you can't do that). But... it's hard to tell without looking at your code. Link to comment Share on other sites More sharing options...
rich Posted March 22, 2016 Share Posted March 22, 2016 I agree, BaseTexture isn't an event emitter. Would need to see your actual code to figure it out though. But there is nowhere in the Phaser source where 'baseTexture.on' is used. Link to comment Share on other sites More sharing options...
jjwallace Posted March 23, 2016 Author Share Posted March 23, 2016 create: function () { if(BasicGame.onMobile == false){ var displacementTexture = PIXI.Texture.fromImage(BasicGame.rootURL + "assets/img/displacement_map.jpg"); //PIXI.BaseTexture displacementFilter = new PIXI.DisplacementFilter(displacementTexture); } Link to comment Share on other sites More sharing options...
Recommended Posts