fengFanYong

Members
  • Content Count

    25
  • Joined

  • Last visited

About fengFanYong

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. fengFanYong

    Refresh efficiency of the shape

    @ivan.popelyshev Can i set the 'cacheAsBitmap = true' of the shape that do not need to be refreshed?
  2. fengFanYong

    Refresh efficiency of the shape

    Can i set the 'cacheAsBitmap = true' of the shape that do not need to be refreshed?
  3. fengFanYong

    sprite as a container

    @ivan.popelyshev How to set up transform of graphics? I want The size of the graphics Independent to the local coordinates of the sprite,for example: var sprite = new PIXI.Sprite(); sprite.width = 10; sprite.height = 20; var grphics = new PIXI.Grphics(); grphics.width = 10; grphics.height = 10; I want get the size of grphics is 10*10. Thank!
  4. fengFanYong

    sprite as a container

    Can I use an sprite as a container? for example: var sprite = new PIXI.Sprite; var graphics = new PIXI.Graphics(); sprite.addChild(graphics); The position of the graphics relative to the local coordinates of the sprite.
  5. fengFanYong

    Refresh efficiency of the shape

    @ivan.popelyshev I have many sprite or graphics in page,But only one need to move,if render all sprite or texture each time,it is change so slow,the animation unfluent,In order to improve the efficiency of refresh,what should i do?
  6. fengFanYong

    Refresh efficiency of the shape

    I created a lot of sprite and graphics,But only a little refresh is needed each time,In order to improve the efficiency of refresh,what should i do? thanks!
  7. fengFanYong

    set graphics transform.worldTransform

    @ivan.popelyshev When i create a sprite,it children is graphics,but i hope this position of graphics is a Actual pixel。 var sp = new PIXI.Sprite(); sp.x = 100; sp.y = 100; sp.width = 100; sp.height = 100; var g = new PIXI.Graphics(); g.beginFill(0x123123); g.drawRect(0,0,100,100); g.endFill(); sp.addChild(g); i hope draw a circle 100*100 pixel. THANK!
  8. fengFanYong

    set graphics transform.worldTransform

    @ivan.popelyshev How to set context.setTransform(1,1,1,1,0,0) of graphics when render graphics? Thank!
  9. fengFanYong

    set graphics transform.worldTransform

    because i want to set context.setTransform(1,1,1,1,0,0) of graphics
  10. fengFanYong

    set graphics transform.worldTransform

    i create a pixi.graphics. how to set transform.worldTransform of graphics ,
  11. fengFanYong

    How to draw gradient color

    HI: i want to draw gradient color,but found draw gradient color of text,can not draw gradient color of other shape.How to draw gradient color of rectangle.
  12. fengFanYong

    How can I control video in pixi

    hello i create a video,How can I control video in pixi(start,stop); var texture = PIXI.Texture.fromVideo('./asd.mp4'); var videoSprite = new PIXI.Sprite(texture); Thank!
  13. i create a sprite,and set it width != height;i create graphics as the sprite children,but if i user graphics.drawCircle draw circle,it will draw Ellipse; code : <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>text drawCircle</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.2.2/pixi.min.js"></script> <style> *{ margin: 0; padding: 0; } </style> </head> <body> <script> var stage = new PIXI.Container; var renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight, {antialias: true}); document.body.appendChild(renderer.view); requestAnimationFrame(update); var sp = new PIXI.Sprite(); sp.position.x = 100; sp.position.y = 100; sp.width = 200; sp.height = 400; g = new PIXI.Graphics(); g.beginFill(0x123123); g.drawCircle(.5,.5,.5); g.endFill(); sp.addChild(g); stage.addChild(sp); function update(){ renderer.render(stage); requestAnimationFrame(update); } </script> </body> </html> can i draw circle use graphics.drawCircle?
  14. fengFanYong

    render sprite

    I do not clear something off the canvas, i want only clear the area of sprite,but when i use render.context.clear(),it will clear area of last render element.this clear different from clear of html5.
  15. fengFanYong

    render sprite

    sorry ,i do not know your mean,i know can't clear a single elemen,i want clear the area of sprite,can your get give a demo?