u-space 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.js +243 -200
- package/dist/plugins/curve-movement/CurveMovementObject.d.ts +1 -1
- package/dist/plugins/curve-movement/index.cjs +1 -1
- package/dist/plugins/curve-movement/index.js +4 -5
- package/dist/plugins/u-manager/Watermarker.d.ts +1 -0
- package/dist/plugins/u-manager/constants.d.ts +1 -0
- package/dist/plugins/u-manager/index.cjs +60 -60
- package/dist/plugins/u-manager/index.d.ts +1 -0
- package/dist/plugins/u-manager/index.js +9032 -8616
- package/dist/plugins/u-manager/loaders/SceneLoader.d.ts +10 -1
- package/dist/plugins/u-manager/semantics/BuildingGroup.d.ts +15 -0
- package/dist/plugins/u-manager/semantics/FloorMesh.d.ts +41 -0
- package/dist/plugins/u-manager/semantics/SemanticLoader.d.ts +8 -0
- package/dist/plugins/u-manager/semantics/SemanticParser.d.ts +5 -0
- package/dist/plugins/u-manager/semantics/index.d.ts +6 -0
- package/dist/plugins/u-manager/semantics/semantic.types.d.ts +87 -0
- package/dist/plugins/u-manager/semantics/types.d.ts +25 -0
- package/dist/plugins/u-manager/types.d.ts +1 -1
- package/dist/src/effects/TSLEffects.d.ts +1 -1
- package/dist/src/loaders/ModelLoaderManager.d.ts +1 -1
- package/dist/src/loaders/TextureLoaderManager.d.ts +1 -1
- package/dist/src/viewers/Viewer.d.ts +1 -1
- package/docs/api-plugin-u-manager.md +109 -1
- package/docs/changelog.md +7 -0
- package/docs/index.md +7 -1
- package/docs/mcp.md +96 -0
- package/package.json +8 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("three/webgpu");
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("three/webgpu");class s extends e.EventDispatcher{viewer;path=null;progress=0;speed=.1;loop="once";pingPong=!1;positionOffset=new e.Vector3;autoLookAt=!0;lookAtOffset=0;direction=1;_isPlaying=!1;_tempPosition=new e.Vector3;_tempTangent=new e.Vector3;_tempLookAt=new e.Vector3;constructor(t){super(),this.viewer=t}setFromPoints(t,o=!1){return this.setPath(new e.CatmullRomCurve3(t,o,"catmullrom",0))}setPath(t){return this.path=t,this}setProgress(t){return this.progress=Math.max(0,Math.min(1,t)),this}get isPlaying(){return this._isPlaying}play(){return this.resume(),this.progress=0,this.direction=1,this}resume(){return this._isPlaying=!0,this.viewer.addEventListener("beforeControlsUpdate",this._update),this}pause(){return this._isPlaying=!1,this.viewer.removeEventListener("beforeControlsUpdate",this._update),this}stop(){return this.pause(),this.progress=0,this.direction=1,this}reverse(){return this.direction*=-1,this}_update=()=>{if(!this._isPlaying||!this.path)return;const t=this.viewer.timer.getDelta();if(this.progress+=this.speed*t*this.direction,this.progress>=1)switch(this.loop){case"once":this.progress=1,this.pause(),this.dispatchEvent({type:"complete"});break;case"repeat":this.progress=0;break;case"pingpong":this.progress=1,this.direction=-1;break}else if(this.progress<=0)switch(this.loop){case"once":this.progress=0,this.pause(),this.dispatchEvent({type:"complete"});break;case"repeat":this.progress=1;break;case"pingpong":this.progress=0,this.direction=1;break}this.path.getPointAt(this.progress,this._tempPosition),this._tempPosition.add(this.positionOffset),this.autoLookAt&&(this.path.getTangentAt(this.progress,this._tempTangent),this._tempLookAt.copy(this._tempPosition).add(this._tempTangent)),this.dispatchEvent({type:"update",progress:this.progress}),this.viewer.render()};dispose(){this.stop(),this.path=null}}class r extends s{constructor(t){super(t),this.addEventListener("update",this._updateCamera)}_updateCamera=()=>{this.viewer.controls.setPosition(this._tempPosition.x,this._tempPosition.y,this._tempPosition.z),this.autoLookAt&&(this.viewer.controls.setTarget(this._tempLookAt.x,this._tempLookAt.y,this._tempLookAt.z),this.lookAtOffset!==0&&this.viewer.controls.rotate(this.lookAtOffset,0))};dispose(){super.dispose(),this.removeEventListener("update",this._updateCamera)}}class h extends s{target=null;constructor(t){super(t),this.addEventListener("update",this._updateObject)}_updateObject(){this.target&&(this.target.position.copy(this._tempPosition),this.autoLookAt&&(this.target.lookAt(this._tempLookAt),this.lookAtOffset!==0&&this.target.rotateY(this.lookAtOffset)))}dispose(){super.dispose(),this.removeEventListener("update",this._updateObject),this.target=null}}exports.CurveMovement=s;exports.CurveMovementCamera=r;exports.CurveMovementObject=h;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EventDispatcher as r, Vector3 as e, CatmullRomCurve3 as h } from "three/webgpu";
|
|
2
|
-
import "three";
|
|
3
2
|
class i extends r {
|
|
4
3
|
viewer;
|
|
5
4
|
/** 路径曲线 */
|
|
@@ -119,7 +118,7 @@ class i extends r {
|
|
|
119
118
|
this.stop(), this.path = null;
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
|
-
class
|
|
121
|
+
class a extends i {
|
|
123
122
|
constructor(t) {
|
|
124
123
|
super(t), this.addEventListener("update", this._updateCamera);
|
|
125
124
|
}
|
|
@@ -130,7 +129,7 @@ class n extends i {
|
|
|
130
129
|
super.dispose(), this.removeEventListener("update", this._updateCamera);
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
|
-
class
|
|
132
|
+
class n extends i {
|
|
134
133
|
/** 移动目标对象 */
|
|
135
134
|
target = null;
|
|
136
135
|
constructor(t) {
|
|
@@ -148,6 +147,6 @@ class u extends i {
|
|
|
148
147
|
}
|
|
149
148
|
export {
|
|
150
149
|
i as CurveMovement,
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
a as CurveMovementCamera,
|
|
151
|
+
n as CurveMovementObject
|
|
153
152
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type PassNode, Mesh, MeshBasicNodeMaterial, OrthographicCamera, PlaneGeometry, Scene } from 'three/webgpu';
|
|
2
2
|
import type { Viewer } from 'u-space';
|
|
3
3
|
export declare class Watermarker extends Scene {
|
|
4
|
+
#private;
|
|
4
5
|
viewer: Viewer;
|
|
5
6
|
camera: OrthographicCamera;
|
|
6
7
|
mesh: Mesh<PlaneGeometry, MeshBasicNodeMaterial>;
|
|
@@ -3,3 +3,4 @@ export declare const TOPOLOGY_DATA_FILE_PATH = "/db/topology_paths.json";
|
|
|
3
3
|
export declare const ANIMATIONS_DATA_FILE_PATH = "/db/animations.json";
|
|
4
4
|
export declare const VISIONS_DATA_FILE_PATH = "/db/model_visions.json";
|
|
5
5
|
export declare const PROPERTIES_DATA_FILE_PATH = "/db/properties.json";
|
|
6
|
+
export declare const SEMANTIC_DATA_FILE_PATH = "/db/semantic_model.json";
|