Code Monkey home page Code Monkey logo

Comments (4)

noih avatar noih commented on August 19, 2024 2

try to use window.PIXI.display instead of PIXI.display

import * as PIXI from 'pixi.js';

window.PIXI = PIXI;
require('pixi-layers');

const test = new window.PIXI.display.Group(100, false);

or create custom file wrap it, for example (js) libs/PIXI.js

import * as PIXI from 'pixi.js';

/* eslint import/first: off */
window.PIXI = PIXI;
require('pixi-layers');

export default PIXI;

then

import PIXI from 'libs/PIXI';

from layers.

f32by avatar f32by commented on August 19, 2024 1

still the same error :(

from layers.

stefan-reloyalty avatar stefan-reloyalty commented on August 19, 2024

Have you tried changing the order of imports? Like:

import * as PIXI from 'pixi.js'
import 'pixi-layers'

const test = new PIXI.display.Group(100, false)

from layers.

Mathieu-C avatar Mathieu-C commented on August 19, 2024

@hellotanuky Have you found a way around this issue? I'm facing the same problem, thinking of compiling all Pixi-related code independently from React and bundling everything together with webpack but curious to hear from you.

from layers.

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.