@operato/scene-visualizer 10.0.0-beta.1 → 10.0.0-beta.3
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/editors/property-editor-gltf-info.d.ts +8 -1
- package/dist/editors/property-editor-gltf-info.js +80 -24
- package/dist/editors/property-editor-gltf-info.js.map +1 -1
- package/package.json +2 -2
- package/dist/banner.d.ts +0 -244
- package/dist/banner.js +0 -75
- package/dist/banner.js.map +0 -1
- package/dist/camera.d.ts +0 -249
- package/dist/camera.js +0 -107
- package/dist/camera.js.map +0 -1
- package/dist/cube.d.ts +0 -241
- package/dist/cube.js +0 -37
- package/dist/cube.js.map +0 -1
- package/dist/cylinder.d.ts +0 -9
- package/dist/cylinder.js +0 -37
- package/dist/cylinder.js.map +0 -1
- package/dist/ellipse.d.ts +0 -5
- package/dist/ellipse.js +0 -20
- package/dist/ellipse.js.map +0 -1
- package/dist/gltf-object.d.ts +0 -249
- package/dist/gltf-object.js +0 -103
- package/dist/gltf-object.js.map +0 -1
- package/dist/html-overlay-element.d.ts +0 -1
- package/dist/html-overlay-element.js +0 -8
- package/dist/html-overlay-element.js.map +0 -1
- package/dist/light.d.ts +0 -14
- package/dist/light.js +0 -134
- package/dist/light.js.map +0 -1
- package/dist/polygon.d.ts +0 -17
- package/dist/polygon.js +0 -62
- package/dist/polygon.js.map +0 -1
- package/dist/rect.d.ts +0 -5
- package/dist/rect.js +0 -34
- package/dist/rect.js.map +0 -1
- package/dist/scene/component.d.ts +0 -1
- package/dist/scene/component.js +0 -29
- package/dist/scene/component.js.map +0 -1
- package/dist/sphere.d.ts +0 -9
- package/dist/sphere.js +0 -37
- package/dist/sphere.js.map +0 -1
- package/dist/sprite.d.ts +0 -238
- package/dist/sprite.js +0 -27
- package/dist/sprite.js.map +0 -1
- package/dist/text.d.ts +0 -1
- package/dist/text.js +0 -7
- package/dist/text.js.map +0 -1
- package/dist/three-container-editor.d.ts +0 -22
- package/dist/three-container-editor.js +0 -132
- package/dist/three-container-editor.js.map +0 -1
- package/dist/three-container.d.ts +0 -61
- package/dist/three-container.js +0 -371
- package/dist/three-container.js.map +0 -1
- package/dist/three-controls.d.ts +0 -111
- package/dist/three-controls.js +0 -414
- package/dist/three-controls.js.map +0 -1
- package/dist/three-layout.d.ts +0 -8
- package/dist/three-layout.js +0 -20
- package/dist/three-layout.js.map +0 -1
- package/dist/three-space.d.ts +0 -8
- package/dist/three-space.js +0 -58
- package/dist/three-space.js.map +0 -1
- package/dist/threed/common.d.ts +0 -22
- package/dist/threed/common.js +0 -19
- package/dist/threed/common.js.map +0 -1
- package/dist/threed/floor/floor.d.ts +0 -3
- package/dist/threed/floor/floor.js +0 -51
- package/dist/threed/floor/floor.js.map +0 -1
- package/dist/threed/html/elements.d.ts +0 -2
- package/dist/threed/html/elements.js +0 -21
- package/dist/threed/html/elements.js.map +0 -1
- package/dist/threed/index.d.ts +0 -16
- package/dist/threed/index.js +0 -17
- package/dist/threed/index.js.map +0 -1
- package/dist/threed/interfaces.d.ts +0 -15
- package/dist/threed/interfaces.js +0 -5
- package/dist/threed/interfaces.js.map +0 -1
- package/dist/threed/managers/camera-manager.d.ts +0 -14
- package/dist/threed/managers/camera-manager.js +0 -60
- package/dist/threed/managers/camera-manager.js.map +0 -1
- package/dist/threed/managers/controls-manager.d.ts +0 -50
- package/dist/threed/managers/controls-manager.js +0 -249
- package/dist/threed/managers/controls-manager.js.map +0 -1
- package/dist/threed/managers/event-manager3d.d.ts +0 -19
- package/dist/threed/managers/event-manager3d.js +0 -76
- package/dist/threed/managers/event-manager3d.js.map +0 -1
- package/dist/threed/managers/index.d.ts +0 -7
- package/dist/threed/managers/index.js +0 -7
- package/dist/threed/managers/index.js.map +0 -1
- package/dist/threed/managers/light-manager.d.ts +0 -7
- package/dist/threed/managers/light-manager.js +0 -37
- package/dist/threed/managers/light-manager.js.map +0 -1
- package/dist/threed/managers/renderer-manager.d.ts +0 -30
- package/dist/threed/managers/renderer-manager.js +0 -120
- package/dist/threed/managers/renderer-manager.js.map +0 -1
- package/dist/threed/managers/scene-manager.d.ts +0 -15
- package/dist/threed/managers/scene-manager.js +0 -48
- package/dist/threed/managers/scene-manager.js.map +0 -1
- package/dist/threed/managers/types.d.ts +0 -36
- package/dist/threed/managers/types.js +0 -2
- package/dist/threed/managers/types.js.map +0 -1
- package/dist/threed/real-object-camera-meshed.d.ts +0 -12
- package/dist/threed/real-object-camera-meshed.js +0 -49
- package/dist/threed/real-object-camera-meshed.js.map +0 -1
- package/dist/threed/real-object-camera.d.ts +0 -9
- package/dist/threed/real-object-camera.js +0 -31
- package/dist/threed/real-object-camera.js.map +0 -1
- package/dist/threed/real-object-dom-element.d.ts +0 -9
- package/dist/threed/real-object-dom-element.js +0 -48
- package/dist/threed/real-object-dom-element.js.map +0 -1
- package/dist/threed/real-object-dummy.d.ts +0 -6
- package/dist/threed/real-object-dummy.js +0 -11
- package/dist/threed/real-object-dummy.js.map +0 -1
- package/dist/threed/real-object-extrude.d.ts +0 -22
- package/dist/threed/real-object-extrude.js +0 -180
- package/dist/threed/real-object-extrude.js.map +0 -1
- package/dist/threed/real-object-gltf.d.ts +0 -16
- package/dist/threed/real-object-gltf.js +0 -105
- package/dist/threed/real-object-gltf.js.map +0 -1
- package/dist/threed/real-object-group.d.ts +0 -5
- package/dist/threed/real-object-group.js +0 -11
- package/dist/threed/real-object-group.js.map +0 -1
- package/dist/threed/real-object-mesh.d.ts +0 -13
- package/dist/threed/real-object-mesh.js +0 -73
- package/dist/threed/real-object-mesh.js.map +0 -1
- package/dist/threed/real-object-plane.d.ts +0 -5
- package/dist/threed/real-object-plane.js +0 -22
- package/dist/threed/real-object-plane.js.map +0 -1
- package/dist/threed/real-object-registry.d.ts +0 -7
- package/dist/threed/real-object-registry.js +0 -32
- package/dist/threed/real-object-registry.js.map +0 -1
- package/dist/threed/real-object-scene.d.ts +0 -21
- package/dist/threed/real-object-scene.js +0 -72
- package/dist/threed/real-object-scene.js.map +0 -1
- package/dist/threed/real-object-sprite-2d.d.ts +0 -14
- package/dist/threed/real-object-sprite-2d.js +0 -45
- package/dist/threed/real-object-sprite-2d.js.map +0 -1
- package/dist/threed/real-object-sprite.d.ts +0 -11
- package/dist/threed/real-object-sprite.js +0 -52
- package/dist/threed/real-object-sprite.js.map +0 -1
- package/dist/threed/real-object-text.d.ts +0 -15
- package/dist/threed/real-object-text.js +0 -66
- package/dist/threed/real-object-text.js.map +0 -1
- package/dist/threed/real-object.d.ts +0 -65
- package/dist/threed/real-object.js +0 -251
- package/dist/threed/real-object.js.map +0 -1
- package/dist/threed/texture/canvas-texture.d.ts +0 -4
- package/dist/threed/texture/canvas-texture.js +0 -49
- package/dist/threed/texture/canvas-texture.js.map +0 -1
- package/dist/threed/texture/text-texture.d.ts +0 -8
- package/dist/threed/texture/text-texture.js +0 -79
- package/dist/threed/texture/text-texture.js.map +0 -1
- package/dist/threed/three-dimensional-container.d.ts +0 -7
- package/dist/threed/three-dimensional-container.js +0 -2
- package/dist/threed/three-dimensional-container.js.map +0 -1
- package/dist/threed/utils/bound-uv-generator.d.ts +0 -16
- package/dist/threed/utils/bound-uv-generator.js +0 -42
- package/dist/threed/utils/bound-uv-generator.js.map +0 -1
- package/dist/threed/utils/dispose.d.ts +0 -2
- package/dist/threed/utils/dispose.js +0 -32
- package/dist/threed/utils/dispose.js.map +0 -1
- package/dist/wall.d.ts +0 -241
- package/dist/wall.js +0 -44
- package/dist/wall.js.map +0 -1
package/dist/polygon.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { RealObjectExtrude } from './threed/real-object-extrude.js';
|
|
6
|
-
import { registerRealObjectFactory } from './threed/real-object-registry.js';
|
|
7
|
-
export class PolygonExtrude extends RealObjectExtrude {
|
|
8
|
-
get shape() {
|
|
9
|
-
var { path = [], round = 0 } = this.component.state;
|
|
10
|
-
var shape = new THREE.Shape();
|
|
11
|
-
for (var i = 0; i < path.length; i++) {
|
|
12
|
-
const prev = path[(i - 1 + path.length) % path.length];
|
|
13
|
-
const cursor = path[(i + path.length) % path.length];
|
|
14
|
-
const next = path[(i + 1) % path.length];
|
|
15
|
-
if (prev.x === cursor.x && prev.y === cursor.y) {
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
var length = Math.sqrt((prev.x - cursor.x) * (prev.x - cursor.x) + (prev.y - cursor.y) * (prev.y - cursor.y));
|
|
19
|
-
var theta = length !== 0 ? Math.atan2(prev.x - cursor.x, prev.y - cursor.y) : 0;
|
|
20
|
-
var x = Math.sin(theta) * Math.min(round, length / 2) + cursor.x;
|
|
21
|
-
var y = Math.cos(theta) * Math.min(round, length / 2) + cursor.y;
|
|
22
|
-
const p1 = round > 0 || length !== 0 ? { x, y } : cursor;
|
|
23
|
-
var length = Math.sqrt((next.x - cursor.x) * (next.x - cursor.x) + (next.y - cursor.y) * (next.y - cursor.y));
|
|
24
|
-
theta = length !== 0 ? Math.atan2(next.x - cursor.x, next.y - cursor.y) : 0;
|
|
25
|
-
x = Math.sin(theta) * Math.min(round, length / 2) + cursor.x;
|
|
26
|
-
y = Math.cos(theta) * Math.min(round, length / 2) + cursor.y;
|
|
27
|
-
const p2 = round > 0 || length !== 0 ? { x, y } : cursor;
|
|
28
|
-
i == 0 ? shape.moveTo(p1.x, p1.y) : shape.lineTo(p1.x, p1.y);
|
|
29
|
-
round > 0 && shape.quadraticCurveTo(cursor.x, cursor.y, p2.x, p2.y);
|
|
30
|
-
}
|
|
31
|
-
return shape;
|
|
32
|
-
}
|
|
33
|
-
get minMax() {
|
|
34
|
-
if (!this._minMax) {
|
|
35
|
-
var { path } = this.component.state;
|
|
36
|
-
var minX;
|
|
37
|
-
var minY;
|
|
38
|
-
var maxX;
|
|
39
|
-
var maxY;
|
|
40
|
-
path.forEach((p, i) => {
|
|
41
|
-
if (i == 0) {
|
|
42
|
-
minX = maxX = p.x;
|
|
43
|
-
minY = maxY = p.y;
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
minX = Math.min(minX, p.x);
|
|
47
|
-
maxX = Math.max(maxX, p.x);
|
|
48
|
-
minY = Math.min(minY, p.y);
|
|
49
|
-
maxY = Math.max(maxY, p.y);
|
|
50
|
-
});
|
|
51
|
-
this._minMax = {
|
|
52
|
-
minX,
|
|
53
|
-
minY,
|
|
54
|
-
maxX,
|
|
55
|
-
maxY
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
return this._minMax;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
registerRealObjectFactory('polygon', (component) => new PolygonExtrude(component));
|
|
62
|
-
//# sourceMappingURL=polygon.js.map
|
package/dist/polygon.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"polygon.js","sourceRoot":"","sources":["../src/polygon.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,MAAM,OAAO,cAAe,SAAQ,iBAAiB;IAQnD,IAAI,KAAK;QACP,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;QAEnD,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,CAAA;QAE7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAA;YACtD,MAAM,MAAM,GA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AC,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { POINT } from '@hatiolab/things-scene'\nimport * as THREE from 'three'\nimport { RealObjectExtrude } from './threed/real-object-extrude.js'\nimport { registerRealObjectFactory } from './threed/real-object-registry.js'\n\nexport class PolygonExtrude extends RealObjectExtrude {\n _minMax?: {\n minX?: number\n minY?: number\n maxX?: number\n maxY?: number\n }\n\n get shape() {\n var { path = [], round = 0 } = this.component.state\n\n var shape = new THREE.Shape()\n\n for (var i = 0; i < path.length; i++) {\n const prev = path[(i - 1 + path.length) % path.length]\n const cursor = path[(i + path.length) % path.length]\n const next = path[(i + 1) % path.length]\n\n if (prev.x === cursor.x && prev.y === cursor.y) {\n continue\n }\n\n var length = Math.sqrt((prev.x - cursor.x) * (prev.x - cursor.x) + (prev.y - cursor.y) * (prev.y - cursor.y))\n var theta = length !== 0 ? Math.atan2(prev.x - cursor.x, prev.y - cursor.y) : 0\n var x = Math.sin(theta) * Math.min(round, length / 2) + cursor.x\n var y = Math.cos(theta) * Math.min(round, length / 2) + cursor.y\n\n const p1 = round > 0 || length !== 0 ? { x, y } : cursor\n\n var length = Math.sqrt((next.x - cursor.x) * (next.x - cursor.x) + (next.y - cursor.y) * (next.y - cursor.y))\n theta = length !== 0 ? Math.atan2(next.x - cursor.x, next.y - cursor.y) : 0\n x = Math.sin(theta) * Math.min(round, length / 2) + cursor.x\n y = Math.cos(theta) * Math.min(round, length / 2) + cursor.y\n\n const p2 = round > 0 || length !== 0 ? { x, y } : cursor\n\n i == 0 ? shape.moveTo(p1.x, p1.y) : shape.lineTo(p1.x, p1.y)\n round > 0 && shape.quadraticCurveTo(cursor.x, cursor.y, p2.x, p2.y)\n }\n\n return shape\n }\n\n get minMax() {\n if (!this._minMax) {\n var { path } = this.component.state\n\n var minX: number | undefined\n var minY: number | undefined\n var maxX: number | undefined\n var maxY: number | undefined\n\n path.forEach((p: POINT, i: number) => {\n if (i == 0) {\n minX = maxX = p.x\n minY = maxY = p.y\n return\n }\n\n minX = Math.min(minX!, p.x)\n maxX = Math.max(maxX!, p.x)\n minY = Math.min(minY!, p.y)\n maxY = Math.max(maxY!, p.y)\n })\n\n this._minMax = {\n minX,\n minY,\n maxX,\n maxY\n }\n }\n\n return this._minMax\n }\n}\n\nregisterRealObjectFactory('polygon', (component) => new PolygonExtrude(component))\n"]}
|
package/dist/rect.d.ts
DELETED
package/dist/rect.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { RealObjectExtrude } from './threed/real-object-extrude.js';
|
|
6
|
-
import { registerRealObjectFactory } from './threed/real-object-registry.js';
|
|
7
|
-
export class RectExtrude extends RealObjectExtrude {
|
|
8
|
-
get shape() {
|
|
9
|
-
var { width, height, round } = this.component.state;
|
|
10
|
-
var shape = new THREE.Shape();
|
|
11
|
-
if (round > 0) {
|
|
12
|
-
var radius = (round / 100) * (width / 2);
|
|
13
|
-
shape.moveTo(radius, 0);
|
|
14
|
-
shape.lineTo(width - radius, 0);
|
|
15
|
-
shape.quadraticCurveTo(width, 0, width, radius);
|
|
16
|
-
shape.lineTo(width, height - radius);
|
|
17
|
-
shape.quadraticCurveTo(width, height, width - radius, height);
|
|
18
|
-
shape.lineTo(radius, height);
|
|
19
|
-
shape.quadraticCurveTo(0, height, 0, height - radius);
|
|
20
|
-
shape.lineTo(0, radius);
|
|
21
|
-
shape.quadraticCurveTo(0, 0, radius, 0);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
shape.moveTo(0, 0);
|
|
25
|
-
shape.lineTo(width, 0);
|
|
26
|
-
shape.lineTo(width, height);
|
|
27
|
-
shape.lineTo(0, height);
|
|
28
|
-
shape.lineTo(0, 0);
|
|
29
|
-
}
|
|
30
|
-
return shape;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
registerRealObjectFactory('rect', (component) => new RectExtrude(component));
|
|
34
|
-
//# sourceMappingURL=rect.js.map
|
package/dist/rect.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rect.js","sourceRoot":"","sources":["../src/rect.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAChD,IAAI,KAAK;QACP,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;QACnD,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,CAAA;QAE7B,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,IAAI,MAAM,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;YAExC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACvB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,EAAE,CAAC,CAAC,CAAA;YAC/B,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;YAC/C,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;YACpC,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,MAAM,EAAE,MAAM,CAAC,CAAA;YAC7D,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;YAC5B,KAAK,CAAC,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;YACrD,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;YACvB,KAAK,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;QACzC,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;YAClB,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtB,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;YAC3B,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;YACvB,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACpB,CAAC;QAED,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAED,yBAAyB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,WAAW,CAAC,SAAS,CAAC,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport * as THREE from 'three'\nimport { RealObjectExtrude } from './threed/real-object-extrude.js'\nimport { registerRealObjectFactory } from './threed/real-object-registry.js'\n\nexport class RectExtrude extends RealObjectExtrude {\n get shape() {\n var { width, height, round } = this.component.state\n var shape = new THREE.Shape()\n\n if (round > 0) {\n var radius = (round / 100) * (width / 2)\n\n shape.moveTo(radius, 0)\n shape.lineTo(width - radius, 0)\n shape.quadraticCurveTo(width, 0, width, radius)\n shape.lineTo(width, height - radius)\n shape.quadraticCurveTo(width, height, width - radius, height)\n shape.lineTo(radius, height)\n shape.quadraticCurveTo(0, height, 0, height - radius)\n shape.lineTo(0, radius)\n shape.quadraticCurveTo(0, 0, radius, 0)\n } else {\n shape.moveTo(0, 0)\n shape.lineTo(width, 0)\n shape.lineTo(width, height)\n shape.lineTo(0, height)\n shape.lineTo(0, 0)\n }\n\n return shape\n }\n}\n\nregisterRealObjectFactory('rect', (component) => new RectExtrude(component))\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/scene/component.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Component } from '@hatiolab/things-scene';
|
|
2
|
-
import { RealObjectSprite2D } from '../threed/real-object-sprite-2d.js';
|
|
3
|
-
Component.prototype.buildRealObject = function () {
|
|
4
|
-
return new RealObjectSprite2D(this);
|
|
5
|
-
};
|
|
6
|
-
Component.prototype.is3dish = function () {
|
|
7
|
-
return true;
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(Component.prototype, 'realObject', {
|
|
10
|
-
get: function () {
|
|
11
|
-
if (!this.disposed && !this._realObject) {
|
|
12
|
-
this._realObject = this.buildRealObject();
|
|
13
|
-
if (!this._realObject) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
this._realObject.update();
|
|
17
|
-
this._realObject.updateTransform();
|
|
18
|
-
}
|
|
19
|
-
return this._realObject;
|
|
20
|
-
},
|
|
21
|
-
enumerable: false,
|
|
22
|
-
configurable: false
|
|
23
|
-
});
|
|
24
|
-
var oldDispose = Component.prototype.dispose;
|
|
25
|
-
Component.prototype.dispose = function () {
|
|
26
|
-
oldDispose.call(this);
|
|
27
|
-
this.realObject && this.realObject.dispose();
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/scene/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AAEvE,SAAS,CAAC,SAAS,CAAC,eAAe,GAAG;IACpC,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAA;AACrC,CAAC,CAAA;AAED,SAAS,CAAC,SAAS,CAAC,OAAO,GAAG;IAC5B,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,SAAS,EAAE,YAAY,EAAE;IACvD,GAAG,EAAE;QACH,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACxC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;YAEzC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBACtB,OAAM;YACR,CAAC;YAED,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAA;YACzB,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAA;QACpC,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;IACD,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE,KAAK;CACpB,CAAC,CAAA;AAEF,IAAI,UAAU,GAAG,SAAS,CAAC,SAAS,CAAC,OAAO,CAAA;AAE5C,SAAS,CAAC,SAAS,CAAC,OAAO,GAAG;IAC5B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAErB,IAAI,CAAC,UAAU,IAAK,IAAI,CAAC,UAAkB,CAAC,OAAO,EAAE,CAAA;AACvD,CAAC,CAAA","sourcesContent":["import { Component } from '@hatiolab/things-scene'\nimport { RealObject } from '../threed/real-object.js'\nimport { RealObjectSprite2D } from '../threed/real-object-sprite-2d.js'\n\nComponent.prototype.buildRealObject = function (this: Component): RealObject | undefined {\n return new RealObjectSprite2D(this)\n}\n\nComponent.prototype.is3dish = function (this: Component): boolean {\n return true\n}\n\nObject.defineProperty(Component.prototype, 'realObject', {\n get: function (this: Component): RealObject | undefined {\n if (!this.disposed && !this._realObject) {\n this._realObject = this.buildRealObject()\n\n if (!this._realObject) {\n return\n }\n\n this._realObject.update()\n this._realObject.updateTransform()\n }\n\n return this._realObject\n },\n enumerable: false,\n configurable: false\n})\n\nvar oldDispose = Component.prototype.dispose\n\nComponent.prototype.dispose = function () {\n oldDispose.call(this)\n\n this.realObject && (this.realObject as any).dispose()\n}\n"]}
|
package/dist/sphere.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ComponentNature, Ellipse, RealObject, RealObjectMesh } from '@hatiolab/things-scene';
|
|
2
|
-
export declare class Sphere3D extends RealObjectMesh {
|
|
3
|
-
buildGeometry(): void;
|
|
4
|
-
}
|
|
5
|
-
export declare class Sphere extends Ellipse {
|
|
6
|
-
is3dish(): boolean;
|
|
7
|
-
buildRealObject(): RealObject | undefined;
|
|
8
|
-
get nature(): ComponentNature;
|
|
9
|
-
}
|
package/dist/sphere.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright © HatioLab Inc. All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
import { Ellipse, sceneComponent, RealObjectMesh } from '@hatiolab/things-scene';
|
|
6
|
-
import * as THREE from 'three';
|
|
7
|
-
const NATURE = {
|
|
8
|
-
mutable: false,
|
|
9
|
-
resizable: true,
|
|
10
|
-
rotatable: true,
|
|
11
|
-
properties: [],
|
|
12
|
-
help: 'scene/component/sphere'
|
|
13
|
-
};
|
|
14
|
-
export class Sphere3D extends RealObjectMesh {
|
|
15
|
-
buildGeometry() {
|
|
16
|
-
var { depth = 0, rx = 0, ry = 0 } = this.component.state;
|
|
17
|
-
let geometry = new THREE.SphereGeometry(1, 32, 16);
|
|
18
|
-
geometry.scale(rx, depth, ry);
|
|
19
|
-
this.object3d.geometry = geometry;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
let Sphere = class Sphere extends Ellipse {
|
|
23
|
-
is3dish() {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
buildRealObject() {
|
|
27
|
-
return new Sphere3D(this);
|
|
28
|
-
}
|
|
29
|
-
get nature() {
|
|
30
|
-
return NATURE;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
Sphere = __decorate([
|
|
34
|
-
sceneComponent('sphere')
|
|
35
|
-
], Sphere);
|
|
36
|
-
export { Sphere };
|
|
37
|
-
//# sourceMappingURL=sphere.js.map
|
package/dist/sphere.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sphere.js","sourceRoot":"","sources":["../src/sphere.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,wBAAwB;CAC/B,CAAA;AAED,MAAM,OAAO,QAAS,SAAQ,cAAc;IAC1C,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,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QAClD,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,MAAM,GAAZ,MAAM,MAAO,SAAQ,OAAO;IACjC,OAAO;QACL,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;QACb,OAAO,IAAI,QAAQ,CAAC,IAAW,CAAC,CAAA;IAClC,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAZY,MAAM;IADlB,cAAc,CAAC,QAAQ,CAAC;GACZ,MAAM,CAYlB","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/sphere'\n}\n\nexport class Sphere3D extends RealObjectMesh {\n buildGeometry() {\n var { depth = 0, rx = 0, ry = 0 } = this.component.state\n\n let geometry = new THREE.SphereGeometry(1, 32, 16)\n geometry.scale(rx, depth, ry)\n\n this.object3d.geometry = geometry\n }\n}\n\n@sceneComponent('sphere')\nexport class Sphere extends Ellipse {\n is3dish() {\n return true\n }\n\n buildRealObject(): RealObject | undefined {\n return new Sphere3D(this as any)\n }\n\n get nature(): ComponentNature {\n return NATURE\n }\n}\n"]}
|
package/dist/sprite.d.ts
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { Component, ComponentNature, Shape, RealObject } from '@hatiolab/things-scene';
|
|
2
|
-
declare const Sprite_base: (new (...args: any[]) => {
|
|
3
|
-
contains(x: any, y: any): boolean;
|
|
4
|
-
get path(): {
|
|
5
|
-
x: any;
|
|
6
|
-
y: any;
|
|
7
|
-
}[];
|
|
8
|
-
set path(path: {
|
|
9
|
-
x: any;
|
|
10
|
-
y: any;
|
|
11
|
-
}[]): any;
|
|
12
|
-
get anchors(): {
|
|
13
|
-
name: string;
|
|
14
|
-
position: {
|
|
15
|
-
x: any;
|
|
16
|
-
y: any;
|
|
17
|
-
};
|
|
18
|
-
}[];
|
|
19
|
-
get bounds(): any;
|
|
20
|
-
set bounds(bounds: any): any;
|
|
21
|
-
render(ctx: any): void;
|
|
22
|
-
_app: any;
|
|
23
|
-
_model: any;
|
|
24
|
-
_state: any;
|
|
25
|
-
_delta: any;
|
|
26
|
-
_animation: any;
|
|
27
|
-
_animate: any;
|
|
28
|
-
_parent: any;
|
|
29
|
-
_disposed: any;
|
|
30
|
-
_textHidden: any;
|
|
31
|
-
_text_substitutor: any;
|
|
32
|
-
_value_substitutor: any;
|
|
33
|
-
_mappings: any;
|
|
34
|
-
_realObject: import("@hatiolab/things-scene").IRealObject | undefined;
|
|
35
|
-
_cachedState: any;
|
|
36
|
-
updatedAt: any;
|
|
37
|
-
fontSize: any;
|
|
38
|
-
__cache__: any;
|
|
39
|
-
created(): void;
|
|
40
|
-
added(parent: any): void;
|
|
41
|
-
removed(parent: any): void;
|
|
42
|
-
ready(): Promise<void>;
|
|
43
|
-
touch(): void;
|
|
44
|
-
clearCache(...attrs: any[]): void;
|
|
45
|
-
removeSelf(completely: any): void;
|
|
46
|
-
resetAnimation(): void;
|
|
47
|
-
dispose(): void;
|
|
48
|
-
get nature(): import("@hatiolab/things-scene").ComponentNature;
|
|
49
|
-
get disposed(): boolean;
|
|
50
|
-
isLayer(): boolean;
|
|
51
|
-
isGroup(): boolean;
|
|
52
|
-
isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
|
|
53
|
-
isLine(): boolean;
|
|
54
|
-
isRoot(): boolean;
|
|
55
|
-
isRootModel(): boolean;
|
|
56
|
-
is3dish(): boolean;
|
|
57
|
-
isIn3DSpace(): boolean;
|
|
58
|
-
isTemplate(): boolean;
|
|
59
|
-
isHTMLElement(): boolean;
|
|
60
|
-
isConnectable(): boolean;
|
|
61
|
-
isIdentifiable(): boolean;
|
|
62
|
-
isPositionable(): boolean;
|
|
63
|
-
replaceRefids(replaceMap: any): void;
|
|
64
|
-
get(property: any): any;
|
|
65
|
-
set(props: any, propval?: any): any;
|
|
66
|
-
getState(property: any): any;
|
|
67
|
-
setState(props: any, propval?: any): any;
|
|
68
|
-
get model(): any;
|
|
69
|
-
get state(): any;
|
|
70
|
-
get hierarchy(): any;
|
|
71
|
-
get volatile(): never[];
|
|
72
|
-
_applyProps(target: any, props: any, options: any): any;
|
|
73
|
-
move(offset: {
|
|
74
|
-
x: number;
|
|
75
|
-
y: number;
|
|
76
|
-
}, ...args: boolean[]): void;
|
|
77
|
-
symmetryX(x?: number): void;
|
|
78
|
-
symmetryY(y: number): void;
|
|
79
|
-
adjustResize(bounds: import("@hatiolab/things-scene").BOUNDS, origin_bounds: import("@hatiolab/things-scene").BOUNDS, diagonal: boolean): any;
|
|
80
|
-
adjustRotation(rotation: number, step: boolean): any;
|
|
81
|
-
outline(progress: number): any;
|
|
82
|
-
get center(): import("@hatiolab/things-scene").POINT;
|
|
83
|
-
set center(p: import("@hatiolab/things-scene").POINT): any;
|
|
84
|
-
get location(): import("@hatiolab/things-scene").POINT;
|
|
85
|
-
set location(l: import("@hatiolab/things-scene").POINT): any;
|
|
86
|
-
get rotate(): import("@hatiolab/things-scene").POINT;
|
|
87
|
-
set rotate(r: import("@hatiolab/things-scene").POINT): any;
|
|
88
|
-
get dimension(): import("@hatiolab/things-scene").DIMENSION;
|
|
89
|
-
set dimension(d: import("@hatiolab/things-scene").DIMENSION): any;
|
|
90
|
-
get drawPath(): import("@hatiolab/things-scene").POINT[];
|
|
91
|
-
get rotatePoint(): import("@hatiolab/things-scene").POINT;
|
|
92
|
-
get mutable(): boolean;
|
|
93
|
-
get resizable(): boolean;
|
|
94
|
-
get rotatable(): boolean;
|
|
95
|
-
buildRealObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
96
|
-
get realObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
97
|
-
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
98
|
-
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
99
|
-
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
100
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
101
|
-
prepareIf(condition: boolean): void;
|
|
102
|
-
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
103
|
-
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
104
|
-
drawFill(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
105
|
-
get strokeStyle(): any;
|
|
106
|
-
set strokeStyle(v: any): any;
|
|
107
|
-
get fillStyle(): any;
|
|
108
|
-
set fillStyle(v: any): any;
|
|
109
|
-
get fontColor(): string;
|
|
110
|
-
set fontColor(v: string): any;
|
|
111
|
-
get rotation(): number;
|
|
112
|
-
set rotation(v: number): any;
|
|
113
|
-
get decorators(): string[];
|
|
114
|
-
get decotag(): string;
|
|
115
|
-
get hidden(): boolean;
|
|
116
|
-
set hidden(v: boolean): any;
|
|
117
|
-
get tag(): string;
|
|
118
|
-
set tag(v: string): any;
|
|
119
|
-
get appendum(): any;
|
|
120
|
-
set appendum(v: any): any;
|
|
121
|
-
defaultTextSubstitutor(): any;
|
|
122
|
-
textLines(context?: import("@hatiolab/things-scene").SceneRenderContext): any;
|
|
123
|
-
get font(): string;
|
|
124
|
-
get lineHeight(): number;
|
|
125
|
-
get textSubstitutor(): () => string;
|
|
126
|
-
get text(): string;
|
|
127
|
-
set text(v: string): any;
|
|
128
|
-
get textBounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
129
|
-
get textRotation(): number;
|
|
130
|
-
get textHidden(): boolean;
|
|
131
|
-
set textHidden(v: boolean): any;
|
|
132
|
-
get hasTextProperty(): boolean;
|
|
133
|
-
animate(opts: import("@hatiolab/things-scene/dist-types/animation/interfaces").AnimationConfig): any;
|
|
134
|
-
effect(context: import("@hatiolab/things-scene").SceneRenderContext, model: any): any;
|
|
135
|
-
serialize(...others: any[]): any;
|
|
136
|
-
trim(): void;
|
|
137
|
-
closeScene(data: any): void;
|
|
138
|
-
delta(attr?: string | object, value?: any): any;
|
|
139
|
-
invalidate(): void;
|
|
140
|
-
get value(): any;
|
|
141
|
-
set value(v: any): any;
|
|
142
|
-
get data(): any;
|
|
143
|
-
set data(v: any): any;
|
|
144
|
-
set tap(v: any): any;
|
|
145
|
-
get mappings(): any[];
|
|
146
|
-
get retention(): number;
|
|
147
|
-
get animation(): import("@hatiolab/things-scene/dist-types/animation/interfaces").AnimationController | undefined;
|
|
148
|
-
get started(): boolean;
|
|
149
|
-
set started(v: boolean): any;
|
|
150
|
-
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
151
|
-
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): any;
|
|
152
|
-
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any;
|
|
153
|
-
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
154
|
-
findAnchor(name: string): any;
|
|
155
|
-
isDescendible(container: Component): any;
|
|
156
|
-
getContext(component?: unknown): any;
|
|
157
|
-
get root(): Component;
|
|
158
|
-
get rootModel(): Component;
|
|
159
|
-
get parent(): Component;
|
|
160
|
-
set parent(v: Component): any;
|
|
161
|
-
get scalable(): boolean;
|
|
162
|
-
get stuck(): boolean;
|
|
163
|
-
get capturable(): boolean;
|
|
164
|
-
get position(): string;
|
|
165
|
-
get origin(): string;
|
|
166
|
-
get offset(): import("@hatiolab/things-scene").POINT;
|
|
167
|
-
get app(): import("@hatiolab/things-scene").ApplicationContext;
|
|
168
|
-
drawEffect(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
169
|
-
prepareFill(resolve: Function, reject: Function): void;
|
|
170
|
-
prepareFillIf(condition: boolean): void;
|
|
171
|
-
onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
|
|
172
|
-
drawImage(context: import("@hatiolab/things-scene").SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
|
|
173
|
-
mutateBounds(logic: ((bounds: import("@hatiolab/things-scene").BOUNDS) => import("@hatiolab/things-scene").BOUNDS | void) | null, context?: any): void;
|
|
174
|
-
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;
|
|
175
|
-
access(accessor: string, data: any): any;
|
|
176
|
-
substitute(template: string, data: any): any;
|
|
177
|
-
onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
|
|
178
|
-
onchangeData(after: Record<string, any>, before: Record<string, any>): void;
|
|
179
|
-
buildMappings(): void;
|
|
180
|
-
executeMappings(force?: boolean): void;
|
|
181
|
-
disposeMappings(): void;
|
|
182
|
-
ondropfile(transfered: FileList, files: string[]): void;
|
|
183
|
-
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
184
|
-
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
185
|
-
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
-
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
-
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
188
|
-
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
189
|
-
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
190
|
-
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
-
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
-
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
193
|
-
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
194
|
-
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
195
|
-
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
196
|
-
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
197
|
-
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
198
|
-
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
199
|
-
on(name: string | object, callback: Function, context?: any): any;
|
|
200
|
-
off(name?: string | object, callback?: Function, context?: any): any;
|
|
201
|
-
once(name: string | object, callback: Function, context?: any): any;
|
|
202
|
-
trigger(name: string, ...args: any[]): any;
|
|
203
|
-
delegate_on(delegator: any): any;
|
|
204
|
-
delegate_off(delegator: any): any;
|
|
205
|
-
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
206
|
-
calculateBounds?(): void;
|
|
207
|
-
oncreate_element?(element: HTMLElement): void;
|
|
208
|
-
removeComponent(component: Component, ghost?: boolean): void;
|
|
209
|
-
addComponent(component: Component, ghost?: boolean): void;
|
|
210
|
-
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
211
|
-
getOverlay(component: Component): HTMLElement | undefined;
|
|
212
|
-
findById(id: string): Component | undefined;
|
|
213
|
-
findByRefid(ref: string | number): Component | undefined;
|
|
214
|
-
findAllById(id: string): Component[];
|
|
215
|
-
resize(): void;
|
|
216
|
-
fit(type?: string): void;
|
|
217
|
-
get components(): Component[] | undefined;
|
|
218
|
-
get layout(): any;
|
|
219
|
-
get auxOverlay(): HTMLElement | undefined;
|
|
220
|
-
get isReady(): boolean;
|
|
221
|
-
get unitScale(): number;
|
|
222
|
-
get selected(): Component[];
|
|
223
|
-
set selected(_v: Component[]): any;
|
|
224
|
-
get focused(): Component | null;
|
|
225
|
-
set focused(_v: Component | null): any;
|
|
226
|
-
get hasSameParentForAllSelected(): boolean;
|
|
227
|
-
set hasSameParentForAllSelected(_v: boolean): any;
|
|
228
|
-
get fitMode(): string | undefined;
|
|
229
|
-
set fitMode(_v: string | undefined): any;
|
|
230
|
-
get element(): HTMLElement | null;
|
|
231
|
-
set element(_v: HTMLElement | null): any;
|
|
232
|
-
}) & typeof Shape;
|
|
233
|
-
export declare class Sprite extends Sprite_base {
|
|
234
|
-
is3dish(): boolean;
|
|
235
|
-
buildRealObject(): RealObject | undefined;
|
|
236
|
-
get nature(): ComponentNature;
|
|
237
|
-
}
|
|
238
|
-
export {};
|
package/dist/sprite.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { __decorate } from "tslib";
|
|
5
|
-
import { RectPath, Shape, sceneComponent, RealObjectSprite2D } from '@hatiolab/things-scene';
|
|
6
|
-
const NATURE = {
|
|
7
|
-
mutable: false,
|
|
8
|
-
resizable: true,
|
|
9
|
-
rotatable: true,
|
|
10
|
-
properties: []
|
|
11
|
-
};
|
|
12
|
-
let Sprite = class Sprite extends RectPath(Shape) {
|
|
13
|
-
is3dish() {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
buildRealObject() {
|
|
17
|
-
return new RealObjectSprite2D(this);
|
|
18
|
-
}
|
|
19
|
-
get nature() {
|
|
20
|
-
return NATURE;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
Sprite = __decorate([
|
|
24
|
-
sceneComponent('sprite')
|
|
25
|
-
], Sprite);
|
|
26
|
-
export { Sprite };
|
|
27
|
-
//# sourceMappingURL=sprite.js.map
|
package/dist/sprite.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sprite.js","sourceRoot":"","sources":["../src/sprite.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAA8B,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAc,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEpI,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,EAAE;CACf,CAAA;AAGM,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,QAAQ,CAAC,KAAK,CAAC;IACzC,OAAO;QACL,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;QACb,OAAO,IAAI,kBAAkB,CAAC,IAAW,CAAC,CAAA;IAC5C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAZY,MAAM;IADlB,cAAc,CAAC,QAAQ,CAAC;GACZ,MAAM,CAYlB","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, RectPath, Shape, sceneComponent, RealObject, RealObjectSprite2D } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: []\n}\n\n@sceneComponent('sprite')\nexport class Sprite extends RectPath(Shape) {\n is3dish(): boolean {\n return true\n }\n\n buildRealObject(): RealObject | undefined {\n return new RealObjectSprite2D(this as any)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
package/dist/text.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/text.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { registerRealObjectFactory } from './threed/real-object-registry.js';
|
|
5
|
-
import { RealObjectText } from './threed/real-object-text.js';
|
|
6
|
-
registerRealObjectFactory('text', (component) => new RealObjectText(component));
|
|
7
|
-
//# sourceMappingURL=text.js.map
|
package/dist/text.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAE7D,yBAAyB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { registerRealObjectFactory } from './threed/real-object-registry.js'\nimport { RealObjectText } from './threed/real-object-text.js'\n\nregisterRealObjectFactory('text', (component) => new RealObjectText(component))\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
3
|
-
import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js';
|
|
4
|
-
export declare class ThreeContainerEditor {
|
|
5
|
-
private ortho;
|
|
6
|
-
private persp;
|
|
7
|
-
private scene;
|
|
8
|
-
private camera;
|
|
9
|
-
private renderer;
|
|
10
|
-
private orbit?;
|
|
11
|
-
private transform?;
|
|
12
|
-
constructor(scene: THREE.Scene, ortho: THREE.OrthographicCamera, persp: THREE.PerspectiveCamera, camera: THREE.Camera, renderer: THREE.Renderer);
|
|
13
|
-
dispose(): void;
|
|
14
|
-
get orbitControls(): OrbitControls;
|
|
15
|
-
get transformControls(): TransformControls;
|
|
16
|
-
attach(target: THREE.Object3D): void;
|
|
17
|
-
detach(): void;
|
|
18
|
-
onKeyDown(e: KeyboardEvent): void;
|
|
19
|
-
onKeyUp(e: KeyboardEvent): void;
|
|
20
|
-
onWindowResize(): void;
|
|
21
|
-
render(): void;
|
|
22
|
-
}
|