roxor45

Members
  • Content Count

    13
  • Joined

  • Last visited

Everything posted by roxor45

  1. roxor45

    Dash line

    OMG, is not user frendly .
  2. roxor45

    Dash line

    Hi all , Hum , I seach on web but I don't find information for draw a dashed line . It's possible easily with pixi ?
  3. roxor45

    deep and child

    thanks for the tips
  4. roxor45

    deep and child

    thanks for this idea ! it's work ! function backg() { if (varbg < 1) { background.visible = true; varbg = 1; } else { (varbg > 0) background.visible = false; varbg = 0 ; } }
  5. roxor45

    deep and child

    hi all , I have make some button in my script for show/hide some object like that : var background = PIXI.Sprite.fromImage('images/sol2.jpg'); app.stage.addChild(background); var varbg = 1; function backg() { if (varbg < 1) { app.stage.addChild(background); varbg = 1; } else { (varbg > 0) app.stage.removeChild(background); varbg = 0 ; } } in the beginning my other object ( like bunny) , it's in front of the background. When I clic on button for hide background, it's ok my background disapear like a charm . but when a REclick on my button for show the background , my background reapear on the front of the canvas , Over my other object . So, my question is : It's possible to add a deep level at a child ? thanks for your help
  6. roxor45

    right click event

    OUHA , very very nice, Many thanks !
  7. roxor45

    right click event

    lol don't worry , it's not a porn avatar it's an avatar from my google account , so no pb i change that . back to Js I try that and I come back ! thanks !!!
  8. hello all, actually i try a lot of example from pixi , And I try to catch right click for delete sprite from bunny example : https://pixijs.io/examples/#/demos/dragging.js So it's possible to get right click event ? how to do that ? do you have an example ? thanks and good day
  9. -for argument in beginfill ( 0,0) it's because I don't want a background for this circle. So after test I can delete this line so If I understand you , I need to create a PIXI.Container ?
  10. thx for your help, I try this, but same problem var bunny = new PIXI.Sprite(texture); bunny.interactive = true; bunny.buttonMode = true; bunny.anchor.set(0.5); bunny.scale.set(3); bunny .on('pointerdown', onDragStart) .on('pointerup', onDragEnd) .on('pointerupoutside', onDragEnd) .on('pointermove', onDragMove); bunny.x = 100; bunny.y = 100; var graphics = new PIXI.Graphics(); graphics.lineStyle(1, 0xFFBD01, 1); graphics.beginFill(0,0, 1); graphics.drawCircle(400, 250, 50); graphics.endFill(); bunny.addChild(graphics); //add to bunny app.stage.addChild(bunny); //stage bunny
  11. sorry I'm not understand, could you explain pls
  12. Hello all, Actually I try to create a draggable image with circle around. so I don't know how join sprite and graphics function first part , with draggable picture : var app = new PIXI.Application(800, 600, {backgroundColor : 0x1099bb}); document.body.appendChild(app.view); // create a texture from an image path var texture = PIXI.Texture.fromImage('images/ppois.png'); // Scale mode for pixelation texture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST; var bunny = new PIXI.Sprite(texture); // enable the bunny to be interactive... this will allow it to respond to mouse and touch events bunny.interactive = true; // this button mode will mean the hand cursor appears when you roll over the bunny with your mouse bunny.buttonMode = true; // center the bunny's anchor point bunny.anchor.set(0.5); // make it a bit bigger, so it's easier to grab bunny.scale.set(3); // setup events for mouse + touch using // the pointer events bunny .on('pointerdown', onDragStart) .on('pointerup', onDragEnd) .on('pointerupoutside', onDragEnd) .on('pointermove', onDragMove); // move the sprite to its designated position bunny.x = 100; bunny.y = 100; // add it to the stage app.stage.addChild(bunny) } second part for create a circle : var graphics = new PIXI.Graphics(); graphics.lineStyle(1, 0xFFBD01, 1); graphics.beginFill(0,0, 1); graphics.drawCircle(400, 250, 50); graphics.endFill(); app.stage.addChild(graphics); But how add this circle around this picture ?? thanks for your help