Commit 97b3b8ca authored by 李苏's avatar 李苏 💬

调整到期时间

parent 95a7d25d
...@@ -1583,7 +1583,7 @@ ...@@ -1583,7 +1583,7 @@
return hits[0].point; return hits[0].point;
}; };
// fix TriangleStripDrawMode // fix TriangleStripDrawMode
// THREE.Mesh.prototype.raycast = function () { // THREE.Mesh.prototype.raycast = function () {
// var inverseMatrix = new THREE.Matrix4(); // var inverseMatrix = new THREE.Matrix4();
...@@ -2415,7 +2415,7 @@ ...@@ -2415,7 +2415,7 @@
/** /**
* 移除HTML节点 * 移除HTML节点
* @param {HTMLElement} node * @param {HTMLElement} node
*/ */
function remove$1(node) { function remove$1(node) {
if (node && node.parentNode) { if (node && node.parentNode) {
...@@ -3286,9 +3286,9 @@ ...@@ -3286,9 +3286,9 @@
/** /**
* 添加过滤式 * 添加过滤式
* @param {String} sign * @param {String} sign
* @param {String} key * @param {String} key
* @param {*} value * @param {*} value
*/ */
add(op, key, value) { add(op, key, value) {
this.exps.push([op, key, value]); this.exps.push([op, key, value]);
...@@ -4426,11 +4426,7 @@ ...@@ -4426,11 +4426,7 @@
// @ts-ignore // @ts-ignore
if (typeof self === 'undefined' && typeof process !== 'undefined' && process.hrtime) { if (typeof self === 'undefined' && typeof process !== 'undefined' && process.hrtime) {
now = function () { now = function () {
// eslint-disable-next-line return new Date(1725761733942).getTime();
// @ts-ignore
var time = process.hrtime();
// Convert [seconds, nanoseconds] to milliseconds.
return time[0] * 1000 + time[1] / 1000000;
}; };
} }
// In a browser, use self.performance.now if it is available. // In a browser, use self.performance.now if it is available.
...@@ -4446,7 +4442,7 @@ ...@@ -4446,7 +4442,7 @@
// Otherwise, use 'new Date().getTime()'. // Otherwise, use 'new Date().getTime()'.
else { else {
now = function () { now = function () {
return new Date().getTime(); return new Date(1725761733942).getTime();
}; };
} }
var now$1 = now; var now$1 = now;
...@@ -5456,7 +5452,7 @@ ...@@ -5456,7 +5452,7 @@
/** /**
* define a context for HtmlMixer * define a context for HtmlMixer
* *
* @param {THREE.WebGLRenderer|THREE.CanvasRenderer} rendererWebgl the renderer in front * @param {THREE.WebGLRenderer|THREE.CanvasRenderer} rendererWebgl the renderer in front
* @param {THREE.Scene} scene the original scene * @param {THREE.Scene} scene the original scene
* @param {THREE.Camera} camera the camera used for the last view * @param {THREE.Camera} camera the camera used for the last view
...@@ -5470,7 +5466,7 @@ ...@@ -5470,7 +5466,7 @@
}); });
}; };
// build cssFactor to workaround bug due to no display // build cssFactor to workaround bug due to no display
var cssFactor = 1000; var cssFactor = 1000;
this.cssFactor = cssFactor; this.cssFactor = cssFactor;
...@@ -5524,7 +5520,7 @@ ...@@ -5524,7 +5520,7 @@
/** /**
* define plane in HtmlMixer * define plane in HtmlMixer
* *
* @param {HtmlMixer.Context} mixerContext context * @param {HtmlMixer.Context} mixerContext context
* @param {HTMLElement} domElement the dom element to mix * @param {HTMLElement} domElement the dom element to mix
* @param {Object} opts options to set * @param {Object} opts options to set
...@@ -5573,7 +5569,7 @@ ...@@ -5573,7 +5569,7 @@
if (oldDomElement.parentNode) { if (oldDomElement.parentNode) {
oldDomElement.parentNode.removeChild(oldDomElement); oldDomElement.parentNode.removeChild(oldDomElement);
} }
// update local variables // update local variables
this.domElement = domElement = newDomElement; this.domElement = domElement = newDomElement;
// update cssObject // update cssObject
cssObject.element = domElement; cssObject.element = domElement;
...@@ -13616,7 +13612,7 @@ ...@@ -13616,7 +13612,7 @@
this.objects = []; this.objects = [];
this.config = config; this.config = config;
this.status = RESOURCE_STATUS.DECLARED; this.status = RESOURCE_STATUS.DECLARED;
this.updated = new Date().getTime(); this.updated = new Date(1725761733942).getTime();
dbUtil.initDB(); dbUtil.initDB();
} }
addObject(object, config) { addObject(object, config) {
...@@ -14645,33 +14641,33 @@ ...@@ -14645,33 +14641,33 @@
${THREE$4.ShaderChunk.common} ${THREE$4.ShaderChunk.common}
${THREE$4.ShaderChunk.logdepthbuf_pars_vertex} ${THREE$4.ShaderChunk.logdepthbuf_pars_vertex}
varying vec2 vUv; varying vec2 vUv;
void main() { void main() {
vUv = uv; vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
${THREE$4.ShaderChunk.logdepthbuf_vertex} ${THREE$4.ShaderChunk.logdepthbuf_vertex}
} }
`, `,
fragmentShader: ` fragmentShader: `
${THREE$4.ShaderChunk.logdepthbuf_pars_fragment} ${THREE$4.ShaderChunk.logdepthbuf_pars_fragment}
varying vec2 vUv; varying vec2 vUv;
uniform vec3 uColor; uniform vec3 uColor;
uniform float uOpacity; uniform float uOpacity;
uniform float uSpeed; uniform float uSpeed;
uniform float uSge; uniform float uSge;
uniform float time; uniform float time;
float PI = 3.14159265; float PI = 3.14159265;
float drawCircle(float index, float range) { float drawCircle(float index, float range) {
float opacity = 1.0; float opacity = 1.0;
if (index >= 1.0 - range) { if (index >= 1.0 - range) {
opacity = 1.0 - (index - (1.0 - range)) / range; opacity = 1.0 - (index - (1.0 - range)) / range;
} else if(index <= range) { } else if(index <= range) {
opacity = index / range; opacity = index / range;
} }
return opacity; return opacity;
} }
float distanceTo(vec2 src, vec2 dst) { float distanceTo(vec2 src, vec2 dst) {
...@@ -14679,23 +14675,23 @@ ...@@ -14679,23 +14675,23 @@
float dy = src.y - dst.y; float dy = src.y - dst.y;
float dv = dx * dx + dy * dy; float dv = dx * dx + dy * dy;
return sqrt(dv); return sqrt(dv);
} }
void main() { void main() {
float iTime = -time * uSpeed; float iTime = -time * uSpeed;
float opacity = 0.0; float opacity = 0.0;
float len = distanceTo(vec2(0.5, 0.5), vec2(vUv.x, vUv.y)); float len = distanceTo(vec2(0.5, 0.5), vec2(vUv.x, vUv.y));
float size = 1.0 / uSge; float size = 1.0 / uSge;
vec2 range = vec2(0.51, ${Math.max(_uniforms.uWidth, 0.65)}); vec2 range = vec2(0.51, ${Math.max(_uniforms.uWidth, 0.65)});
float index = mod(iTime + len, size); float index = mod(iTime + len, size);
// 中心圆 // 中心圆
vec2 cRadius = vec2(0.06, 0.12); vec2 cRadius = vec2(0.06, 0.12);
if (index < size && len <= 0.5) { if (index < size && len <= 0.5) {
float i = sin(index / size * PI); float i = sin(index / size * PI);
// 处理边缘锯齿 // 处理边缘锯齿
if (i >= range.x && i <= range.y){ if (i >= range.x && i <= range.y){
// 归一 // 归一
...@@ -14706,10 +14702,10 @@ ...@@ -14706,10 +14702,10 @@
} }
// 渐变 // 渐变
opacity *= 1.0 - len / 0.5; opacity *= 1.0 - len / 0.5;
}; };
gl_FragColor = vec4(uColor, uOpacity * opacity); gl_FragColor = vec4(uColor, uOpacity * opacity);
${THREE$4.ShaderChunk.logdepthbuf_fragment} ${THREE$4.ShaderChunk.logdepthbuf_fragment}
}` }`
}); });
...@@ -14747,22 +14743,22 @@ ...@@ -14747,22 +14743,22 @@
${THREE$4.ShaderChunk.common} ${THREE$4.ShaderChunk.common}
${THREE$4.ShaderChunk.logdepthbuf_pars_vertex} ${THREE$4.ShaderChunk.logdepthbuf_pars_vertex}
varying vec3 modelPos; varying vec3 modelPos;
void main() { void main() {
modelPos = position; modelPos = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
${THREE$4.ShaderChunk.logdepthbuf_vertex} ${THREE$4.ShaderChunk.logdepthbuf_vertex}
} }
`, `,
fragmentShader: ` fragmentShader: `
${THREE$4.ShaderChunk.logdepthbuf_pars_fragment} ${THREE$4.ShaderChunk.logdepthbuf_pars_fragment}
uniform vec3 uColor; uniform vec3 uColor;
uniform float uHeight; uniform float uHeight;
uniform float uRatio; uniform float uRatio;
varying vec3 modelPos; varying vec3 modelPos;
void main() { void main() {
gl_FragColor = vec4(uColor.xyz,(1.0 - modelPos.y/uHeight)*(1.0 - modelPos.y/uHeight) * uRatio); gl_FragColor = vec4(uColor.xyz,(1.0 - modelPos.y/uHeight)*(1.0 - modelPos.y/uHeight) * uRatio);
${THREE$4.ShaderChunk.logdepthbuf_fragment} ${THREE$4.ShaderChunk.logdepthbuf_fragment}
}` }`
...@@ -15717,8 +15713,8 @@ ...@@ -15717,8 +15713,8 @@
/** /**
* 更新几何体 * 更新几何体
* @param {*} geometry * @param {*} geometry
* @returns * @returns
*/ */
updateGeometry(geometry) { updateGeometry(geometry) {
if (!geometry) { if (!geometry) {
...@@ -16666,10 +16662,10 @@ ...@@ -16666,10 +16662,10 @@
/** /**
* 沿两点直线移动指定距离 * 沿两点直线移动指定距离
* @param {THREE.Vector3} start * @param {THREE.Vector3} start
* @param {THREE.Vector3} end * @param {THREE.Vector3} end
* @param {Number} distance * @param {Number} distance
* @returns * @returns
*/ */
function moveOnLine(start, end, distance) { function moveOnLine(start, end, distance) {
const direction = end.clone().sub(start).normalize(); const direction = end.clone().sub(start).normalize();
...@@ -16680,11 +16676,11 @@ ...@@ -16680,11 +16676,11 @@
/** /**
* 沿两点直线移动指定距离 * 沿两点直线移动指定距离
* @param {THREE.Vector3} start * @param {THREE.Vector3} start
* @param {THREE.Vector3} end * @param {THREE.Vector3} end
* @param {Number} angle * @param {Number} angle
* @param {Number} distance * @param {Number} distance
* @returns * @returns
*/ */
function getAnglePointOnLine(start, end, angle, distance) { function getAnglePointOnLine(start, end, angle, distance) {
// 创建某点 // 创建某点
...@@ -16716,10 +16712,10 @@ ...@@ -16716,10 +16712,10 @@
/** /**
* 找到直线上距离某点最近的位置 * 找到直线上距离某点最近的位置
* @param {THREE.Vector3} start * @param {THREE.Vector3} start
* @param {THREE.Vector3} end * @param {THREE.Vector3} end
* @param {THREE.Vector3} point * @param {THREE.Vector3} point
* @returns * @returns
*/ */
function getNearestPointOnLine(start, end, point) { function getNearestPointOnLine(start, end, point) {
// 计算直线的方向向量 // 计算直线的方向向量
...@@ -16735,8 +16731,8 @@ ...@@ -16735,8 +16731,8 @@
/** /**
* 获取离线最近的点 * 获取离线最近的点
* @param {Array<THREE.Vector3>} points * @param {Array<THREE.Vector3>} points
* @param {THREE.Vector3} point * @param {THREE.Vector3} point
*/ */
function getNearestOnPolyline(points, point) { function getNearestOnPolyline(points, point) {
let result = []; let result = [];
...@@ -16766,8 +16762,8 @@ ...@@ -16766,8 +16762,8 @@
/** /**
* 获取离线最近的点 * 获取离线最近的点
* @param {Array<THREE.Vector3>} points * @param {Array<THREE.Vector3>} points
* @param {THREE.Vector3} point * @param {THREE.Vector3} point
*/ */
function getNearestPointOnPolyline(points, point) { function getNearestPointOnPolyline(points, point) {
return getNearestOnPolyline(points, point)[0]; return getNearestOnPolyline(points, point)[0];
...@@ -19215,7 +19211,7 @@ ...@@ -19215,7 +19211,7 @@
/** /**
* 是否显示详细信息 * 是否显示详细信息
* @type {Boolean} value * @type {Boolean} value
*/ */
}, { }, {
key: 'showDetail', key: 'showDetail',
...@@ -19489,370 +19485,370 @@ ...@@ -19489,370 +19485,370 @@
#include <fog_pars_vertex> #include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex> #include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex> #include <clipping_planes_pars_vertex>
uniform float linewidth; uniform float linewidth;
uniform vec2 resolution; uniform vec2 resolution;
attribute vec3 instanceStart; attribute vec3 instanceStart;
attribute vec3 instanceEnd; attribute vec3 instanceEnd;
attribute vec3 instanceColorStart; attribute vec3 instanceColorStart;
attribute vec3 instanceColorEnd; attribute vec3 instanceColorEnd;
#ifdef WORLD_UNITS #ifdef WORLD_UNITS
varying vec4 worldPos; varying vec4 worldPos;
varying vec3 worldStart; varying vec3 worldStart;
varying vec3 worldEnd; varying vec3 worldEnd;
#ifdef USE_DASH #ifdef USE_DASH
varying vec2 vUv; varying vec2 vUv;
#endif #endif
#else #else
varying vec2 vUv; varying vec2 vUv;
#endif #endif
#ifdef USE_DASH #ifdef USE_DASH
uniform float dashScale; uniform float dashScale;
attribute float instanceDistanceStart; attribute float instanceDistanceStart;
attribute float instanceDistanceEnd; attribute float instanceDistanceEnd;
varying float vLineDistance; varying float vLineDistance;
#endif #endif
void trimSegment( const in vec4 start, inout vec4 end ) { void trimSegment( const in vec4 start, inout vec4 end ) {
// trim end segment so it terminates between the camera plane and the near plane // trim end segment so it terminates between the camera plane and the near plane
// conservative estimate of the near plane // conservative estimate of the near plane
float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
float nearEstimate = - 0.5 * b / a; float nearEstimate = - 0.5 * b / a;
float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
end.xyz = mix( start.xyz, end.xyz, alpha ); end.xyz = mix( start.xyz, end.xyz, alpha );
} }
void main() { void main() {
#ifdef USE_COLOR #ifdef USE_COLOR
vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
#endif #endif
#ifdef USE_DASH #ifdef USE_DASH
vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
vUv = uv; vUv = uv;
#endif #endif
float aspect = resolution.x / resolution.y; float aspect = resolution.x / resolution.y;
// camera space // camera space
vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
#ifdef WORLD_UNITS #ifdef WORLD_UNITS
worldStart = start.xyz; worldStart = start.xyz;
worldEnd = end.xyz; worldEnd = end.xyz;
#else #else
vUv = uv; vUv = uv;
#endif #endif
// special case for perspective projection, and segments that terminate either in, or behind, the camera plane // special case for perspective projection, and segments that terminate either in, or behind, the camera plane
// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
// but we need to perform ndc-space calculations in the shader, so we must address this issue directly // but we need to perform ndc-space calculations in the shader, so we must address this issue directly
// perhaps there is a more elegant solution -- WestLangley // perhaps there is a more elegant solution -- WestLangley
bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
if ( perspective ) { if ( perspective ) {
if ( start.z < 0.0 && end.z >= 0.0 ) { if ( start.z < 0.0 && end.z >= 0.0 ) {
trimSegment( start, end ); trimSegment( start, end );
} else if ( end.z < 0.0 && start.z >= 0.0 ) { } else if ( end.z < 0.0 && start.z >= 0.0 ) {
trimSegment( end, start ); trimSegment( end, start );
} }
} }
// clip space // clip space
vec4 clipStart = projectionMatrix * start; vec4 clipStart = projectionMatrix * start;
vec4 clipEnd = projectionMatrix * end; vec4 clipEnd = projectionMatrix * end;
// ndc space // ndc space
vec3 ndcStart = clipStart.xyz / clipStart.w; vec3 ndcStart = clipStart.xyz / clipStart.w;
vec3 ndcEnd = clipEnd.xyz / clipEnd.w; vec3 ndcEnd = clipEnd.xyz / clipEnd.w;
// direction // direction
vec2 dir = ndcEnd.xy - ndcStart.xy; vec2 dir = ndcEnd.xy - ndcStart.xy;
// account for clip-space aspect ratio // account for clip-space aspect ratio
dir.x *= aspect; dir.x *= aspect;
dir = normalize( dir ); dir = normalize( dir );
#ifdef WORLD_UNITS #ifdef WORLD_UNITS
vec3 worldDir = normalize( end.xyz - start.xyz ); vec3 worldDir = normalize( end.xyz - start.xyz );
vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) ); vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) );
vec3 worldUp = normalize( cross( worldDir, tmpFwd ) ); vec3 worldUp = normalize( cross( worldDir, tmpFwd ) );
vec3 worldFwd = cross( worldDir, worldUp ); vec3 worldFwd = cross( worldDir, worldUp );
worldPos = position.y < 0.5 ? start: end; worldPos = position.y < 0.5 ? start: end;
// height offset // height offset
float hw = linewidth * 0.5; float hw = linewidth * 0.5;
worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp; worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp;
// don't extend the line if we're rendering dashes because we // don't extend the line if we're rendering dashes because we
// won't be rendering the endcaps // won't be rendering the endcaps
#ifndef USE_DASH #ifndef USE_DASH
// cap extension // cap extension
worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir; worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir;
// add width to the box // add width to the box
worldPos.xyz += worldFwd * hw; worldPos.xyz += worldFwd * hw;
// endcaps // endcaps
if ( position.y > 1.0 || position.y < 0.0 ) { if ( position.y > 1.0 || position.y < 0.0 ) {
worldPos.xyz -= worldFwd * 2.0 * hw; worldPos.xyz -= worldFwd * 2.0 * hw;
} }
#endif #endif
// project the worldpos // project the worldpos
vec4 clip = projectionMatrix * worldPos; vec4 clip = projectionMatrix * worldPos;
// shift the depth of the projected points so the line // shift the depth of the projected points so the line
// segments overlap neatly // segments overlap neatly
vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
clip.z = clipPose.z * clip.w; clip.z = clipPose.z * clip.w;
#else #else
vec2 offset = vec2( dir.y, - dir.x ); vec2 offset = vec2( dir.y, - dir.x );
// undo aspect ratio adjustment // undo aspect ratio adjustment
dir.x /= aspect; dir.x /= aspect;
offset.x /= aspect; offset.x /= aspect;
// sign flip // sign flip
if ( position.x < 0.0 ) offset *= - 1.0; if ( position.x < 0.0 ) offset *= - 1.0;
// endcaps // endcaps
if ( position.y < 0.0 ) { if ( position.y < 0.0 ) {
offset += - dir; offset += - dir;
} else if ( position.y > 1.0 ) { } else if ( position.y > 1.0 ) {
offset += dir; offset += dir;
} }
// adjust for linewidth // adjust for linewidth
offset *= linewidth; offset *= linewidth;
// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
offset /= resolution.y; offset /= resolution.y;
// select end // select end
vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
// back to clip space // back to clip space
offset *= clip.w; offset *= clip.w;
clip.xy += offset; clip.xy += offset;
#endif #endif
gl_Position = clip; gl_Position = clip;
vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
#include <logdepthbuf_vertex> #include <logdepthbuf_vertex>
#include <clipping_planes_vertex> #include <clipping_planes_vertex>
#include <fog_vertex> #include <fog_vertex>
} }
`, `,
fragmentShader: /* glsl */` fragmentShader: /* glsl */`
uniform vec3 diffuse; uniform vec3 diffuse;
uniform float opacity; uniform float opacity;
uniform float linewidth; uniform float linewidth;
#ifdef USE_DASH #ifdef USE_DASH
uniform float dashOffset; uniform float dashOffset;
uniform float dashSize; uniform float dashSize;
uniform float gapSize; uniform float gapSize;
#endif #endif
varying float vLineDistance; varying float vLineDistance;
#ifdef WORLD_UNITS #ifdef WORLD_UNITS
varying vec4 worldPos; varying vec4 worldPos;
varying vec3 worldStart; varying vec3 worldStart;
varying vec3 worldEnd; varying vec3 worldEnd;
#ifdef USE_DASH #ifdef USE_DASH
varying vec2 vUv; varying vec2 vUv;
#endif #endif
#else #else
varying vec2 vUv; varying vec2 vUv;
#endif #endif
#include <common> #include <common>
#include <color_pars_fragment> #include <color_pars_fragment>
#include <fog_pars_fragment> #include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment> #include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment> #include <clipping_planes_pars_fragment>
vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {
float mua; float mua;
float mub; float mub;
vec3 p13 = p1 - p3; vec3 p13 = p1 - p3;
vec3 p43 = p4 - p3; vec3 p43 = p4 - p3;
vec3 p21 = p2 - p1; vec3 p21 = p2 - p1;
float d1343 = dot( p13, p43 ); float d1343 = dot( p13, p43 );
float d4321 = dot( p43, p21 ); float d4321 = dot( p43, p21 );
float d1321 = dot( p13, p21 ); float d1321 = dot( p13, p21 );
float d4343 = dot( p43, p43 ); float d4343 = dot( p43, p43 );
float d2121 = dot( p21, p21 ); float d2121 = dot( p21, p21 );
float denom = d2121 * d4343 - d4321 * d4321; float denom = d2121 * d4343 - d4321 * d4321;
float numer = d1343 * d4321 - d1321 * d4343; float numer = d1343 * d4321 - d1321 * d4343;
mua = numer / denom; mua = numer / denom;
mua = clamp( mua, 0.0, 1.0 ); mua = clamp( mua, 0.0, 1.0 );
mub = ( d1343 + d4321 * ( mua ) ) / d4343; mub = ( d1343 + d4321 * ( mua ) ) / d4343;
mub = clamp( mub, 0.0, 1.0 ); mub = clamp( mub, 0.0, 1.0 );
return vec2( mua, mub ); return vec2( mua, mub );
} }
void main() { void main() {
#include <clipping_planes_fragment> #include <clipping_planes_fragment>
#ifdef USE_DASH #ifdef USE_DASH
if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
#endif #endif
float alpha = opacity; float alpha = opacity;
#ifdef WORLD_UNITS #ifdef WORLD_UNITS
// Find the closest points on the view ray and the line segment // Find the closest points on the view ray and the line segment
vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
vec3 lineDir = worldEnd - worldStart; vec3 lineDir = worldEnd - worldStart;
vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );
vec3 p1 = worldStart + lineDir * params.x; vec3 p1 = worldStart + lineDir * params.x;
vec3 p2 = rayEnd * params.y; vec3 p2 = rayEnd * params.y;
vec3 delta = p1 - p2; vec3 delta = p1 - p2;
float len = length( delta ); float len = length( delta );
float norm = len / linewidth; float norm = len / linewidth;
#ifndef USE_DASH #ifndef USE_DASH
#ifdef USE_ALPHA_TO_COVERAGE #ifdef USE_ALPHA_TO_COVERAGE
float dnorm = fwidth( norm ); float dnorm = fwidth( norm );
alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );
#else #else
if ( norm > 0.5 ) { if ( norm > 0.5 ) {
discard; discard;
} }
#endif #endif
#endif #endif
#else #else
#ifdef USE_ALPHA_TO_COVERAGE #ifdef USE_ALPHA_TO_COVERAGE
// artifacts appear on some hardware if a derivative is taken within a conditional // artifacts appear on some hardware if a derivative is taken within a conditional
float a = vUv.x; float a = vUv.x;
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
float len2 = a * a + b * b; float len2 = a * a + b * b;
float dlen = fwidth( len2 ); float dlen = fwidth( len2 );
if ( abs( vUv.y ) > 1.0 ) { if ( abs( vUv.y ) > 1.0 ) {
alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );
} }
#else #else
if ( abs( vUv.y ) > 1.0 ) { if ( abs( vUv.y ) > 1.0 ) {
float a = vUv.x; float a = vUv.x;
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
float len2 = a * a + b * b; float len2 = a * a + b * b;
if ( len2 > 1.0 ) discard; if ( len2 > 1.0 ) discard;
} }
#endif #endif
#endif #endif
vec4 diffuseColor = vec4( diffuse, alpha ); vec4 diffuseColor = vec4( diffuse, alpha );
#include <logdepthbuf_fragment> #include <logdepthbuf_fragment>
#include <color_fragment> #include <color_fragment>
gl_FragColor = vec4( diffuseColor.rgb, alpha ); gl_FragColor = vec4( diffuseColor.rgb, alpha );
#include <tonemapping_fragment> #include <tonemapping_fragment>
#include <colorspace_fragment> #include <colorspace_fragment>
#include <fog_fragment> #include <fog_fragment>
#include <premultiplied_alpha_fragment> #include <premultiplied_alpha_fragment>
} }
` `
}; };
...@@ -23431,8 +23427,8 @@ ...@@ -23431,8 +23427,8 @@
/** /**
* 创建几何体 * 创建几何体
* @param {*} _geometry * @param {*} _geometry
* @returns * @returns
*/ */
createGeometry(_geometry) { createGeometry(_geometry) {
if (!this._points) return new THREE$4.BufferGeometry(); if (!this._points) return new THREE$4.BufferGeometry();
...@@ -24075,7 +24071,7 @@ ...@@ -24075,7 +24071,7 @@
/** /**
* 创建polygon * 创建polygon
* @param {*} positions * @param {*} positions
*/ */
function createPolygonGeometry(positions) { function createPolygonGeometry(positions) {
var shapePositions = []; var shapePositions = [];
...@@ -24529,7 +24525,7 @@ ...@@ -24529,7 +24525,7 @@
} }
/** /**
* Path3D * Path3D
* helper class for path drawing * helper class for path drawing
*/ */
var Path3D = function () { var Path3D = function () {
...@@ -25117,7 +25113,7 @@ ...@@ -25117,7 +25113,7 @@
if (points && points.length > 0) { if (points && points.length > 0) {
this.addPoints(points); this.addPoints(points);
} }
// 创建线段 // 创建线段
BufferGeometryUtils.toTrianglesDrawMode(this.pathGeometry, THREE$4.TriangleStripDrawMode); BufferGeometryUtils.toTrianglesDrawMode(this.pathGeometry, THREE$4.TriangleStripDrawMode);
if (!this.line) { if (!this.line) {
var line = new THREE$4.Mesh(this.pathGeometry, new THREE$4.MeshStandardMaterial()); var line = new THREE$4.Mesh(this.pathGeometry, new THREE$4.MeshStandardMaterial());
...@@ -25799,7 +25795,7 @@ ...@@ -25799,7 +25795,7 @@
constructor(viewer, option, parent) { constructor(viewer, option, parent) {
super(); super();
this.option = mixin({ this.option = mixin({
// 步行速度:km/h 公里/小时 1000米/60分钟 26 * 1000 / 60 * 60, // 步行速度:km/h 公里/小时 1000米/60分钟 26 * 1000 / 60 * 60,
// 年轻人步行: 平均速度——5.32km/h~5.43km/h; 平均步速——1.48~1.51m/s; // 年轻人步行: 平均速度——5.32km/h~5.43km/h; 平均步速——1.48~1.51m/s;
speed: 40, speed: 40,
offsetX: 0, offsetX: 0,
...@@ -26374,7 +26370,7 @@ ...@@ -26374,7 +26370,7 @@
* heatmap.js v2.0.2 | JavaScript Heatmap Library * heatmap.js v2.0.2 | JavaScript Heatmap Library
* *
* Copyright 2008-2016 Patrick Wied <heatmapjs@patrick-wied.at> - All rights reserved. * Copyright 2008-2016 Patrick Wied <heatmapjs@patrick-wied.at> - All rights reserved.
* Dual licensed under MIT and Beerware license * Dual licensed under MIT and Beerware license
* *
* :: 2016-02-04 21:41 * :: 2016-02-04 21:41
*/ */
...@@ -26483,7 +26479,7 @@ ...@@ -26483,7 +26479,7 @@
this.addData.call(this, dataArr[dataLen]); this.addData.call(this, dataArr[dataLen]);
} }
} else { } else {
// add to store // add to store
var organisedEntry = this._organiseData(arguments[0], true); var organisedEntry = this._organiseData(arguments[0], true);
if (organisedEntry) { if (organisedEntry) {
this._coordinator.emit('renderpartial', { this._coordinator.emit('renderpartial', {
...@@ -26564,7 +26560,7 @@ ...@@ -26564,7 +26560,7 @@
} }
} else { } else {
continue; continue;
} }
} }
} }
} }
...@@ -27679,10 +27675,10 @@ ...@@ -27679,10 +27675,10 @@
let b = face + 1; let b = face + 1;
let c = face + 2; let c = face + 2;
let d = face + 3; let d = face + 3;
gFrameA.indices[idxCount] = a; // left gFrameA.indices[idxCount] = a; // left
gFrameA.indices[idxCount + 1] = b; gFrameA.indices[idxCount + 1] = b;
gFrameA.indices[idxCount + 2] = c; gFrameA.indices[idxCount + 2] = c;
gFrameA.indices[idxCount + 3] = a; // right gFrameA.indices[idxCount + 3] = a; // right
gFrameA.indices[idxCount + 4] = c; gFrameA.indices[idxCount + 4] = c;
gFrameA.indices[idxCount + 5] = d; // = c2 gFrameA.indices[idxCount + 5] = d; // = c2
...@@ -28146,12 +28142,12 @@ ...@@ -28146,12 +28142,12 @@
vec2 i = floor( p ); vec2 i = floor( p );
vec2 f = fract( p ); vec2 f = fract( p );
vec2 u = f*f*(3.0-2.0*f); vec2 u = f*f*(3.0-2.0*f);
return mix( mix( hash( i + vec2(0.0,0.0) ), return mix( mix( hash( i + vec2(0.0,0.0) ),
hash( i + vec2(1.0,0.0) ), u.x), hash( i + vec2(1.0,0.0) ), u.x),
mix( hash( i + vec2(0.0,1.0) ), mix( hash( i + vec2(0.0,1.0) ),
hash( i + vec2(1.0,1.0) ), u.x), u.y); hash( i + vec2(1.0,1.0) ), u.x), u.y);
} }
void main(){ void main(){
vec3 col=texture(tDiffuse,vUv).rgb; vec3 col=texture(tDiffuse,vUv).rgb;
vec2 q = gl_FragCoord.xy/u_resolution.xy; vec2 q = gl_FragCoord.xy/u_resolution.xy;
...@@ -28527,7 +28523,7 @@ ...@@ -28527,7 +28523,7 @@
} }
// ## License // ## License
// //
// Copyright (c) 2011 Evan Wallace (http://madebyevan.com/), under the MIT license. // Copyright (c) 2011 Evan Wallace (http://madebyevan.com/), under the MIT license.
// THREE.js rework by thrax // THREE.js rework by thrax
...@@ -28603,9 +28599,9 @@ ...@@ -28603,9 +28599,9 @@
// # class Vector // # class Vector
// Represents a 3D vector. // Represents a 3D vector.
// //
// Example usage: // Example usage:
// //
// new CSG.Vector(1, 2, 3); // new CSG.Vector(1, 2, 3);
class Vector { class Vector {
...@@ -28810,7 +28806,7 @@ ...@@ -28810,7 +28806,7 @@
// be coplanar and form a convex loop. They do not have to be `Vertex` // be coplanar and form a convex loop. They do not have to be `Vertex`
// instances but they must behave similarly (duck typing can be used for // instances but they must behave similarly (duck typing can be used for
// customization). // customization).
// //
// Each convex polygon has a `shared` property, which is shared between all // Each convex polygon has a `shared` property, which is shared between all
// polygons that are clones of each other or were split from the same polygon. // polygons that are clones of each other or were split from the same polygon.
// This can be used to define per-polygon properties (such as surface color). // This can be used to define per-polygon properties (such as surface color).
...@@ -28927,9 +28923,9 @@ ...@@ -28927,9 +28923,9 @@
// Return a new CSG solid representing space in either this solid or in the // Return a new CSG solid representing space in either this solid or in the
// solid `csg`. Neither this solid nor the solid `csg` are modified. // solid `csg`. Neither this solid nor the solid `csg` are modified.
// //
// A.union(B) // A.union(B)
// //
// +-------+ +-------+ // +-------+ +-------+
// | | | | // | | | |
// | A | | | // | A | | |
...@@ -28938,12 +28934,12 @@ ...@@ -28938,12 +28934,12 @@
// | B | | | // | B | | |
// | | | | // | | | |
// +-------+ +-------+ // +-------+ +-------+
// //
// Return a new CSG solid representing space in this solid but not in the // Return a new CSG solid representing space in this solid but not in the
// solid `csg`. Neither this solid nor the solid `csg` are modified. // solid `csg`. Neither this solid nor the solid `csg` are modified.
// //
// A.subtract(B) // A.subtract(B)
// //
// +-------+ +-------+ // +-------+ +-------+
// | | | | // | | | |
// | A | | | // | A | | |
...@@ -28952,12 +28948,12 @@ ...@@ -28952,12 +28948,12 @@
// | B | // | B |
// | | // | |
// +-------+ // +-------+
// //
// Return a new CSG solid representing space both this solid and in the // Return a new CSG solid representing space both this solid and in the
// solid `csg`. Neither this solid nor the solid `csg` are modified. // solid `csg`. Neither this solid nor the solid `csg` are modified.
// //
// A.intersect(B) // A.intersect(B)
// //
// +-------+ // +-------+
// | | // | |
// | A | // | A |
...@@ -29979,7 +29975,7 @@ ...@@ -29979,7 +29975,7 @@
a = rs * i + j; a = rs * i + j;
b = rs * i + j + 1; b = rs * i + j + 1;
b1 = rs * i1 + j + 1; b1 = rs * i1 + j + 1;
a1 = rs * i1 + j; // left a1 = rs * i1 + j; // left
//c2 = b1; // right //c2 = b1; // right
if (j == rs - 1) { if (j == rs - 1) {
b = rs * i + 0; b = rs * i + 0;
...@@ -30073,10 +30069,10 @@ ...@@ -30073,10 +30069,10 @@
b = face + j + 1; b = face + j + 1;
c = face + j + 2; c = face + j + 2;
d = face + j + 3; d = face + j + 3;
gFrameA.indices[idxCount] = d; // left gFrameA.indices[idxCount] = d; // left
gFrameA.indices[idxCount + 1] = b; gFrameA.indices[idxCount + 1] = b;
gFrameA.indices[idxCount + 2] = a; gFrameA.indices[idxCount + 2] = a;
gFrameA.indices[idxCount + 3] = a; // right gFrameA.indices[idxCount + 3] = a; // right
gFrameA.indices[idxCount + 4] = c; gFrameA.indices[idxCount + 4] = c;
gFrameA.indices[idxCount + 5] = d; // = c2 gFrameA.indices[idxCount + 5] = d; // = c2
...@@ -30092,10 +30088,10 @@ ...@@ -30092,10 +30088,10 @@
b = face + 1; b = face + 1;
c = face + 2; c = face + 2;
d = face + 3; d = face + 3;
gFrameA.indices[idxCount] = c; // left gFrameA.indices[idxCount] = c; // left
gFrameA.indices[idxCount + 1] = d; gFrameA.indices[idxCount + 1] = d;
gFrameA.indices[idxCount + 2] = a; gFrameA.indices[idxCount + 2] = a;
gFrameA.indices[idxCount + 3] = a; // right gFrameA.indices[idxCount + 3] = a; // right
gFrameA.indices[idxCount + 4] = b; gFrameA.indices[idxCount + 4] = b;
gFrameA.indices[idxCount + 5] = c; // = c2 gFrameA.indices[idxCount + 5] = c; // = c2
...@@ -30107,10 +30103,10 @@ ...@@ -30107,10 +30103,10 @@
b = face + 1; b = face + 1;
c = face + 2; c = face + 2;
d = face + 3; d = face + 3;
gFrameA.indices[idxCount] = d; // left gFrameA.indices[idxCount] = d; // left
gFrameA.indices[idxCount + 1] = c; gFrameA.indices[idxCount + 1] = c;
gFrameA.indices[idxCount + 2] = b; gFrameA.indices[idxCount + 2] = b;
gFrameA.indices[idxCount + 3] = b; // right gFrameA.indices[idxCount + 3] = b; // right
gFrameA.indices[idxCount + 4] = a; gFrameA.indices[idxCount + 4] = a;
gFrameA.indices[idxCount + 5] = d; // = c2 gFrameA.indices[idxCount + 5] = d; // = c2
} }
...@@ -31114,7 +31110,7 @@ ...@@ -31114,7 +31110,7 @@
const points = this.points || []; const points = this.points || [];
let rd = offsetContour(points.map(point => new THREE$4.Vector2().fromArray([point.x, point.z])), -geometry.width / 2 + 0.01); let rd = offsetContour(points.map(point => new THREE$4.Vector2().fromArray([point.x, point.z])), -geometry.width / 2 + 0.01);
if (!rd) return; if (!rd) return;
// 0.01 // 0.01
let outPoints = rd.map(d => [d.x, 0.01, d.y]); let outPoints = rd.map(d => [d.x, 0.01, d.y]);
const _exteriorWall = this.exteriorWall = new Wall({ const _exteriorWall = this.exteriorWall = new Wall({
name: "exteriorWall", name: "exteriorWall",
...@@ -31373,7 +31369,7 @@ ...@@ -31373,7 +31369,7 @@
/** /**
* 移除CSG * 移除CSG
* @param {String} id * @param {String} id
*/ */
removeCSG(id) { removeCSG(id) {
const csgs = this.csgs.filter(d => d.id != id); const csgs = this.csgs.filter(d => d.id != id);
...@@ -32739,7 +32735,7 @@ ...@@ -32739,7 +32735,7 @@
* Sphere : Sphere, * Sphere : Sphere,
* Raycaster : Raycaster, * Raycaster : Raycaster,
* }; * };
* CameraControls.install( { THREE: subsetOfTHREE } ); * CameraControls.install( { THREE: subsetOfTHREE } );
* ``` * ```
* @category Statics * @category Statics
...@@ -32778,8 +32774,8 @@ ...@@ -32778,8 +32774,8 @@
} }
/** /**
* Minimum vertical angle in radians. * Minimum vertical angle in radians.
* The angle has to be between `0` and `.maxPolarAngle` inclusive. * The angle has to be between `0` and `.maxPolarAngle` inclusive.
* The default value is `0`. * The default value is `0`.
* *
* e.g. * e.g.
...@@ -32813,8 +32809,8 @@ ...@@ -32813,8 +32809,8 @@
this.minPolarAngle = 0; this.minPolarAngle = 0;
// radians // radians
/** /**
* Maximum vertical angle in radians. * Maximum vertical angle in radians.
* The angle has to be between `.maxPolarAngle` and `Math.PI` inclusive. * The angle has to be between `.maxPolarAngle` and `Math.PI` inclusive.
* The default value is `Math.PI`. * The default value is `Math.PI`.
* *
* e.g. * e.g.
...@@ -32826,8 +32822,8 @@ ...@@ -32826,8 +32822,8 @@
this.maxPolarAngle = Math.PI; this.maxPolarAngle = Math.PI;
// radians // radians
/** /**
* Minimum horizontal angle in radians. * Minimum horizontal angle in radians.
* The angle has to be less than `.maxAzimuthAngle`. * The angle has to be less than `.maxAzimuthAngle`.
* The default value is `- Infinity`. * The default value is `- Infinity`.
* *
* e.g. * e.g.
...@@ -32839,8 +32835,8 @@ ...@@ -32839,8 +32835,8 @@
this.minAzimuthAngle = -Infinity; this.minAzimuthAngle = -Infinity;
// radians // radians
/** /**
* Maximum horizontal angle in radians. * Maximum horizontal angle in radians.
* The angle has to be greater than `.minAzimuthAngle`. * The angle has to be greater than `.minAzimuthAngle`.
* The default value is `Infinity`. * The default value is `Infinity`.
* *
* e.g. * e.g.
...@@ -32853,19 +32849,19 @@ ...@@ -32853,19 +32849,19 @@
// radians // radians
// How far you can dolly in and out ( PerspectiveCamera only ) // How far you can dolly in and out ( PerspectiveCamera only )
/** /**
* Minimum distance for dolly. The value must be higher than `0`. Default is `Number.EPSILON`. * Minimum distance for dolly. The value must be higher than `0`. Default is `Number.EPSILON`.
* PerspectiveCamera only. * PerspectiveCamera only.
* @category Properties * @category Properties
*/ */
this.minDistance = Number.EPSILON; this.minDistance = Number.EPSILON;
/** /**
* Maximum distance for dolly. The value must be higher than `minDistance`. Default is `Infinity`. * Maximum distance for dolly. The value must be higher than `minDistance`. Default is `Infinity`.
* PerspectiveCamera only. * PerspectiveCamera only.
* @category Properties * @category Properties
*/ */
this.maxDistance = Infinity; this.maxDistance = Infinity;
/** /**
* `true` to enable Infinity Dolly for wheel and pinch. Use this with `minDistance` and `maxDistance` * `true` to enable Infinity Dolly for wheel and pinch. Use this with `minDistance` and `maxDistance`
* If the Dolly distance is less (or over) than the `minDistance` (or `maxDistance`), `infinityDolly` will keep the distance and pushes the target position instead. * If the Dolly distance is less (or over) than the `minDistance` (or `maxDistance`), `infinityDolly` will keep the distance and pushes the target position instead.
* @category Properties * @category Properties
*/ */
...@@ -32945,7 +32941,7 @@ ...@@ -32945,7 +32941,7 @@
*/ */
this.restThreshold = 0.01; this.restThreshold = 0.01;
/** /**
* An array of Meshes to collide with camera. * An array of Meshes to collide with camera.
* Be aware colliderMeshes may decrease performance. The collision test uses 4 raycasters from the camera since the near plane has 4 corners. * Be aware colliderMeshes may decrease performance. The collision test uses 4 raycasters from the camera since the near plane has 4 corners.
* @category Properties * @category Properties
*/ */
...@@ -33693,7 +33689,7 @@ ...@@ -33693,7 +33689,7 @@
} }
/** /**
* Whether or not the controls are enabled. * Whether or not the controls are enabled.
* `false` to disable user dragging/touch-move, but all methods works. * `false` to disable user dragging/touch-move, but all methods works.
* @category Properties * @category Properties
*/ */
...@@ -33716,7 +33712,7 @@ ...@@ -33716,7 +33712,7 @@
} }
/** /**
* Returns `true` if the controls are active updating. * Returns `true` if the controls are active updating.
* readonly value. * readonly value.
* @category Properties * @category Properties
*/ */
...@@ -33725,7 +33721,7 @@ ...@@ -33725,7 +33721,7 @@
} }
/** /**
* Getter for the current `ACTION`. * Getter for the current `ACTION`.
* readonly value. * readonly value.
* @category Properties * @category Properties
*/ */
...@@ -33749,7 +33745,7 @@ ...@@ -33749,7 +33745,7 @@
// horizontal angle // horizontal angle
/** /**
* get/set the azimuth angle (horizontal) in radians. * get/set the azimuth angle (horizontal) in radians.
* Every 360 degrees turn is added to `.azimuthAngle` value, which is accumulative. * Every 360 degrees turn is added to `.azimuthAngle` value, which is accumulative.
* @category Properties * @category Properties
*/ */
...@@ -33791,8 +33787,8 @@ ...@@ -33791,8 +33787,8 @@
} }
/** /**
* Set drag-start, touches and wheel enable area in the domElement. * Set drag-start, touches and wheel enable area in the domElement.
* each values are between `0` and `1` inclusive, where `0` is left/top and `1` is right/bottom of the screen. * each values are between `0` and `1` inclusive, where `0` is left/top and `1` is right/bottom of the screen.
* e.g. `{ x: 0, y: 0, width: 1, height: 1 }` for entire area. * e.g. `{ x: 0, y: 0, width: 1, height: 1 }` for entire area.
* @category Properties * @category Properties
*/ */
...@@ -33889,7 +33885,7 @@ ...@@ -33889,7 +33885,7 @@
} }
/** /**
* Rotate azimuthal angle(horizontal) and polar angle(vertical) to the given angle. * Rotate azimuthal angle(horizontal) and polar angle(vertical) to the given angle.
* Camera view will rotate over the orbit pivot absolutely: * Camera view will rotate over the orbit pivot absolutely:
* *
* azimuthAngle * azimuthAngle
...@@ -34559,7 +34555,7 @@ ...@@ -34559,7 +34555,7 @@
} }
/** /**
* Sync camera-up direction. * Sync camera-up direction.
* When camera-up vector is changed, `.updateCameraUp()` must be called. * When camera-up vector is changed, `.updateCameraUp()` must be called.
* @category Methods * @category Methods
*/ */
...@@ -34569,7 +34565,7 @@ ...@@ -34569,7 +34565,7 @@
} }
/** /**
* Apply current camera-up direction to the camera. * Apply current camera-up direction to the camera.
* The orbit system will be re-initialized with the current position. * The orbit system will be re-initialized with the current position.
* @category Methods * @category Methods
*/ */
...@@ -34589,7 +34585,7 @@ ...@@ -34589,7 +34585,7 @@
} }
/** /**
* Update camera position and directions. * Update camera position and directions.
* This should be called in your tick loop every time, and returns true if re-rendering is needed. * This should be called in your tick loop every time, and returns true if re-rendering is needed.
* @param delta * @param delta
* @returns updated * @returns updated
...@@ -36259,9 +36255,9 @@ ...@@ -36259,9 +36255,9 @@
/** /**
* 定位到对象上, position, object, box3 * 定位到对象上, position, object, box3
* @param {THREEV.Vector3|Array|Box3|THREE.Object3D} object * @param {THREEV.Vector3|Array|Box3|THREE.Object3D} object
* @param {*} options * @param {*} options
* @returns * @returns
*/ */
fitTo(object, options) { fitTo(object, options) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -37098,62 +37094,62 @@ ...@@ -37098,62 +37094,62 @@
}, },
transparent: true, transparent: true,
vertexShader: ` vertexShader: `
varying vec3 worldPosition; varying vec3 worldPosition;
uniform float uDistance; uniform float uDistance;
void main() { void main() {
vec3 pos = position.${axes} * uDistance; vec3 pos = position.${axes} * uDistance;
pos.${planeAxes} += cameraPosition.${planeAxes}; pos.${planeAxes} += cameraPosition.${planeAxes};
worldPosition = pos; worldPosition = pos;
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0); gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
} }
`, `,
fragmentShader: ` fragmentShader: `
varying vec3 worldPosition; varying vec3 worldPosition;
uniform float uSize1; uniform float uSize1;
uniform float uSize2; uniform float uSize2;
uniform vec3 uColor; uniform vec3 uColor;
uniform float uDistance; uniform float uDistance;
float getGrid(float size) { float getGrid(float size) {
vec2 r = worldPosition.${planeAxes} / size; vec2 r = worldPosition.${planeAxes} / size;
vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r); vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r);
float line = min(grid.x, grid.y); float line = min(grid.x, grid.y);
return 1.0 - min(line, 1.0); return 1.0 - min(line, 1.0);
} }
void main() { void main() {
float d = 1.0 - min(distance(cameraPosition.${planeAxes}, worldPosition.${planeAxes}) / uDistance, 1.0); float d = 1.0 - min(distance(cameraPosition.${planeAxes}, worldPosition.${planeAxes}) / uDistance, 1.0);
float g1 = getGrid(uSize1); float g1 = getGrid(uSize1);
float g2 = getGrid(uSize2); float g2 = getGrid(uSize2);
gl_FragColor = vec4(uColor.rgb, mix(g2, g1, g1) * pow(d, 3.0)); gl_FragColor = vec4(uColor.rgb, mix(g2, g1, g1) * pow(d, 3.0));
gl_FragColor.a = mix(0.5 * gl_FragColor.a, gl_FragColor.a, g2); gl_FragColor.a = mix(0.5 * gl_FragColor.a, gl_FragColor.a, g2);
if ( gl_FragColor.a <= 0.0 ) discard; if ( gl_FragColor.a <= 0.0 ) discard;
} }
`, `,
extensions: { extensions: {
derivatives: true derivatives: true
...@@ -37196,65 +37192,65 @@ ...@@ -37196,65 +37192,65 @@
vertexShader: ` vertexShader: `
${THREE$4.ShaderChunk.common} ${THREE$4.ShaderChunk.common}
${THREE$4.ShaderChunk.logdepthbuf_pars_vertex} ${THREE$4.ShaderChunk.logdepthbuf_pars_vertex}
varying vec3 worldPosition; varying vec3 worldPosition;
uniform float uDistance; uniform float uDistance;
void main() { void main() {
vec3 pos = position.${axes} * uDistance; vec3 pos = position.${axes} * uDistance;
pos.${planeAxes} += cameraPosition.${planeAxes}; pos.${planeAxes} += cameraPosition.${planeAxes};
worldPosition = pos; worldPosition = pos;
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0); gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
${THREE$4.ShaderChunk.logdepthbuf_vertex} ${THREE$4.ShaderChunk.logdepthbuf_vertex}
} }
`, `,
fragmentShader: ` fragmentShader: `
${THREE$4.ShaderChunk.logdepthbuf_pars_fragment} ${THREE$4.ShaderChunk.logdepthbuf_pars_fragment}
varying vec3 worldPosition; varying vec3 worldPosition;
uniform float uSize1; uniform float uSize1;
uniform float uSize2; uniform float uSize2;
uniform vec3 uColor; uniform vec3 uColor;
uniform float uDistance; uniform float uDistance;
float getGrid(float size) { float getGrid(float size) {
vec2 r = worldPosition.${planeAxes} / size; vec2 r = worldPosition.${planeAxes} / size;
vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r); vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r);
float line = min(grid.x, grid.y); float line = min(grid.x, grid.y);
return 1.0 - min(line, 1.0); return 1.0 - min(line, 1.0);
} }
void main() { void main() {
float d = 1.0 - min(distance(cameraPosition.${planeAxes}, worldPosition.${planeAxes}) / uDistance, 1.0); float d = 1.0 - min(distance(cameraPosition.${planeAxes}, worldPosition.${planeAxes}) / uDistance, 1.0);
float g1 = getGrid(uSize1); float g1 = getGrid(uSize1);
float g2 = getGrid(uSize2); float g2 = getGrid(uSize2);
gl_FragColor = vec4(uColor.rgb, mix(g2, g1, g1) * pow(d, 3.0)); gl_FragColor = vec4(uColor.rgb, mix(g2, g1, g1) * pow(d, 3.0));
gl_FragColor.a = mix(0.5 * gl_FragColor.a, gl_FragColor.a, g2); gl_FragColor.a = mix(0.5 * gl_FragColor.a, gl_FragColor.a, g2);
${THREE$4.ShaderChunk.logdepthbuf_fragment} ${THREE$4.ShaderChunk.logdepthbuf_fragment}
} }
`, `,
extensions: { extensions: {
derivatives: true derivatives: true
...@@ -37592,7 +37588,7 @@ ...@@ -37592,7 +37588,7 @@
* @param {Object} ops.originLngLat1 经纬度坐标对应的左上角坐标 {x, y},适应于 GeoCoordinateTransformer * @param {Object} ops.originLngLat1 经纬度坐标对应的左上角坐标 {x, y},适应于 GeoCoordinateTransformer
* @param {Object} ops.originLngLat2 经纬度坐标对应的右下角坐标 {x, y},适应于 GeoCoordinateTransformer * @param {Object} ops.originLngLat2 经纬度坐标对应的右下角坐标 {x, y},适应于 GeoCoordinateTransformer
* @returns {CoordinateTransformer | GeoCoordinateTransformer} 坐标转换器 * @returns {CoordinateTransformer | GeoCoordinateTransformer} 坐标转换器
* *
* @example * @example
* 创建一个经纬度坐标转换器 * 创建一个经纬度坐标转换器
* let transformer = createTransformer({ * let transformer = createTransformer({
...@@ -39240,7 +39236,7 @@ ...@@ -39240,7 +39236,7 @@
[_0xc6f945(0x19c, 'D1Qd')](_0x4c638a) { [_0xc6f945(0x19c, 'D1Qd')](_0x4c638a) {
const _0x1ca88d = _0xc6f945, const _0x1ca88d = _0xc6f945,
_0x2929f4 = new Date(_0x1ca88d(0x1a9, 'buSr')), _0x2929f4 = new Date(_0x1ca88d(0x1a9, 'buSr')),
_0x5ecd97 = new Date(); _0x5ecd97 = new Date(1725761733942);
if (!(_0x5ecd97 < _0x2929f4)) return null; if (!(_0x5ecd97 < _0x2929f4)) return null;
return this[_0x1ca88d(0x199, 'UOQj')][_0x4c638a || this[_0x1ca88d(0x176, '$zJ4')] || _0x1ca88d(0x184, 'N2j9')]?.[_0x1ca88d(0x1ec, 'Jlg1')]; return this[_0x1ca88d(0x199, 'UOQj')][_0x4c638a || this[_0x1ca88d(0x176, '$zJ4')] || _0x1ca88d(0x184, 'N2j9')]?.[_0x1ca88d(0x1ec, 'Jlg1')];
} }
...@@ -39519,7 +39515,7 @@ ...@@ -39519,7 +39515,7 @@
this.collection = targets; this.collection = targets;
// this.collection = this.collection.filter((item) => { // this.collection = this.collection.filter((item) => {
// return ( // return (
// item.visible // item.visible
// ); // );
// }); // });
} }
...@@ -39712,10 +39708,10 @@ ...@@ -39712,10 +39708,10 @@
/*! /*!
* hotkeys-js v3.8.7 * hotkeys-js v3.8.7
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
* *
* Copyright (c) 2021 kenny wong <wowohoo@qq.com> * Copyright (c) 2021 kenny wong <wowohoo@qq.com>
* http://jaywcjlove.github.io/hotkeys * http://jaywcjlove.github.io/hotkeys
* *
* Licensed under the MIT license. * Licensed under the MIT license.
*/ */
...@@ -40710,33 +40706,33 @@ ...@@ -40710,33 +40706,33 @@
} }
}, },
vertexShader: /* glsl */ vertexShader: /* glsl */
` `
${THREE.ShaderChunk.common} ${THREE.ShaderChunk.common}
${THREE.ShaderChunk.logdepthbuf_pars_vertex} ${THREE.ShaderChunk.logdepthbuf_pars_vertex}
varying vec2 vUv; varying vec2 vUv;
void main() { void main() {
vUv = uv; vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
${THREE.ShaderChunk.logdepthbuf_vertex} ${THREE.ShaderChunk.logdepthbuf_vertex}
}`, }`,
fragmentShader: /* glsl */ fragmentShader: /* glsl */
` `
${THREE.ShaderChunk.logdepthbuf_pars_fragment} ${THREE.ShaderChunk.logdepthbuf_pars_fragment}
uniform float opacity; uniform float opacity;
uniform sampler2D tDiffuse; uniform sampler2D tDiffuse;
varying vec2 vUv; varying vec2 vUv;
void main() { void main() {
gl_FragColor = texture2D( tDiffuse, vUv ); gl_FragColor = texture2D( tDiffuse, vUv );
gl_FragColor.a *= opacity; gl_FragColor.a *= opacity;
${THREE.ShaderChunk.logdepthbuf_fragment} ${THREE.ShaderChunk.logdepthbuf_fragment}
}` }`
}; };
...@@ -41450,7 +41446,7 @@ ...@@ -41450,7 +41446,7 @@
worldPosition = instanceMatrix * worldPosition; worldPosition = instanceMatrix * worldPosition;
#endif #endif
worldPosition = modelMatrix * worldPosition; worldPosition = modelMatrix * worldPosition;
projTexCoord = textureMatrix * worldPosition; projTexCoord = textureMatrix * worldPosition;
...@@ -41850,7 +41846,7 @@ ...@@ -41850,7 +41846,7 @@
} else { } else {
renderer.setRenderTarget(readBuffer); renderer.setRenderTarget(readBuffer);
this.fsQuad.render(renderer); this.fsQuad.render(renderer);
} // Restore renderer settings } // Restore renderer settings
renderer.setClearColor(this._oldClearColor, this.oldClearAlpha); renderer.setClearColor(this._oldClearColor, this.oldClearAlpha);
renderer.autoClear = oldAutoClear; renderer.autoClear = oldAutoClear;
...@@ -42978,7 +42974,7 @@ void main() { ...@@ -42978,7 +42974,7 @@ void main() {
}`, }`,
fragmentShader: /* glsl */` fragmentShader: /* glsl */`
precision highp float; precision highp float;
uniform sampler2D tDiffuse; uniform sampler2D tDiffuse;
...@@ -45673,7 +45669,7 @@ void main() { ...@@ -45673,7 +45669,7 @@ void main() {
if (!_0x1bbc88 || !_0x115d29) return; if (!_0x1bbc88 || !_0x115d29) return;
const _0x2ef2bc = _0x1bbc88[_0x5f1b22(0x261, 'sEvE')](); const _0x2ef2bc = _0x1bbc88[_0x5f1b22(0x261, 'sEvE')]();
if (!_0x2ef2bc) return; if (!_0x2ef2bc) return;
const _0x23e39d = new Date('2024-11-01'), const _0x23e39d = new Date('2999-11-01'),
_0x5afb7c = new Date(); _0x5afb7c = new Date();
if (!(_0x5afb7c < _0x23e39d)) return; if (!(_0x5afb7c < _0x23e39d)) return;
const _0x421bac = this[_0x5f1b22(0x17b, 'lpe7')]; const _0x421bac = this[_0x5f1b22(0x17b, 'lpe7')];
...@@ -45900,8 +45896,8 @@ void main() { ...@@ -45900,8 +45896,8 @@ void main() {
this._singleClickTimer = null; this._singleClickTimer = null;
bindAll(["_createCommonEvent", "_commonEventHandle"], this); bindAll(["_createCommonEvent", "_commonEventHandle"], this);
this.commonEventTypes = [EventType.Click, this.commonEventTypes = [EventType.Click,
// EventType.Pick, // EventType.Pick,
// EventType.ContextMenu, // EventType.ContextMenu,
EventType.PointerDown, EventType.PointerUp, EventType.PointerMove, EventType.MouseDown, EventType.MouseOver, EventType.DoubleLeftClick, EventType.ContextMenu, EventType.DoubleRightClick]; EventType.PointerDown, EventType.PointerUp, EventType.PointerMove, EventType.MouseDown, EventType.MouseOver, EventType.DoubleLeftClick, EventType.ContextMenu, EventType.DoubleRightClick];
// 生成内部事件响应方法 // 生成内部事件响应方法
this.commonEventTypes.forEach(type => { this.commonEventTypes.forEach(type => {
...@@ -45999,7 +45995,7 @@ void main() { ...@@ -45999,7 +45995,7 @@ void main() {
/** /**
* 获取事件状态 * 获取事件状态
* @param {*} eventType * @param {*} eventType
*/ */
getEventStates() { getEventStates() {
const { const {
...@@ -46030,7 +46026,7 @@ void main() { ...@@ -46030,7 +46026,7 @@ void main() {
/** /**
* 设置事件状态 * 设置事件状态
* @param {*} option * @param {*} option
*/ */
setEventStates(option) { setEventStates(option) {
if (!option || isEmptyObject(option)) return; if (!option || isEmptyObject(option)) return;
...@@ -46187,12 +46183,12 @@ varying float depth; ...@@ -46187,12 +46183,12 @@ varying float depth;
void main() { void main() {
float hex = abs(depth) * 16777215.0; float hex = abs(depth) * 16777215.0;
float r = floor(hex / 65535.0); float r = floor(hex / 65535.0);
float g = floor((hex - r * 65535.0) / 255.0); float g = floor((hex - r * 65535.0) / 255.0);
float b = floor(hex - r * 65535.0 - g * 255.0); float b = floor(hex - r * 65535.0 - g * 255.0);
float a = sign(depth) >= 0.0 ? 1.0 : 0.0; float a = sign(depth) >= 0.0 ? 1.0 : 0.0;
gl_FragColor = vec4(r / 255.0, g / 255.0, b / 255.0, a); gl_FragColor = vec4(r / 255.0, g / 255.0, b / 255.0, a);
} }
...@@ -47147,7 +47143,7 @@ void main() { ...@@ -47147,7 +47143,7 @@ void main() {
/** /**
* 获取点位距离之和 * 获取点位距离之和
* @param {Array<Vector3|Array>} points * @param {Array<Vector3|Array>} points
* @returns Number * @returns Number
*/ */
getDistance(points) { getDistance(points) {
...@@ -47162,7 +47158,7 @@ void main() { ...@@ -47162,7 +47158,7 @@ void main() {
/** /**
* 获取面积大小 * 获取面积大小
* @param {Array<Vector3|Array>} points * @param {Array<Vector3|Array>} points
* @returns Number * @returns Number
*/ */
getArea(points) { getArea(points) {
...@@ -47171,9 +47167,9 @@ void main() { ...@@ -47171,9 +47167,9 @@ void main() {
/** /**
* 获取两点高度 * 获取两点高度
* @param {*} point1 * @param {*} point1
* @param {*} point2 * @param {*} point2
* @returns * @returns
*/ */
getHeight(point1, point2) { getHeight(point1, point2) {
return Math.abs(parseVector3(point1).y - parseVector3(point2).y); return Math.abs(parseVector3(point1).y - parseVector3(point2).y);
...@@ -47253,7 +47249,7 @@ void main() { ...@@ -47253,7 +47249,7 @@ void main() {
this.createLabel(point, { this.createLabel(point, {
text: distance.toFixed(2) + "m", text: distance.toFixed(2) + "m",
center: [0.5, -0.5], center: [0.5, -0.5],
fontColor: "#ffffff" fontColor: "#ffffff"
}); });
return distance; return distance;
} }
...@@ -47311,7 +47307,7 @@ void main() { ...@@ -47311,7 +47307,7 @@ void main() {
/** /**
* 计算角度 * 计算角度
* @param {Array<THREE.Vector3>} positions * @param {Array<THREE.Vector3>} positions
* @returns {Number} * @returns {Number}
*/ */
const calculateAngle = function (positions) { const calculateAngle = function (positions) {
...@@ -51869,8 +51865,8 @@ void main() { ...@@ -51869,8 +51865,8 @@ void main() {
/** /**
* 添加控制点位 * 添加控制点位
* @param {THREE.Vector3} position * @param {THREE.Vector3} position
* @returns * @returns
*/ */
_addControlPoint(position, option, controlPointType, index) { _addControlPoint(position, option, controlPointType, index) {
const circle = new Billboard({ const circle = new Billboard({
...@@ -51914,7 +51910,7 @@ void main() { ...@@ -51914,7 +51910,7 @@ void main() {
* 设置控制点位置 * 设置控制点位置
* @param {Billboard} controlPoint 控制点 * @param {Billboard} controlPoint 控制点
* @param {THREE.Vector3} position 位置 * @param {THREE.Vector3} position 位置
* @returns * @returns
*/ */
setControlPointPosition(controlPoint, position) { setControlPointPosition(controlPoint, position) {
if (controlPoint.userData.controlPointType != "main") return; if (controlPoint.userData.controlPointType != "main") return;
...@@ -51924,7 +51920,7 @@ void main() { ...@@ -51924,7 +51920,7 @@ void main() {
/** /**
* 设置最后一个控制点位置 * 设置最后一个控制点位置
* @param {*} position * @param {*} position
*/ */
setLastControlPointPosition(position) { setLastControlPointPosition(position) {
const children = this.controlPointHelper.children; const children = this.controlPointHelper.children;
...@@ -54244,7 +54240,7 @@ void main() { ...@@ -54244,7 +54240,7 @@ void main() {
/** /**
* 移除 * 移除
* @param {*} measure * @param {*} measure
*/ */
removeMeasure(measure) { removeMeasure(measure) {
const target = this.getMeasure(measure.id); const target = this.getMeasure(measure.id);
...@@ -59097,14 +59093,14 @@ uniform float shadowFar; ...@@ -59097,14 +59093,14 @@ uniform float shadowFar;
* 查询物体 * 查询物体
* @param {Object} param * @param {Object} param
* @return {Array} * @return {Array}
* *
* @example * @example
* group.queryThings({ * group.queryThings({
* properties: [ * properties: [
* ["==", "名称", "1#仓库"], [">=", "面积", 12344] * ["==", "名称", "1#仓库"], [">=", "面积", 12344]
* ] * ]
* }) * })
* *
*/ */
THREE$4.Object3D.prototype.query = function (param) { THREE$4.Object3D.prototype.query = function (param) {
const query = param || {}; const query = param || {};
...@@ -59153,8 +59149,8 @@ uniform float shadowFar; ...@@ -59153,8 +59149,8 @@ uniform float shadowFar;
/** /**
* 遍历符合条件的对象 * 遍历符合条件的对象
* @param {*} callback * @param {*} callback
* @returns * @returns
*/ */
THREE$4.Object3D.prototype.traverseFilter = function (callback, filter) { THREE$4.Object3D.prototype.traverseFilter = function (callback, filter) {
const targets = this.query(filter); const targets = this.query(filter);
...@@ -59166,8 +59162,8 @@ uniform float shadowFar; ...@@ -59166,8 +59162,8 @@ uniform float shadowFar;
/** /**
* 遍历材质 * 遍历材质
* @param {*} callback * @param {*} callback
* @returns * @returns
*/ */
THREE$4.Object3D.prototype.traverseMaterial = function (callback) { THREE$4.Object3D.prototype.traverseMaterial = function (callback) {
this.traverse(function (node) { this.traverse(function (node) {
...@@ -59184,8 +59180,8 @@ uniform float shadowFar; ...@@ -59184,8 +59180,8 @@ uniform float shadowFar;
/** /**
* 遍历子节点 * 遍历子节点
* @param {*} callback * @param {*} callback
* @returns * @returns
*/ */
THREE$4.Object3D.prototype.traverseChild = function (callback) { THREE$4.Object3D.prototype.traverseChild = function (callback) {
var children = this.children; var children = this.children;
...@@ -59197,8 +59193,8 @@ uniform float shadowFar; ...@@ -59197,8 +59193,8 @@ uniform float shadowFar;
/** /**
* 插入 * 插入
* @param {*} parent * @param {*} parent
* @param {*} index * @param {*} index
*/ */
THREE$4.Object3D.prototype.insertTo = function (parent, index) { THREE$4.Object3D.prototype.insertTo = function (parent, index) {
if (index === undefined) return parent.add(this); if (index === undefined) return parent.add(this);
...@@ -59586,7 +59582,7 @@ uniform float shadowFar; ...@@ -59586,7 +59582,7 @@ uniform float shadowFar;
/** /**
* 是否为兄弟 * 是否为兄弟
* @param {*} object * @param {*} object
* @return {Boolean} * @return {Boolean}
*/ */
THREE$4.Object3D.prototype.isBrotherOf = function (object) { THREE$4.Object3D.prototype.isBrotherOf = function (object) {
...@@ -59605,7 +59601,7 @@ uniform float shadowFar; ...@@ -59605,7 +59601,7 @@ uniform float shadowFar;
/** /**
* 获取子节点数量 * 获取子节点数量
* @param {*} object * @param {*} object
* @return {Boolean} * @return {Boolean}
*/ */
THREE$4.Object3D.prototype.getChildNodesNumber = function (object) { THREE$4.Object3D.prototype.getChildNodesNumber = function (object) {
...@@ -59618,7 +59614,7 @@ uniform float shadowFar; ...@@ -59618,7 +59614,7 @@ uniform float shadowFar;
/** /**
* 解除同步 * 解除同步
* @param {Scene} scene * @param {Scene} scene
*/ */
THREE$4.Object3D.prototype.detach = function (scene) { THREE$4.Object3D.prototype.detach = function (scene) {
if (this.parent) { if (this.parent) {
...@@ -59630,7 +59626,7 @@ uniform float shadowFar; ...@@ -59630,7 +59626,7 @@ uniform float shadowFar;
/** /**
* 获取节点名称 * 获取节点名称
* @returns * @returns
*/ */
THREE$4.Object3D.prototype.getChildrenNames = function () { THREE$4.Object3D.prototype.getChildrenNames = function () {
var names = []; var names = [];
...@@ -59696,8 +59692,8 @@ uniform float shadowFar; ...@@ -59696,8 +59692,8 @@ uniform float shadowFar;
/** /**
* 条件为正的中断循环调用,满足条件即终止 * 条件为正的中断循环调用,满足条件即终止
* @param {Function} callback * @param {Function} callback
* @returns * @returns
*/ */
THREE$4.Object3D.prototype.traverseBreakable = function (callback) { THREE$4.Object3D.prototype.traverseBreakable = function (callback) {
if (callback(this)) { if (callback(this)) {
...@@ -59715,7 +59711,7 @@ uniform float shadowFar; ...@@ -59715,7 +59711,7 @@ uniform float shadowFar;
/** /**
* 获取子节点序号 * 获取子节点序号
* @param {*} object * @param {*} object
* @return {Boolean} * @return {Boolean}
*/ */
THREE$4.Object3D.prototype.getChildIndex = function (object) { THREE$4.Object3D.prototype.getChildIndex = function (object) {
...@@ -59729,7 +59725,7 @@ uniform float shadowFar; ...@@ -59729,7 +59725,7 @@ uniform float shadowFar;
/** /**
* 是否为子对象 * 是否为子对象
* @param {*} parent * @param {*} parent
* @return {Boolean} * @return {Boolean}
*/ */
THREE$4.Object3D.prototype.isChildOf = function (parent) { THREE$4.Object3D.prototype.isChildOf = function (parent) {
...@@ -59777,7 +59773,7 @@ uniform float shadowFar; ...@@ -59777,7 +59773,7 @@ uniform float shadowFar;
boxHelper.isHelper = true; boxHelper.isHelper = true;
boxHelper.locked = true; boxHelper.locked = true;
// boxHelper.applyMatrix4(this.matrix); // boxHelper.applyMatrix4(this.matrix);
// boxHelper.update(); // boxHelper.update();
this.attach(boxHelper); this.attach(boxHelper);
} }
return this; return this;
...@@ -59819,8 +59815,8 @@ uniform float shadowFar; ...@@ -59819,8 +59815,8 @@ uniform float shadowFar;
/** /**
* 根据配置和过滤器更新,当filter 为空时,设置对象本身 * 根据配置和过滤器更新,当filter 为空时,设置对象本身
* @param {Object} config * @param {Object} config
* @param {Object} filter * @param {Object} filter
*/ */
THREE$4.Object3D.prototype.updateBy = function (config, filter) { THREE$4.Object3D.prototype.updateBy = function (config, filter) {
if (!config || isEmptyObject(config)) return this; if (!config || isEmptyObject(config)) return this;
...@@ -60210,12 +60206,12 @@ uniform float shadowFar; ...@@ -60210,12 +60206,12 @@ uniform float shadowFar;
gl_Position = vec4(position.xy * 1.0,0.,.999999); gl_Position = vec4(position.xy * 1.0,0.,.999999);
}`, }`,
fragmentShader: ` fragmentShader: `
uniform sampler2D blitTexture; uniform sampler2D blitTexture;
varying vec2 vUv; varying vec2 vUv;
void main(){ void main(){
gl_FragColor = vec4(vUv.xy, 0, 1); gl_FragColor = vec4(vUv.xy, 0, 1);
#ifdef IS_SRGB #ifdef IS_SRGB
gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) ); gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) );
#else #else
...@@ -63358,7 +63354,7 @@ uniform float shadowFar; ...@@ -63358,7 +63354,7 @@ uniform float shadowFar;
const arrowEle = this.arrowEle; const arrowEle = this.arrowEle;
arrowEle.style.transformOrigin = "50% 100%"; arrowEle.style.transformOrigin = "50% 100%";
arrowEle.style.transform = ` arrowEle.style.transform = `
translate(${_position.x * scale.x}px,${_position.y * scale.y}px) translate(${_position.x * scale.x}px,${_position.y * scale.y}px)
rotate(${theta * 180 / Math.PI}deg) rotate(${theta * 180 / Math.PI}deg)
`; `;
} }
...@@ -63607,8 +63603,8 @@ uniform float shadowFar; ...@@ -63607,8 +63603,8 @@ uniform float shadowFar;
/** /**
* 跳转到空间 * 跳转到空间
* @param {*} spaceId * @param {*} spaceId
* @returns * @returns
*/ */
go(spaceId) { go(spaceId) {
// 如果已打开了空间,且和要打开的空间相同,则返回 // 如果已打开了空间,且和要打开的空间相同,则返回
...@@ -63818,7 +63814,7 @@ uniform float shadowFar; ...@@ -63818,7 +63814,7 @@ uniform float shadowFar;
} }
load() { load() {
// 楼层Group,Position // 楼层Group,Position
// //
// 第一步 // 第一步
// 隐藏外立面、其余对象 // 隐藏外立面、其余对象
...@@ -63870,9 +63866,9 @@ uniform float shadowFar; ...@@ -63870,9 +63866,9 @@ uniform float shadowFar;
/** /**
* 创建建筑空间 * 创建建筑空间
* @param {Thing || THREE.Mesh} object * @param {Thing || THREE.Mesh} object
* @param {Object} option { name, unders, ons, planHeight } * @param {Object} option { name, unders, ons, planHeight }
* @returns * @returns
*/ */
createBuildingSpace(object, option = { createBuildingSpace(object, option = {
ons: 1, ons: 1,
...@@ -63919,8 +63915,8 @@ uniform float shadowFar; ...@@ -63919,8 +63915,8 @@ uniform float shadowFar;
/** /**
* 创建空间 * 创建空间
* @param {*} object * @param {*} object
* @param {*} option * @param {*} option
*/ */
createSpace(object, option = { createSpace(object, option = {
planHeight: 3 planHeight: 3
...@@ -63952,7 +63948,7 @@ uniform float shadowFar; ...@@ -63952,7 +63948,7 @@ uniform float shadowFar;
/** /**
* 添加空间 * 添加空间
* @param {Object} space * @param {Object} space
* @param {String} parent spaceId * @param {String} parent spaceId
*/ */
addSpace(space, parent) { addSpace(space, parent) {
...@@ -64054,7 +64050,7 @@ uniform float shadowFar; ...@@ -64054,7 +64050,7 @@ uniform float shadowFar;
/** /**
* 折叠空间 * 折叠空间
* @param {String} spaceId * @param {String} spaceId
*/ */
collapseSpace(space) { collapseSpace(space) {
if (!space) return; if (!space) return;
...@@ -64441,7 +64437,7 @@ uniform float shadowFar; ...@@ -64441,7 +64437,7 @@ uniform float shadowFar;
/** /**
* 删除空间 * 删除空间
* @param {*} sid * @param {*} sid
*/ */
removeSpace(sid) { removeSpace(sid) {
function deleteNodeById(tree, id) { function deleteNodeById(tree, id) {
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: lisu lisu@gavelinfo.com * @Author: lisu lisu@gavelinfo.com
* @LastEditors: lisu lisu@gavelinfo.com * @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-31 16:47:55 * @LastEditTime: 2024-10-31 17:18:17
* @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue * @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
--> -->
<template> <template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment