@operato/scene-visualizer 9.2.2 → 10.0.0-beta.1
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/banner.d.ts +232 -3
- package/dist/banner.js +1 -2
- package/dist/banner.js.map +1 -1
- package/dist/camera.d.ts +232 -3
- package/dist/camera.js +1 -2
- package/dist/camera.js.map +1 -1
- package/dist/carrier.d.ts +263 -0
- package/dist/carrier.js +272 -0
- package/dist/carrier.js.map +1 -0
- package/dist/cube.d.ts +232 -4
- package/dist/cube.js +1 -2
- package/dist/cube.js.map +1 -1
- package/dist/cylinder.d.ts +1 -3
- package/dist/cylinder.js +1 -2
- package/dist/cylinder.js.map +1 -1
- package/dist/desk.d.ts +238 -3
- package/dist/desk.js +1 -2
- package/dist/desk.js.map +1 -1
- package/dist/editors/index.d.ts +1 -0
- package/dist/editors/index.js +5 -0
- package/dist/editors/index.js.map +1 -1
- package/dist/editors/property-editor-gltf-fill-targets.d.ts +17 -0
- package/dist/editors/property-editor-gltf-fill-targets.js +211 -0
- package/dist/editors/property-editor-gltf-fill-targets.js.map +1 -0
- package/dist/editors/property-editor-gltf-info.js +38 -29
- package/dist/editors/property-editor-gltf-info.js.map +1 -1
- package/dist/editors/property-editor-location-increase-pattern.js +91 -95
- package/dist/editors/property-editor-location-increase-pattern.js.map +1 -1
- package/dist/effects/outline.js +1 -1
- package/dist/effects/outline.js.map +1 -1
- package/dist/ellipse.js +2 -4
- package/dist/ellipse.js.map +1 -1
- package/dist/gltf-object.d.ts +232 -3
- package/dist/gltf-object.js +1 -2
- package/dist/gltf-object.js.map +1 -1
- package/dist/html-overlay-element.js +3 -7
- package/dist/html-overlay-element.js.map +1 -1
- package/dist/index.d.ts +5 -17
- package/dist/index.js +7 -17
- package/dist/index.js.map +1 -1
- package/dist/light.d.ts +1 -2
- package/dist/light.js +1 -2
- package/dist/light.js.map +1 -1
- package/dist/polygon.js +2 -4
- package/dist/polygon.js.map +1 -1
- package/dist/rack-table-3d.d.ts +16 -0
- package/dist/rack-table-3d.js +94 -0
- package/dist/rack-table-3d.js.map +1 -0
- package/dist/rack-table-cell.d.ts +238 -3
- package/dist/rack-table-cell.js +44 -51
- package/dist/rack-table-cell.js.map +1 -1
- package/dist/rack-table-location.d.ts +37 -0
- package/dist/rack-table-location.js +227 -0
- package/dist/rack-table-location.js.map +1 -0
- package/dist/rack-table.d.ts +13 -29
- package/dist/rack-table.js +108 -380
- package/dist/rack-table.js.map +1 -1
- package/dist/rack.d.ts +3 -5
- package/dist/rack.js +7 -9
- package/dist/rack.js.map +1 -1
- package/dist/rect.js +2 -4
- package/dist/rect.js.map +1 -1
- package/dist/signal-tower.d.ts +492 -0
- package/dist/signal-tower.js +275 -0
- package/dist/signal-tower.js.map +1 -0
- package/dist/sphere.d.ts +1 -3
- package/dist/sphere.js +1 -2
- package/dist/sphere.js.map +1 -1
- package/dist/sprite.d.ts +232 -3
- package/dist/sprite.js +1 -2
- package/dist/sprite.js.map +1 -1
- package/dist/stock.d.ts +22 -10
- package/dist/stock.js +87 -81
- package/dist/stock.js.map +1 -1
- package/dist/tank.d.ts +492 -0
- package/dist/tank.js +312 -0
- package/dist/tank.js.map +1 -0
- package/dist/templates/carrier.d.ts +19 -0
- package/dist/templates/carrier.js +20 -0
- package/dist/templates/carrier.js.map +1 -0
- package/dist/templates/cube.js +1 -1
- package/dist/templates/cube.js.map +1 -1
- package/dist/templates/cylinder.js +3 -3
- package/dist/templates/cylinder.js.map +1 -1
- package/dist/templates/index.d.ts +1 -0
- package/dist/templates/index.js +9 -1
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/signal-tower.d.ts +21 -0
- package/dist/templates/signal-tower.js +22 -0
- package/dist/templates/signal-tower.js.map +1 -0
- package/dist/templates/sphere.d.ts +1 -0
- package/dist/templates/sphere.js +5 -4
- package/dist/templates/sphere.js.map +1 -1
- package/dist/templates/tank.d.ts +21 -0
- package/dist/templates/tank.js +22 -0
- package/dist/templates/tank.js.map +1 -0
- package/dist/templates/vehicle.d.ts +19 -0
- package/dist/templates/vehicle.js +20 -0
- package/dist/templates/vehicle.js.map +1 -0
- package/dist/text.js +2 -4
- package/dist/text.js.map +1 -1
- package/dist/three-container.d.ts +11 -35
- package/dist/three-container.js +128 -322
- package/dist/three-container.js.map +1 -1
- package/dist/three-controls.d.ts +101 -1
- package/dist/three-controls.js +339 -541
- package/dist/three-controls.js.map +1 -1
- package/dist/three-space.d.ts +6 -83
- package/dist/three-space.js +25 -537
- package/dist/three-space.js.map +1 -1
- package/dist/threed/index.d.ts +1 -0
- package/dist/threed/index.js +1 -0
- package/dist/threed/index.js.map +1 -1
- package/dist/threed/interfaces.d.ts +15 -0
- package/dist/threed/interfaces.js +5 -0
- package/dist/threed/interfaces.js.map +1 -0
- package/dist/threed/managers/camera-manager.d.ts +14 -0
- package/dist/threed/managers/camera-manager.js +60 -0
- package/dist/threed/managers/camera-manager.js.map +1 -0
- package/dist/threed/managers/controls-manager.d.ts +50 -0
- package/dist/threed/managers/controls-manager.js +249 -0
- package/dist/threed/managers/controls-manager.js.map +1 -0
- package/dist/threed/managers/event-manager3d.d.ts +19 -0
- package/dist/threed/managers/event-manager3d.js +76 -0
- package/dist/threed/managers/event-manager3d.js.map +1 -0
- package/dist/threed/managers/index.d.ts +7 -0
- package/dist/threed/managers/index.js +7 -0
- package/dist/threed/managers/index.js.map +1 -0
- package/dist/threed/managers/light-manager.d.ts +7 -0
- package/dist/threed/managers/light-manager.js +37 -0
- package/dist/threed/managers/light-manager.js.map +1 -0
- package/dist/threed/managers/renderer-manager.d.ts +30 -0
- package/dist/threed/managers/renderer-manager.js +120 -0
- package/dist/threed/managers/renderer-manager.js.map +1 -0
- package/dist/threed/managers/scene-manager.d.ts +15 -0
- package/dist/threed/managers/scene-manager.js +48 -0
- package/dist/threed/managers/scene-manager.js.map +1 -0
- package/dist/threed/managers/types.d.ts +36 -0
- package/dist/threed/managers/types.js +2 -0
- package/dist/threed/managers/types.js.map +1 -0
- package/dist/threed/real-object-dom-element.js +11 -3
- package/dist/threed/real-object-dom-element.js.map +1 -1
- package/dist/threed/real-object-extrude.d.ts +1 -0
- package/dist/threed/real-object-extrude.js +7 -0
- package/dist/threed/real-object-extrude.js.map +1 -1
- package/dist/threed/real-object-gltf.js +6 -2
- package/dist/threed/real-object-gltf.js.map +1 -1
- package/dist/threed/real-object-mesh.js +4 -6
- package/dist/threed/real-object-mesh.js.map +1 -1
- package/dist/threed/real-object-registry.d.ts +7 -0
- package/dist/threed/real-object-registry.js +32 -0
- package/dist/threed/real-object-registry.js.map +1 -0
- package/dist/threed/real-object-scene.js +10 -5
- package/dist/threed/real-object-scene.js.map +1 -1
- package/dist/threed/real-object-sprite-2d.js.map +1 -1
- package/dist/threed/real-object-sprite.js +2 -0
- package/dist/threed/real-object-sprite.js.map +1 -1
- package/dist/threed/real-object-text.js +2 -0
- package/dist/threed/real-object-text.js.map +1 -1
- package/dist/threed/real-object.d.ts +3 -2
- package/dist/threed/real-object.js +7 -16
- package/dist/threed/real-object.js.map +1 -1
- package/dist/threed/three-dimensional-container.d.ts +1 -2
- package/dist/threed/three-dimensional-container.js.map +1 -1
- package/dist/threed/utils/dispose.d.ts +2 -0
- package/dist/threed/utils/dispose.js +32 -0
- package/dist/threed/utils/dispose.js.map +1 -0
- package/dist/vehicle.d.ts +248 -0
- package/dist/vehicle.js +133 -0
- package/dist/vehicle.js.map +1 -0
- package/dist/visualizer.d.ts +4 -5
- package/dist/visualizer.js +15 -28
- package/dist/visualizer.js.map +1 -1
- package/dist/wall.d.ts +232 -4
- package/dist/wall.js +1 -2
- package/dist/wall.js.map +1 -1
- package/icons/carrier.png +0 -0
- package/icons/signal-tower.png +0 -0
- package/icons/tank.png +0 -0
- package/icons/vehicle.png +0 -0
- package/package.json +16 -18
package/dist/cube.d.ts
CHANGED
|
@@ -1,10 +1,238 @@
|
|
|
1
|
-
import { ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
2
|
-
import { RealObject } from './threed/real-object.js';
|
|
3
|
-
import { RealObjectMesh } from './threed/real-object-mesh.js';
|
|
1
|
+
import { Component, ComponentNature, Shape, RealObject, RealObjectMesh } from '@hatiolab/things-scene';
|
|
4
2
|
export declare class Cube3D extends RealObjectMesh {
|
|
5
3
|
buildGeometry(): void;
|
|
6
4
|
}
|
|
7
|
-
declare const Cube_base:
|
|
5
|
+
declare const Cube_base: (new (...args: any[]) => {
|
|
6
|
+
contains(x: any, y: any): boolean;
|
|
7
|
+
get path(): {
|
|
8
|
+
x: any;
|
|
9
|
+
y: any;
|
|
10
|
+
}[];
|
|
11
|
+
set path(path: {
|
|
12
|
+
x: any;
|
|
13
|
+
y: any;
|
|
14
|
+
}[]): any;
|
|
15
|
+
get anchors(): {
|
|
16
|
+
name: string;
|
|
17
|
+
position: {
|
|
18
|
+
x: any;
|
|
19
|
+
y: any;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
get bounds(): any;
|
|
23
|
+
set bounds(bounds: any): any;
|
|
24
|
+
render(ctx: any): void;
|
|
25
|
+
_app: any;
|
|
26
|
+
_model: any;
|
|
27
|
+
_state: any;
|
|
28
|
+
_delta: any;
|
|
29
|
+
_animation: any;
|
|
30
|
+
_animate: any;
|
|
31
|
+
_parent: any;
|
|
32
|
+
_disposed: any;
|
|
33
|
+
_textHidden: any;
|
|
34
|
+
_text_substitutor: any;
|
|
35
|
+
_value_substitutor: any;
|
|
36
|
+
_mappings: any;
|
|
37
|
+
_realObject: import("@hatiolab/things-scene").IRealObject | undefined;
|
|
38
|
+
_cachedState: any;
|
|
39
|
+
updatedAt: any;
|
|
40
|
+
fontSize: any;
|
|
41
|
+
__cache__: any;
|
|
42
|
+
created(): void;
|
|
43
|
+
added(parent: any): void;
|
|
44
|
+
removed(parent: any): void;
|
|
45
|
+
ready(): Promise<void>;
|
|
46
|
+
touch(): void;
|
|
47
|
+
clearCache(...attrs: any[]): void;
|
|
48
|
+
removeSelf(completely: any): void;
|
|
49
|
+
resetAnimation(): void;
|
|
50
|
+
dispose(): void;
|
|
51
|
+
get nature(): import("@hatiolab/things-scene").ComponentNature;
|
|
52
|
+
get disposed(): boolean;
|
|
53
|
+
isLayer(): boolean;
|
|
54
|
+
isGroup(): boolean;
|
|
55
|
+
isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
|
|
56
|
+
isLine(): boolean;
|
|
57
|
+
isRoot(): boolean;
|
|
58
|
+
isRootModel(): boolean;
|
|
59
|
+
is3dish(): boolean;
|
|
60
|
+
isIn3DSpace(): boolean;
|
|
61
|
+
isTemplate(): boolean;
|
|
62
|
+
isHTMLElement(): boolean;
|
|
63
|
+
isConnectable(): boolean;
|
|
64
|
+
isIdentifiable(): boolean;
|
|
65
|
+
isPositionable(): boolean;
|
|
66
|
+
replaceRefids(replaceMap: any): void;
|
|
67
|
+
get(property: any): any;
|
|
68
|
+
set(props: any, propval?: any): any;
|
|
69
|
+
getState(property: any): any;
|
|
70
|
+
setState(props: any, propval?: any): any;
|
|
71
|
+
get model(): any;
|
|
72
|
+
get state(): any;
|
|
73
|
+
get hierarchy(): any;
|
|
74
|
+
get volatile(): never[];
|
|
75
|
+
_applyProps(target: any, props: any, options: any): any;
|
|
76
|
+
move(offset: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
}, ...args: boolean[]): void;
|
|
80
|
+
symmetryX(x?: number): void;
|
|
81
|
+
symmetryY(y: number): void;
|
|
82
|
+
adjustResize(bounds: import("@hatiolab/things-scene").BOUNDS, origin_bounds: import("@hatiolab/things-scene").BOUNDS, diagonal: boolean): any;
|
|
83
|
+
adjustRotation(rotation: number, step: boolean): any;
|
|
84
|
+
outline(progress: number): any;
|
|
85
|
+
get center(): import("@hatiolab/things-scene").POINT;
|
|
86
|
+
set center(p: import("@hatiolab/things-scene").POINT): any;
|
|
87
|
+
get location(): import("@hatiolab/things-scene").POINT;
|
|
88
|
+
set location(l: import("@hatiolab/things-scene").POINT): any;
|
|
89
|
+
get rotate(): import("@hatiolab/things-scene").POINT;
|
|
90
|
+
set rotate(r: import("@hatiolab/things-scene").POINT): any;
|
|
91
|
+
get dimension(): import("@hatiolab/things-scene").DIMENSION;
|
|
92
|
+
set dimension(d: import("@hatiolab/things-scene").DIMENSION): any;
|
|
93
|
+
get drawPath(): import("@hatiolab/things-scene").POINT[];
|
|
94
|
+
get rotatePoint(): import("@hatiolab/things-scene").POINT;
|
|
95
|
+
get mutable(): boolean;
|
|
96
|
+
get resizable(): boolean;
|
|
97
|
+
get rotatable(): boolean;
|
|
98
|
+
buildRealObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
99
|
+
get realObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
100
|
+
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
101
|
+
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
102
|
+
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
103
|
+
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
104
|
+
prepareIf(condition: boolean): void;
|
|
105
|
+
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
106
|
+
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
107
|
+
drawFill(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
108
|
+
get strokeStyle(): any;
|
|
109
|
+
set strokeStyle(v: any): any;
|
|
110
|
+
get fillStyle(): any;
|
|
111
|
+
set fillStyle(v: any): any;
|
|
112
|
+
get fontColor(): string;
|
|
113
|
+
set fontColor(v: string): any;
|
|
114
|
+
get rotation(): number;
|
|
115
|
+
set rotation(v: number): any;
|
|
116
|
+
get decorators(): string[];
|
|
117
|
+
get decotag(): string;
|
|
118
|
+
get hidden(): boolean;
|
|
119
|
+
set hidden(v: boolean): any;
|
|
120
|
+
get tag(): string;
|
|
121
|
+
set tag(v: string): any;
|
|
122
|
+
get appendum(): any;
|
|
123
|
+
set appendum(v: any): any;
|
|
124
|
+
defaultTextSubstitutor(): any;
|
|
125
|
+
textLines(context?: import("@hatiolab/things-scene").SceneRenderContext): any;
|
|
126
|
+
get font(): string;
|
|
127
|
+
get lineHeight(): number;
|
|
128
|
+
get textSubstitutor(): () => string;
|
|
129
|
+
get text(): string;
|
|
130
|
+
set text(v: string): any;
|
|
131
|
+
get textBounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
132
|
+
get textRotation(): number;
|
|
133
|
+
get textHidden(): boolean;
|
|
134
|
+
set textHidden(v: boolean): any;
|
|
135
|
+
get hasTextProperty(): boolean;
|
|
136
|
+
animate(opts: import("@hatiolab/things-scene/dist-types/animation/interfaces").AnimationConfig): any;
|
|
137
|
+
effect(context: import("@hatiolab/things-scene").SceneRenderContext, model: any): any;
|
|
138
|
+
serialize(...others: any[]): any;
|
|
139
|
+
trim(): void;
|
|
140
|
+
closeScene(data: any): void;
|
|
141
|
+
delta(attr?: string | object, value?: any): any;
|
|
142
|
+
invalidate(): void;
|
|
143
|
+
get value(): any;
|
|
144
|
+
set value(v: any): any;
|
|
145
|
+
get data(): any;
|
|
146
|
+
set data(v: any): any;
|
|
147
|
+
set tap(v: any): any;
|
|
148
|
+
get mappings(): any[];
|
|
149
|
+
get retention(): number;
|
|
150
|
+
get animation(): import("@hatiolab/things-scene/dist-types/animation/interfaces").AnimationController | undefined;
|
|
151
|
+
get started(): boolean;
|
|
152
|
+
set started(v: boolean): any;
|
|
153
|
+
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
154
|
+
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): any;
|
|
155
|
+
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any;
|
|
156
|
+
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
157
|
+
findAnchor(name: string): any;
|
|
158
|
+
isDescendible(container: Component): any;
|
|
159
|
+
getContext(component?: unknown): any;
|
|
160
|
+
get root(): Component;
|
|
161
|
+
get rootModel(): Component;
|
|
162
|
+
get parent(): Component;
|
|
163
|
+
set parent(v: Component): any;
|
|
164
|
+
get scalable(): boolean;
|
|
165
|
+
get stuck(): boolean;
|
|
166
|
+
get capturable(): boolean;
|
|
167
|
+
get position(): string;
|
|
168
|
+
get origin(): string;
|
|
169
|
+
get offset(): import("@hatiolab/things-scene").POINT;
|
|
170
|
+
get app(): import("@hatiolab/things-scene").ApplicationContext;
|
|
171
|
+
drawEffect(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
172
|
+
prepareFill(resolve: Function, reject: Function): void;
|
|
173
|
+
prepareFillIf(condition: boolean): void;
|
|
174
|
+
onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
|
|
175
|
+
drawImage(context: import("@hatiolab/things-scene").SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
|
|
176
|
+
mutateBounds(logic: ((bounds: import("@hatiolab/things-scene").BOUNDS) => import("@hatiolab/things-scene").BOUNDS | void) | null, context?: any): void;
|
|
177
|
+
mutatePath(beforeLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, afterLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, context?: any): void;
|
|
178
|
+
access(accessor: string, data: any): any;
|
|
179
|
+
substitute(template: string, data: any): any;
|
|
180
|
+
onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
|
|
181
|
+
onchangeData(after: Record<string, any>, before: Record<string, any>): void;
|
|
182
|
+
buildMappings(): void;
|
|
183
|
+
executeMappings(force?: boolean): void;
|
|
184
|
+
disposeMappings(): void;
|
|
185
|
+
ondropfile(transfered: FileList, files: string[]): void;
|
|
186
|
+
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
187
|
+
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
188
|
+
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
189
|
+
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
190
|
+
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
195
|
+
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
196
|
+
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
197
|
+
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
198
|
+
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
199
|
+
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
200
|
+
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
201
|
+
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
202
|
+
on(name: string | object, callback: Function, context?: any): any;
|
|
203
|
+
off(name?: string | object, callback?: Function, context?: any): any;
|
|
204
|
+
once(name: string | object, callback: Function, context?: any): any;
|
|
205
|
+
trigger(name: string, ...args: any[]): any;
|
|
206
|
+
delegate_on(delegator: any): any;
|
|
207
|
+
delegate_off(delegator: any): any;
|
|
208
|
+
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
209
|
+
calculateBounds?(): void;
|
|
210
|
+
oncreate_element?(element: HTMLElement): void;
|
|
211
|
+
removeComponent(component: Component, ghost?: boolean): void;
|
|
212
|
+
addComponent(component: Component, ghost?: boolean): void;
|
|
213
|
+
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
214
|
+
getOverlay(component: Component): HTMLElement | undefined;
|
|
215
|
+
findById(id: string): Component | undefined;
|
|
216
|
+
findByRefid(ref: string | number): Component | undefined;
|
|
217
|
+
findAllById(id: string): Component[];
|
|
218
|
+
resize(): void;
|
|
219
|
+
fit(type?: string): void;
|
|
220
|
+
get components(): Component[] | undefined;
|
|
221
|
+
get layout(): any;
|
|
222
|
+
get auxOverlay(): HTMLElement | undefined;
|
|
223
|
+
get isReady(): boolean;
|
|
224
|
+
get unitScale(): number;
|
|
225
|
+
get selected(): Component[];
|
|
226
|
+
set selected(_v: Component[]): any;
|
|
227
|
+
get focused(): Component | null;
|
|
228
|
+
set focused(_v: Component | null): any;
|
|
229
|
+
get hasSameParentForAllSelected(): boolean;
|
|
230
|
+
set hasSameParentForAllSelected(_v: boolean): any;
|
|
231
|
+
get fitMode(): string | undefined;
|
|
232
|
+
set fitMode(_v: string | undefined): any;
|
|
233
|
+
get element(): HTMLElement | null;
|
|
234
|
+
set element(_v: HTMLElement | null): any;
|
|
235
|
+
}) & typeof Shape;
|
|
8
236
|
export declare class Cube extends Cube_base {
|
|
9
237
|
is3dish(): boolean;
|
|
10
238
|
buildRealObject(): RealObject | undefined;
|
package/dist/cube.js
CHANGED
|
@@ -2,9 +2,8 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
/*
|
|
3
3
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
import { RectPath, Shape, sceneComponent } from '@hatiolab/things-scene';
|
|
5
|
+
import { RectPath, Shape, sceneComponent, RealObjectMesh } from '@hatiolab/things-scene';
|
|
6
6
|
import * as THREE from 'three';
|
|
7
|
-
import { RealObjectMesh } from './threed/real-object-mesh.js';
|
|
8
7
|
const NATURE = {
|
|
9
8
|
mutable: false,
|
|
10
9
|
resizable: true,
|
package/dist/cube.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cube.js","sourceRoot":"","sources":["../src/cube.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAA8B,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"cube.js","sourceRoot":"","sources":["../src/cube.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAA8B,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAc,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAChI,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,sBAAsB;CAC7B,CAAA;AAED,MAAM,OAAO,MAAO,SAAQ,cAAc;IACxC,aAAa;QACX,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;QAE/D,IAAI,QAAQ,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QAC7C,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;QAEpC,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAA;IACnC,CAAC;CACF;AAGM,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,QAAQ,CAAC,KAAK,CAAC;IACvC,OAAO;QACL,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;QACb,OAAO,IAAI,MAAM,CAAC,IAAW,CAAC,CAAA;IAChC,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAZY,IAAI;IADhB,cAAc,CAAC,MAAM,CAAC;GACV,IAAI,CAYhB","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { Component, ComponentNature, RectPath, Shape, sceneComponent, RealObject, RealObjectMesh } from '@hatiolab/things-scene'\nimport * as THREE from 'three'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [],\n help: 'scene/component/cube'\n}\n\nexport class Cube3D extends RealObjectMesh {\n buildGeometry() {\n var { width = 0, height = 0, depth = 0 } = this.component.state\n\n let geometry = new THREE.BoxGeometry(1, 1, 1)\n geometry.scale(width, depth, height)\n\n this.object3d.geometry = geometry\n }\n}\n\n@sceneComponent('cube')\nexport class Cube extends RectPath(Shape) {\n is3dish() {\n return true\n }\n\n buildRealObject(): RealObject | undefined {\n return new Cube3D(this as any)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
package/dist/cylinder.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ComponentNature, Ellipse } from '@hatiolab/things-scene';
|
|
2
|
-
import { RealObject } from './threed/real-object.js';
|
|
3
|
-
import { RealObjectMesh } from './threed/real-object-mesh.js';
|
|
1
|
+
import { ComponentNature, Ellipse, RealObject, RealObjectMesh } from '@hatiolab/things-scene';
|
|
4
2
|
export declare class Cylinder3D extends RealObjectMesh {
|
|
5
3
|
buildGeometry(): void;
|
|
6
4
|
}
|
package/dist/cylinder.js
CHANGED
|
@@ -2,9 +2,8 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
/*
|
|
3
3
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
import { Ellipse, sceneComponent } from '@hatiolab/things-scene';
|
|
5
|
+
import { Ellipse, sceneComponent, RealObjectMesh } from '@hatiolab/things-scene';
|
|
6
6
|
import * as THREE from 'three';
|
|
7
|
-
import { RealObjectMesh } from './threed/real-object-mesh.js';
|
|
8
7
|
const NATURE = {
|
|
9
8
|
mutable: false,
|
|
10
9
|
resizable: true,
|
package/dist/cylinder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cylinder.js","sourceRoot":"","sources":["../src/cylinder.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAA8B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"cylinder.js","sourceRoot":"","sources":["../src/cylinder.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAA8B,OAAO,EAAE,cAAc,EAAc,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACxH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,0BAA0B;CACjC,CAAA;AAED,MAAM,OAAO,UAAW,SAAQ,cAAc;IAC5C,aAAa;QACX,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;QAExD,IAAI,QAAQ,GAAG,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QACtD,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;QAE7B,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAA;IACnC,CAAC;CACF;AAGM,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,OAAO;IACnC,OAAO;QACL,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;QACb,OAAO,IAAI,UAAU,CAAC,IAAW,CAAC,CAAA;IACpC,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAZY,QAAQ;IADpB,cAAc,CAAC,UAAU,CAAC;GACd,QAAQ,CAYpB","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { Component, ComponentNature, Ellipse, sceneComponent, RealObject, RealObjectMesh } from '@hatiolab/things-scene'\nimport * as THREE from 'three'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [],\n help: 'scene/component/cylinder'\n}\n\nexport class Cylinder3D extends RealObjectMesh {\n buildGeometry() {\n var { depth = 0, rx = 0, ry = 0 } = this.component.state\n\n let geometry = new THREE.CylinderGeometry(1, 1, 1, 25)\n geometry.scale(rx, depth, ry)\n\n this.object3d.geometry = geometry\n }\n}\n\n@sceneComponent('cylinder')\nexport class Cylinder extends Ellipse {\n is3dish() {\n return true\n }\n\n buildRealObject(): RealObject | undefined {\n return new Cylinder3D(this as any)\n }\n\n get nature(): ComponentNature {\n return NATURE\n }\n}\n"]}
|
package/dist/desk.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
1
|
+
import { Component, ComponentNature, Shape, RealObject } from '@hatiolab/things-scene';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
|
-
import { RealObject } from './threed/real-object.js';
|
|
4
3
|
export declare class Desk3D extends RealObject {
|
|
5
4
|
get boardThickness(): number;
|
|
6
5
|
get legThickness(): number;
|
|
@@ -9,7 +8,243 @@ export declare class Desk3D extends RealObject {
|
|
|
9
8
|
createDeskLegs(w: number, h: number, d: number): THREE.Group<THREE.Object3DEventMap>;
|
|
10
9
|
createDeskBoard(w: number, h: number): THREE.Mesh<THREE.BoxGeometry, THREE.MeshStandardMaterial, THREE.Object3DEventMap>;
|
|
11
10
|
}
|
|
12
|
-
declare const Desk_base:
|
|
11
|
+
declare const Desk_base: (new (...args: any[]) => {
|
|
12
|
+
contains(x: number, y: number): boolean;
|
|
13
|
+
get path(): {
|
|
14
|
+
x: any;
|
|
15
|
+
y: any;
|
|
16
|
+
}[];
|
|
17
|
+
set path(path: {
|
|
18
|
+
x: any;
|
|
19
|
+
y: any;
|
|
20
|
+
}[]): any;
|
|
21
|
+
get anchors(): {
|
|
22
|
+
name: string;
|
|
23
|
+
position: {
|
|
24
|
+
x: any;
|
|
25
|
+
y: any;
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
get bounds(): any;
|
|
29
|
+
set bounds(bounds: any): any;
|
|
30
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
31
|
+
_app: any;
|
|
32
|
+
_model: any;
|
|
33
|
+
_state: any;
|
|
34
|
+
_delta: any;
|
|
35
|
+
_animation: any;
|
|
36
|
+
_animate: any;
|
|
37
|
+
_parent: any;
|
|
38
|
+
_disposed: any;
|
|
39
|
+
_textHidden: any;
|
|
40
|
+
_text_substitutor: any;
|
|
41
|
+
_value_substitutor: any;
|
|
42
|
+
_mappings: any;
|
|
43
|
+
_realObject: import("@hatiolab/things-scene").IRealObject | undefined;
|
|
44
|
+
_cachedState: any;
|
|
45
|
+
updatedAt: any;
|
|
46
|
+
fontSize: any;
|
|
47
|
+
__cache__: any;
|
|
48
|
+
created(): void;
|
|
49
|
+
added(parent: any): void;
|
|
50
|
+
removed(parent: any): void;
|
|
51
|
+
ready(): Promise<void>;
|
|
52
|
+
touch(): void;
|
|
53
|
+
clearCache(...attrs: any[]): void;
|
|
54
|
+
removeSelf(completely: any): void;
|
|
55
|
+
resetAnimation(): void;
|
|
56
|
+
dispose(): void;
|
|
57
|
+
get nature(): import("@hatiolab/things-scene").ComponentNature;
|
|
58
|
+
get disposed(): boolean;
|
|
59
|
+
isLayer(): boolean;
|
|
60
|
+
isGroup(): boolean;
|
|
61
|
+
isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
|
|
62
|
+
isLine(): boolean;
|
|
63
|
+
isRoot(): boolean;
|
|
64
|
+
isRootModel(): boolean;
|
|
65
|
+
is3dish(): boolean;
|
|
66
|
+
get is3dMode(): boolean;
|
|
67
|
+
isIn3DSpace(): boolean;
|
|
68
|
+
isTemplate(): boolean;
|
|
69
|
+
isHTMLElement(): boolean;
|
|
70
|
+
isConnectable(): boolean;
|
|
71
|
+
isIdentifiable(): boolean;
|
|
72
|
+
isPositionable(): boolean;
|
|
73
|
+
replaceRefids(replaceMap: any): void;
|
|
74
|
+
get(property: any): any;
|
|
75
|
+
set(props: any, propval?: any): any;
|
|
76
|
+
getState(property: any): any;
|
|
77
|
+
setState(props: any, propval?: any): any;
|
|
78
|
+
get model(): any;
|
|
79
|
+
get state(): any;
|
|
80
|
+
get hierarchy(): any;
|
|
81
|
+
get volatile(): never[];
|
|
82
|
+
_applyProps(target: any, props: any, options: any): any;
|
|
83
|
+
move(offset: {
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
86
|
+
}, ...args: boolean[]): void;
|
|
87
|
+
symmetryX(x?: number): void;
|
|
88
|
+
symmetryY(y: number): void;
|
|
89
|
+
adjustResize(bounds: import("@hatiolab/things-scene").BOUNDS, origin_bounds: import("@hatiolab/things-scene").BOUNDS, diagonal: boolean): {
|
|
90
|
+
left: any;
|
|
91
|
+
top: any;
|
|
92
|
+
width: any;
|
|
93
|
+
height: any;
|
|
94
|
+
};
|
|
95
|
+
adjustRotation(rotation: number, step: boolean): number;
|
|
96
|
+
outline(progress: number): any;
|
|
97
|
+
get center(): import("@hatiolab/things-scene").POINT;
|
|
98
|
+
set center(p: import("@hatiolab/things-scene").POINT): any;
|
|
99
|
+
get location(): import("@hatiolab/things-scene").POINT;
|
|
100
|
+
set location(l: import("@hatiolab/things-scene").POINT): any;
|
|
101
|
+
get rotate(): import("@hatiolab/things-scene").POINT;
|
|
102
|
+
set rotate(r: import("@hatiolab/things-scene").POINT): any;
|
|
103
|
+
get dimension(): import("@hatiolab/things-scene").DIMENSION;
|
|
104
|
+
set dimension(d: import("@hatiolab/things-scene").DIMENSION): any;
|
|
105
|
+
get drawPath(): import("@hatiolab/things-scene").POINT[];
|
|
106
|
+
get rotatePoint(): import("@hatiolab/things-scene").POINT;
|
|
107
|
+
get mutable(): boolean;
|
|
108
|
+
get resizable(): boolean;
|
|
109
|
+
get rotatable(): boolean;
|
|
110
|
+
buildRealObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
111
|
+
get realObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
112
|
+
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
113
|
+
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
114
|
+
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
115
|
+
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
116
|
+
prepareIf(condition: boolean): void;
|
|
117
|
+
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
118
|
+
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
119
|
+
drawFill(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
120
|
+
get strokeStyle(): any;
|
|
121
|
+
set strokeStyle(v: any): any;
|
|
122
|
+
get fillStyle(): any;
|
|
123
|
+
set fillStyle(v: any): any;
|
|
124
|
+
get fontColor(): string;
|
|
125
|
+
set fontColor(v: string): any;
|
|
126
|
+
get rotation(): number;
|
|
127
|
+
set rotation(v: number): any;
|
|
128
|
+
get decorators(): string[];
|
|
129
|
+
get decotag(): string;
|
|
130
|
+
get hidden(): boolean;
|
|
131
|
+
set hidden(v: boolean): any;
|
|
132
|
+
get tag(): string;
|
|
133
|
+
set tag(v: string): any;
|
|
134
|
+
get appendum(): any;
|
|
135
|
+
set appendum(v: any): any;
|
|
136
|
+
defaultTextSubstitutor(): string;
|
|
137
|
+
textLines(context?: import("@hatiolab/things-scene").SceneRenderContext): any[][];
|
|
138
|
+
get font(): string;
|
|
139
|
+
get lineHeight(): number;
|
|
140
|
+
get textSubstitutor(): () => string;
|
|
141
|
+
get text(): string;
|
|
142
|
+
set text(v: string): any;
|
|
143
|
+
get textBounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
144
|
+
get textRotation(): number;
|
|
145
|
+
get textHidden(): boolean;
|
|
146
|
+
set textHidden(v: boolean): any;
|
|
147
|
+
get hasTextProperty(): boolean;
|
|
148
|
+
animate(opts: import("@hatiolab/things-scene").AnimationConfig): any;
|
|
149
|
+
effect(context: import("@hatiolab/things-scene").SceneRenderContext, model: any): void;
|
|
150
|
+
serialize(...others: any[]): string;
|
|
151
|
+
trim(): void;
|
|
152
|
+
closeScene(data: any): void;
|
|
153
|
+
delta(attr?: string | object, value?: any): any;
|
|
154
|
+
invalidate(): void;
|
|
155
|
+
get value(): any;
|
|
156
|
+
set value(v: any): any;
|
|
157
|
+
get data(): any;
|
|
158
|
+
set data(v: any): any;
|
|
159
|
+
set tap(v: any): any;
|
|
160
|
+
get mappings(): any[];
|
|
161
|
+
get retention(): number;
|
|
162
|
+
get animation(): import("@hatiolab/things-scene").AnimationController | undefined;
|
|
163
|
+
get started(): boolean;
|
|
164
|
+
set started(v: boolean): any;
|
|
165
|
+
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
166
|
+
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
167
|
+
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
168
|
+
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
169
|
+
findAnchor(name: string): any;
|
|
170
|
+
isDescendible(container: Component): boolean;
|
|
171
|
+
getContext(component?: unknown): any;
|
|
172
|
+
get root(): Component;
|
|
173
|
+
get rootModel(): Component;
|
|
174
|
+
get parent(): Component;
|
|
175
|
+
set parent(v: Component): any;
|
|
176
|
+
get scalable(): boolean;
|
|
177
|
+
get stuck(): boolean;
|
|
178
|
+
get capturable(): boolean;
|
|
179
|
+
get position(): string;
|
|
180
|
+
get origin(): string;
|
|
181
|
+
get offset(): import("@hatiolab/things-scene").POINT;
|
|
182
|
+
get app(): import("@hatiolab/things-scene").ApplicationContext;
|
|
183
|
+
drawEffect(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
184
|
+
prepareFill(resolve: Function, reject: Function): void;
|
|
185
|
+
prepareFillIf(condition: boolean): void;
|
|
186
|
+
onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
|
|
187
|
+
drawImage(context: import("@hatiolab/things-scene").SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
|
|
188
|
+
mutateBounds(logic: ((bounds: import("@hatiolab/things-scene").BOUNDS) => import("@hatiolab/things-scene").BOUNDS | void) | null, context?: any): void;
|
|
189
|
+
mutatePath(beforeLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, afterLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, context?: any): void;
|
|
190
|
+
access(accessor: string): any;
|
|
191
|
+
substitute(template: string, data: any): string | undefined;
|
|
192
|
+
onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
|
|
193
|
+
onchangeData(after: Record<string, any>, before: Record<string, any>): void;
|
|
194
|
+
buildMappings(): void;
|
|
195
|
+
executeMappings(force?: boolean): void;
|
|
196
|
+
disposeMappings(): void;
|
|
197
|
+
ondropfile(transfered: FileList, files: string[]): void;
|
|
198
|
+
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
199
|
+
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
200
|
+
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
201
|
+
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
202
|
+
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
203
|
+
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
204
|
+
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
205
|
+
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
206
|
+
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
207
|
+
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
208
|
+
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
209
|
+
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
210
|
+
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
211
|
+
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
212
|
+
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
213
|
+
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
214
|
+
on(name: string | object, callback: Function, context?: any): any;
|
|
215
|
+
off(name?: string | object, callback?: Function, context?: any): any;
|
|
216
|
+
once(name: string | object, callback: Function, context?: any): any;
|
|
217
|
+
trigger(name: string, ...args: any[]): any;
|
|
218
|
+
delegate_on(delegator: any): any;
|
|
219
|
+
delegate_off(delegator: any): any;
|
|
220
|
+
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
221
|
+
calculateBounds?(): void;
|
|
222
|
+
oncreate_element?(element: HTMLElement): void;
|
|
223
|
+
removeComponent(component: Component, ghost?: boolean): void;
|
|
224
|
+
addComponent(component: Component, ghost?: boolean): void;
|
|
225
|
+
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
226
|
+
getOverlay(component: Component): HTMLElement | undefined;
|
|
227
|
+
findById(id: string): Component | undefined;
|
|
228
|
+
findByRefid(ref: string | number): Component | undefined;
|
|
229
|
+
findAllById(id: string): Component[];
|
|
230
|
+
resize(): void;
|
|
231
|
+
fit(type?: string): void;
|
|
232
|
+
get components(): Component[] | undefined;
|
|
233
|
+
get layout(): any;
|
|
234
|
+
get auxOverlay(): HTMLElement | undefined;
|
|
235
|
+
get isReady(): boolean;
|
|
236
|
+
get unitScale(): number;
|
|
237
|
+
get selected(): Component[];
|
|
238
|
+
set selected(_v: Component[]): any;
|
|
239
|
+
get focused(): Component | null;
|
|
240
|
+
set focused(_v: Component | null): any;
|
|
241
|
+
get hasSameParentForAllSelected(): boolean;
|
|
242
|
+
set hasSameParentForAllSelected(_v: boolean): any;
|
|
243
|
+
get fitMode(): string | undefined;
|
|
244
|
+
set fitMode(_v: string | undefined): any;
|
|
245
|
+
get element(): HTMLElement | null;
|
|
246
|
+
set element(_v: HTMLElement | null): any;
|
|
247
|
+
}) & typeof Shape;
|
|
13
248
|
export declare class Desk extends Desk_base {
|
|
14
249
|
is3dish(): boolean;
|
|
15
250
|
buildRealObject(): RealObject | undefined;
|
package/dist/desk.js
CHANGED
|
@@ -2,9 +2,8 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
/*
|
|
3
3
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
import { RectPath, Shape, sceneComponent } from '@hatiolab/things-scene';
|
|
5
|
+
import { RectPath, Shape, sceneComponent, RealObject } from '@hatiolab/things-scene';
|
|
6
6
|
import * as THREE from 'three';
|
|
7
|
-
import { RealObject } from './threed/real-object.js';
|
|
8
7
|
const NATURE = {
|
|
9
8
|
mutable: false,
|
|
10
9
|
resizable: true,
|
package/dist/desk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desk.js","sourceRoot":"","sources":["../src/desk.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAA8B,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"desk.js","sourceRoot":"","sources":["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aAAa,GAAG,IAAI,KAAK,CAAC,oBAAoB,CAAC;YACjD,KAAK,EAAE,SAAS,IAAI,SAAS;SAC9B,CAAC,CAAA;QACF,IAAI,aAAa,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACxD,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,CAAA;QAExD,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAGM,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,QAAQ,CAAC,KAAK,CAAC;IACvC,OAAO;QACL,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;QACb,OAAO,IAAI,MAAM,CAAC,IAAW,CAAC,CAAA;IAChC,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAZY,IAAI;IADhB,cAAc,CAAC,MAAM,CAAC;GACV,IAAI,CAYhB","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { Component, ComponentNature, RectPath, Shape, sceneComponent, RealObject } from '@hatiolab/things-scene'\nimport * as THREE from 'three'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'color',\n label: 'leg-color',\n name: 'legColor',\n property: 'legColor'\n }\n ],\n help: 'scene/component/desk'\n}\n\nexport class Desk3D extends RealObject {\n get boardThickness() {\n var { depth } = this.component.state\n\n return Math.min(10, depth / 10)\n }\n\n get legThickness() {\n var { width, height } = this.component.state\n\n var min = Math.min(width, height)\n\n return Math.min(10, min / 10)\n }\n\n get margin() {\n return Math.min(this.legThickness / 5, 2)\n }\n\n build() {\n super.build()\n\n var { width, height, depth } = this.component.state\n\n var top = (depth - this.boardThickness) / 2\n\n var legs = this.createDeskLegs(width, height, depth)\n legs.position.set(0, -this.boardThickness / 2, 0)\n legs.castShadow = true\n\n this.object3d.add(legs)\n\n let board = this.createDeskBoard(width, height)\n board.position.set(0, top, 0)\n board.rotation.x = Math.PI / 2\n board.castShadow = true\n\n this.object3d.add(board)\n }\n\n createDeskLegs(w: number, h: number, d: number) {\n var { legColor } = this.component.state\n\n var legThickness = this.legThickness\n var margin = this.margin\n d -= this.boardThickness\n\n var legs = new THREE.Group()\n\n var posX = w / 2 - legThickness / 2 - margin\n var posY = h / 2 - legThickness / 2 - margin\n var posZ = 0\n\n for (var i = 0; i < 4; i++) {\n var geometry = new THREE.BoxGeometry(legThickness, d, legThickness)\n var material = new THREE.MeshStandardMaterial({\n color: legColor || '#252525'\n })\n\n var leg = new THREE.Mesh(geometry, material)\n leg.castShadow = true\n\n switch (i) {\n case 0:\n leg.position.set(posX, posZ, posY)\n break\n case 1:\n leg.position.set(posX, posZ, -posY)\n break\n case 2:\n leg.position.set(-posX, posZ, posY)\n break\n case 3:\n leg.position.set(-posX, posZ, -posY)\n break\n }\n\n legs.add(leg)\n }\n\n return legs\n }\n\n createDeskBoard(w: number, h: number) {\n var { fillStyle } = this.component.state\n\n var d = 10\n\n var boardMaterial = new THREE.MeshStandardMaterial({\n color: fillStyle || '#ccaa76'\n })\n var boardGeometry = new THREE.BoxGeometry(w, h, d, 1, 1)\n var board = new THREE.Mesh(boardGeometry, boardMaterial)\n\n return board\n }\n}\n\n@sceneComponent('desk')\nexport class Desk extends RectPath(Shape) {\n is3dish() {\n return true\n }\n\n buildRealObject(): RealObject | undefined {\n return new Desk3D(this as any)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
package/dist/editors/index.d.ts
CHANGED
package/dist/editors/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './property-editor-location-increase-pattern.js';
|
|
2
2
|
import './property-editor-gltf-info.js';
|
|
3
|
+
import './property-editor-gltf-fill-targets.js';
|
|
3
4
|
export default [
|
|
4
5
|
{
|
|
5
6
|
type: 'location-increase-pattern',
|
|
@@ -8,6 +9,10 @@ export default [
|
|
|
8
9
|
{
|
|
9
10
|
type: 'gltf-info',
|
|
10
11
|
element: 'property-editor-gltf-info'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
type: 'gltf-fill-targets',
|
|
15
|
+
element: 'property-editor-gltf-fill-targets'
|
|
11
16
|
}
|
|
12
17
|
];
|
|
13
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editors/index.ts"],"names":[],"mappings":"AAAA,OAAO,gDAAgD,CAAA;AACvD,OAAO,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editors/index.ts"],"names":[],"mappings":"AAAA,OAAO,gDAAgD,CAAA;AACvD,OAAO,gCAAgC,CAAA;AACvC,OAAO,wCAAwC,CAAA;AAE/C,eAAe;IACb;QACE,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE,2CAA2C;KACrD;IACD;QACE,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,2BAA2B;KACrC;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,mCAAmC;KAC7C;CACF,CAAA","sourcesContent":["import './property-editor-location-increase-pattern.js'\nimport './property-editor-gltf-info.js'\nimport './property-editor-gltf-fill-targets.js'\n\nexport default [\n {\n type: 'location-increase-pattern',\n element: 'property-editor-location-increase-pattern'\n },\n {\n type: 'gltf-info',\n element: 'property-editor-gltf-info'\n },\n {\n type: 'gltf-fill-targets',\n element: 'property-editor-gltf-fill-targets'\n }\n]\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import '@operato/i18n/ox-i18n.js';
|
|
2
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
3
|
+
import { OxPropertyEditor, PropertySpec } from '@operato/property-editor';
|
|
4
|
+
export default class GLTFFillTargetsEditor extends OxPropertyEditor {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
src?: string;
|
|
7
|
+
private _meshNames;
|
|
8
|
+
private _component;
|
|
9
|
+
updated(changes: PropertyValues<this>): void;
|
|
10
|
+
private _refreshMeshNames;
|
|
11
|
+
editorTemplate(value: any, _spec: PropertySpec): TemplateResult;
|
|
12
|
+
private _setAll;
|
|
13
|
+
private _onToggle;
|
|
14
|
+
private _highlightNode;
|
|
15
|
+
private _clearHighlight;
|
|
16
|
+
private _getRendererManager;
|
|
17
|
+
}
|