rossi46

Members
  • Content count

    58
  • Joined

  • Last visited

Everything posted by rossi46

  1. how to create effect lines like this?

    ok thanks. i will try and post result here for your help.
  2. How to create effect lines line this. I attack images. Line have change position. Thanks
  3. how to create effect lines like this?

    Here is another example. I think it is particles, but i don't know how to do it.
  4. webgl has hit a snag

    I create pixi game. when i change tab it normal. but when i minimize browser. it has "webgl has hit a snag". and my canvas fail. console log has: "webgl: context_lost_webgl: losecontext: context lost". How to fixed it. Thanks
  5. webgl has hit a snag

    I deleted all game and i just have create canvas it is hitting the snag. I load one image size 1110x624 and just create game loader.add("iconsAnimation", ConfigSt.BASE_URL + "assets/images/anim.png"); this.game = new PIXI.Application(1140, 500, { antialias: false, transparent: true, resolution: 1 }); //this.game.ticker.speed = 2; //this.game.ticker.minFPS = 60; $("#gamePlay").append(this.game.view); this.mainContainer = new Container(); this.containerColumn1 = new Container(); this.containerColumn2 = new Container(); this.containerColumn3 = new Container(); this.containerColumn4 = new Container(); this.containerColumn5 = new Container(); this.effectContainer = new Container(); this.iconsContainer = new Container(); this.mainContainer.addChild(this.containerColumn1, this.containerColumn2, this.containerColumn3, this.containerColumn4, this.containerColumn5, this.iconsContainer); this.game.stage.addChild(this.mainContainer, this.effectContainer);
  6. webgl has hit a snag

    here is memory of my game. I do not use particles.
  7. How to load font in phaser?

    How to load font in Phaser. I use: <link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&subset=latin,vietnamese" rel="stylesheet"> and in css, i load: @font-face { font-family: 'Prophit'; src: url("../fonts/V5ProphitDot.eot?#iefix") format("embedded-opentype"), url("../fonts/V5ProphitDot.woff") format("woff"), url("../fonts/V5ProphitDot.ttf") format("truetype"), url("../fonts/V5ProphitDot.svg#V5ProphitDot") format("svg"); font-weight: normal; font-style: normal; } in game, i create: this.textJackpot = this.add.text(this.world.centerX, 24, "0", { font: "42px 'Prophit'", fill: "#fff600", align: "center" }); this.textBalance = this.add.text(this.world.centerX, 24, "0", { font: "42px 'Roboto'", fill: "#fff600", align: "center" }); but It do not work???? How to load it????
  8. I use pixi timer plugin. it works on pixi 3.0.8 but not work on 4.5.1. How to fixed and build it. Link: https://github.com/Nazariglez/pixi-timer Or how to use eventemitter as timer
  9. how to user pixi timer or eventemitter?

    I use original example of pixi-timer. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Pixi.js Test</title> <script src="https://pixijs.download/v4.5.3/pixi.min.js"></script> <script src="js/pixi-timer.js"></script> </head> <body> <script> var renderer = new PIXI.autoDetectRenderer(800,600); document.body.appendChild(renderer.view); var stage = new PIXI.Container(); function animate(){ window.requestAnimationFrame(animate); renderer.render(stage); PIXI.timerManager.update(); } animate(); var timer = PIXI.timerManager.createTimer(1000); timer.repeat = 15; timer.on('start', function(elapsed){console.log('start')}); timer.on('end', function(elapsed){console.log('end', elapsed)}); timer.on('repeat', function(elapsed, repeat){console.log('repeat', repeat)}); //timer.on('update', function(elapsed, delta){console.log('update',elapsed, delta)}); timer.on('stop', function(elapsed){console.log('stop')}); </script> </body> </html> it doesn't run.
  10. how to user pixi timer or eventemitter?

    i've just tried pixi 4.5.3. it didn't work. i say "Cannot read property 'update' of undefined", but when i use pixi 3.0.8, it works. I use file pixi-timer.js in plugin. I use many timer in game. ticker can replace for setTimeout??
  11. mask on renderercanvas errror?

    I created a slot game. But in some browser does'n't support webgl. It auto render canvas. But when i used mask. It doesn't work correct??? it wrong position. I use console of browser to change position of mask, but not effect???? mask position set not effect on canvasrenderer mode.? how to anchor graphics mask? when resize the game. the mask is not resize? My code: this.game = new PIXI.Application(800, 450, { antialias: true, transparent: true, resolution: 1 }); $("#game-container").append(this.game.view); this.mainGroup = new Container(); this.effectGroup = new Container(); this.game.stage.addChild(this.mainGroup, this.effectGroup); //create group this.containerColumn1 = new Container(); this.containerColumn2 = new Container(); this.containerColumn3 = new Container(); this.containerColumn4 = new Container(); this.containerColumn5 = new Container(); this.mainGroup.addChild(this.containerColumn1); this.mainGroup.addChild(this.containerColumn2); this.mainGroup.addChild(this.containerColumn3); this.mainGroup.addChild(this.containerColumn4); this.mainGroup.addChild(this.containerColumn5); this.mask = new Graphics(); this.mask.drawRect(0, 0, 606, 330); this.mask.position.set(97, 43); this.mainGroup.mask = this.mask; how to anchor mask when resize game??
  12. mask on renderercanvas errror?

    when i create some mini game with other canvas in one page. the main slots games tween very lag. How to prevent that. example site: http://zon.club. Use iframe in the main slot canvas??? Thanks
  13. mask on renderercanvas errror?

    thank for your help. How smothie slot game. When i open 4 tab of game and spin. It lag and not smooth. how do maximum performance and fps smooth?? i usually create prototype and after one sence i destroy all container. have any good idea to manage memory, my game init about 120mb after many spin slots, memory up to 1gb or greater than that. thanks. Sorry for my bad english
  14. mask on renderercanvas errror?

    thanks. i did it. it work perfect
  15. mask on renderercanvas errror?

    can you give me an example. or how to set position of mask as sprite mask when game canvas resize. thanks
  16. mask not run?

    i create mask in my game but in some pc, it not run? Here my code that.mask = new Sprite(TextureCache["mask"]); that.mask.position.set(that.size[0] / 2 - 8, that.size[1] / 2 - 12); that.mask.anchor.set(0.5); that.mainContainer.addChild(that.mask); that.mainContainer.mask = that.mask;
  17. mask not run?

    No. I use the lastest chrome on pc window 10. firefox is normal
  18. mask not run?

    I use sprite mask
  19. i use HackTimer js to game run when tab is not active. But animatedSprite not run when not active tab?
  20. I create a game. But when i create text, it lost Diacredical Marks (language is vietnamese). Normal I use style in pixi example, it does not loose Diacredical Marks. But when i remove some stype of text. It loose Diacredical Marks? here is the code full and code where i comment style of text. window.SamTruyen = window.SamTruyen || {}; //loader window.SamTruyen.Loader = function () { this.init(); }; window.SamTruyen.Loader.prototype = { init: function () { var assetImages = ["samtruyen/x2.json"]; loader.add(assetImages); loader.on("progress", this.progress); loader.load(this.complete); }, complete: function () { AppSt.Game = new window.SamTruyen.Game(); }, progress: function () { } }; //bonus window.SamTruyen.Bonus = function () { this.create(); }; window.SamTruyen.Bonus.prototype = { }; //x2 window.SamTruyen.X2 = function () { }; window.SamTruyen.X2.prototype = { turnLeft: 3, init: function() { var that = AppSt.Game; var ths = AppSt.X2; ths.x2Container = new Container(); that.stage.addChild(ths.x2Container); ths.createAssets(); }, createAssets: function () { var that = AppSt.Game; var ths = AppSt.X2; var bg = new Sprite(TextureCache["ast_x2-bg.png"]); ths.x2Container.addChild(bg); bg.position.set(0, 0); var style = new PIXI.TextStyle({ fontFamily: 'Times New Roman', fontSize: 16, fontWeight: 'bold', fill: "yellow" }); ths.lblTurn = new PIXI.Text("LƯỢT CÒN LẠI", style); ths.lblTurn.position.set(that.renderer.view.width / 2, 71); ths.lblTurn.anchor.set(0.5, 0); ths.x2Container.addChild(ths.lblTurn); } }; //trial //game window.SamTruyen.Game = function () { this.create(); }; window.SamTruyen.Game.prototype = { game: null, stage: null, renderer: null, smoothie: null, mainContainer: null, containerColumn1: null, containerColumn2: null, containerColumn3: null, containerColumn4: null, containerColumn5: null, mask: null, column1: {}, column2: {}, column3: {}, column4: {}, column5: {}, effectContainer: null, iconsContainer: null, create: function() { PIXI.utils.skipHello(); this.renderer = new autoDetectRenderer(600, 330, { antialias: false, transparent: true, resolution: 1 }); $("#game").append(this.renderer.view); this.stage = new Container(); this.smoothie = new Smoothie({ engine: PIXI, renderer: this.renderer, root: this.stage, update: undefined, fps: 120 }); this.smoothie.start(); this.mainContainer = new Container(); this.containerColumn1 = new Container(); this.containerColumn2 = new Container(); this.containerColumn3 = new Container(); this.containerColumn4 = new Container(); this.containerColumn5 = new Container(); this.effectContainer = new Container(); this.iconsContainer = new Container(); this.mainContainer.addChild(this.containerColumn1, this.containerColumn2, this.containerColumn3, this.containerColumn4, this.containerColumn5, this.iconsContainer); this.stage.addChild(this.mainContainer, this.effectContainer); } }; //app var hubmanagerSt = null; (function () { window.AppSt = {}; AppSt.AccountID = 0; AppSt.initGame = function () { AppSt.Loader = new window.SamTruyen.Loader(); } AppSt.deleteGame = function () { } })(); $(document).ready(function () { AppSt.initGame(); setTimeout(function(){ AppSt.X2 = new SamTruyen.X2(); AppSt.X2.init(); }, 2000); }); var style = new PIXI.TextStyle({ fontFamily: 'Times New Roman', fontSize: 16, fontWeight: 'bold', fill: "yellow", // gradient /* stroke: '#4a1850', strokeThickness: 5, dropShadow: true, dropShadowColor: '#000000', dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6, wordWrap: true, wordWrapWidth: 440 */ }); I have two images. One loose Diacredical Marks and one doesn't loose
  21. text Diacredical Marks pixijs problem?

    many thanks. padding is perfect.
  22. i zoom html use css zoom. The button in pixi game wrong position. But i use transform scale it ok. How to fix that when use zoom??
  23. motion path in pixi?

    How to create motion path in pixi or has plugin motion path in pixi? Thanks
  24. how to use pixijs loader with holwer.js