@x-viewer/editor 0.9.0
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/README.md +3 -0
- package/dist/index.esm.js +96 -0
- package/dist/types/Editor.d.ts +14 -0
- package/dist/types/EventBus.d.ts +17 -0
- package/dist/types/drawables/Door2dDrawable.d.ts +6 -0
- package/dist/types/drawables/Object2dDrawable.d.ts +30 -0
- package/dist/types/drawables/Room2dDrawable.d.ts +21 -0
- package/dist/types/gizmo/Gizmo.d.ts +142 -0
- package/dist/types/gizmo/TransformControls.d.ts +291 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interactions/BaseDrawInteraction.d.ts +32 -0
- package/dist/types/interactions/DrawObject2dInteraction.d.ts +15 -0
- package/dist/types/interactions/DrawWall2dInteraction.d.ts +16 -0
- package/dist/types/interactions/Editor2dInteraction.d.ts +21 -0
- package/dist/types/interactions/Editor3dInteraction.d.ts +18 -0
- package/dist/types/viewers/EditorModel3d.d.ts +4 -0
- package/dist/types/viewers/EditorViewer2d.d.ts +28 -0
- package/dist/types/viewers/EditorViewer3d.d.ts +24 -0
- package/package.json +47 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseViewer, EffectManager, THREE } from "@x-viewer/core";
|
|
2
|
+
import { EditorModel3d } from "./EditorModel3d";
|
|
3
|
+
export declare class EditorViewer3d extends BaseViewer {
|
|
4
|
+
effect: EffectManager;
|
|
5
|
+
model: EditorModel3d;
|
|
6
|
+
constructor(viewerCfg: any);
|
|
7
|
+
protected initEvents(): void;
|
|
8
|
+
protected setDefaultBackground(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Gets if selection is enabled.
|
|
11
|
+
*/
|
|
12
|
+
get enableSelection(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Sets if selection is enabled.
|
|
15
|
+
*/
|
|
16
|
+
set enableSelection(enable: boolean);
|
|
17
|
+
loadModel(): Promise<void>;
|
|
18
|
+
addObjectToModel(object: THREE.Object3D): void;
|
|
19
|
+
getObjectByUuid(uuid: string): THREE.Object3D | undefined;
|
|
20
|
+
setDrawMode(mode: string, drawObject: THREE.Object3D): void;
|
|
21
|
+
exitDrawMode(): void;
|
|
22
|
+
setObjectHighlight(object: THREE.Object3D): void;
|
|
23
|
+
clearHighlight(): void;
|
|
24
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@x-viewer/editor",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"author": "",
|
|
5
|
+
"license": "",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public",
|
|
11
|
+
"registry": "https://registry.npmjs.org/"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"package.json",
|
|
15
|
+
"dist",
|
|
16
|
+
"assets",
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"main": "dist/index.umd.js",
|
|
22
|
+
"module": "dist/index.esm.js",
|
|
23
|
+
"types": "dist/types/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"import": "./dist/index.esm.js",
|
|
27
|
+
"require": "./dist/index.umd.js",
|
|
28
|
+
"types": "./dist/types/index.d.ts"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@x-viewer/core": "^0.9.0",
|
|
33
|
+
"@x-viewer/plugins": "^0.9.0",
|
|
34
|
+
"@x-viewer/builder": "^0.9.0"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "pnpm run clean:build && pnpm run data-type && rollup -c --environment BUILD:production",
|
|
38
|
+
"clean:build": "rimraf ./dist",
|
|
39
|
+
"data-type": "tsc --project tsconfig.bundle.json && tsc-alias -p tsconfig.bundle.json",
|
|
40
|
+
"dev": "pnpm run data-type && rollup -c -w",
|
|
41
|
+
"lint": "eslint . --ext .js,.ts",
|
|
42
|
+
"lint:fix": "pnpm lint --fix",
|
|
43
|
+
"format": "prettier --check .",
|
|
44
|
+
"format:fix": "prettier --write .",
|
|
45
|
+
"lint-staged": "lint-staged"
|
|
46
|
+
}
|
|
47
|
+
}
|