@thi.ng/scenegraph 1.0.40 → 1.0.42
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/CHANGELOG.md +7 -1
- package/README.md +2 -2
- package/anode.d.ts +5 -5
- package/api.d.ts +4 -4
- package/package.json +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-04-
|
|
3
|
+
- **Last updated**: 2024-04-23T07:02:18Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [1.0.41](https://github.com/thi-ng/umbrella/tree/@thi.ng/scenegraph@1.0.41) (2024-04-20)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update type usage ([6bf3ee1](https://github.com/thi-ng/umbrella/commit/6bf3ee1))
|
|
17
|
+
|
|
12
18
|
# [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/scenegraph@1.0.0) (2023-11-12)
|
|
13
19
|
|
|
14
20
|
#### 🛑 Breaking changes
|
package/README.md
CHANGED
|
@@ -57,10 +57,10 @@ import * as sg from "@thi.ng/scenegraph";
|
|
|
57
57
|
Browser ESM import:
|
|
58
58
|
|
|
59
59
|
```html
|
|
60
|
-
<script type="module" src="https://
|
|
60
|
+
<script type="module" src="https://esm.run/@thi.ng/scenegraph"></script>
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
[
|
|
63
|
+
[JSDelivr documentation](https://www.jsdelivr.com/)
|
|
64
64
|
|
|
65
65
|
For Node.js REPL:
|
|
66
66
|
|
package/anode.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Nullable } from "@thi.ng/api";
|
|
1
|
+
import type { Maybe, Nullable } from "@thi.ng/api";
|
|
2
2
|
import type { Mat } from "@thi.ng/matrices";
|
|
3
3
|
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
4
4
|
import type { ISceneNode, NodeInfo } from "./api.js";
|
|
@@ -27,21 +27,21 @@ export declare abstract class ANode<T extends ISceneNode<any>> {
|
|
|
27
27
|
*
|
|
28
28
|
* @param p -
|
|
29
29
|
*/
|
|
30
|
-
childForPoint(p: ReadonlyVec): NodeInfo<T
|
|
30
|
+
childForPoint(p: ReadonlyVec): Maybe<NodeInfo<T>>;
|
|
31
31
|
/**
|
|
32
32
|
* Returns copy of world space point `p`, transformed into this
|
|
33
33
|
* node's local coordinate system.
|
|
34
34
|
*
|
|
35
35
|
* @param p -
|
|
36
36
|
*/
|
|
37
|
-
abstract mapGlobalPoint(p: ReadonlyVec): Vec
|
|
37
|
+
abstract mapGlobalPoint(p: ReadonlyVec): Maybe<Vec>;
|
|
38
38
|
/**
|
|
39
39
|
* Returns copy of node local space point `p`, transformed into the global
|
|
40
40
|
* worldspace.
|
|
41
41
|
*
|
|
42
42
|
* @param p
|
|
43
43
|
*/
|
|
44
|
-
abstract mapLocalPointToGlobal(p: ReadonlyVec): Vec
|
|
44
|
+
abstract mapLocalPointToGlobal(p: ReadonlyVec): Maybe<Vec>;
|
|
45
45
|
/**
|
|
46
46
|
* Returns copy of node local space point `p`, transformed into the
|
|
47
47
|
* coordinate system of `dest` node.
|
|
@@ -49,7 +49,7 @@ export declare abstract class ANode<T extends ISceneNode<any>> {
|
|
|
49
49
|
* @param dest -
|
|
50
50
|
* @param p -
|
|
51
51
|
*/
|
|
52
|
-
abstract mapLocalPointToNode(dest: T, p: ReadonlyVec): Vec
|
|
52
|
+
abstract mapLocalPointToNode(dest: T, p: ReadonlyVec): Maybe<Vec>;
|
|
53
53
|
/**
|
|
54
54
|
* Returns true, if given point is contained within the boundary of
|
|
55
55
|
* this node. Since this class is used as generic base
|
package/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IID, Nullable } from "@thi.ng/api";
|
|
1
|
+
import type { IID, Maybe, Nullable } from "@thi.ng/api";
|
|
2
2
|
import type { Mat } from "@thi.ng/matrices";
|
|
3
3
|
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
4
4
|
export interface ISceneNode<T extends ISceneNode<T>> extends IID<string> {
|
|
@@ -11,10 +11,10 @@ export interface ISceneNode<T extends ISceneNode<T>> extends IID<string> {
|
|
|
11
11
|
deleteChild(node: number | T): boolean;
|
|
12
12
|
update(): void;
|
|
13
13
|
draw<D>(ctx: D): void;
|
|
14
|
-
mapGlobalPoint(p: ReadonlyVec): Vec
|
|
15
|
-
mapLocalPointToNode(dest: ISceneNode<T>, p: ReadonlyVec): Vec
|
|
14
|
+
mapGlobalPoint(p: ReadonlyVec): Maybe<Vec>;
|
|
15
|
+
mapLocalPointToNode(dest: ISceneNode<T>, p: ReadonlyVec): Maybe<Vec>;
|
|
16
16
|
containsLocalPoint(_: ReadonlyVec): boolean;
|
|
17
|
-
childForPoint(p: ReadonlyVec): NodeInfo<T
|
|
17
|
+
childForPoint(p: ReadonlyVec): Maybe<NodeInfo<T>>;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Node information for mouse picking.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/scenegraph",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"description": "Extensible 2D/3D scene graph with @thi.ng/hiccup-canvas support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build": "yarn build:esbuild && yarn build:decl",
|
|
28
28
|
"build:decl": "tsc --declaration --emitDeclarationOnly",
|
|
29
29
|
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
30
|
-
"clean": "
|
|
30
|
+
"clean": "bun ../../tools/src/clean-package.ts",
|
|
31
31
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
32
32
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
33
33
|
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
@@ -36,16 +36,15 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.
|
|
40
|
-
"@thi.ng/checks": "^3.6.
|
|
41
|
-
"@thi.ng/errors": "^2.5.
|
|
42
|
-
"@thi.ng/matrices": "^2.3.
|
|
43
|
-
"@thi.ng/vectors": "^7.10.
|
|
39
|
+
"@thi.ng/api": "^8.11.1",
|
|
40
|
+
"@thi.ng/checks": "^3.6.3",
|
|
41
|
+
"@thi.ng/errors": "^2.5.6",
|
|
42
|
+
"@thi.ng/matrices": "^2.3.35",
|
|
43
|
+
"@thi.ng/vectors": "^7.10.29"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@microsoft/api-extractor": "^7.43.0",
|
|
47
47
|
"esbuild": "^0.20.2",
|
|
48
|
-
"rimraf": "^5.0.5",
|
|
49
48
|
"typedoc": "^0.25.12",
|
|
50
49
|
"typescript": "^5.4.3"
|
|
51
50
|
},
|
|
@@ -100,5 +99,5 @@
|
|
|
100
99
|
],
|
|
101
100
|
"status": "alpha"
|
|
102
101
|
},
|
|
103
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "5dd66c18a3862a3af69a5b2f49563f7cbdd960c2\n"
|
|
104
103
|
}
|