Giter Club home page Giter Club logo

Comments (4)

MarkSky avatar MarkSky commented on May 14, 2024 1

These is my code:
in GameTest.vue

<template>
    <div class="game-test-box">
        <ion-phaser
            :game.prop="game"
            :initialize.prop="initialize"
            class="mine-box" />
    </div>
</template>

<script>
    import Phaser from 'phaser';
    import 'phaser/plugins/spine/dist/SpinePlugin';
    import SymbolScene from '@/scripts/scene/SymbolScene';

    export default {
        data() {
            return {
                initialize: false,

                game: {
                    width: 664,
                    height: 1152,
                    transparent: true,
                    type: Phaser.AUTO,
                    plugins: {
                        scene: [{ key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }],
                    },
                    scene: [SymbolScene],
                },
            };
        },

        created() {
            this.initialize = true;
        },
    };
</script>

in SymbolScene.js

import Phaser from 'phaser';

export default class SymbolScene extends Phaser.Scene {
    constructor() {
        super({
            key: 'SymbolScene',
        });
    }

    preload() {
        this.load.setPath('assets/');
        this.load.image('gamePic', 'spine/game/skeleton.png');
        this.load.spine('gameSpine', 'spine/game/skeleton.json', ['spine/game/skeleton.atlas'], true);
    }

    create() {
        this.add.spine(50, 50, 'gameSpine');
    }

After update to 1.3.0, it has been solved.
Thank you.

from ion-phaser.

jdnichollsc avatar jdnichollsc commented on May 14, 2024

Can you share a code example please?

from ion-phaser.

jdnichollsc avatar jdnichollsc commented on May 14, 2024

Please try the last version and let me know, thanks!

from ion-phaser.

jdnichollsc avatar jdnichollsc commented on May 14, 2024

Awesome, thanks for letting me know! <3

from ion-phaser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.