Hi all,
I would like to publish yet another Jsfiddle, after I posted already a few of them. So, basically I know how it’s done. This time is different. though:
I’ve created a local copy of the three.module.js
itself, which I directly modified and uploaded to my private webspace vielzutun.ch. I can access that file from a web browser, using the path as below, but when I try to use it in an import-directive in Jsfiddle, like this:
import * as THREE from "https://vielzutun.ch/wordpress/public/three.module.js";
//import * as THREE from "https://threejs.org/build/three.module.js";
import { OrbitControls } from "https://threejs.org/examples/jsm/controls/OrbitControls.js";
import { GUI } from "https://threejs.org/examples/jsm/libs/dat.gui.module.js";
I am confronted with CORS (cross origin resource sharing) violations, which apparently one of the Jsfiddle servers imposes.
Failed to load resource: Origin https://fiddle.jshell.net is not allowed by Access-Control-Allow-Origin.
https://vielzutun.ch/wordpress/public/three.module.js
What would be the proper way to go about this? (Other than not hacking three.module.js
directly)?
Motivation behind it:
I was successful in the integration of the non-affine, perspective correct texturing into Three.js, currently as a Proof of Concept for a LatheGeometry only. Which involved changing the shader codes, and I didn’t know how to get that into three.js other than hacking three.module.js
directly. Now I would like to show off and share it with you