@adobe/data 0.7.2 → 0.7.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/ecs/archetype/archetype.d.ts +3 -3
- package/dist/ecs/archetype/create-archetype.d.ts +4 -4
- package/dist/ecs/archetype/create-archetype.js.map +1 -1
- package/dist/ecs/archetype/create-archetype.test.js +6 -6
- package/dist/ecs/archetype/create-archetype.test.js.map +1 -1
- package/dist/ecs/archetype/delete-row.d.ts +2 -2
- package/dist/ecs/archetype/delete-row.js.map +1 -1
- package/dist/ecs/archetype/delete-row.test.js +4 -4
- package/dist/ecs/archetype/delete-row.test.js.map +1 -1
- package/dist/ecs/core-components.d.ts +3 -3
- package/dist/ecs/database/database.d.ts +4 -4
- package/dist/ecs/database/observe-select-entities.d.ts +2 -2
- package/dist/ecs/database/observe-select-entities.js.map +1 -1
- package/dist/ecs/database/observed/create-observed-database.js.map +1 -1
- package/dist/ecs/database/observed/observed-database.d.ts +3 -3
- package/dist/ecs/database/replicate.js.map +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.d.ts +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.js +14 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.js.map +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.test.js +14 -0
- package/dist/ecs/entity-location-table/create-entity-location-table.test.js.map +1 -1
- package/dist/ecs/entity.d.ts +9 -7
- package/dist/ecs/entity.js +5 -2
- package/dist/ecs/entity.js.map +1 -1
- package/dist/ecs/index.d.ts +1 -1
- package/dist/ecs/index.js +1 -1
- package/dist/ecs/index.js.map +1 -1
- package/dist/ecs/optional-components.d.ts +3 -0
- package/dist/ecs/optional-components.js +2 -0
- package/dist/ecs/optional-components.js.map +1 -0
- package/dist/ecs/required-components.d.ts +4 -0
- package/dist/ecs/required-components.js +2 -0
- package/dist/ecs/required-components.js.map +1 -0
- package/dist/ecs/store/core/core.d.ts +15 -15
- package/dist/ecs/store/core/create-core.d.ts +2 -1
- package/dist/ecs/store/core/create-core.js +29 -12
- package/dist/ecs/store/core/create-core.js.map +1 -1
- package/dist/ecs/store/core/create-core.test.d.ts +1 -1
- package/dist/ecs/store/core/create-core.test.js +30 -2
- package/dist/ecs/store/core/create-core.test.js.map +1 -1
- package/dist/ecs/store/core/select-entities.d.ts +2 -2
- package/dist/ecs/store/core/select-entities.js.map +1 -1
- package/dist/ecs/store/create-store.d.ts +2 -1
- package/dist/ecs/store/create-store.js +3 -1
- package/dist/ecs/store/create-store.js.map +1 -1
- package/dist/ecs/store/store.d.ts +6 -6
- package/dist/samples/todo/services/state-service/create-todo-database.d.ts +1 -1
- package/dist/samples/todo/services/state-service/create-todo-store.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/dist/blob/download-handle.d.ts +0 -4
- package/dist/blob/download-handle.js +0 -2
- package/dist/blob/download-handle.js.map +0 -1
- package/dist/blob/upload-handle.d.ts +0 -4
- package/dist/blob/upload-handle.js +0 -2
- package/dist/blob/upload-handle.js.map +0 -1
- package/dist/ecs/database/applied/applied-database.d.ts +0 -47
- package/dist/ecs/database/applied/applied-database.js +0 -22
- package/dist/ecs/database/applied/applied-database.js.map +0 -1
- package/dist/ecs/database/applied/applied-entry.d.ts +0 -30
- package/dist/ecs/database/applied/applied-entry.js +0 -84
- package/dist/ecs/database/applied/applied-entry.js.map +0 -1
- package/dist/ecs/database/applied/create-applied-database.d.ts +0 -8
- package/dist/ecs/database/applied/create-applied-database.js +0 -266
- package/dist/ecs/database/applied/create-applied-database.js.map +0 -1
- package/dist/ecs/database/applied/create-applied-database.test.d.ts +0 -1
- package/dist/ecs/database/applied/create-applied-database.test.js +0 -94
- package/dist/ecs/database/applied/create-applied-database.test.js.map +0 -1
- package/dist/ecs/database/create-applied-database.d.ts +0 -49
- package/dist/ecs/database/create-applied-database.js +0 -275
- package/dist/ecs/database/create-applied-database.js.map +0 -1
- package/dist/ecs/database/reconciling/applied-database.d.ts +0 -47
- package/dist/ecs/database/reconciling/applied-database.js +0 -22
- package/dist/ecs/database/reconciling/applied-database.js.map +0 -1
- package/dist/ecs/database/reconciling/applied-entry.d.ts +0 -30
- package/dist/ecs/database/reconciling/applied-entry.js +0 -84
- package/dist/ecs/database/reconciling/applied-entry.js.map +0 -1
- package/dist/ecs/database/reconciling/create-applied-database.d.ts +0 -8
- package/dist/ecs/database/reconciling/create-applied-database.js +0 -266
- package/dist/ecs/database/reconciling/create-applied-database.js.map +0 -1
- package/dist/ecs/database/reconciling/create-applied-database.test.d.ts +0 -1
- package/dist/ecs/database/reconciling/create-applied-database.test.js +0 -94
- package/dist/ecs/database/reconciling/create-applied-database.test.js.map +0 -1
- package/dist/ecs/store/store-schema/create-store-schema-test.d.ts +0 -1
- package/dist/ecs/store/store-schema/create-store-schema-test.js +0 -33
- package/dist/ecs/store/store-schema/create-store-schema-test.js.map +0 -1
- package/dist/ecs/store/store-schema/create-store-schema.d.ts +0 -11
- package/dist/ecs/store/store-schema/create-store-schema.js +0 -31
- package/dist/ecs/store/store-schema/create-store-schema.js.map +0 -1
- package/dist/ecs/store/store-schema/index.d.ts +0 -2
- package/dist/ecs/store/store-schema/index.js +0 -24
- package/dist/ecs/store/store-schema/index.js.map +0 -1
- package/dist/ecs/store/store-schema/store-schema.d.ts +0 -12
- package/dist/ecs/store/store-schema/store-schema.js +0 -23
- package/dist/ecs/store/store-schema/store-schema.js.map +0 -1
- package/dist/ecs/world/create-world.d.ts +0 -7
- package/dist/ecs/world/create-world.js +0 -113
- package/dist/ecs/world/create-world.js.map +0 -1
- package/dist/ecs/world/create-world.test.d.ts +0 -1
- package/dist/ecs/world/create-world.test.js +0 -499
- package/dist/ecs/world/create-world.test.js.map +0 -1
- package/dist/ecs/world/index.d.ts +0 -5
- package/dist/ecs/world/index.js +0 -27
- package/dist/ecs/world/index.js.map +0 -1
- package/dist/ecs/world/system-phase.d.ts +0 -5
- package/dist/ecs/world/system-phase.js +0 -14
- package/dist/ecs/world/system-phase.js.map +0 -1
- package/dist/ecs/world/system.d.ts +0 -25
- package/dist/ecs/world/system.js +0 -2
- package/dist/ecs/world/system.js.map +0 -1
- package/dist/ecs/world/world-schema/create-world-schema-test.d.ts +0 -1
- package/dist/ecs/world/world-schema/create-world-schema-test.js +0 -55
- package/dist/ecs/world/world-schema/create-world-schema-test.js.map +0 -1
- package/dist/ecs/world/world-schema/create-world-schema.d.ts +0 -19
- package/dist/ecs/world/world-schema/create-world-schema.js +0 -33
- package/dist/ecs/world/world-schema/create-world-schema.js.map +0 -1
- package/dist/ecs/world/world-schema/index.d.ts +0 -2
- package/dist/ecs/world/world-schema/index.js +0 -24
- package/dist/ecs/world/world-schema/index.js.map +0 -1
- package/dist/ecs/world/world-schema/world-schema.d.ts +0 -18
- package/dist/ecs/world/world-schema/world-schema.js +0 -23
- package/dist/ecs/world/world-schema/world-schema.js.map +0 -1
- package/dist/ecs/world/world.d.ts +0 -11
- package/dist/ecs/world/world.js +0 -2
- package/dist/ecs/world/world.js.map +0 -1
- package/dist/graphics/camera/camera.d.ts +0 -62
- package/dist/graphics/camera/camera.js +0 -17
- package/dist/graphics/camera/camera.js.map +0 -1
- package/dist/graphics/camera/index.d.ts +0 -4
- package/dist/graphics/camera/index.js +0 -5
- package/dist/graphics/camera/index.js.map +0 -1
- package/dist/graphics/camera/screen-to-world-ray.d.ts +0 -12
- package/dist/graphics/camera/screen-to-world-ray.js +0 -49
- package/dist/graphics/camera/screen-to-world-ray.js.map +0 -1
- package/dist/graphics/camera/screen-to-world-ray.test.d.ts +0 -1
- package/dist/graphics/camera/screen-to-world-ray.test.js +0 -171
- package/dist/graphics/camera/screen-to-world-ray.test.js.map +0 -1
- package/dist/graphics/camera/to-view-projection.d.ts +0 -3
- package/dist/graphics/camera/to-view-projection.js +0 -8
- package/dist/graphics/camera/to-view-projection.js.map +0 -1
- package/dist/graphics/camera/world-to-screen.d.ts +0 -12
- package/dist/graphics/camera/world-to-screen.js +0 -38
- package/dist/graphics/camera/world-to-screen.js.map +0 -1
- package/dist/graphics/camera/world-to-screen.test.d.ts +0 -1
- package/dist/graphics/camera/world-to-screen.test.js +0 -124
- package/dist/graphics/camera/world-to-screen.test.js.map +0 -1
- package/dist/graphics/create-struct-gpu-buffer.d.ts +0 -7
- package/dist/graphics/create-struct-gpu-buffer.js +0 -17
- package/dist/graphics/create-struct-gpu-buffer.js.map +0 -1
- package/dist/graphics/extract-wgsl-bindings.d.ts +0 -5
- package/dist/graphics/extract-wgsl-bindings.js +0 -10
- package/dist/graphics/extract-wgsl-bindings.js.map +0 -1
- package/dist/graphics/frame.d.ts +0 -22
- package/dist/graphics/frame.js +0 -12
- package/dist/graphics/frame.js.map +0 -1
- package/dist/graphics/get-web-gpu-device-and-context.d.ts +0 -2
- package/dist/graphics/get-web-gpu-device-and-context.js +0 -21
- package/dist/graphics/get-web-gpu-device-and-context.js.map +0 -1
- package/dist/graphics/graphics-context.d.ts +0 -5
- package/dist/graphics/graphics-context.js +0 -2
- package/dist/graphics/graphics-context.js.map +0 -1
- package/dist/graphics/index.d.ts +0 -5
- package/dist/graphics/index.js +0 -5
- package/dist/graphics/index.js.map +0 -1
- package/dist/graphics/to-gpu-buffer.d.ts +0 -2
- package/dist/graphics/to-gpu-buffer.js +0 -14
- package/dist/graphics/to-gpu-buffer.js.map +0 -1
- package/dist/internal/array-buffer-like/grow.d.ts +0 -1
- package/dist/internal/array-buffer-like/grow.js +0 -9
- package/dist/internal/array-buffer-like/grow.js.map +0 -1
- package/dist/lit/elements/service-application.d.ts +0 -9
- package/dist/lit/elements/service-application.js +0 -55
- package/dist/lit/elements/service-application.js.map +0 -1
- package/dist/lit/elements/service-context.d.ts +0 -1
- package/dist/lit/elements/service-context.js +0 -24
- package/dist/lit/elements/service-context.js.map +0 -1
- package/dist/lit/elements/service-element.d.ts +0 -6
- package/dist/lit/elements/service-element.js +0 -43
- package/dist/lit/elements/service-element.js.map +0 -1
- package/dist/math/picking/get-closest-entity-to-line.d.ts +0 -4
- package/dist/math/picking/get-closest-entity-to-line.js +0 -30
- package/dist/math/picking/get-closest-entity-to-line.js.map +0 -1
- package/dist/math/picking/get-closest-entity-to-point.d.ts +0 -4
- package/dist/math/picking/get-closest-entity-to-point.js +0 -27
- package/dist/math/picking/get-closest-entity-to-point.js.map +0 -1
- package/dist/math/picking/get-intersecting-entities.d.ts +0 -12
- package/dist/math/picking/get-intersecting-entities.js +0 -15
- package/dist/math/picking/get-intersecting-entities.js.map +0 -1
- package/dist/math/picking/index.d.ts +0 -5
- package/dist/math/picking/index.js +0 -27
- package/dist/math/picking/index.js.map +0 -1
- package/dist/math/picking/pick-from-tables.d.ts +0 -19
- package/dist/math/picking/pick-from-tables.js +0 -63
- package/dist/math/picking/pick-from-tables.js.map +0 -1
- package/dist/math/picking/pick-result.d.ts +0 -10
- package/dist/math/picking/pick-result.js +0 -23
- package/dist/math/picking/pick-result.js.map +0 -1
- package/dist/old-ecs/privacy/helper-functions.d.ts +0 -43
- package/dist/old-ecs/privacy/helper-functions.js +0 -76
- package/dist/old-ecs/privacy/helper-functions.js.map +0 -1
- package/dist/old-ecs/privacy/helper-functions.test.d.ts +0 -1
- package/dist/old-ecs/privacy/helper-functions.test.js +0 -173
- package/dist/old-ecs/privacy/helper-functions.test.js.map +0 -1
- package/dist/table/compact-table.d.ts +0 -7
- package/dist/table/compact-table.js +0 -15
- package/dist/table/compact-table.js.map +0 -1
- package/dist/table/compact-table.test.d.ts +0 -1
- package/dist/table/compact-table.test.js +0 -121
- package/dist/table/compact-table.test.js.map +0 -1
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
23
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
25
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
26
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
|
-
};
|
|
28
|
-
import { html, LitElement } from "lit";
|
|
29
|
-
import { property } from "lit/decorators.js";
|
|
30
|
-
import { provide } from "@lit/context";
|
|
31
|
-
import { serviceContext } from "./service-context.js";
|
|
32
|
-
import { isDisposable } from "../../service/disposable.js";
|
|
33
|
-
export class ServiceApplication extends LitElement {
|
|
34
|
-
async updated(changedProperties) {
|
|
35
|
-
super.updated(changedProperties);
|
|
36
|
-
this.service ??= await this.createService();
|
|
37
|
-
}
|
|
38
|
-
disconnectedCallback() {
|
|
39
|
-
super.disconnectedCallback();
|
|
40
|
-
if (isDisposable(this.service)) {
|
|
41
|
-
this.service.dispose();
|
|
42
|
-
}
|
|
43
|
-
this.service = null;
|
|
44
|
-
}
|
|
45
|
-
render() {
|
|
46
|
-
return html `
|
|
47
|
-
<div>Service Application Should Be Overridden</div>
|
|
48
|
-
`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
__decorate([
|
|
52
|
-
provide({ context: serviceContext }),
|
|
53
|
-
property({ type: Object })
|
|
54
|
-
], ServiceApplication.prototype, "service", void 0);
|
|
55
|
-
//# sourceMappingURL=service-application.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service-application.js","sourceRoot":"","sources":["../../../src/lit/elements/service-application.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;;;;;;;AAEX,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,OAAgB,kBAAsC,SAAQ,UAAU;IAQjE,KAAK,CAAC,OAAO,CAAC,iBAAiC;QACpD,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,KAAK,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IAChD,CAAC;IAEQ,oBAAoB;QACzB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,IAAW,CAAC;IAC/B,CAAC;IAEQ,MAAM;QACX,OAAO,IAAI,CAAA;;SAEV,CAAC;IACN,CAAC;CACJ;AAtBa;IAFT,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const serviceContext: import("@lit/context").Context<symbol, unknown>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
import { createContext } from "@lit/context";
|
|
23
|
-
export const serviceContext = createContext(Symbol("service"));
|
|
24
|
-
//# sourceMappingURL=service-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service-context.js","sourceRoot":"","sources":["../../../src/lit/elements/service-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
23
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
25
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
26
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
|
-
};
|
|
28
|
-
import { LitElement } from "lit";
|
|
29
|
-
import { serviceContext } from "./service-context.js";
|
|
30
|
-
import { property } from "lit/decorators.js";
|
|
31
|
-
import { consume } from "@lit/context";
|
|
32
|
-
import { applyServiceDecorators } from "../decorators/apply-service-decorators.js";
|
|
33
|
-
export class ServiceElement extends LitElement {
|
|
34
|
-
constructor() {
|
|
35
|
-
super();
|
|
36
|
-
applyServiceDecorators(this);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
__decorate([
|
|
40
|
-
consume({ context: serviceContext }),
|
|
41
|
-
property({ type: Object })
|
|
42
|
-
], ServiceElement.prototype, "service", void 0);
|
|
43
|
-
//# sourceMappingURL=service-element.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service-element.js","sourceRoot":"","sources":["../../../src/lit/elements/service-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;;;;;;;AAEX,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,MAAM,OAAO,cAAkC,SAAQ,UAAU;IAM7D;QACI,KAAK,EAAE,CAAC;QACR,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CAEJ;AAPa;IAFT,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CACL"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Aabb, Line3, Vec3 } from "../index.js";
|
|
2
|
-
export function getClosestEntityToLine(rows, line) {
|
|
3
|
-
let closestEntity = null;
|
|
4
|
-
let closestDistanceSquared = Infinity;
|
|
5
|
-
let closestAlpha = Infinity;
|
|
6
|
-
let pickedPosition = null;
|
|
7
|
-
for (const [id, aabb] of rows) {
|
|
8
|
-
const aabbCenter = Aabb.center(aabb);
|
|
9
|
-
const alpha = Line3.closestPointOnLine(line, aabbCenter);
|
|
10
|
-
const closestPointOnLineSegment = Line3.interpolate(line, alpha);
|
|
11
|
-
const distSquared = Vec3.distanceSquared(aabbCenter, closestPointOnLineSegment);
|
|
12
|
-
if (distSquared < closestDistanceSquared ||
|
|
13
|
-
(distSquared === closestDistanceSquared && alpha < closestAlpha)) {
|
|
14
|
-
closestDistanceSquared = distSquared;
|
|
15
|
-
closestAlpha = alpha;
|
|
16
|
-
closestEntity = id;
|
|
17
|
-
pickedPosition = closestPointOnLineSegment;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
if (closestEntity !== null && pickedPosition) {
|
|
21
|
-
return {
|
|
22
|
-
entity: closestEntity,
|
|
23
|
-
lineAlpha: closestAlpha,
|
|
24
|
-
entityPosition: pickedPosition,
|
|
25
|
-
// face: AabbFace.fromPosition(pickedPosition, rows.get(closestEntity)!),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=get-closest-entity-to-line.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-closest-entity-to-line.js","sourceRoot":"","sources":["../../../src/math/picking/get-closest-entity-to-line.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,UAAU,sBAAsB,CAAC,IAAuB,EAAE,IAAW;IACvE,IAAI,aAAa,GAAkB,IAAI,CAAC;IACxC,IAAI,sBAAsB,GAAG,QAAQ,CAAC;IACtC,IAAI,YAAY,GAAG,QAAQ,CAAC;IAC5B,IAAI,cAAc,GAAgB,IAAI,CAAC;IACvC,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACzD,MAAM,yBAAyB,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACjE,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,yBAAyB,CAAC,CAAC;QAChF,IAAI,WAAW,GAAG,sBAAsB;YACpC,CAAC,WAAW,KAAK,sBAAsB,IAAI,KAAK,GAAG,YAAY,CAAC,EAAE,CAAC;YACnE,sBAAsB,GAAG,WAAW,CAAC;YACrC,YAAY,GAAG,KAAK,CAAC;YACrB,aAAa,GAAG,EAAE,CAAC;YACnB,cAAc,GAAG,yBAAyB,CAAC;QAC/C,CAAC;IACL,CAAC;IACD,IAAI,aAAa,KAAK,IAAI,IAAI,cAAc,EAAE,CAAC;QAC3C,OAAO;YACH,MAAM,EAAE,aAAa;YACrB,SAAS,EAAE,YAAY;YACvB,cAAc,EAAE,cAAc;YAC9B,yEAAyE;SAC5E,CAAC;IACN,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Aabb, Vec3 } from "../index.js";
|
|
2
|
-
export function getClosestEntityToPoint(rows, point) {
|
|
3
|
-
let closestRow = -1;
|
|
4
|
-
let closestDistanceSquared = Infinity;
|
|
5
|
-
let closestAabb = null;
|
|
6
|
-
for (const [row, aabb] of rows) {
|
|
7
|
-
const distSquared = Vec3.distanceSquared(point, Aabb.center(aabb));
|
|
8
|
-
if (distSquared < closestDistanceSquared) {
|
|
9
|
-
closestDistanceSquared = distSquared;
|
|
10
|
-
closestRow = row;
|
|
11
|
-
closestAabb = aabb;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
if (closestRow !== -1 && closestAabb) {
|
|
15
|
-
// For point-based picking, we need to calculate the alpha along the line
|
|
16
|
-
// that would put us at the closest point to the AABB center
|
|
17
|
-
// Since this function is called with a point (line.a), alpha should be 0
|
|
18
|
-
return {
|
|
19
|
-
entity: closestRow,
|
|
20
|
-
lineAlpha: 0,
|
|
21
|
-
entityPosition: point,
|
|
22
|
-
// face: AabbFace.fromPosition(point, closestAabb),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=get-closest-entity-to-point.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-closest-entity-to-point.js","sourceRoot":"","sources":["../../../src/math/picking/get-closest-entity-to-point.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,UAAU,uBAAuB,CAAC,IAAuB,EAAE,KAAW;IACxE,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;IACpB,IAAI,sBAAsB,GAAG,QAAQ,CAAC;IACtC,IAAI,WAAW,GAAgB,IAAI,CAAC;IACpC,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QACnE,IAAI,WAAW,GAAG,sBAAsB,EAAE,CAAC;YACvC,sBAAsB,GAAG,WAAW,CAAC;YACrC,UAAU,GAAG,GAAG,CAAC;YACjB,WAAW,GAAG,IAAI,CAAC;QACvB,CAAC;IACL,CAAC;IACD,IAAI,UAAU,KAAK,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;QACnC,yEAAyE;QACzE,4DAA4D;QAC5D,yEAAyE;QACzE,OAAO;YACH,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,CAAC;YACZ,cAAc,EAAE,KAAK;YACrB,mDAAmD;SACtD,CAAC;IACN,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Entity } from "../../ecs/index.js";
|
|
2
|
-
import { Table } from "../../table/table.js";
|
|
3
|
-
import { Aabb, Line3 } from "../index.js";
|
|
4
|
-
export declare function getIntersectingEntities<T extends Table<{
|
|
5
|
-
id: Entity;
|
|
6
|
-
boundingBox: Aabb;
|
|
7
|
-
}>>(options: {
|
|
8
|
-
tables: readonly T[];
|
|
9
|
-
line: Line3;
|
|
10
|
-
radius?: number;
|
|
11
|
-
predicate?: (table: T, row: number) => boolean;
|
|
12
|
-
}): Map<Entity, Aabb>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Aabb } from "../index.js";
|
|
2
|
-
export function getIntersectingEntities(options) {
|
|
3
|
-
const { tables, line, radius = 0, predicate } = options;
|
|
4
|
-
const rows = new Map();
|
|
5
|
-
for (const table of tables) {
|
|
6
|
-
for (let row = 0; row < table.rowCount; row++) {
|
|
7
|
-
const boundingBox = table.columns.boundingBox.get(row);
|
|
8
|
-
if (Aabb.lineIntersection(boundingBox, line, radius) !== -1 && (predicate?.(table, row) ?? true)) {
|
|
9
|
-
rows.set(table.columns.id.get(row), boundingBox);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return rows;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=get-intersecting-entities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-intersecting-entities.js","sourceRoot":"","sources":["../../../src/math/picking/get-intersecting-entities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAS,MAAM,aAAa,CAAC;AAE1C,MAAM,UAAU,uBAAuB,CAAsD,OAK5F;IACG,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAgB,CAAC;IACrC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QACzB,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,CAAC;YAC5C,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACvD,IAAI,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC;gBAC/F,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;YACrD,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
export * from "./pick-from-tables.js";
|
|
23
|
-
export * from "./pick-result.js";
|
|
24
|
-
export * from "./get-closest-entity-to-point.js";
|
|
25
|
-
export * from "./get-closest-entity-to-line.js";
|
|
26
|
-
export * from "./get-intersecting-entities.js";
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/math/picking/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAGX,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Table } from "../../table/index.js";
|
|
2
|
-
import { Aabb } from "../index.js";
|
|
3
|
-
import { Line3 } from "../index.js";
|
|
4
|
-
import { Entity } from "../../ecs/index.js";
|
|
5
|
-
import { PickResult } from "./pick-result.js";
|
|
6
|
-
/**
|
|
7
|
-
* Picks the closest intersecting row from a table.
|
|
8
|
-
* This would be the broad phase picking step.
|
|
9
|
-
* @returns The entity id and picked position, or null if no entity is found.
|
|
10
|
-
*/
|
|
11
|
-
export declare function pickFromTables<T extends Table<{
|
|
12
|
-
id: Entity;
|
|
13
|
-
boundingBox: Aabb;
|
|
14
|
-
}>>(options: {
|
|
15
|
-
tables: readonly T[];
|
|
16
|
-
line: Line3;
|
|
17
|
-
radius?: number;
|
|
18
|
-
predicate?: (table: T, row: number) => boolean;
|
|
19
|
-
}): PickResult | null;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
import { Aabb } from "../index.js";
|
|
23
|
-
import { Line3 } from "../index.js";
|
|
24
|
-
import { getIntersectingEntities } from "./get-intersecting-entities.js";
|
|
25
|
-
import { getClosestEntityToPoint } from "./get-closest-entity-to-point.js";
|
|
26
|
-
import { getClosestEntityToLine } from "./get-closest-entity-to-line.js";
|
|
27
|
-
/**
|
|
28
|
-
* Picks the closest intersecting row from a table.
|
|
29
|
-
* This would be the broad phase picking step.
|
|
30
|
-
* @returns The entity id and picked position, or null if no entity is found.
|
|
31
|
-
*/
|
|
32
|
-
export function pickFromTables(options) {
|
|
33
|
-
const { tables, line, radius = 0, predicate } = options;
|
|
34
|
-
let rows = getIntersectingEntities({ tables, line, radius: 0, predicate });
|
|
35
|
-
if (rows.size > 0) {
|
|
36
|
-
// For direct intersection, find the alpha for the closest intersecting entity
|
|
37
|
-
let best = null;
|
|
38
|
-
for (const [id, aabb] of rows) {
|
|
39
|
-
const alpha = Aabb.lineIntersection(aabb, line, 0);
|
|
40
|
-
if (alpha !== -1 && (best === null || alpha < best.alpha)) {
|
|
41
|
-
best = { id, alpha };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (best) {
|
|
45
|
-
return {
|
|
46
|
-
entity: best.id,
|
|
47
|
-
lineAlpha: best.alpha,
|
|
48
|
-
entityPosition: Line3.interpolate(line, best.alpha),
|
|
49
|
-
// face: AabbFace.fromPosition(Line3.interpolate(line, best.alpha), rows.get(best.id)!),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
// fallback (should not happen):
|
|
53
|
-
return getClosestEntityToPoint(rows, line.a);
|
|
54
|
-
}
|
|
55
|
-
else if (radius > 0) {
|
|
56
|
-
rows = getIntersectingEntities({ tables, line, radius, predicate });
|
|
57
|
-
if (rows.size > 0) {
|
|
58
|
-
return getClosestEntityToLine(rows, line);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=pick-from-tables.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pick-from-tables.js","sourceRoot":"","sources":["../../../src/math/picking/pick-from-tables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAGX,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAqD,OAKlF;IACG,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACxD,IAAI,IAAI,GAAG,uBAAuB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3E,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAChB,8EAA8E;QAC9E,IAAI,IAAI,GAAyC,IAAI,CAAC;QACtD,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACnD,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxD,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;YACzB,CAAC;QACL,CAAC;QACD,IAAI,IAAI,EAAE,CAAC;YACP,OAAO;gBACH,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,SAAS,EAAE,IAAI,CAAC,KAAK;gBACrB,cAAc,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;gBACnD,wFAAwF;aAC3F,CAAC;QACN,CAAC;QACD,gCAAgC;QAChC,OAAO,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;SAAM,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,IAAI,GAAG,uBAAuB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QACpE,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAChB,OAAO,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9C,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Entity } from "../../ecs/index.js";
|
|
2
|
-
import { Vec3 } from "../index.js";
|
|
3
|
-
export interface PickResult {
|
|
4
|
-
/** The entity that was picked. */
|
|
5
|
-
entity: Entity;
|
|
6
|
-
/** Alpha value (0-1) along the picking line where the intersection/closest point occurs. */
|
|
7
|
-
lineAlpha: number;
|
|
8
|
-
/** World-space position of the entity or closest point on the AABB. */
|
|
9
|
-
entityPosition: Vec3;
|
|
10
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=pick-result.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pick-result.js","sourceRoot":"","sources":["../../../src/math/picking/pick-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Schema } from "../../schema/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Privacy options used in Schema
|
|
4
|
-
*/
|
|
5
|
-
export type PrivacyOptions = {
|
|
6
|
-
[K in NonNullable<Schema["privacy"]>]?: boolean;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Checks if a component should be included for serialization
|
|
10
|
-
* @param schema
|
|
11
|
-
* @param privacyOptions
|
|
12
|
-
* @returns Whether the component should be included
|
|
13
|
-
*/
|
|
14
|
-
export declare const shouldIncludeComponentForSerialization: (schema: Schema, privacyOptions?: PrivacyOptions) => boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Filters a column for privacy by replacing its data with default values if it contains any data.
|
|
17
|
-
* @param schema - The schema of the component
|
|
18
|
-
* @param rows - The number of rows in the table
|
|
19
|
-
* @param data - The data of the column
|
|
20
|
-
* @returns The filtered column containing default values
|
|
21
|
-
*/
|
|
22
|
-
export declare const filterColumnForPrivacy: (schema: Schema, rows: any, data: any) => any;
|
|
23
|
-
/**
|
|
24
|
-
* Gets a filtered column based on privacy options
|
|
25
|
-
* @param name - The name of the component
|
|
26
|
-
* @param privacyOptions
|
|
27
|
-
* @param data - The data of the column
|
|
28
|
-
* @param componentSchemas
|
|
29
|
-
* @param rows - The number of rows in the table
|
|
30
|
-
* @returns A tuple containing the name of the component and the filtered column data
|
|
31
|
-
*/
|
|
32
|
-
export declare const getFilteredColumn: (name: string, privacyOptions: PrivacyOptions | undefined, data: any, componentSchemas: Record<string, Schema>, rows: number) => any[];
|
|
33
|
-
/**
|
|
34
|
-
* Filters a table for privacy based on the filtered components.
|
|
35
|
-
* @param filteredComponents - The components to filter
|
|
36
|
-
* @param table - The table to filter
|
|
37
|
-
* @param options - The privacy options to use
|
|
38
|
-
* @returns The filtered table
|
|
39
|
-
*/
|
|
40
|
-
export declare const filterTableForPrivacy: (filteredComponents: Record<string, Schema>, table: any, options: any) => {
|
|
41
|
-
rows: any;
|
|
42
|
-
columns: any;
|
|
43
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if a component should be included for serialization
|
|
3
|
-
* @param schema
|
|
4
|
-
* @param privacyOptions
|
|
5
|
-
* @returns Whether the component should be included
|
|
6
|
-
*/
|
|
7
|
-
export const shouldIncludeComponentForSerialization = (schema, privacyOptions) => {
|
|
8
|
-
// const schema = componentSchemas[component as keyof C];
|
|
9
|
-
// if the component has no privacy attribute, it is considered as necessary.
|
|
10
|
-
// this is to maintain backwards compatibility with existing schemas
|
|
11
|
-
if (!schema?.privacy) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
// Check the privacy attribute
|
|
15
|
-
return !schema.privacy || (privacyOptions?.[schema.privacy] ?? (schema.privacy === 'strictlyNecessary'));
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Filters a column for privacy by replacing its data with default values if it contains any data.
|
|
19
|
-
* @param schema - The schema of the component
|
|
20
|
-
* @param rows - The number of rows in the table
|
|
21
|
-
* @param data - The data of the column
|
|
22
|
-
* @returns The filtered column containing default values
|
|
23
|
-
*/
|
|
24
|
-
export const filterColumnForPrivacy = (schema, rows, data) => {
|
|
25
|
-
let value = data;
|
|
26
|
-
// If the column has no data and the filtered component has a default, use the default
|
|
27
|
-
if (value !== undefined && value !== null && (Array.isArray(value) && value.length !== 0)) {
|
|
28
|
-
// Create array filled with default values for the number of rows
|
|
29
|
-
if (rows > 0) {
|
|
30
|
-
value = new Array(rows).fill(schema.default);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
value = [];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
console.warn(`Updated column for schema ${JSON.stringify(schema)} with rows: ${rows}, original data: ${JSON.stringify(data)}, resulting value: ${JSON.stringify(value)} for privacy filter`);
|
|
37
|
-
return value;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Gets a filtered column based on privacy options
|
|
41
|
-
* @param name - The name of the component
|
|
42
|
-
* @param privacyOptions
|
|
43
|
-
* @param data - The data of the column
|
|
44
|
-
* @param componentSchemas
|
|
45
|
-
* @param rows - The number of rows in the table
|
|
46
|
-
* @returns A tuple containing the name of the component and the filtered column data
|
|
47
|
-
*/
|
|
48
|
-
export const getFilteredColumn = (name, privacyOptions, data, componentSchemas, rows) => {
|
|
49
|
-
const schema = componentSchemas[name];
|
|
50
|
-
if (shouldIncludeComponentForSerialization(schema, privacyOptions)) {
|
|
51
|
-
return [name, data];
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return [name, filterColumnForPrivacy(componentSchemas[name], rows, data)];
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Filters a table for privacy based on the filtered components.
|
|
59
|
-
* @param filteredComponents - The components to filter
|
|
60
|
-
* @param table - The table to filter
|
|
61
|
-
* @param options - The privacy options to use
|
|
62
|
-
* @returns The filtered table
|
|
63
|
-
*/
|
|
64
|
-
export const filterTableForPrivacy = (filteredComponents, table, options) => {
|
|
65
|
-
// filter the tables for privacy based on the filtered components.
|
|
66
|
-
const { rows, columns } = table;
|
|
67
|
-
const filteredColumns = Object.fromEntries(Object.entries(columns)
|
|
68
|
-
.map(([name, data]) => {
|
|
69
|
-
return getFilteredColumn(name, options, data, filteredComponents, rows);
|
|
70
|
-
}));
|
|
71
|
-
return {
|
|
72
|
-
rows,
|
|
73
|
-
columns: filteredColumns,
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=helper-functions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper-functions.js","sourceRoot":"","sources":["../../../src/old-ecs/privacy/helper-functions.ts"],"names":[],"mappings":"AA8BA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,MAAc,EAAE,cAA+B,EAAW,EAAE;IAC/G,yDAAyD;IACzD,4EAA4E;IAC5E,oEAAoE;IACpE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,8BAA8B;IAC9B,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,KAAK,mBAAmB,CAAC,CAAC,CAAC;AAC7G,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAE,IAAS,EAAE,IAAS,EAAE,EAAE;IAC3E,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,sFAAsF;IACtF,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;QACxF,iEAAiE;QACjE,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;YACX,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACjD,CAAC;aAAM,CAAC;YACJ,KAAK,GAAG,EAAE,CAAC;QACf,CAAC;IACL,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,6BAA6B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,eAAe,IAAI,oBAAoB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,sBAAsB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7L,OAAO,KAAK,CAAC;AACjB,CAAC,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,cAA0C,EAAE,IAAS,EAAE,gBAAwC,EAAE,IAAY,EAAE,EAAE;IAC7J,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,sCAAsC,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,CAAC;QACjE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,IAAI,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAC9E,CAAC;AACL,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,kBAA0C,EAAE,KAAU,EAAE,OAAY,EAAE,EAAE;IAC1G,kEAAkE;IAClE,MAAM,EAAC,IAAI,EAAE,OAAO,EAAC,GAAG,KAAK,CAAC;IAC9B,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CACtC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;SAClB,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;QAClB,OAAO,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC5E,CAAC,CAAC,CACT,CAAC;IAEF,OAAO;QACH,IAAI;QACJ,OAAO,EAAE,eAAe;KAC3B,CAAC;AACN,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|