Why the stl loader does not work on ios (swift)

I had the same problem when loading .obj files via a loader

the reason is that you have to enable/allow loading of files from javascript in WKWebview. See this post on github:

This allows the loading using XMLHttpRequest (wich three.js is using in the background to load resources)

	webView.configuration.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs")
	webView.configuration.setValue(true, forKey: "allowUniversalAccessFromFileURLs")

source:

1 Like