qq_54065101 2023-04-19 14:49 采纳率: 0%
浏览 26

关于pixiloader访问不到的问题有知道的吗

为什么在PIXI的身上访问不到loader?

img


这是版本

img

这是打印结果

img

  • 写回答

2条回答 默认 最新

  • 崽崽的谷雨 2023-04-19 14:55
    关注

    PIXI打印一下看看

    <template>
      <div ref="appContainer"></div>
    </template>
    
    
    import * as PIXI from 'pixi.js';
    import { onMounted, onUnmounted, ref } from 'vue';
    export default {
      setup() {
        let app = null;
        let scene = null;
        let sprite = null;
        const appContainer = ref(null);
        onMounted(() => {
          app = new PIXI.Application({
            width: 800,
            height: 600,
            backgroundColor: 0x1099bb
          });
          appContainer.value.appendChild(app.view);
          scene = new PIXI.Container();
          app.stage.addChild(scene);
          sprite = PIXI.Sprite.from('image.png');
          sprite.anchor.set(0.5);
          sprite.x = app.screen.width / 2;
          sprite.y = app.screen.height / 2;
          scene.addChild(sprite);
        });
        onUnmounted(() => {
          app.destroy(true);
        });
        return {
          appContainer,
          scene,
          sprite
        };
      }
    }
    
    
    评论 编辑记录

报告相同问题?

问题事件

  • 创建了问题 4月19日

悬赏问题

  • ¥15 使用百度地图api 位置函数报错?
  • ¥15 metamask如何添加TRON自定义网络
  • ¥66 关于川崎机器人调速问题
  • ¥15 winFrom界面无法打开
  • ¥30 crossover21 ARM64版本安装软件问题
  • ¥15 mymetaobjecthandler没有进入
  • ¥15 mmo能不能做客户端怪物
  • ¥15 osm下载到arcgis出错
  • ¥15 Dell g15 每次打开eiq portal后3分钟内自动退出
  • ¥200 使用python编写程序,采用socket方式获取网页实时刷新的数据,能定时print()出来就行。