Skip to content

[Bug] Image assets are not loaded #9

Description

@fadri1

When loading an image asset, I get this error : Unrecognized source type to auto-detect Resource

After investigation, the error happened during the texture creation here: https://github.com/pixijs/node/blob/65d42f79a4615642af6a815d7c8ab6ec908fe901/src/adapter/loadNodeTexture.ts#L27

The method autoDetectResource from @pixi/core used NodeCanvasResource.test here: https://github.com/pixijs/pixijs/blob/0238708e11d4842787e9144fad33479ff12cbe89/packages/core/src/textures/resources/autoDetectResource.ts#L114C13-L114C13

I don't understand why source instanceof NodeCanvasElement returns false as source seems to be a NodeCanvasElement instance. As a temporary workaround, I override NodeCanvasResource.test static method.

I work on a project which have to run on Node and browser, and I updated pixi.js to 7.3.2, so @pixi/node loads packages as @pixi/core, @pixi/assets, etc at version 7.3.2.

The problem is probably related to this, is there any plan to update this library at 7.3.2, or at 8.0.0?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions