PrismarineJS/prismarine-viewer

Relative path of worker.js cause loading error when using pviewer as a front end component #201

portwatcher posted onGitHub

This line https://github.com/PrismarineJS/prismarine-viewer/blob/master/viewer/lib/worldrenderer.js#L22 decides pviewer to load woker.js relative to present path of where pviewer is used.

Say we have wrapped a "schematic renderer" component and use it in our project. Typically this component will be used under the path like domain/foo/bar/:id, and pviewer will request worker.js at domain/foo/bar/worker.js not domain/worker.js

Not only worker.js, JSON files of blockStates, etc, have the same problem.


Temporarily I decide to setup a independent web site that provide rendering at / and use it through iframe

posted by portwatcher over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests