|
@@ -8562,7 +8562,8 @@
|
|
WebGLRenderer.prototype.paramThreeToGL = function (e) {
|
|
WebGLRenderer.prototype.paramThreeToGL = function (e) {
|
|
var t,
|
|
var t,
|
|
i = this.extensions,
|
|
i = this.extensions,
|
|
- r = this.getContext(); //context;
|
|
|
|
|
|
+ r = this.getContext();
|
|
|
|
+ //context;
|
|
if (e === RepeatWrapping) return r.REPEAT;
|
|
if (e === RepeatWrapping) return r.REPEAT;
|
|
if (e === ClampToEdgeWrapping) return r.CLAMP_TO_EDGE;
|
|
if (e === ClampToEdgeWrapping) return r.CLAMP_TO_EDGE;
|
|
if (e === MirroredRepeatWrapping) return r.MIRRORED_REPEAT;
|
|
if (e === MirroredRepeatWrapping) return r.MIRRORED_REPEAT;
|
|
@@ -8633,15 +8634,16 @@
|
|
listeners[type] = [];
|
|
listeners[type] = [];
|
|
}
|
|
}
|
|
/* if(type == 'flyingDone'){
|
|
/* if(type == 'flyingDone'){
|
|
- console.log('addEventListener flyingDone')
|
|
|
|
- } */
|
|
|
|
|
|
+ console.log('addEventListener flyingDone')
|
|
|
|
+ } */
|
|
if (!listeners[type].some(e => e.listener == listener)) {
|
|
if (!listeners[type].some(e => e.listener == listener)) {
|
|
listeners[type].push({
|
|
listeners[type].push({
|
|
listener,
|
|
listener,
|
|
importance,
|
|
importance,
|
|
once
|
|
once
|
|
});
|
|
});
|
|
- listeners[type] = listeners[type].sort((e, a) => a.importance - e.importance); //add
|
|
|
|
|
|
+ listeners[type] = listeners[type].sort((e, a) => a.importance - e.importance);
|
|
|
|
+ //add
|
|
}
|
|
}
|
|
};
|
|
};
|
|
EventDispatcher.prototype.hasEventListener = function (type, listener) {
|
|
EventDispatcher.prototype.hasEventListener = function (type, listener) {
|
|
@@ -8655,9 +8657,9 @@
|
|
var listenerArray = listeners[type];
|
|
var listenerArray = listeners[type];
|
|
if (listenerArray !== undefined) {
|
|
if (listenerArray !== undefined) {
|
|
/* const index = listenerArray.indexOf( listener );
|
|
/* const index = listenerArray.indexOf( listener );
|
|
- if ( index !== - 1 ) {
|
|
|
|
- listenerArray.splice( index, 1 );
|
|
|
|
- } */
|
|
|
|
|
|
+ if ( index !== - 1 ) {
|
|
|
|
+ listenerArray.splice( index, 1 );
|
|
|
|
+ } */
|
|
|
|
|
|
var item = listenerArray.find(e => e.listener == listener);
|
|
var item = listenerArray.find(e => e.listener == listener);
|
|
item && listenerArray.splice(listenerArray.indexOf(item), 1);
|
|
item && listenerArray.splice(listenerArray.indexOf(item), 1);
|
|
@@ -8694,7 +8696,8 @@
|
|
if (once) {
|
|
if (once) {
|
|
this.removeEventListener(event.type, listener);
|
|
this.removeEventListener(event.type, listener);
|
|
}
|
|
}
|
|
- var result = listener.call(this, event); //add stopContinue
|
|
|
|
|
|
+ var result = listener.call(this, event);
|
|
|
|
+ //add stopContinue
|
|
|
|
|
|
if (result && result.stopContinue) {
|
|
if (result && result.stopContinue) {
|
|
break;
|
|
break;
|
|
@@ -8733,7 +8736,8 @@
|
|
return euler;
|
|
return euler;
|
|
};
|
|
};
|
|
Object3D.prototype.traverse = function (callback, lastResult) {
|
|
Object3D.prototype.traverse = function (callback, lastResult) {
|
|
- var result = callback(this, lastResult); //lastResult一般用于收集祖先的visible
|
|
|
|
|
|
+ var result = callback(this, lastResult);
|
|
|
|
+ //lastResult一般用于收集祖先的visible
|
|
if (result && result.stopContinue) {
|
|
if (result && result.stopContinue) {
|
|
//xzw add
|
|
//xzw add
|
|
return;
|
|
return;
|
|
@@ -8752,7 +8756,8 @@
|
|
updateMatrixWorld(force) {
|
|
updateMatrixWorld(force) {
|
|
//重写,只为了将root当做parent
|
|
//重写,只为了将root当做parent
|
|
|
|
|
|
- this.scale.set(1 / this.root.scale.x, 1 / this.root.scale.y, 1 / this.root.scale.z); //中和模型缩放。无论模型缩放如何都不能改tag大小
|
|
|
|
|
|
+ this.scale.set(1 / this.root.scale.x, 1 / this.root.scale.y, 1 / this.root.scale.z);
|
|
|
|
+ //中和模型缩放。无论模型缩放如何都不能改tag大小
|
|
|
|
|
|
this.updateMatrix();
|
|
this.updateMatrix();
|
|
this.matrixWorld.multiplyMatrices(this.root.matrixWorld, this.matrix);
|
|
this.matrixWorld.multiplyMatrices(this.root.matrixWorld, this.matrix);
|
|
@@ -8812,7 +8817,8 @@
|
|
return a.distance - b.distance;
|
|
return a.distance - b.distance;
|
|
}
|
|
}
|
|
function intersectObject(object, raycaster, intersects, recursive, ignoreUnvisible) {
|
|
function intersectObject(object, raycaster, intersects, recursive, ignoreUnvisible) {
|
|
- if (ignoreUnvisible && !object.visible) return; //add
|
|
|
|
|
|
+ if (ignoreUnvisible && !object.visible) return;
|
|
|
|
+ //add
|
|
|
|
|
|
if (object.layers.test(raycaster.layers)) {
|
|
if (object.layers.test(raycaster.layers)) {
|
|
object.raycast(raycaster, intersects);
|
|
object.raycast(raycaster, intersects);
|
|
@@ -8875,29 +8881,50 @@
|
|
};
|
|
};
|
|
Curve.prototype.getPointAt = function (u, optionalTarget) {
|
|
Curve.prototype.getPointAt = function (u, optionalTarget) {
|
|
var t = this.getUtoTmapping(u);
|
|
var t = this.getUtoTmapping(u);
|
|
- this.UtoTMapArr && this.UtoTMapArr.push(t); //add
|
|
|
|
|
|
+ this.UtoTMapArr && this.UtoTMapArr.push(t);
|
|
|
|
+ //add
|
|
return this.getPoint(t, optionalTarget);
|
|
return this.getPoint(t, optionalTarget);
|
|
};
|
|
};
|
|
- var _inverseMatrix$3 = /*@__PURE__*/new Matrix4();
|
|
|
|
- var _ray$3 = /*@__PURE__*/new Ray();
|
|
|
|
- var _sphere$6 = /*@__PURE__*/new Sphere();
|
|
|
|
- var _sphereHitAt = /*@__PURE__*/new Vector3();
|
|
|
|
- var _vA$1$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _vB$1$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _vC$1$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _tempA$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _morphA$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _intersectionPoint$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _intersectionPointWorld$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _basePosition$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _skinIndex$1 = /*@__PURE__*/new Vector4();
|
|
|
|
- var _skinWeight$1 = /*@__PURE__*/new Vector4();
|
|
|
|
- var _vector3 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _matrix4 = /*@__PURE__*/new Matrix4();
|
|
|
|
- var _vertex = /*@__PURE__*/new Vector3();
|
|
|
|
- var _sphere$5 = /*@__PURE__*/new Sphere();
|
|
|
|
- var _inverseMatrix$2$1 = /*@__PURE__*/new Matrix4();
|
|
|
|
- var _ray$2$1 = /*@__PURE__*/new Ray();
|
|
|
|
|
|
+ var _inverseMatrix$3 = /*@__PURE__*/
|
|
|
|
+ new Matrix4();
|
|
|
|
+ var _ray$3 = /*@__PURE__*/
|
|
|
|
+ new Ray();
|
|
|
|
+ var _sphere$6 = /*@__PURE__*/
|
|
|
|
+ new Sphere();
|
|
|
|
+ var _sphereHitAt = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _vA$1$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _vB$1$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _vC$1$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _tempA$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _morphA$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _intersectionPoint$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _intersectionPointWorld$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _basePosition$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _skinIndex$1 = /*@__PURE__*/
|
|
|
|
+ new Vector4();
|
|
|
|
+ var _skinWeight$1 = /*@__PURE__*/
|
|
|
|
+ new Vector4();
|
|
|
|
+ var _vector3 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _matrix4 = /*@__PURE__*/
|
|
|
|
+ new Matrix4();
|
|
|
|
+ var _vertex = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _sphere$5 = /*@__PURE__*/
|
|
|
|
+ new Sphere();
|
|
|
|
+ var _inverseMatrix$2$1 = /*@__PURE__*/
|
|
|
|
+ new Matrix4();
|
|
|
|
+ var _ray$2$1 = /*@__PURE__*/
|
|
|
|
+ new Ray();
|
|
SkinnedMesh.prototype.computeBoundingSphere = function () {
|
|
SkinnedMesh.prototype.computeBoundingSphere = function () {
|
|
var geometry = this.geometry;
|
|
var geometry = this.geometry;
|
|
if (!this.boundingSphere) {
|
|
if (!this.boundingSphere) {
|
|
@@ -9020,7 +9047,8 @@
|
|
var c = index.getX(j + 2);
|
|
var c = index.getX(j + 2);
|
|
intersection = checkGeometryIntersection(this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);
|
|
intersection = checkGeometryIntersection(this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);
|
|
if (intersection) {
|
|
if (intersection) {
|
|
- intersection.faceIndex = Math.floor(j / 3); // triangle number in indexed buffer semantics
|
|
|
|
|
|
+ intersection.faceIndex = Math.floor(j / 3);
|
|
|
|
+ // triangle number in indexed buffer semantics
|
|
intersection.face.materialIndex = group.materialIndex;
|
|
intersection.face.materialIndex = group.materialIndex;
|
|
intersects.push(intersection);
|
|
intersects.push(intersection);
|
|
}
|
|
}
|
|
@@ -9035,7 +9063,8 @@
|
|
var _c = index.getX(_i + 2);
|
|
var _c = index.getX(_i + 2);
|
|
intersection = checkGeometryIntersection(this, material, raycaster, rayLocalSpace, uv, uv1, normal, _a, _b, _c);
|
|
intersection = checkGeometryIntersection(this, material, raycaster, rayLocalSpace, uv, uv1, normal, _a, _b, _c);
|
|
if (intersection) {
|
|
if (intersection) {
|
|
- intersection.faceIndex = Math.floor(_i / 3); // triangle number in indexed buffer semantics
|
|
|
|
|
|
+ intersection.faceIndex = Math.floor(_i / 3);
|
|
|
|
+ // triangle number in indexed buffer semantics
|
|
intersects.push(intersection);
|
|
intersects.push(intersection);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -9055,7 +9084,8 @@
|
|
var _c2 = _j + 2;
|
|
var _c2 = _j + 2;
|
|
intersection = checkGeometryIntersection(this, _groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, _a2, _b2, _c2);
|
|
intersection = checkGeometryIntersection(this, _groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, _a2, _b2, _c2);
|
|
if (intersection) {
|
|
if (intersection) {
|
|
- intersection.faceIndex = Math.floor(_j / 3); // triangle number in non-indexed buffer semantics
|
|
|
|
|
|
+ intersection.faceIndex = Math.floor(_j / 3);
|
|
|
|
+ // triangle number in non-indexed buffer semantics
|
|
intersection.face.materialIndex = _group.materialIndex;
|
|
intersection.face.materialIndex = _group.materialIndex;
|
|
intersects.push(intersection);
|
|
intersects.push(intersection);
|
|
}
|
|
}
|
|
@@ -9070,16 +9100,20 @@
|
|
var _c3 = _i3 + 2;
|
|
var _c3 = _i3 + 2;
|
|
intersection = checkGeometryIntersection(this, material, raycaster, rayLocalSpace, uv, uv1, normal, _a3, _b3, _c3);
|
|
intersection = checkGeometryIntersection(this, material, raycaster, rayLocalSpace, uv, uv1, normal, _a3, _b3, _c3);
|
|
if (intersection) {
|
|
if (intersection) {
|
|
- intersection.faceIndex = Math.floor(_i3 / 3); // triangle number in non-indexed buffer semantics
|
|
|
|
|
|
+ intersection.faceIndex = Math.floor(_i3 / 3);
|
|
|
|
+ // triangle number in non-indexed buffer semantics
|
|
intersects.push(intersection);
|
|
intersects.push(intersection);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- var _v40 = /*@__PURE__*/new Vector4();
|
|
|
|
- var _v41 = /*@__PURE__*/new Vector4();
|
|
|
|
- var _v42 = /*@__PURE__*/new Vector4();
|
|
|
|
|
|
+ var _v40 = /*@__PURE__*/
|
|
|
|
+ new Vector4();
|
|
|
|
+ var _v41 = /*@__PURE__*/
|
|
|
|
+ new Vector4();
|
|
|
|
+ var _v42 = /*@__PURE__*/
|
|
|
|
+ new Vector4();
|
|
function checkGeometryIntersection(object, material, raycaster, ray, uv, uv1, normal, a, b, c) {
|
|
function checkGeometryIntersection(object, material, raycaster, ray, uv, uv1, normal, a, b, c) {
|
|
object.getVertexPosition(a, _vA$1$1);
|
|
object.getVertexPosition(a, _vA$1$1);
|
|
object.getVertexPosition(b, _vB$1$1);
|
|
object.getVertexPosition(b, _vB$1$1);
|
|
@@ -9131,8 +9165,10 @@
|
|
object: object
|
|
object: object
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- var _v1$6$1 = /*@__PURE__*/new Vector3();
|
|
|
|
- var _v2$3$1 = /*@__PURE__*/new Vector3();
|
|
|
|
|
|
+ var _v1$6$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
|
|
+ var _v2$3$1 = /*@__PURE__*/
|
|
|
|
+ new Vector3();
|
|
Sphere.prototype.expandByPoint = function (point) {
|
|
Sphere.prototype.expandByPoint = function (point) {
|
|
if (this.isEmpty()) {
|
|
if (this.isEmpty()) {
|
|
this.center.copy(point);
|
|
this.center.copy(point);
|
|
@@ -9180,6 +9216,69 @@
|
|
}
|
|
}
|
|
return this;
|
|
return this;
|
|
};
|
|
};
|
|
|
|
+ Color.prototype.getHSV = function () {
|
|
|
|
+ //or hsb 色相、饱和度、明度(不同于hsl的亮度,只有色相是和hsl一样)代码源于deepseek
|
|
|
|
+ var r = this.r,
|
|
|
|
+ g = this.g,
|
|
|
|
+ b = this.b;
|
|
|
|
+ var max = Math.max(r, g, b);
|
|
|
|
+ var min = Math.min(r, g, b);
|
|
|
|
+ var h,
|
|
|
|
+ s,
|
|
|
|
+ v = max;
|
|
|
|
+ var d = max - min;
|
|
|
|
+ s = max === 0 ? 0 : d / max;
|
|
|
|
+ if (max === min) {
|
|
|
|
+ h = 0;
|
|
|
|
+ // 无色
|
|
|
|
+ } else {
|
|
|
|
+ switch (max) {
|
|
|
|
+ case r:
|
|
|
|
+ h = (g - b) / d + (g < b ? 6 : 0);
|
|
|
|
+ break;
|
|
|
|
+ case g:
|
|
|
|
+ h = (b - r) / d + 2;
|
|
|
|
+ break;
|
|
|
|
+ case b:
|
|
|
|
+ h = (r - g) / d + 4;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ h /= 6;
|
|
|
|
+ }
|
|
|
|
+ return {
|
|
|
|
+ h: h * 360,
|
|
|
|
+ s: s * 100,
|
|
|
|
+ v: v * 100
|
|
|
|
+ };
|
|
|
|
+ };
|
|
|
|
+ Color.prototype.setHSV = function (h, s, v) {
|
|
|
|
+ h = h % 360;
|
|
|
|
+ s /= 100;
|
|
|
|
+ v /= 100;
|
|
|
|
+ var c = v * s;
|
|
|
|
+ var x = c * (1 - Math.abs(h / 60 % 2 - 1));
|
|
|
|
+ var m = v - c;
|
|
|
|
+ var r, g, b;
|
|
|
|
+ if (0 <= h && h < 60) {
|
|
|
|
+ [r, g, b] = [c, x, 0];
|
|
|
|
+ } else if (60 <= h && h < 120) {
|
|
|
|
+ [r, g, b] = [x, c, 0];
|
|
|
|
+ } else if (120 <= h && h < 180) {
|
|
|
|
+ [r, g, b] = [0, c, x];
|
|
|
|
+ } else if (180 <= h && h < 240) {
|
|
|
|
+ [r, g, b] = [0, x, c];
|
|
|
|
+ } else if (240 <= h && h < 300) {
|
|
|
|
+ [r, g, b] = [x, 0, c];
|
|
|
|
+ } else if (300 <= h && h < 360) {
|
|
|
|
+ [r, g, b] = [c, 0, x];
|
|
|
|
+ }
|
|
|
|
+ return this.setRGB(r + m, g + m, b + m);
|
|
|
|
+ };
|
|
|
|
+ var oldSet = Color.prototype.set;
|
|
|
|
+ Color.prototype.set = function () {
|
|
|
|
+ if (arguments.length >= 3) return this.setRGB.apply(this, arguments);
|
|
|
|
+ return oldSet.apply(this, arguments);
|
|
|
|
+ };
|
|
|
|
|
|
var MathLight = {};
|
|
var MathLight = {};
|
|
MathLight.RADIANS_PER_DEGREE = Math.PI / 180;
|
|
MathLight.RADIANS_PER_DEGREE = Math.PI / 180;
|
|
@@ -20355,8 +20454,9 @@
|
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
super();
|
|
super();
|
|
var map = new Texture();
|
|
var map = new Texture();
|
|
- map.minFilter = LinearFilter; //清晰一些?
|
|
|
|
- map.magFilter = LinearFilter;
|
|
|
|
|
|
+ map.minFilter = LinearMipmapNearestFilter;
|
|
|
|
+ map.magFilter = NearestFilter; //放大后可以很清晰
|
|
|
|
+
|
|
this.sprite = new Sprite$2(Object.assign({
|
|
this.sprite = new Sprite$2(Object.assign({
|
|
root: this
|
|
root: this
|
|
}, options, {
|
|
}, options, {
|
|
@@ -20531,16 +20631,17 @@
|
|
var actualBoundingBoxDescent = infos[i].fontBoundingBoxDescent == void 0 ? this.fontsize * r * 0.2 : infos[i].fontBoundingBoxDescent;
|
|
var actualBoundingBoxDescent = infos[i].fontBoundingBoxDescent == void 0 ? this.fontsize * r * 0.2 : infos[i].fontBoundingBoxDescent;
|
|
y += actualBoundingBoxDescent + textBorderThick + lineSpace;
|
|
y += actualBoundingBoxDescent + textBorderThick + lineSpace;
|
|
}
|
|
}
|
|
- var texture = new Texture(canvas);
|
|
|
|
- texture.minFilter = LinearFilter;
|
|
|
|
- texture.magFilter = LinearFilter;
|
|
|
|
- texture.needsUpdate = true;
|
|
|
|
- //this.material.needsUpdate = true;
|
|
|
|
|
|
|
|
- if (this.sprite.material.map) {
|
|
|
|
- this.sprite.material.map.dispose();
|
|
|
|
|
|
+ /* let texture = new THREE.Texture(canvas);
|
|
|
|
+ texture.needsUpdate = true; */
|
|
|
|
+ this.sprite.material.map.image = canvas;
|
|
|
|
+ this.sprite.material.map.needsUpdate = true;
|
|
|
|
+
|
|
|
|
+ /* if(this.sprite.material.map){
|
|
|
|
+ this.sprite.material.map.dispose()
|
|
}
|
|
}
|
|
- this.sprite.material.map = texture;
|
|
|
|
|
|
+ this.sprite.material.map = texture; */
|
|
|
|
+
|
|
var oldScale = this.sprite.scale.clone();
|
|
var oldScale = this.sprite.scale.clone();
|
|
this.sprite.scale.set(spriteWidth * 0.01 / r, spriteHeight * 0.01 / r, 1.0);
|
|
this.sprite.scale.set(spriteWidth * 0.01 / r, spriteHeight * 0.01 / r, 1.0);
|
|
if (!oldScale.equals(this.sprite.scale)) {
|
|
if (!oldScale.equals(this.sprite.scale)) {
|
|
@@ -49902,11 +50003,14 @@
|
|
if (this.color == color) return;
|
|
if (this.color == color) return;
|
|
this.color = color;
|
|
this.color = color;
|
|
var c = new Color().set(this.color);
|
|
var c = new Color().set(this.color);
|
|
|
|
+ var hsb = new Color().set(this.color).getHSV();
|
|
|
|
+ var textColor = new Color().setHSV(hsb.h, hsb.s, 100); //make bright full
|
|
|
|
+
|
|
this.titleLabel.setTextColor({
|
|
this.titleLabel.setTextColor({
|
|
- r: c.r * 255,
|
|
|
|
- g: c.g * 255,
|
|
|
|
- b: c.b * 255,
|
|
|
|
- a: 0.5
|
|
|
|
|
|
+ r: textColor.r * 255,
|
|
|
|
+ g: textColor.g * 255,
|
|
|
|
+ b: textColor.b * 255,
|
|
|
|
+ a: 0.95
|
|
});
|
|
});
|
|
this.updateSelectStyle(); //apply color
|
|
this.updateSelectStyle(); //apply color
|
|
|
|
|
|
@@ -50329,20 +50433,20 @@
|
|
viewer.mapViewer && viewer.mapViewer.dispatchEvent('content_changed');
|
|
viewer.mapViewer && viewer.mapViewer.dispatchEvent('content_changed');
|
|
}
|
|
}
|
|
updateSelectStyle() {
|
|
updateSelectStyle() {
|
|
- var c = new Color().set(this.color).getHSL({
|
|
|
|
- h: 0,
|
|
|
|
- s: 0,
|
|
|
|
- l: 0
|
|
|
|
- });
|
|
|
|
|
|
+ //let c = new THREE.Color().set(this.color).getHSL({ h: 0, s: 0, l: 0 })
|
|
|
|
+ var hsv = new Color().set(this.color).getHSV();
|
|
var color, arrowColor;
|
|
var color, arrowColor;
|
|
if (this.selectStates.click) {
|
|
if (this.selectStates.click) {
|
|
color = '#00C8AF';
|
|
color = '#00C8AF';
|
|
arrowColor = '#ffffff';
|
|
arrowColor = '#ffffff';
|
|
} else if (this.selectStates.hover) {
|
|
} else if (this.selectStates.hover) {
|
|
- color = new Color().setHSL(c.h, c.s, c.l - 0.1);
|
|
|
|
- arrowColor = new Color().setHSL(c.h, c.s, c.l >= 0.4 ? c.l - 0.3 : c.l + 0.3);
|
|
|
|
|
|
+ /* color = new THREE.Color().setHSL(c.h, c.s, c.l - 0.1 )
|
|
|
|
+ arrowColor = new THREE.Color().setHSL(c.h, c.s, c.l >= 0.4 ? c.l - 0.3 : c.l + 0.3 ) */
|
|
|
|
+ color = new Color().setHSV(hsv.h, hsv.s, hsv.v - 10);
|
|
|
|
+ arrowColor = new Color().setHSV(hsv.h, hsv.s, hsv.v >= 40 ? hsv.v - 30 : hsv.v + 30);
|
|
} else {
|
|
} else {
|
|
- arrowColor = new Color().setHSL(c.h, c.s, c.l >= 0.4 ? c.l - 0.3 : c.l + 0.3);
|
|
|
|
|
|
+ //arrowColor = new THREE.Color().setHSL(c.h, c.s, c.l >= 0.4 ? c.l - 0.3 : c.l + 0.3 )
|
|
|
|
+ arrowColor = new Color().setHSV(hsv.h, hsv.s, hsv.v >= 40 ? hsv.v - 30 : hsv.v + 30);
|
|
color = this.color;
|
|
color = this.color;
|
|
}
|
|
}
|
|
if (this.arrows) {
|
|
if (this.arrows) {
|
|
@@ -50628,6 +50732,7 @@
|
|
|
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
+ var sid$1 = 0;
|
|
class History extends EventDispatcher {
|
|
class History extends EventDispatcher {
|
|
constructor(o) {
|
|
constructor(o) {
|
|
super();
|
|
super();
|
|
@@ -50637,6 +50742,7 @@
|
|
this.getData = o.getData; //获取数据的方法
|
|
this.getData = o.getData; //获取数据的方法
|
|
|
|
|
|
this.dataBefore;
|
|
this.dataBefore;
|
|
|
|
+ this.sid = sid$1++;
|
|
(o.viewer || viewer).inputHandler.addEventListener('keydown', e => {
|
|
(o.viewer || viewer).inputHandler.addEventListener('keydown', e => {
|
|
if (e.keyCode == 90 && e.event.ctrlKey) {
|
|
if (e.keyCode == 90 && e.event.ctrlKey) {
|
|
//Z
|
|
//Z
|
|
@@ -50657,7 +50763,7 @@
|
|
unExist || this.redoList.push(last);
|
|
unExist || this.redoList.push(last);
|
|
unExist && this.undo(); //找不到就回退下一个。
|
|
unExist && this.undo(); //找不到就回退下一个。
|
|
this.dispatchEvent('undo');
|
|
this.dispatchEvent('undo');
|
|
- //console.log('undo',last)
|
|
|
|
|
|
+ console.log(this.sid, 'undo', this.undoList.length);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
redo() {
|
|
redo() {
|