Skip to content

ObjectLoader: missing class member crossOrigin #14318

@MarcelKlammer

Description

@MarcelKlammer
Description of the problem

ObjectLoader has no class member crossOrigin, only the method setCrossOrigin is present.

Comparing it to other classes like TextureLoader, which has

crossOrigin: 'Anonymous'

ObjectLoader should also have this member specified.

I tried to have a real S3 URL in images in a json file instead of data:

The following error occured:
THREE.WebGLState: DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.

This error is gone when adding

crossOrigin: 'Anonymous'

as a class member to ObjectLoader.

Three.js version
  • Dev
  • r93
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions