Skip to content

Pixi Loader use multiple times error #154

@ozgunsandal

Description

@ozgunsandal

Hi friends,
I'm creating a project with pixijs. I've loaded all of my assets in my index.ts file and it is ok for now. But, i have to load another images from a server url into my project in runtime and i have to use another pixi loader instance. When i've done this pixi loader cannot find the texture which is loaded.

this.loader = new PIXI.Loader();
        this.loader.add("image","http://www.happykidgames.com/assets/blogImages/14.jpg", {crossOrigin:""});
        this.loader.load(() => {
            
        }).onComplete.add((loader, resources) => {
            this.image = new PIXI.Sprite(resources.image.texture);
            console.log(resources.image.texture)
            console.log("das")
            this.addChild(this.image);
        })

Is there a way to use multiple loader in pixi?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions