Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vuejs empty canvas #100

Open
charterchap opened this issue Apr 14, 2020 · 2 comments
Open

vuejs empty canvas #100

charterchap opened this issue Apr 14, 2020 · 2 comments

Comments

@charterchap
Copy link

charterchap commented Apr 14, 2020

I'm trying to get the ColorTween example to load using vuejs. All I get is an empty canvas with the background color set. No animation or shapes seem to load and I don't see any errors. Anyone have any suggestions?

<template>
    <canvas id="stage" width="550" height="400"></canvas>
</template>

<script>
  import * as PIXI from 'pixi.js' // version 4.8.6
  const animate = require('pixi-animate');
  const ct = require("./colortween/ColorTween.js");

  export default {
    data() {
      return {};
    },
    mounted(){
        var scene = new PIXI.animate.Scene(550, 400, {
                view: document.getElementById("stage"),
                backgroundColor: 0x000000,
                antialias: true
            });
        scene.load(ct.library.ColorTween);
    }
  }
</script>
@andrewstart
Copy link
Collaborator

I don't know that I can offer help fixing it, but you could get a little more info by adding a callback for load() - it would be helpful to know if the load thinks it is finishing, or if it is just silently waiting forever. Your browser may also be able to tell you when network requests start. It would be odd, but potentially possible that the Scene never asks to load any additional files (assuming there are additional files - I don't know what is produced when publishing that file).

@charterchap
Copy link
Author

Looks like the callback is going through just fine. I am starting to run out of ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants