@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
87 lines (86 loc) • 1.48 kB
JavaScript
"use strict";
export class PolyLibsController {
constructor() {
this._rootPrefix = "";
this._root = "/three/js/libs";
//
//
// KTX2
//
//
this._KTX2Path = "/ktx2";
//
//
// DRACO
//
//
this._DRACOPath = "/draco";
//
//
// DRACO GLTF
//
//
this._DRACOGLTFPath = "/draco/gltf";
//
//
// XATLAS
//
//
this._XATLASPath = "/xatlas";
//
//
// OCCT
//
//
this._OCCTPath = "/occt";
//
//
// MANIFOLD
//
//
this._ManifoldPath = "/manifold";
}
root() {
if (this._root) {
if (this._rootPrefix.length > 0) {
const root = this._root.replace(/^(\.)/, "");
return `${this._rootPrefix}${root}`;
} else {
return this._root;
}
}
}
setRoot(url) {
this._root = url;
}
setRootPrefix(prefix) {
this._rootPrefix = prefix;
}
KTX2Path() {
return this._KTX2Path;
}
// setDRACOPath(path: string | null) {
// this._DRACOPath = path;
// }
DRACOPath() {
return this._DRACOPath;
}
// setDRACOGLTFPath(path: string | null) {
// this._DRACOGLTFPath = path;
// }
DRACOGLTFPath() {
return this._DRACOGLTFPath;
}
// setDRACOGLTFPath(path: string | null) {
// this._DRACOGLTFPath = path;
// }
XATLASPath() {
return this._XATLASPath;
}
OCCTPath() {
return this._OCCTPath;
}
ManifoldPath() {
return this._ManifoldPath;
}
}