Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

phaser rotate around x y point

preload ()
    {
        this.load.spritesheet('diamonds', 'assets/sprites/diamonds32x24x5.png', { frameWidth: 32, frameHeight: 24 });
    }

    create ()
    {
        this.group = this.add.group();

        for (var i = 0; i < 256; i++)
        {
            this.group.create(Phaser.Math.Between(200, 600), Phaser.Math.Between(100, 500), 'diamonds', Phaser.Math.Between(0, 4));
        }

        this.geomPoint = new Phaser.Geom.Point(400, 300);

        this.input.on('pointermove', function (pointer) {
            this.geomPoint.setTo(pointer.x, pointer.y);
        }, this);
    }

    update ()
    {
        Phaser.Actions.RotateAroundDistance(this.group.getChildren(), this.geomPoint, 0.1, 100);
    }
Comment

PREVIOUS NEXT
Code Example
Javascript :: phaser set x y 
Javascript :: phaser 60 fps animation test 
Javascript :: phaser chained animation 
Javascript :: phaser generate frame names 
Javascript :: phaser pause animation instances 
Javascript :: phaser animation yoyo 
Javascript :: .every() Accepts a test function and returns a boolean if all the elements of the array pass the test. 
Javascript :: using cron with bull node js 
Javascript :: rotate matrix 90 degrees javascript 
Javascript :: chai promise resolved 
Javascript :: check notification permissopn allow or not 
Javascript :: find numeric Unicode value of the character with charCodeAt() method 
Javascript :: call back filter 
Javascript :: how to choose a weighted random array element in javascript 
Javascript :: reduce function javascript 
Javascript :: TypeError: expressValidator is not a function 
Javascript :: how to call function from another component in vue js 
Javascript :: sort array method 
Javascript :: reactnative timepicker 
Javascript :: setimmediate node example 
Javascript :: first name last name concatenate javascript with ternary operator 
Javascript :: find duplicates array javascript 
Javascript :: javascript autocomplete 
Javascript :: nodejs debug 
Javascript :: jquery get parent element 
Javascript :: set element at index javascript array and create new array 
Javascript :: parse json java 
Javascript :: jquery edit href 
Javascript :: set active element javascript 
Javascript :: vuejs how use this.$slots.default 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =