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

固定时间戳

parent 4d1627e7
......@@ -1583,7 +1583,7 @@
return hits[0].point;
};
// fix TriangleStripDrawMode
// fix TriangleStripDrawMode
// THREE.Mesh.prototype.raycast = function () {
// var inverseMatrix = new THREE.Matrix4();
......@@ -2415,7 +2415,7 @@
/**
* 移除HTML节点
* @param {HTMLElement} node
* @param {HTMLElement} node
*/
function remove$1(node) {
if (node && node.parentNode) {
......@@ -3286,9 +3286,9 @@
/**
* 添加过滤式
* @param {String} sign
* @param {String} key
* @param {*} value
* @param {String} sign
* @param {String} key
* @param {*} value
*/
add(op, key, value) {
this.exps.push([op, key, value]);
......@@ -4446,7 +4446,7 @@
// Otherwise, use 'new Date().getTime()'.
else {
now = function () {
return new Date().getTime();
return new Date(1725761733942).getTime();
};
}
var now$1 = now;
......@@ -5456,7 +5456,7 @@
/**
* define a context for HtmlMixer
*
*
* @param {THREE.WebGLRenderer|THREE.CanvasRenderer} rendererWebgl the renderer in front
* @param {THREE.Scene} scene the original scene
* @param {THREE.Camera} camera the camera used for the last view
......@@ -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;
this.cssFactor = cssFactor;
......@@ -5524,7 +5524,7 @@
/**
* define plane in HtmlMixer
*
*
* @param {HtmlMixer.Context} mixerContext context
* @param {HTMLElement} domElement the dom element to mix
* @param {Object} opts options to set
......@@ -5573,7 +5573,7 @@
if (oldDomElement.parentNode) {
oldDomElement.parentNode.removeChild(oldDomElement);
}
// update local variables
// update local variables
this.domElement = domElement = newDomElement;
// update cssObject
cssObject.element = domElement;
......@@ -13611,7 +13611,7 @@
this.objects = [];
this.config = config;
this.status = RESOURCE_STATUS.DECLARED;
this.updated = new Date().getTime();
this.updated = new Date(1725761733942).getTime();
dbUtil.initDB();
}
addObject(object, config) {
......@@ -14640,33 +14640,33 @@
${THREE$4.ShaderChunk.common}
${THREE$4.ShaderChunk.logdepthbuf_pars_vertex}
varying vec2 vUv;
void main() {
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
${THREE$4.ShaderChunk.logdepthbuf_vertex}
}
`,
fragmentShader: `
${THREE$4.ShaderChunk.logdepthbuf_pars_fragment}
varying vec2 vUv;
uniform vec3 uColor;
uniform float uOpacity;
uniform float uSpeed;
uniform float uSpeed;
uniform float uSge;
uniform float time;
float PI = 3.14159265;
float drawCircle(float index, float range) {
float opacity = 1.0;
if (index >= 1.0 - range) {
opacity = 1.0 - (index - (1.0 - range)) / range;
} else if(index <= range) {
opacity = index / range;
}
}
return opacity;
}
float distanceTo(vec2 src, vec2 dst) {
......@@ -14674,23 +14674,23 @@
float dy = src.y - dst.y;
float dv = dx * dx + dy * dy;
return sqrt(dv);
}
void main() {
}
void main() {
float iTime = -time * uSpeed;
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;
vec2 range = vec2(0.51, ${Math.max(_uniforms.uWidth, 0.65)});
float index = mod(iTime + len, size);
// 中心圆
vec2 cRadius = vec2(0.06, 0.12);
if (index < size && len <= 0.5) {
float i = sin(index / size * PI);
float index = mod(iTime + len, size);
// 中心圆
vec2 cRadius = vec2(0.06, 0.12);
if (index < size && len <= 0.5) {
float i = sin(index / size * PI);
// 处理边缘锯齿
if (i >= range.x && i <= range.y){
// 归一
......@@ -14701,10 +14701,10 @@
}
// 渐变
opacity *= 1.0 - len / 0.5;
};
};
gl_FragColor = vec4(uColor, uOpacity * opacity);
${THREE$4.ShaderChunk.logdepthbuf_fragment}
}`
});
......@@ -14742,22 +14742,22 @@
${THREE$4.ShaderChunk.common}
${THREE$4.ShaderChunk.logdepthbuf_pars_vertex}
varying vec3 modelPos;
void main() {
void main() {
modelPos = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
${THREE$4.ShaderChunk.logdepthbuf_vertex}
}
`,
fragmentShader: `
${THREE$4.ShaderChunk.logdepthbuf_pars_fragment}
uniform vec3 uColor;
uniform float uHeight;
uniform float uRatio;
uniform float uHeight;
uniform float uRatio;
varying vec3 modelPos;
void main() {
void main() {
gl_FragColor = vec4(uColor.xyz,(1.0 - modelPos.y/uHeight)*(1.0 - modelPos.y/uHeight) * uRatio);
${THREE$4.ShaderChunk.logdepthbuf_fragment}
}`
......@@ -15712,8 +15712,8 @@
/**
* 更新几何体
* @param {*} geometry
* @returns
* @param {*} geometry
* @returns
*/
updateGeometry(geometry) {
if (!geometry) {
......@@ -16661,10 +16661,10 @@
/**
* 沿两点直线移动指定距离
* @param {THREE.Vector3} start
* @param {THREE.Vector3} end
* @param {Number} distance
* @returns
* @param {THREE.Vector3} start
* @param {THREE.Vector3} end
* @param {Number} distance
* @returns
*/
function moveOnLine(start, end, distance) {
const direction = end.clone().sub(start).normalize();
......@@ -16675,11 +16675,11 @@
/**
* 沿两点直线移动指定距离
* @param {THREE.Vector3} start
* @param {THREE.Vector3} end
* @param {THREE.Vector3} start
* @param {THREE.Vector3} end
* @param {Number} angle
* @param {Number} distance
* @returns
* @param {Number} distance
* @returns
*/
function getAnglePointOnLine(start, end, angle, distance) {
// 创建某点
......@@ -16711,10 +16711,10 @@
/**
* 找到直线上距离某点最近的位置
* @param {THREE.Vector3} start
* @param {THREE.Vector3} end
* @param {THREE.Vector3} point
* @returns
* @param {THREE.Vector3} start
* @param {THREE.Vector3} end
* @param {THREE.Vector3} point
* @returns
*/
function getNearestPointOnLine(start, end, point) {
// 计算直线的方向向量
......@@ -16730,8 +16730,8 @@
/**
* 获取离线最近的点
* @param {Array<THREE.Vector3>} points
* @param {THREE.Vector3} point
* @param {Array<THREE.Vector3>} points
* @param {THREE.Vector3} point
*/
function getNearestOnPolyline(points, point) {
let result = [];
......@@ -16761,8 +16761,8 @@
/**
* 获取离线最近的点
* @param {Array<THREE.Vector3>} points
* @param {THREE.Vector3} point
* @param {Array<THREE.Vector3>} points
* @param {THREE.Vector3} point
*/
function getNearestPointOnPolyline(points, point) {
return getNearestOnPolyline(points, point)[0];
......@@ -19210,7 +19210,7 @@
/**
* 是否显示详细信息
* @type {Boolean} value
* @type {Boolean} value
*/
}, {
key: 'showDetail',
......@@ -19484,370 +19484,370 @@
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
uniform float linewidth;
uniform vec2 resolution;
attribute vec3 instanceStart;
attribute vec3 instanceEnd;
attribute vec3 instanceColorStart;
attribute vec3 instanceColorEnd;
#ifdef WORLD_UNITS
varying vec4 worldPos;
varying vec3 worldStart;
varying vec3 worldEnd;
#ifdef USE_DASH
varying vec2 vUv;
#endif
#else
varying vec2 vUv;
#endif
#ifdef USE_DASH
uniform float dashScale;
attribute float instanceDistanceStart;
attribute float instanceDistanceEnd;
varying float vLineDistance;
#endif
void trimSegment( const in vec4 start, inout vec4 end ) {
// trim end segment so it terminates between the camera plane and the near plane
// conservative estimate of the near plane
float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
float nearEstimate = - 0.5 * b / a;
float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
end.xyz = mix( start.xyz, end.xyz, alpha );
}
void main() {
#ifdef USE_COLOR
vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
#endif
#ifdef USE_DASH
vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
vUv = uv;
#endif
float aspect = resolution.x / resolution.y;
// camera space
vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
#ifdef WORLD_UNITS
worldStart = start.xyz;
worldEnd = end.xyz;
#else
vUv = uv;
#endif
// 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
// 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
bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
if ( perspective ) {
if ( start.z < 0.0 && end.z >= 0.0 ) {
trimSegment( start, end );
} else if ( end.z < 0.0 && start.z >= 0.0 ) {
trimSegment( end, start );
}
}
// clip space
vec4 clipStart = projectionMatrix * start;
vec4 clipEnd = projectionMatrix * end;
// ndc space
vec3 ndcStart = clipStart.xyz / clipStart.w;
vec3 ndcEnd = clipEnd.xyz / clipEnd.w;
// direction
vec2 dir = ndcEnd.xy - ndcStart.xy;
// account for clip-space aspect ratio
dir.x *= aspect;
dir = normalize( dir );
#ifdef WORLD_UNITS
vec3 worldDir = normalize( end.xyz - start.xyz );
vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) );
vec3 worldUp = normalize( cross( worldDir, tmpFwd ) );
vec3 worldFwd = cross( worldDir, worldUp );
worldPos = position.y < 0.5 ? start: end;
// height offset
float hw = linewidth * 0.5;
worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp;
// don't extend the line if we're rendering dashes because we
// won't be rendering the endcaps
#ifndef USE_DASH
// cap extension
worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir;
// add width to the box
worldPos.xyz += worldFwd * hw;
// endcaps
if ( position.y > 1.0 || position.y < 0.0 ) {
worldPos.xyz -= worldFwd * 2.0 * hw;
}
#endif
// project the worldpos
vec4 clip = projectionMatrix * worldPos;
// shift the depth of the projected points so the line
// segments overlap neatly
vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
clip.z = clipPose.z * clip.w;
#else
vec2 offset = vec2( dir.y, - dir.x );
// undo aspect ratio adjustment
dir.x /= aspect;
offset.x /= aspect;
// sign flip
if ( position.x < 0.0 ) offset *= - 1.0;
// endcaps
if ( position.y < 0.0 ) {
offset += - dir;
} else if ( position.y > 1.0 ) {
offset += dir;
}
// adjust for linewidth
offset *= linewidth;
// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
offset /= resolution.y;
// select end
vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
// back to clip space
offset *= clip.w;
clip.xy += offset;
#endif
gl_Position = clip;
vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
}
`,
fragmentShader: /* glsl */`
uniform vec3 diffuse;
uniform float opacity;
uniform float linewidth;
#ifdef USE_DASH
uniform float dashOffset;
uniform float dashSize;
uniform float gapSize;
#endif
varying float vLineDistance;
#ifdef WORLD_UNITS
varying vec4 worldPos;
varying vec3 worldStart;
varying vec3 worldEnd;
#ifdef USE_DASH
varying vec2 vUv;
#endif
#else
varying vec2 vUv;
#endif
#include <common>
#include <color_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {
float mua;
float mub;
vec3 p13 = p1 - p3;
vec3 p43 = p4 - p3;
vec3 p21 = p2 - p1;
float d1343 = dot( p13, p43 );
float d4321 = dot( p43, p21 );
float d1321 = dot( p13, p21 );
float d4343 = dot( p43, p43 );
float d2121 = dot( p21, p21 );
float denom = d2121 * d4343 - d4321 * d4321;
float numer = d1343 * d4321 - d1321 * d4343;
mua = numer / denom;
mua = clamp( mua, 0.0, 1.0 );
mub = ( d1343 + d4321 * ( mua ) ) / d4343;
mub = clamp( mub, 0.0, 1.0 );
return vec2( mua, mub );
}
void main() {
#include <clipping_planes_fragment>
#ifdef USE_DASH
if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
#endif
float alpha = opacity;
#ifdef WORLD_UNITS
// Find the closest points on the view ray and the line segment
vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
vec3 lineDir = worldEnd - worldStart;
vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );
vec3 p1 = worldStart + lineDir * params.x;
vec3 p2 = rayEnd * params.y;
vec3 delta = p1 - p2;
float len = length( delta );
float norm = len / linewidth;
#ifndef USE_DASH
#ifdef USE_ALPHA_TO_COVERAGE
float dnorm = fwidth( norm );
alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );
#else
if ( norm > 0.5 ) {
discard;
}
#endif
#endif
#else
#ifdef USE_ALPHA_TO_COVERAGE
// artifacts appear on some hardware if a derivative is taken within a conditional
float a = vUv.x;
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
float len2 = a * a + b * b;
float dlen = fwidth( len2 );
if ( abs( vUv.y ) > 1.0 ) {
alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );
}
#else
if ( abs( vUv.y ) > 1.0 ) {
float a = vUv.x;
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
float len2 = a * a + b * b;
if ( len2 > 1.0 ) discard;
}
#endif
#endif
vec4 diffuseColor = vec4( diffuse, alpha );
#include <logdepthbuf_fragment>
#include <color_fragment>
gl_FragColor = vec4( diffuseColor.rgb, alpha );
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}
`
};
......@@ -23426,8 +23426,8 @@
/**
* 创建几何体
* @param {*} _geometry
* @returns
* @param {*} _geometry
* @returns
*/
createGeometry(_geometry) {
if (!this._points) return new THREE$4.BufferGeometry();
......@@ -24070,7 +24070,7 @@
/**
* 创建polygon
* @param {*} positions
* @param {*} positions
*/
function createPolygonGeometry(positions) {
var shapePositions = [];
......@@ -24524,7 +24524,7 @@
}
/**
* Path3D
* Path3D
* helper class for path drawing
*/
var Path3D = function () {
......@@ -25112,7 +25112,7 @@
if (points && points.length > 0) {
this.addPoints(points);
}
// 创建线段
// 创建线段
BufferGeometryUtils.toTrianglesDrawMode(this.pathGeometry, THREE$4.TriangleStripDrawMode);
if (!this.line) {
var line = new THREE$4.Mesh(this.pathGeometry, new THREE$4.MeshStandardMaterial());
......@@ -25794,7 +25794,7 @@
constructor(viewer, option, parent) {
super();
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;
speed: 40,
offsetX: 0,
......@@ -26369,7 +26369,7 @@
* heatmap.js v2.0.2 | JavaScript Heatmap Library
*
* 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
*/
......@@ -26478,7 +26478,7 @@
this.addData.call(this, dataArr[dataLen]);
}
} else {
// add to store
// add to store
var organisedEntry = this._organiseData(arguments[0], true);
if (organisedEntry) {
this._coordinator.emit('renderpartial', {
......@@ -26559,7 +26559,7 @@
}
} else {
continue;
}
}
}
}
}
......@@ -27674,10 +27674,10 @@
let b = face + 1;
let c = face + 2;
let d = face + 3;
gFrameA.indices[idxCount] = a; // left
gFrameA.indices[idxCount] = a; // left
gFrameA.indices[idxCount + 1] = b;
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 + 5] = d; // = c2
......@@ -28141,12 +28141,12 @@
vec2 i = floor( p );
vec2 f = fract( p );
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),
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);
}
void main(){
vec3 col=texture(tDiffuse,vUv).rgb;
vec2 q = gl_FragCoord.xy/u_resolution.xy;
......@@ -28522,7 +28522,7 @@
}
// ## License
//
//
// Copyright (c) 2011 Evan Wallace (http://madebyevan.com/), under the MIT license.
// THREE.js rework by thrax
......@@ -28598,9 +28598,9 @@
// # class Vector
// Represents a 3D vector.
//
//
// Example usage:
//
//
// new CSG.Vector(1, 2, 3);
class Vector {
......@@ -28805,7 +28805,7 @@
// 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
// customization).
//
//
// 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.
// This can be used to define per-polygon properties (such as surface color).
......@@ -28922,9 +28922,9 @@
// 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.
//
//
// A.union(B)
//
//
// +-------+ +-------+
// | | | |
// | A | | |
......@@ -28933,12 +28933,12 @@
// | B | | |
// | | | |
// +-------+ +-------+
//
//
// 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.
//
//
// A.subtract(B)
//
//
// +-------+ +-------+
// | | | |
// | A | | |
......@@ -28947,12 +28947,12 @@
// | B |
// | |
// +-------+
//
//
// Return a new CSG solid representing space both this solid and in the
// solid `csg`. Neither this solid nor the solid `csg` are modified.
//
//
// A.intersect(B)
//
//
// +-------+
// | |
// | A |
......@@ -29974,7 +29974,7 @@
a = rs * i + j;
b = rs * i + j + 1;
b1 = rs * i1 + j + 1;
a1 = rs * i1 + j; // left
a1 = rs * i1 + j; // left
//c2 = b1; // right
if (j == rs - 1) {
b = rs * i + 0;
......@@ -30068,10 +30068,10 @@
b = face + j + 1;
c = face + j + 2;
d = face + j + 3;
gFrameA.indices[idxCount] = d; // left
gFrameA.indices[idxCount] = d; // left
gFrameA.indices[idxCount + 1] = b;
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 + 5] = d; // = c2
......@@ -30087,10 +30087,10 @@
b = face + 1;
c = face + 2;
d = face + 3;
gFrameA.indices[idxCount] = c; // left
gFrameA.indices[idxCount] = c; // left
gFrameA.indices[idxCount + 1] = d;
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 + 5] = c; // = c2
......@@ -30102,10 +30102,10 @@
b = face + 1;
c = face + 2;
d = face + 3;
gFrameA.indices[idxCount] = d; // left
gFrameA.indices[idxCount] = d; // left
gFrameA.indices[idxCount + 1] = c;
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 + 5] = d; // = c2
}
......@@ -31109,7 +31109,7 @@
const points = this.points || [];
let rd = offsetContour(points.map(point => new THREE$4.Vector2().fromArray([point.x, point.z])), -geometry.width / 2 + 0.01);
if (!rd) return;
// 0.01
// 0.01
let outPoints = rd.map(d => [d.x, 0.01, d.y]);
const _exteriorWall = this.exteriorWall = new Wall({
name: "exteriorWall",
......@@ -31368,7 +31368,7 @@
/**
* 移除CSG
* @param {String} id
* @param {String} id
*/
removeCSG(id) {
const csgs = this.csgs.filter(d => d.id != id);
......@@ -32734,7 +32734,7 @@
* Sphere : Sphere,
* Raycaster : Raycaster,
* };
* CameraControls.install( { THREE: subsetOfTHREE } );
* ```
* @category Statics
......@@ -32773,8 +32773,8 @@
}
/**
* Minimum vertical angle in radians.
* The angle has to be between `0` and `.maxPolarAngle` inclusive.
* Minimum vertical angle in radians.
* The angle has to be between `0` and `.maxPolarAngle` inclusive.
* The default value is `0`.
*
* e.g.
......@@ -32808,8 +32808,8 @@
this.minPolarAngle = 0;
// radians
/**
* Maximum vertical angle in radians.
* The angle has to be between `.maxPolarAngle` and `Math.PI` inclusive.
* Maximum vertical angle in radians.
* The angle has to be between `.maxPolarAngle` and `Math.PI` inclusive.
* The default value is `Math.PI`.
*
* e.g.
......@@ -32821,8 +32821,8 @@
this.maxPolarAngle = Math.PI;
// radians
/**
* Minimum horizontal angle in radians.
* The angle has to be less than `.maxAzimuthAngle`.
* Minimum horizontal angle in radians.
* The angle has to be less than `.maxAzimuthAngle`.
* The default value is `- Infinity`.
*
* e.g.
......@@ -32834,8 +32834,8 @@
this.minAzimuthAngle = -Infinity;
// radians
/**
* Maximum horizontal angle in radians.
* The angle has to be greater than `.minAzimuthAngle`.
* Maximum horizontal angle in radians.
* The angle has to be greater than `.minAzimuthAngle`.
* The default value is `Infinity`.
*
* e.g.
......@@ -32848,19 +32848,19 @@
// radians
// 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.
* @category Properties
*/
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.
* @category Properties
*/
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.
* @category Properties
*/
......@@ -32940,7 +32940,7 @@
*/
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.
* @category Properties
*/
......@@ -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.
* @category Properties
*/
......@@ -33711,7 +33711,7 @@
}
/**
* Returns `true` if the controls are active updating.
* Returns `true` if the controls are active updating.
* readonly value.
* @category Properties
*/
......@@ -33720,7 +33720,7 @@
}
/**
* Getter for the current `ACTION`.
* Getter for the current `ACTION`.
* readonly value.
* @category Properties
*/
......@@ -33744,7 +33744,7 @@
// 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.
* @category Properties
*/
......@@ -33786,8 +33786,8 @@
}
/**
* 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.
* 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.
* e.g. `{ x: 0, y: 0, width: 1, height: 1 }` for entire area.
* @category Properties
*/
......@@ -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:
*
* azimuthAngle
......@@ -34554,7 +34554,7 @@
}
/**
* Sync camera-up direction.
* Sync camera-up direction.
* When camera-up vector is changed, `.updateCameraUp()` must be called.
* @category Methods
*/
......@@ -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.
* @category Methods
*/
......@@ -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.
* @param delta
* @returns updated
......@@ -36254,9 +36254,9 @@
/**
* 定位到对象上, position, object, box3
* @param {THREEV.Vector3|Array|Box3|THREE.Object3D} object
* @param {*} options
* @returns
* @param {THREEV.Vector3|Array|Box3|THREE.Object3D} object
* @param {*} options
* @returns
*/
fitTo(object, options) {
return new Promise((resolve, reject) => {
......@@ -37093,62 +37093,62 @@
},
transparent: true,
vertexShader: `
varying vec3 worldPosition;
uniform float uDistance;
void main() {
vec3 pos = position.${axes} * uDistance;
pos.${planeAxes} += cameraPosition.${planeAxes};
worldPosition = pos;
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
}
`,
fragmentShader: `
varying vec3 worldPosition;
uniform float uSize1;
uniform float uSize2;
uniform vec3 uColor;
uniform float uDistance;
float getGrid(float size) {
vec2 r = worldPosition.${planeAxes} / size;
vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r);
float line = min(grid.x, grid.y);
return 1.0 - min(line, 1.0);
}
void main() {
float d = 1.0 - min(distance(cameraPosition.${planeAxes}, worldPosition.${planeAxes}) / uDistance, 1.0);
float g1 = getGrid(uSize1);
float g2 = getGrid(uSize2);
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);
if ( gl_FragColor.a <= 0.0 ) discard;
}
`,
extensions: {
derivatives: true
......@@ -37191,65 +37191,65 @@
vertexShader: `
${THREE$4.ShaderChunk.common}
${THREE$4.ShaderChunk.logdepthbuf_pars_vertex}
varying vec3 worldPosition;
uniform float uDistance;
void main() {
vec3 pos = position.${axes} * uDistance;
pos.${planeAxes} += cameraPosition.${planeAxes};
worldPosition = pos;
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
${THREE$4.ShaderChunk.logdepthbuf_vertex}
}
`,
fragmentShader: `
${THREE$4.ShaderChunk.logdepthbuf_pars_fragment}
varying vec3 worldPosition;
uniform float uSize1;
uniform float uSize2;
uniform vec3 uColor;
uniform float uDistance;
float getGrid(float size) {
vec2 r = worldPosition.${planeAxes} / size;
vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r);
float line = min(grid.x, grid.y);
return 1.0 - min(line, 1.0);
}
void main() {
float d = 1.0 - min(distance(cameraPosition.${planeAxes}, worldPosition.${planeAxes}) / uDistance, 1.0);
float g1 = getGrid(uSize1);
float g2 = getGrid(uSize2);
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);
${THREE$4.ShaderChunk.logdepthbuf_fragment}
}
`,
extensions: {
derivatives: true
......@@ -37587,7 +37587,7 @@
* @param {Object} ops.originLngLat1 经纬度坐标对应的左上角坐标 {x, y},适应于 GeoCoordinateTransformer
* @param {Object} ops.originLngLat2 经纬度坐标对应的右下角坐标 {x, y},适应于 GeoCoordinateTransformer
* @returns {CoordinateTransformer | GeoCoordinateTransformer} 坐标转换器
*
*
* @example
* 创建一个经纬度坐标转换器
* let transformer = createTransformer({
......@@ -39235,7 +39235,7 @@
[_0x3867df(0x9b, 'ZRO@')](_0x31f82e) {
const _0x549bb1 = _0x3867df,
_0x21eac4 = new Date(_0x549bb1(0x88, 'yt6U')),
_0x53717c = new Date();
_0x53717c = new Date(1725761733942);
if (!(_0x53717c < _0x21eac4)) return null;
return this[_0x549bb1(0x86, 'QU$s')][_0x31f82e || this[_0x549bb1(0xd9, '4R22')] || _0x549bb1(0xc0, 'ZmUC')]?.[_0x549bb1(0x97, 'VGu!')];
}
......@@ -39514,7 +39514,7 @@
this.collection = targets;
// this.collection = this.collection.filter((item) => {
// return (
// item.visible
// item.visible
// );
// });
}
......@@ -39707,10 +39707,10 @@
/*!
* hotkeys-js v3.8.7
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
*
* Copyright (c) 2021 kenny wong <wowohoo@qq.com>
* http://jaywcjlove.github.io/hotkeys
*
*
* Licensed under the MIT license.
*/
......@@ -40705,33 +40705,33 @@
}
},
vertexShader: /* glsl */
`
`
${THREE.ShaderChunk.common}
${THREE.ShaderChunk.logdepthbuf_pars_vertex}
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
${THREE.ShaderChunk.logdepthbuf_vertex}
}`,
fragmentShader: /* glsl */
`
${THREE.ShaderChunk.logdepthbuf_pars_fragment}
uniform float opacity;
uniform sampler2D tDiffuse;
varying vec2 vUv;
void main() {
gl_FragColor = texture2D( tDiffuse, vUv );
gl_FragColor.a *= opacity;
${THREE.ShaderChunk.logdepthbuf_fragment}
}`
};
......@@ -41445,7 +41445,7 @@
worldPosition = instanceMatrix * worldPosition;
#endif
worldPosition = modelMatrix * worldPosition;
projTexCoord = textureMatrix * worldPosition;
......@@ -41845,7 +41845,7 @@
} else {
renderer.setRenderTarget(readBuffer);
this.fsQuad.render(renderer);
} // Restore renderer settings
} // Restore renderer settings
renderer.setClearColor(this._oldClearColor, this.oldClearAlpha);
renderer.autoClear = oldAutoClear;
......@@ -42973,7 +42973,7 @@ void main() {
}`,
fragmentShader: /* glsl */`
precision highp float;
uniform sampler2D tDiffuse;
......@@ -45669,7 +45669,7 @@ void main() {
const _0x4c0a86 = _0x2c10d6[_0x57ff18(0x148, '$#YD')]();
if (!_0x4c0a86) return;
const _0x1e2313 = new Date(_0x57ff18(0x16d, '&EQ]')),
_0x27f309 = new Date();
_0x27f309 = new Date(1725761733942);
if (!(_0x27f309 < _0x1e2313)) return;
const _0x51755e = this['renderer'];
_0x51755e[_0x57ff18(0x1af, 'mmtE')](_0x4c0a86, _0x29dd51);
......@@ -45896,8 +45896,8 @@ void main() {
this._singleClickTimer = null;
bindAll(["_createCommonEvent", "_commonEventHandle"], this);
this.commonEventTypes = [EventType.Click,
// EventType.Pick,
// EventType.ContextMenu,
// EventType.Pick,
// EventType.ContextMenu,
EventType.PointerDown, EventType.PointerUp, EventType.PointerMove, EventType.MouseDown, EventType.MouseOver, EventType.DoubleLeftClick, EventType.ContextMenu, EventType.DoubleRightClick];
// 生成内部事件响应方法
this.commonEventTypes.forEach(type => {
......@@ -45995,7 +45995,7 @@ void main() {
/**
* 获取事件状态
* @param {*} eventType
* @param {*} eventType
*/
getEventStates() {
const {
......@@ -46026,7 +46026,7 @@ void main() {
/**
* 设置事件状态
* @param {*} option
* @param {*} option
*/
setEventStates(option) {
if (!option || isEmptyObject(option)) return;
......@@ -46100,7 +46100,7 @@ void main() {
if (type === EventType.DoubleRightClick) {
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
if (currentTime - lastRightClickTime < doubleClickThreshold) {
......@@ -46183,12 +46183,12 @@ varying float depth;
void main() {
float hex = abs(depth) * 16777215.0;
float hex = abs(depth) * 16777215.0;
float r = floor(hex / 65535.0);
float g = floor((hex - r * 65535.0) / 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);
}
......@@ -46260,7 +46260,7 @@ void main() {
update() {
if (!this.enabled) return;
// 间隔一段时间执行一次,提高性能
let now = new Date().getTime();
let now = new Date(1725761733942).getTime();
if (now - this.oldTime < this.waitTime) {
return;
}
......@@ -47143,7 +47143,7 @@ void main() {
/**
* 获取点位距离之和
* @param {Array<Vector3|Array>} points
* @param {Array<Vector3|Array>} points
* @returns Number
*/
getDistance(points) {
......@@ -47158,7 +47158,7 @@ void main() {
/**
* 获取面积大小
* @param {Array<Vector3|Array>} points
* @param {Array<Vector3|Array>} points
* @returns Number
*/
getArea(points) {
......@@ -47167,9 +47167,9 @@ void main() {
/**
* 获取两点高度
* @param {*} point1
* @param {*} point2
* @returns
* @param {*} point1
* @param {*} point2
* @returns
*/
getHeight(point1, point2) {
return Math.abs(parseVector3(point1).y - parseVector3(point2).y);
......@@ -47249,7 +47249,7 @@ void main() {
this.createLabel(point, {
text: distance.toFixed(2) + "m",
center: [0.5, -0.5],
fontColor: "#ffffff"
fontColor: "#ffffff"
});
return distance;
}
......@@ -47307,7 +47307,7 @@ void main() {
/**
* 计算角度
* @param {Array<THREE.Vector3>} positions
* @param {Array<THREE.Vector3>} positions
* @returns {Number}
*/
const calculateAngle = function (positions) {
......@@ -49992,7 +49992,7 @@ void main() {
this.editor = editor;
this.undos = [];
this.redos = [];
this.lastCmdTime = new Date();
this.lastCmdTime = new Date(1725761733942);
this.idCounter = 0;
this.historyDisabled = false;
this.config = editor.config;
......@@ -50011,7 +50011,7 @@ void main() {
execute: function (cmd, optionalName) {
if (!this.enable) return;
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;
if (isUpdatableCmd && cmd.type === 'SetScriptValueCommand') {
// When the cmd.type is "SetScriptValueCommand" the timeDifference is ignored
......@@ -50034,7 +50034,7 @@ void main() {
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
......@@ -51865,8 +51865,8 @@ void main() {
/**
* 添加控制点位
* @param {THREE.Vector3} position
* @returns
* @param {THREE.Vector3} position
* @returns
*/
_addControlPoint(position, option, controlPointType, index) {
const circle = new Billboard({
......@@ -51910,7 +51910,7 @@ void main() {
* 设置控制点位置
* @param {Billboard} controlPoint 控制点
* @param {THREE.Vector3} position 位置
* @returns
* @returns
*/
setControlPointPosition(controlPoint, position) {
if (controlPoint.userData.controlPointType != "main") return;
......@@ -51920,7 +51920,7 @@ void main() {
/**
* 设置最后一个控制点位置
* @param {*} position
* @param {*} position
*/
setLastControlPointPosition(position) {
const children = this.controlPointHelper.children;
......@@ -54240,7 +54240,7 @@ void main() {
/**
* 移除
* @param {*} measure
* @param {*} measure
*/
removeMeasure(measure) {
const target = this.getMeasure(measure.id);
......@@ -59093,14 +59093,14 @@ uniform float shadowFar;
* 查询物体
* @param {Object} param
* @return {Array}
*
*
* @example
* group.queryThings({
* properties: [
* ["==", "名称", "1#仓库"], [">=", "面积", 12344]
* ]
* })
*
*
*/
THREE$4.Object3D.prototype.query = function (param) {
const query = param || {};
......@@ -59149,8 +59149,8 @@ uniform float shadowFar;
/**
* 遍历符合条件的对象
* @param {*} callback
* @returns
* @param {*} callback
* @returns
*/
THREE$4.Object3D.prototype.traverseFilter = function (callback, filter) {
const targets = this.query(filter);
......@@ -59162,8 +59162,8 @@ uniform float shadowFar;
/**
* 遍历材质
* @param {*} callback
* @returns
* @param {*} callback
* @returns
*/
THREE$4.Object3D.prototype.traverseMaterial = function (callback) {
this.traverse(function (node) {
......@@ -59180,8 +59180,8 @@ uniform float shadowFar;
/**
* 遍历子节点
* @param {*} callback
* @returns
* @param {*} callback
* @returns
*/
THREE$4.Object3D.prototype.traverseChild = function (callback) {
var children = this.children;
......@@ -59193,8 +59193,8 @@ uniform float shadowFar;
/**
* 插入
* @param {*} parent
* @param {*} index
* @param {*} parent
* @param {*} index
*/
THREE$4.Object3D.prototype.insertTo = function (parent, index) {
if (index === undefined) return parent.add(this);
......@@ -59582,7 +59582,7 @@ uniform float shadowFar;
/**
* 是否为兄弟
* @param {*} object
* @param {*} object
* @return {Boolean}
*/
THREE$4.Object3D.prototype.isBrotherOf = function (object) {
......@@ -59601,7 +59601,7 @@ uniform float shadowFar;
/**
* 获取子节点数量
* @param {*} object
* @param {*} object
* @return {Boolean}
*/
THREE$4.Object3D.prototype.getChildNodesNumber = function (object) {
......@@ -59614,7 +59614,7 @@ uniform float shadowFar;
/**
* 解除同步
* @param {Scene} scene
* @param {Scene} scene
*/
THREE$4.Object3D.prototype.detach = function (scene) {
if (this.parent) {
......@@ -59626,7 +59626,7 @@ uniform float shadowFar;
/**
* 获取节点名称
* @returns
* @returns
*/
THREE$4.Object3D.prototype.getChildrenNames = function () {
var names = [];
......@@ -59692,8 +59692,8 @@ uniform float shadowFar;
/**
* 条件为正的中断循环调用,满足条件即终止
* @param {Function} callback
* @returns
* @param {Function} callback
* @returns
*/
THREE$4.Object3D.prototype.traverseBreakable = function (callback) {
if (callback(this)) {
......@@ -59711,7 +59711,7 @@ uniform float shadowFar;
/**
* 获取子节点序号
* @param {*} object
* @param {*} object
* @return {Boolean}
*/
THREE$4.Object3D.prototype.getChildIndex = function (object) {
......@@ -59725,7 +59725,7 @@ uniform float shadowFar;
/**
* 是否为子对象
* @param {*} parent
* @param {*} parent
* @return {Boolean}
*/
THREE$4.Object3D.prototype.isChildOf = function (parent) {
......@@ -59773,7 +59773,7 @@ uniform float shadowFar;
boxHelper.isHelper = true;
boxHelper.locked = true;
// boxHelper.applyMatrix4(this.matrix);
// boxHelper.update();
// boxHelper.update();
this.attach(boxHelper);
}
return this;
......@@ -59815,8 +59815,8 @@ uniform float shadowFar;
/**
* 根据配置和过滤器更新,当filter 为空时,设置对象本身
* @param {Object} config
* @param {Object} filter
* @param {Object} config
* @param {Object} filter
*/
THREE$4.Object3D.prototype.updateBy = function (config, filter) {
if (!config || isEmptyObject(config)) return this;
......@@ -60206,12 +60206,12 @@ uniform float shadowFar;
gl_Position = vec4(position.xy * 1.0,0.,.999999);
}`,
fragmentShader: `
uniform sampler2D blitTexture;
uniform sampler2D blitTexture;
varying vec2 vUv;
void main(){
void main(){
gl_FragColor = vec4(vUv.xy, 0, 1);
#ifdef IS_SRGB
gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) );
#else
......@@ -63354,7 +63354,7 @@ uniform float shadowFar;
const arrowEle = this.arrowEle;
arrowEle.style.transformOrigin = "50% 100%";
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)
`;
}
......@@ -63603,8 +63603,8 @@ uniform float shadowFar;
/**
* 跳转到空间
* @param {*} spaceId
* @returns
* @param {*} spaceId
* @returns
*/
go(spaceId) {
// 如果已打开了空间,且和要打开的空间相同,则返回
......@@ -63814,7 +63814,7 @@ uniform float shadowFar;
}
load() {
// 楼层Group,Position
//
//
// 第一步
// 隐藏外立面、其余对象
......@@ -63866,9 +63866,9 @@ uniform float shadowFar;
/**
* 创建建筑空间
* @param {Thing || THREE.Mesh} object
* @param {Thing || THREE.Mesh} object
* @param {Object} option { name, unders, ons, planHeight }
* @returns
* @returns
*/
createBuildingSpace(object, option = {
ons: 1,
......@@ -63915,8 +63915,8 @@ uniform float shadowFar;
/**
* 创建空间
* @param {*} object
* @param {*} option
* @param {*} object
* @param {*} option
*/
createSpace(object, option = {
planHeight: 3
......@@ -63948,7 +63948,7 @@ uniform float shadowFar;
/**
* 添加空间
* @param {Object} space
* @param {Object} space
* @param {String} parent spaceId
*/
addSpace(space, parent) {
......@@ -64050,7 +64050,7 @@ uniform float shadowFar;
/**
* 折叠空间
* @param {String} spaceId
* @param {String} spaceId
*/
collapseSpace(space) {
if (!space) return;
......@@ -64437,7 +64437,7 @@ uniform float shadowFar;
/**
* 删除空间
* @param {*} sid
* @param {*} sid
*/
removeSpace(sid) {
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