Heppell08 Posted June 21, 2014 Share Posted June 21, 2014 I have been in the examples and done pretty much a copy and paste of the code into my menu state code to use the filter. I've still not got anything coming onscreen and i console logged the update of the filter which returns undefined even though its all named correctly as you'll see in the below code. If anyone knows why the filter is not working let me know.Neonizer.Menu = function(game) {}; var backdrop; var startButton; var optionsButton; var creditButton; var text; var gridGroup; var gridLine; var filter; var blankdrop; var menuBoom;Neonizer.Menu.prototype = { create: function() { backdrop = this.add.sprite(0,0,'menuBD'); backdrop.width = 800; backdrop.height = 600; blankdrop = this.add.sprite(0,0); blankdrop.width = 800; blankdrop.height = 600; filter = this.add.filter('LightBeam', 800, 600); // You have the following values to play with (defaults shown): filter.alpha = 0.0; // filter.red = 1.0; // filter.green = 1.0; // filter.blue = 2.0; // filter.thickness = 70.0; filter.speed = 1.5; blankdrop.filters = [filter]; startButton = this.add.button(this.game.world.centerX - 300, this.game.world.centerY - 200, 'startBtn', this.startGame, this, 0); startButton.events.onInputOver.add(this.buttonScale, this); startButton.events.onInputOut.add(this.buttonScaleDown, this); menuBoom = this.add.emitter(0,0,100); menuBoom.makeParticles('menuSpark'); }, update: function() { filter.update(); menuBoom.x = this.input.activePointer.x; menuBoom.y = this.input.activePointer.y; menuBoom.start(true, 2000, null, 1); }, startGame: function() { this.game.state.start('Game'); }, buttonScale: function() { startButton.scale.x = 1.3; startButton.scale.y = 1.3; }, buttonScaleDown: function() { startButton.scale.x = 1; startButton.scale.y = 1; },}; Link to comment Share on other sites More sharing options...
Heppell08 Posted June 21, 2014 Author Share Posted June 21, 2014 Sorry another wasted topic. I am developing in node webkit and clearly it must not support the webGL i require. Link to comment Share on other sites More sharing options...
lewster32 Posted June 21, 2014 Share Posted June 21, 2014 I would have thought node-webkit would be pretty advanced in its WebGL support. If using Windows, have you copied across the required dlls? https://github.com/rogerwang/node-webkit/wiki/Webgl-support-on-windows Heppell08 1 Link to comment Share on other sites More sharing options...
Heppell08 Posted June 21, 2014 Author Share Posted June 21, 2014 yeah i never even knew about that. friend on twitter told me it too. thanks Link to comment Share on other sites More sharing options...
lewster32 Posted June 21, 2014 Share Posted June 21, 2014 No problem Link to comment Share on other sites More sharing options...
Recommended Posts