更新编译输出为es5支持老旧的浏览器

This commit is contained in:
ChenX
2018-06-06 17:23:22 +08:00
parent 256a7ea8a6
commit 29a6dd0fff
38 changed files with 616 additions and 533 deletions

26
dist/ColorPalette.js vendored
View File

@@ -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