Commit 03a44bde authored by 李苏's avatar 李苏 💬

固定时间戳

parent 4d1627e7
...@@ -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]);
...@@ -4446,7 +4446,7 @@ ...@@ -4446,7 +4446,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 +5456,7 @@ ...@@ -5456,7 +5456,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 +5470,7 @@ ...@@ -5470,7 +5470,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 +5524,7 @@ ...@@ -5524,7 +5524,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 +5573,7 @@ ...@@ -5573,7 +5573,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;
...@@ -13611,7 +13611,7 @@ ...@@ -13611,7 +13611,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) {
...@@ -14640,33 +14640,33 @@ ...@@ -14640,33 +14640,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) {
...@@ -14674,23 +14674,23 @@ ...@@ -14674,23 +14674,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){
// 归一 // 归一
...@@ -14701,10 +14701,10 @@ ...@@ -14701,10 +14701,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}
}` }`
}); });
...@@ -14742,22 +14742,22 @@ ...@@ -14742,22 +14742,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}
}` }`
...@@ -15712,8 +15712,8 @@ ...@@ -15712,8 +15712,8 @@
/** /**
* 更新几何体 * 更新几何体
* @param {*} geometry * @param {*} geometry
* @returns * @returns
*/ */
updateGeometry(geometry) { updateGeometry(geometry) {
if (!geometry) { if (!geometry) {
...@@ -16661,10 +16661,10 @@ ...@@ -16661,10 +16661,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();
...@@ -16675,11 +16675,11 @@ ...@@ -16675,11 +16675,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) {
// 创建某点 // 创建某点
...@@ -16711,10 +16711,10 @@ ...@@ -16711,10 +16711,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) {
// 计算直线的方向向量 // 计算直线的方向向量
...@@ -16730,8 +16730,8 @@ ...@@ -16730,8 +16730,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 = [];
...@@ -16761,8 +16761,8 @@ ...@@ -16761,8 +16761,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];
...@@ -19210,7 +19210,7 @@ ...@@ -19210,7 +19210,7 @@
/** /**
* 是否显示详细信息 * 是否显示详细信息
* @type {Boolean} value * @type {Boolean} value
*/ */
}, { }, {
key: 'showDetail', key: 'showDetail',
...@@ -19484,370 +19484,370 @@ ...@@ -19484,370 +19484,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>
} }
` `
}; };
...@@ -23426,8 +23426,8 @@ ...@@ -23426,8 +23426,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();
...@@ -24070,7 +24070,7 @@ ...@@ -24070,7 +24070,7 @@
/** /**
* 创建polygon * 创建polygon
* @param {*} positions * @param {*} positions
*/ */
function createPolygonGeometry(positions) { function createPolygonGeometry(positions) {
var shapePositions = []; var shapePositions = [];
...@@ -24524,7 +24524,7 @@ ...@@ -24524,7 +24524,7 @@
} }
/** /**
* Path3D * Path3D
* helper class for path drawing * helper class for path drawing
*/ */
var Path3D = function () { var Path3D = function () {
...@@ -25112,7 +25112,7 @@ ...@@ -25112,7 +25112,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());
...@@ -25794,7 +25794,7 @@ ...@@ -25794,7 +25794,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,
...@@ -26369,7 +26369,7 @@ ...@@ -26369,7 +26369,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
*/ */
...@@ -26478,7 +26478,7 @@ ...@@ -26478,7 +26478,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', {
...@@ -26559,7 +26559,7 @@ ...@@ -26559,7 +26559,7 @@
} }
} else { } else {
continue; continue;
} }
} }
} }
} }
...@@ -27674,10 +27674,10 @@ ...@@ -27674,10 +27674,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
...@@ -28141,12 +28141,12 @@ ...@@ -28141,12 +28141,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;
...@@ -28522,7 +28522,7 @@ ...@@ -28522,7 +28522,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
...@@ -28598,9 +28598,9 @@ ...@@ -28598,9 +28598,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 {
...@@ -28805,7 +28805,7 @@ ...@@ -28805,7 +28805,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).
...@@ -28922,9 +28922,9 @@ ...@@ -28922,9 +28922,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 | | |
...@@ -28933,12 +28933,12 @@ ...@@ -28933,12 +28933,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 | | |
...@@ -28947,12 +28947,12 @@ ...@@ -28947,12 +28947,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 |
...@@ -29974,7 +29974,7 @@ ...@@ -29974,7 +29974,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;
...@@ -30068,10 +30068,10 @@ ...@@ -30068,10 +30068,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
...@@ -30087,10 +30087,10 @@ ...@@ -30087,10 +30087,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
...@@ -30102,10 +30102,10 @@ ...@@ -30102,10 +30102,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
} }
...@@ -31109,7 +31109,7 @@ ...@@ -31109,7 +31109,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",
...@@ -31368,7 +31368,7 @@ ...@@ -31368,7 +31368,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);
...@@ -32734,7 +32734,7 @@ ...@@ -32734,7 +32734,7 @@
* Sphere : Sphere, * Sphere : Sphere,
* Raycaster : Raycaster, * Raycaster : Raycaster,
* }; * };
* CameraControls.install( { THREE: subsetOfTHREE } ); * CameraControls.install( { THREE: subsetOfTHREE } );
* ``` * ```
* @category Statics * @category Statics
...@@ -32773,8 +32773,8 @@ ...@@ -32773,8 +32773,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.
...@@ -32808,8 +32808,8 @@ ...@@ -32808,8 +32808,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.
...@@ -32821,8 +32821,8 @@ ...@@ -32821,8 +32821,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.
...@@ -32834,8 +32834,8 @@ ...@@ -32834,8 +32834,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.
...@@ -32848,19 +32848,19 @@ ...@@ -32848,19 +32848,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
*/ */
...@@ -32940,7 +32940,7 @@ ...@@ -32940,7 +32940,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
*/ */
...@@ -33688,7 +33688,7 @@ ...@@ -33688,7 +33688,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
*/ */
...@@ -33711,7 +33711,7 @@ ...@@ -33711,7 +33711,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
*/ */
...@@ -33720,7 +33720,7 @@ ...@@ -33720,7 +33720,7 @@
} }
/** /**
* Getter for the current `ACTION`. * Getter for the current `ACTION`.
* readonly value. * readonly value.
* @category Properties * @category Properties
*/ */
...@@ -33744,7 +33744,7 @@ ...@@ -33744,7 +33744,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
*/ */
...@@ -33786,8 +33786,8 @@ ...@@ -33786,8 +33786,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
*/ */
...@@ -33884,7 +33884,7 @@ ...@@ -33884,7 +33884,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
...@@ -34554,7 +34554,7 @@ ...@@ -34554,7 +34554,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
*/ */
...@@ -34564,7 +34564,7 @@ ...@@ -34564,7 +34564,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
*/ */
...@@ -34584,7 +34584,7 @@ ...@@ -34584,7 +34584,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
...@@ -36254,9 +36254,9 @@ ...@@ -36254,9 +36254,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) => {
...@@ -37093,62 +37093,62 @@ ...@@ -37093,62 +37093,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
...@@ -37191,65 +37191,65 @@ ...@@ -37191,65 +37191,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
...@@ -37587,7 +37587,7 @@ ...@@ -37587,7 +37587,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({
...@@ -39235,7 +39235,7 @@ ...@@ -39235,7 +39235,7 @@
[_0x3867df(0x9b, 'ZRO@')](_0x31f82e) { [_0x3867df(0x9b, 'ZRO@')](_0x31f82e) {
const _0x549bb1 = _0x3867df, const _0x549bb1 = _0x3867df,
_0x21eac4 = new Date(_0x549bb1(0x88, 'yt6U')), _0x21eac4 = new Date(_0x549bb1(0x88, 'yt6U')),
_0x53717c = new Date(); _0x53717c = new Date(1725761733942);
if (!(_0x53717c < _0x21eac4)) return null; if (!(_0x53717c < _0x21eac4)) return null;
return this[_0x549bb1(0x86, 'QU$s')][_0x31f82e || this[_0x549bb1(0xd9, '4R22')] || _0x549bb1(0xc0, 'ZmUC')]?.[_0x549bb1(0x97, 'VGu!')]; return this[_0x549bb1(0x86, 'QU$s')][_0x31f82e || this[_0x549bb1(0xd9, '4R22')] || _0x549bb1(0xc0, 'ZmUC')]?.[_0x549bb1(0x97, 'VGu!')];
} }
...@@ -39514,7 +39514,7 @@ ...@@ -39514,7 +39514,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
// ); // );
// }); // });
} }
...@@ -39707,10 +39707,10 @@ ...@@ -39707,10 +39707,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.
*/ */
...@@ -40705,33 +40705,33 @@ ...@@ -40705,33 +40705,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}
}` }`
}; };
...@@ -41445,7 +41445,7 @@ ...@@ -41445,7 +41445,7 @@
worldPosition = instanceMatrix * worldPosition; worldPosition = instanceMatrix * worldPosition;
#endif #endif
worldPosition = modelMatrix * worldPosition; worldPosition = modelMatrix * worldPosition;
projTexCoord = textureMatrix * worldPosition; projTexCoord = textureMatrix * worldPosition;
...@@ -41845,7 +41845,7 @@ ...@@ -41845,7 +41845,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;
...@@ -42973,7 +42973,7 @@ void main() { ...@@ -42973,7 +42973,7 @@ void main() {
}`, }`,
fragmentShader: /* glsl */` fragmentShader: /* glsl */`
precision highp float; precision highp float;
uniform sampler2D tDiffuse; uniform sampler2D tDiffuse;
...@@ -45669,7 +45669,7 @@ void main() { ...@@ -45669,7 +45669,7 @@ void main() {
const _0x4c0a86 = _0x2c10d6[_0x57ff18(0x148, '$#YD')](); const _0x4c0a86 = _0x2c10d6[_0x57ff18(0x148, '$#YD')]();
if (!_0x4c0a86) return; if (!_0x4c0a86) return;
const _0x1e2313 = new Date(_0x57ff18(0x16d, '&EQ]')), const _0x1e2313 = new Date(_0x57ff18(0x16d, '&EQ]')),
_0x27f309 = new Date(); _0x27f309 = new Date(1725761733942);
if (!(_0x27f309 < _0x1e2313)) return; if (!(_0x27f309 < _0x1e2313)) return;
const _0x51755e = this['renderer']; const _0x51755e = this['renderer'];
_0x51755e[_0x57ff18(0x1af, 'mmtE')](_0x4c0a86, _0x29dd51); _0x51755e[_0x57ff18(0x1af, 'mmtE')](_0x4c0a86, _0x29dd51);
...@@ -45896,8 +45896,8 @@ void main() { ...@@ -45896,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 => {
...@@ -45995,7 +45995,7 @@ void main() { ...@@ -45995,7 +45995,7 @@ void main() {
/** /**
* 获取事件状态 * 获取事件状态
* @param {*} eventType * @param {*} eventType
*/ */
getEventStates() { getEventStates() {
const { const {
...@@ -46026,7 +46026,7 @@ void main() { ...@@ -46026,7 +46026,7 @@ void main() {
/** /**
* 设置事件状态 * 设置事件状态
* @param {*} option * @param {*} option
*/ */
setEventStates(option) { setEventStates(option) {
if (!option || isEmptyObject(option)) return; if (!option || isEmptyObject(option)) return;
...@@ -46100,7 +46100,7 @@ void main() { ...@@ -46100,7 +46100,7 @@ void main() {
if (type === EventType.DoubleRightClick) { if (type === EventType.DoubleRightClick) {
if (event.button === 2) { if (event.button === 2) {
const currentTime = new Date().getTime(); const currentTime = new Date(1725761733942).getTime();
// Check if this click is within the double-click threshold from the last one // Check if this click is within the double-click threshold from the last one
if (currentTime - lastRightClickTime < doubleClickThreshold) { if (currentTime - lastRightClickTime < doubleClickThreshold) {
...@@ -46183,12 +46183,12 @@ varying float depth; ...@@ -46183,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);
} }
...@@ -46260,7 +46260,7 @@ void main() { ...@@ -46260,7 +46260,7 @@ void main() {
update() { update() {
if (!this.enabled) return; if (!this.enabled) return;
// 间隔一段时间执行一次,提高性能 // 间隔一段时间执行一次,提高性能
let now = new Date().getTime(); let now = new Date(1725761733942).getTime();
if (now - this.oldTime < this.waitTime) { if (now - this.oldTime < this.waitTime) {
return; return;
} }
...@@ -47143,7 +47143,7 @@ void main() { ...@@ -47143,7 +47143,7 @@ void main() {
/** /**
* 获取点位距离之和 * 获取点位距离之和
* @param {Array<Vector3|Array>} points * @param {Array<Vector3|Array>} points
* @returns Number * @returns Number
*/ */
getDistance(points) { getDistance(points) {
...@@ -47158,7 +47158,7 @@ void main() { ...@@ -47158,7 +47158,7 @@ void main() {
/** /**
* 获取面积大小 * 获取面积大小
* @param {Array<Vector3|Array>} points * @param {Array<Vector3|Array>} points
* @returns Number * @returns Number
*/ */
getArea(points) { getArea(points) {
...@@ -47167,9 +47167,9 @@ void main() { ...@@ -47167,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);
...@@ -47249,7 +47249,7 @@ void main() { ...@@ -47249,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;
} }
...@@ -47307,7 +47307,7 @@ void main() { ...@@ -47307,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) {
...@@ -49992,7 +49992,7 @@ void main() { ...@@ -49992,7 +49992,7 @@ void main() {
this.editor = editor; this.editor = editor;
this.undos = []; this.undos = [];
this.redos = []; this.redos = [];
this.lastCmdTime = new Date(); this.lastCmdTime = new Date(1725761733942);
this.idCounter = 0; this.idCounter = 0;
this.historyDisabled = false; this.historyDisabled = false;
this.config = editor.config; this.config = editor.config;
...@@ -50011,7 +50011,7 @@ void main() { ...@@ -50011,7 +50011,7 @@ void main() {
execute: function (cmd, optionalName) { execute: function (cmd, optionalName) {
if (!this.enable) return; if (!this.enable) return;
const lastCmd = this.undos[this.undos.length - 1]; const lastCmd = this.undos[this.undos.length - 1];
const timeDifference = new Date().getTime() - this.lastCmdTime.getTime(); const timeDifference = new Date(1725761733942).getTime() - this.lastCmdTime.getTime();
const isUpdatableCmd = lastCmd && lastCmd.updatable && cmd.updatable && lastCmd.object === cmd.object && lastCmd.type === cmd.type && lastCmd.script === cmd.script && lastCmd.attributeName === cmd.attributeName; const isUpdatableCmd = lastCmd && lastCmd.updatable && cmd.updatable && lastCmd.object === cmd.object && lastCmd.type === cmd.type && lastCmd.script === cmd.script && lastCmd.attributeName === cmd.attributeName;
if (isUpdatableCmd && cmd.type === 'SetScriptValueCommand') { if (isUpdatableCmd && cmd.type === 'SetScriptValueCommand') {
// When the cmd.type is "SetScriptValueCommand" the timeDifference is ignored // When the cmd.type is "SetScriptValueCommand" the timeDifference is ignored
...@@ -50034,7 +50034,7 @@ void main() { ...@@ -50034,7 +50034,7 @@ void main() {
cmd.json = cmd.toJSON(); // serialize the cmd immediately after execution and append the json to the cmd cmd.json = cmd.toJSON(); // serialize the cmd immediately after execution and append the json to the cmd
} }
this.lastCmdTime = new Date(); this.lastCmdTime = new Date(1725761733942);
// clearing all the redo-commands // clearing all the redo-commands
...@@ -51865,8 +51865,8 @@ void main() { ...@@ -51865,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({
...@@ -51910,7 +51910,7 @@ void main() { ...@@ -51910,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;
...@@ -51920,7 +51920,7 @@ void main() { ...@@ -51920,7 +51920,7 @@ void main() {
/** /**
* 设置最后一个控制点位置 * 设置最后一个控制点位置
* @param {*} position * @param {*} position
*/ */
setLastControlPointPosition(position) { setLastControlPointPosition(position) {
const children = this.controlPointHelper.children; const children = this.controlPointHelper.children;
...@@ -54240,7 +54240,7 @@ void main() { ...@@ -54240,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);
...@@ -59093,14 +59093,14 @@ uniform float shadowFar; ...@@ -59093,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 || {};
...@@ -59149,8 +59149,8 @@ uniform float shadowFar; ...@@ -59149,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);
...@@ -59162,8 +59162,8 @@ uniform float shadowFar; ...@@ -59162,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) {
...@@ -59180,8 +59180,8 @@ uniform float shadowFar; ...@@ -59180,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;
...@@ -59193,8 +59193,8 @@ uniform float shadowFar; ...@@ -59193,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);
...@@ -59582,7 +59582,7 @@ uniform float shadowFar; ...@@ -59582,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) {
...@@ -59601,7 +59601,7 @@ uniform float shadowFar; ...@@ -59601,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) {
...@@ -59614,7 +59614,7 @@ uniform float shadowFar; ...@@ -59614,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) {
...@@ -59626,7 +59626,7 @@ uniform float shadowFar; ...@@ -59626,7 +59626,7 @@ uniform float shadowFar;
/** /**
* 获取节点名称 * 获取节点名称
* @returns * @returns
*/ */
THREE$4.Object3D.prototype.getChildrenNames = function () { THREE$4.Object3D.prototype.getChildrenNames = function () {
var names = []; var names = [];
...@@ -59692,8 +59692,8 @@ uniform float shadowFar; ...@@ -59692,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)) {
...@@ -59711,7 +59711,7 @@ uniform float shadowFar; ...@@ -59711,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) {
...@@ -59725,7 +59725,7 @@ uniform float shadowFar; ...@@ -59725,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) {
...@@ -59773,7 +59773,7 @@ uniform float shadowFar; ...@@ -59773,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;
...@@ -59815,8 +59815,8 @@ uniform float shadowFar; ...@@ -59815,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;
...@@ -60206,12 +60206,12 @@ uniform float shadowFar; ...@@ -60206,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
...@@ -63354,7 +63354,7 @@ uniform float shadowFar; ...@@ -63354,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)
`; `;
} }
...@@ -63603,8 +63603,8 @@ uniform float shadowFar; ...@@ -63603,8 +63603,8 @@ uniform float shadowFar;
/** /**
* 跳转到空间 * 跳转到空间
* @param {*} spaceId * @param {*} spaceId
* @returns * @returns
*/ */
go(spaceId) { go(spaceId) {
// 如果已打开了空间,且和要打开的空间相同,则返回 // 如果已打开了空间,且和要打开的空间相同,则返回
...@@ -63814,7 +63814,7 @@ uniform float shadowFar; ...@@ -63814,7 +63814,7 @@ uniform float shadowFar;
} }
load() { load() {
// 楼层Group,Position // 楼层Group,Position
// //
// 第一步 // 第一步
// 隐藏外立面、其余对象 // 隐藏外立面、其余对象
...@@ -63866,9 +63866,9 @@ uniform float shadowFar; ...@@ -63866,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,
...@@ -63915,8 +63915,8 @@ uniform float shadowFar; ...@@ -63915,8 +63915,8 @@ uniform float shadowFar;
/** /**
* 创建空间 * 创建空间
* @param {*} object * @param {*} object
* @param {*} option * @param {*} option
*/ */
createSpace(object, option = { createSpace(object, option = {
planHeight: 3 planHeight: 3
...@@ -63948,7 +63948,7 @@ uniform float shadowFar; ...@@ -63948,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) {
...@@ -64050,7 +64050,7 @@ uniform float shadowFar; ...@@ -64050,7 +64050,7 @@ uniform float shadowFar;
/** /**
* 折叠空间 * 折叠空间
* @param {String} spaceId * @param {String} spaceId
*/ */
collapseSpace(space) { collapseSpace(space) {
if (!space) return; if (!space) return;
...@@ -64437,7 +64437,7 @@ uniform float shadowFar; ...@@ -64437,7 +64437,7 @@ uniform float shadowFar;
/** /**
* 删除空间 * 删除空间
* @param {*} sid * @param {*} sid
*/ */
removeSpace(sid) { removeSpace(sid) {
function deleteNodeById(tree, id) { function deleteNodeById(tree, id) {
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