更新编译输出为es5支持老旧的浏览器
This commit is contained in:
26
dist/ColorPalette.js
vendored
26
dist/ColorPalette.js
vendored
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const THREE = require("three");
|
||||
const ColorPalette = [
|
||||
var THREE = require("three");
|
||||
var ColorPalette = [
|
||||
[255, 0, 0, 255],
|
||||
//[255, 255, 255, 255],//----- 0 - ByBlock - White
|
||||
[255, 0, 0, 255],
|
||||
@@ -13,21 +13,23 @@ const ColorPalette = [
|
||||
[255, 0, 255, 255],
|
||||
];
|
||||
//颜色材质,对于二维图像来说可能有用,应该不对三维对象使用该材质
|
||||
class ColorMaterial {
|
||||
constructor() { }
|
||||
static GetLineMaterial(index) {
|
||||
var ColorMaterial = /** @class */ (function () {
|
||||
function ColorMaterial() {
|
||||
}
|
||||
ColorMaterial.GetLineMaterial = function (index) {
|
||||
if (this.m_LineMaterialMap.has(index))
|
||||
return this.m_LineMaterialMap.get(index);
|
||||
let mat = new THREE.LineBasicMaterial({ color: this.GetColor(index) });
|
||||
var mat = new THREE.LineBasicMaterial({ color: this.GetColor(index) });
|
||||
this.m_LineMaterialMap.set(index, mat);
|
||||
return mat;
|
||||
}
|
||||
static GetColor(index) {
|
||||
let rgb = ColorPalette[index];
|
||||
};
|
||||
ColorMaterial.GetColor = function (index) {
|
||||
var rgb = ColorPalette[index];
|
||||
if (rgb)
|
||||
return new THREE.Color(rgb[0] / 255, rgb[1] / 255, rgb[2] / 255);
|
||||
}
|
||||
}
|
||||
ColorMaterial.m_LineMaterialMap = new Map();
|
||||
};
|
||||
ColorMaterial.m_LineMaterialMap = new Map();
|
||||
return ColorMaterial;
|
||||
}());
|
||||
exports.ColorMaterial = ColorMaterial;
|
||||
//# sourceMappingURL=ColorPalette.js.map
|
||||
Reference in New Issue
Block a user