Strange behavior with rope in Chrome

Recommended Posts



First of all, I am glad to have discovered Phaser, and to be part of this community :) Phaser is a phenomenal library, and I think I am going to have a great time working with it.


I am currently programming the initial screen of a game. I wanted to make a wobbly title (I am using a rope for it) with falling silhouettes behind it and a moving background. The code I am using is this:

    fondointro = game.add.tileSprite(0, 0, game.world.width, game.world.height, 'bgintro');    fondointro.fixedToCamera = true;    var turistasintroTotal = 50;    for (var i = 0; i < turistasintroTotal; i++)    {        var s = game.add.sprite(game.world.randomX, -200, 'Tourist'+Math.floor((Math.random()*7) + 1));        game.physics.arcade.enable(s);        s.body.velocity.y = Math.floor((Math.random()*500) + 100);        s.body.angularVelocity = Math.floor((Math.random()*110) - 50);        s.tint = 0xFFFFFF * Math.random();        s.alpha = 0.5        s.autoCull = true;        s.checkWorldBounds = true;        s.events.onOutOfBounds.add(resetSprite, this);    }    var count = 0;    var length = 918 / 20;    var points = [];    for (var i = 0; i < 20; i++)    {        points.push(new Phaser.Point(i * length, 0));    }    ropeTitle = game.add.rope(2000, this.game.world.centerY, 'title', null, points);    ropeTitle.scale.set(0.8);    ropeTitle.updateAnimation = function() {        count += 0.1;        for (var i = 0; i < this.points.length; i++)        {            this.points[i].y = Math.sin(i * 0.5 + count) * 20;        }    };

Strange thing: When I try it in Firefox it works like a charm, but when I try it in Chrome, the title appears with an alpha of 50% - even if I didn't specify that.


Why does this happen? :)



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.