Vurda69

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Activating the pixi plugin I have problems displaying the bodies in debug. In practice, the box should be designed in a webgl context and not 2d I hope for a change in future versions example : (debug.js - line 242) _drawBody: function(body) { if (!body.world || !body.shape) return; var context = game.renderer.context; var shape = body.shape; if (game.renderer.canvas.getContext('webgl') === null){ // // 2d var x = 0; var y = 0; if (this._camera) { x = -this._camera.position.x; y = -this._camera.position.y; } context.setTransform(1, 0, 0, 1, x, y); context.globalAlpha = game.Debug.bodyAlpha; context.fillStyle = game.Debug.bodyColor; context.strokeStyle = game.Debug.bodyLineColor; context.lineWidth = game.Debug.bodyLineWidth; if (shape.width && shape.height) { context.beginPath(); context.rect( (body.position.x - shape.width / 2) * game.scale, (body.position.y - shape.height / 2) * game.scale, shape.width * game.scale, shape.height * game.scale ); context.fill(); context.stroke(); } else if (shape.radius) { context.beginPath(); context.arc( body.position.x * game.scale, body.position.y * game.scale, shape.radius * game.scale, 0, Math.PI * 2 ); context.fill(); context.stroke(); } } else { // // webgl (pixi plugin) // ?????? } },