
import * as THREE from './build/three.module.js'
// 引入軌道控制器擴展庫OrbitControls.js
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
// 引入dat.gui.js的一個類GUI
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';// 場景
const scene = new THREE.Scene();// 三維樣條曲線
const path = new THREE.CatmullRomCurve3([new THREE.Vector3(-50, 20, 90),new THREE.Vector3(-10, 40, 40),new THREE.Vector3(0, 0, 0),new THREE.Vector3(60, -60, 0),new THREE.Vector3(90, -40, 60),new THREE.Vector3(120, 30, 30),
]);
// 樣條曲線path作為TubeGeometry參數生成管道
const geometry = new THREE.TubeGeometry(path, 200, 5, 30);
const texLoader = new THREE.TextureLoader();
const texture = texLoader.load('./xk.jpg');//紋理貼圖
texture.wrapS = THREE.RepeatWrapping;//UV坐標U方向