Jump to content

Search the Community

Showing results for tags 'context'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 14 results

  1. Hi, We're fairly new to pixi.js and so far everything worked great, but we've now run into our first problem we couldn't figure out browsing the forum and the web. We are currently creating a diagram consisting of lots of elements (about 12.000 elements, could get even more later on). That's going fine so far, but we now added an option for the user to filter the elements on display. So, every time the user changes the filter options, we remove all elements and add the new amount of filtered elements. That still works fine for a couple of times, but after about 9 changes Chrome loses
  2. Good morning guys! I've created a class to manage my sliders in Phaser 2.6.2 with Typescript. I create an object slider like this in file a.ts: let slider = new Slider(game, x, y, width, height, mycallback); mycallback is like that: export function mycallback(value: number): void { usedvalue = value; } My slider class is like that: export class Slider extends Phaser.Group { protected value : number; constructor ( game : Phaser.Game, x : number, y
  3. arun

    What is context

    Hi, friends, what is context in this code "game.add.button(x, y, name, callback, context) " and why this is used in place of context in this code "this.muteButton = game.add.button(20, 20, 'mute', this.toggleSound, this);
  4. When I change tab in chrome browser on PC and visit again after like 30 minutes the game screen is blank with this warning message: WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost On one of my android tabs that happens when I press home button and open android browser again. I tried the search function of this forum but could not find anything relevant. What is happening and how to prevent it? If anyone knows how to handle the context_lost situation or redirect me to the helpful resource. Thanks
  5. Hi all, I'm using Phaser and I came across a glitch which is, I think, due to a bug in the PIXI.TilingSprite.protototype._renderCanvas() method. The bug might be linked to a bad restore of the context. In my game, once I introduced tiling sprites, everything started to "slide". So I assumed that adding tiling sprites to the game introduced the "sliding" effect in the context. To prove me right I logged "context.currentTransform" at the start and end of the TilingSprite._renderCanvas() method, and I came across that result : Start of method : SVGMatrix {a: 1, b: 0, c: 0, d: 1,
  6. SUMMARY: This post: HOW TO 2nd post: Original question that originated this post 3rd post: Research log concerning some problems and workarounds pertinent to this how-to THIS HOW-TO IS IN AN UNUSABLE STATE, AND HAS BEEN NOW ABANDONED. SORRY FOR THE NOISE. Okay, so after some hours of research here's what I came up with, in case anyone's interested or as a future reference for myself. These are the configuration steps to set up a Phaser project in Eclipse Mars.2 (4.5.2). I guess these might change from version to version, but remain essentially simi
  7. Hello, i was trying to attach eventListeners to sprites. I did that in the create function : this.selectorGroup = game.add.group();height = 200;// looping through json for(var key in res){ var selector = game.add.sprite(625, height - 10, "resourceSelector"); selector.inputEnabled = true; // adding some custom property selector.data = key; // attaching eventListener selector.events.onInputUp.add(this.triggerSearch); // adding the sprite to a group this.selectorGroup.add(selector); height = height+40;}// setting all elems of the group to alpha 0this.selectorGroup.alpha = 0;then in
  8. hey everyone, I've been around this forum a couple of times, and have usually found what I am looking for somewhere, but I'm a bit at a loss right now. I'm using Babylon.js to visualize architectural plans. The pre-babylon.js calculations have become sufficiently fast to load a number of scenes in quick succesion after another. My problem: This does not delete the webgl / babylon context. Anytime I load a new scene, the old one does not disappear (obvious from performance). I have come up with a number of ideas, but none have helped thus far. 1) I have deleted and recreated the object re
  9. Hi, I have been using Pixi.js for a few months now and I am wondering if it is possible to erase lines drawn on a PIXI.Graphics object. Basically I have some functionality where I am able to draw on a Graphics object on a Sprite using mouse and touch events. My issue is that the sprite has a texture which is not just 1 color. If the texture was blue I would just draw with blue color to "erase" the lines i had drawn earlier with another color. If I was not using Pixi.js I could use the functionality shown here: http://cssdeck.com/labs/jwvajze4/ This eraser functionality is excactly what I
  10. Hey everyone, I am a little new to phaser but I am currently having a problem that I am sure not many of you would have encountered due to its uniqueness. so right now I am creating a game that needs to be destroyed a number of times. The reason I do this is because after I destroy the game the players will view the high scores of other players (multiplayer games) and that it accomplished by routes without reloading. after a duration I will be routed back to a new instance of the game. I have pin pointed the error from logs. It comes from the this.context.createBuffer in the unlock func
  11. I feel like I'm just bad at Javascript to have to ask this question so please keep the disparaging remarks to a minimum. I have some game handling taking place on a server and being sent back to the game via JSON like this: Strategy.Game.prototype = { create: function() { this.greenGroup = this.add.group(); this.greenGroup.create(100,100, 'greenParticle'); this.getPath(); }, getPath: function() { $.getJSON("http://mysite.com/strategy/ajax/play.ashx", function (data) { console.log(JSON.stringify(data)); data.forEach(function(step)) {
  12. I'm trying to make it to where the user can draw lines on the screen, with a bitmapData object. When I try to draw on the screen, I get a 404 error, and I'm not sure why. Any help is appreciated! Here's my code: var game= new Phaser.Game(720,1000,Phaser.CANVAS, 'game_div');var play={ preload: function() { this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.game.scale.setShowAll(); game.scale.refresh(); this.game.load.image('nope','assets/wrong.png'); }, create: function() { this.bmd=this.game.add.bitmapData(720,1000); this.ctx=this.bmd.context; this.ctx.setLineWidth(5.0); th
  13. Hi, I have a general question. Refer to the following dummy code: var cvs, ctx;cvs = document.getElementById( "single_canvas" );ctx = cvs.getContext( "2d" );// Do some 2d drawing here.// ...// Never want to use 2d context from now on// Want to re-use canvas element but with 3d contentctx = cvs.getContext( "webgl" );// ctx is nullSo, is there a way to unlock/free a canvas context in order to re-initialize it again? Best, benny!
  14. I *think* there may be a problem, but I'm not sure, as all this back end and iOS stuff is really not my speciality. Story time! When testing touch controls on the iPad, my callbacks that I had assigned to game.input.touch did not appear to get called. I assigned the callbacks to the Touch object like this: game.input.touch.touchStartCallback = this.onTouchDown;game.input.touch.touchEndCallback = this.onTouchUp;My functions looked like this: onTouchDown: function(event){ this.game.input.recordPointerHistory = true; this.doThings = true;},onTouchUp: function(event){ this.game.i
×
×
  • Create New...