@thi.ng/scenegraph 0.5.52 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/README.md +1 -1
- package/anode.d.ts +7 -0
- package/node2.d.ts +1 -0
- package/node2.js +3 -0
- package/node3.d.ts +1 -0
- package/node3.js +3 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-04-
|
|
3
|
+
- **Last updated**: 2023-04-19T09:28:07Z
|
|
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
|
+
## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/scenegraph@0.6.0) (2023-04-19)
|
|
13
|
+
|
|
14
|
+
#### 🚀 Features
|
|
15
|
+
|
|
16
|
+
- add ANode.mapLocalPointToGlobal(), update 2D/3D impls ([b1d30ef](https://github.com/thi-ng/umbrella/commit/b1d30ef))
|
|
17
|
+
|
|
12
18
|
## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/scenegraph@0.5.0) (2021-11-17)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/README.md
CHANGED
package/anode.d.ts
CHANGED
|
@@ -35,6 +35,13 @@ export declare abstract class ANode<T extends ISceneNode<any>> {
|
|
|
35
35
|
* @param p -
|
|
36
36
|
*/
|
|
37
37
|
abstract mapGlobalPoint(p: ReadonlyVec): Vec | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Returns copy of node local space point `p`, transformed into the global
|
|
40
|
+
* worldspace.
|
|
41
|
+
*
|
|
42
|
+
* @param p
|
|
43
|
+
*/
|
|
44
|
+
abstract mapLocalPointToGlobal(p: ReadonlyVec): Vec | undefined;
|
|
38
45
|
/**
|
|
39
46
|
* Returns copy of node local space point `p`, transformed into the
|
|
40
47
|
* coordinate system of `dest` node.
|
package/node2.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare class Node2D extends ANode<Node2D> implements ICopy<Node2D>, ISce
|
|
|
11
11
|
deleteChild(node: number | Node2D): boolean;
|
|
12
12
|
update(): void;
|
|
13
13
|
mapGlobalPoint(p: ReadonlyVec): Vec;
|
|
14
|
+
mapLocalPointToGlobal(p: ReadonlyVec): Vec;
|
|
14
15
|
mapLocalPointToNode(dest: Node2D, p: ReadonlyVec): Vec;
|
|
15
16
|
/**
|
|
16
17
|
* By implementing this method (`IToHiccup` interface), scene graph nodes
|
package/node2.js
CHANGED
|
@@ -35,6 +35,9 @@ export class Node2D extends ANode {
|
|
|
35
35
|
mapGlobalPoint(p) {
|
|
36
36
|
return mulV23([], this.invMat, p);
|
|
37
37
|
}
|
|
38
|
+
mapLocalPointToGlobal(p) {
|
|
39
|
+
return mulV23([], this.mat, p);
|
|
40
|
+
}
|
|
38
41
|
mapLocalPointToNode(dest, p) {
|
|
39
42
|
return mulV23(null, dest.invMat, mulV23([], this.mat, p));
|
|
40
43
|
}
|
package/node3.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare class Node3D extends ANode<Node3D> implements ICopy<Node3D>, ISce
|
|
|
11
11
|
deleteChild(node: number | Node3D): boolean;
|
|
12
12
|
update(): void;
|
|
13
13
|
mapGlobalPoint(p: ReadonlyVec): Vec | undefined;
|
|
14
|
+
mapLocalPointToGlobal(p: ReadonlyVec): Vec | undefined;
|
|
14
15
|
mapLocalPointToNode(dest: Node3D, p: ReadonlyVec): Vec | undefined;
|
|
15
16
|
/**
|
|
16
17
|
* Future support planned. No immediate users of this method in a 3D context
|
package/node3.js
CHANGED
|
@@ -35,6 +35,9 @@ export class Node3D extends ANode {
|
|
|
35
35
|
mapGlobalPoint(p) {
|
|
36
36
|
return mulV344([], this.invMat, p);
|
|
37
37
|
}
|
|
38
|
+
mapLocalPointToGlobal(p) {
|
|
39
|
+
return mulV344([], this.mat, p);
|
|
40
|
+
}
|
|
38
41
|
mapLocalPointToNode(dest, p) {
|
|
39
42
|
return mulV344(null, dest.invMat, mulV344([], this.mat, p));
|
|
40
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/scenegraph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Extensible 2D/3D scene graph with @thi.ng/hiccup-canvas support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
37
|
+
"@thi.ng/api": "^8.8.0",
|
|
38
38
|
"@thi.ng/checks": "^3.3.12",
|
|
39
39
|
"@thi.ng/errors": "^2.2.15",
|
|
40
|
-
"@thi.ng/matrices": "^2.1.
|
|
41
|
-
"@thi.ng/vectors": "^7.6.
|
|
40
|
+
"@thi.ng/matrices": "^2.1.53",
|
|
41
|
+
"@thi.ng/vectors": "^7.6.12"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@microsoft/api-extractor": "^7.34.4",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
],
|
|
99
99
|
"status": "alpha"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "3a56bc490f1e68754762a503d06327b5b34ff7eb\n"
|
|
102
102
|
}
|