Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

phaser place on circles

 preload ()
    {
        this.load.image('ball', 'assets/sprites/shinyball.png');
    }

    create ()
    {
        const circle = new Phaser.Geom.Circle(400, 300, 260);
        this.group = this.add.group({ key: 'ball', frameQuantity: 32 });

        Phaser.Actions.PlaceOnCircle(this.group.getChildren(), circle);

        this.tween = this.tweens.addCounter({
            from: 260,
            to: 0,
            duration: 3000,
            delay: 2000,
            ease: 'Sine.easeInOut',
            repeat: -1,
            yoyo: true
        });
    }

    update ()
    {
        Phaser.Actions.RotateAroundDistance(this.group.getChildren(), { x: 400, y: 300 }, 0.02, this.tween.getValue());
    }
Comment

PREVIOUS NEXT
Code Example
Javascript :: phaser place on rectangle shift 
Javascript :: phaser random line 
Javascript :: phaser set alpha 
Javascript :: phaser animation from png sequence 
Javascript :: phaser export animation to json 
Javascript :: phaser pause animation instances 
Javascript :: Counting Duplicates 
Javascript :: chakra ui with humburger menu 
Javascript :: Pretty-Print JSON within Neovim 
Javascript :: Opposites attract 
Javascript :: Expresiones regulares para diferentes tipos de campos de formularios 
Javascript :: nodejs mongodb native reuse single connection 
Javascript :: add filter category to react native flatslit 
Javascript :: documentUrlPatterns 
Javascript :: string concat in js 
Javascript :: react native version 
Javascript :: event listeners 
Javascript :: () = javascript 
Javascript :: react native icons 
Javascript :: react native qr code scanner 
Javascript :: random number between 1 and 10 javascript 
Javascript :: javascript sort array of objects by key value ascending and descending order 
Javascript :: history of react js 
Javascript :: function in javascript 
Javascript :: datatable change default sorting 
Javascript :: console.group in javascript 
Javascript :: call c# function from javascript 
Javascript :: mdn javascript 
Javascript :: javascript camelcase regex 
Javascript :: react.createref 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =