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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.