Skip to content

Commit 5fb0f16

Browse files
committed
rename mat4LookAt → mat4View, mat4EyeMatrix → mat4Eye in form.js
1 parent 2a99f8e commit 5fb0f16

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ Both accept the same options object:
581581
# Utilities
582582
583583
```js
584-
p5.Tree.VERSION // '0.0.30'
584+
p5.Tree.VERSION // '0.0.31'
585585
```
586586
587587
## Shader helpers
@@ -656,9 +656,9 @@ Latest:
656656
657657
Tagged:
658658
659-
* [https://cdn.jsdelivr.net/npm/p5.tree@0.0.30/dist/p5.tree.js](https://cdn.jsdelivr.net/npm/p5.tree@0.0.30/dist/p5.tree.js)
660-
* [https://cdn.jsdelivr.net/npm/p5.tree@0.0.30/dist/p5.tree.min.js](https://cdn.jsdelivr.net/npm/p5.tree@0.0.30/dist/p5.tree.min.js)
661-
* [https://cdn.jsdelivr.net/npm/p5.tree@0.0.30/dist/p5.tree.esm.js](https://cdn.jsdelivr.net/npm/p5.tree@0.0.30/dist/p5.tree.esm.js)
659+
* [https://cdn.jsdelivr.net/npm/p5.tree@0.0.31/dist/p5.tree.js](https://cdn.jsdelivr.net/npm/p5.tree@0.0.31/dist/p5.tree.js)
660+
* [https://cdn.jsdelivr.net/npm/p5.tree@0.0.31/dist/p5.tree.min.js](https://cdn.jsdelivr.net/npm/p5.tree@0.0.31/dist/p5.tree.min.js)
661+
* [https://cdn.jsdelivr.net/npm/p5.tree@0.0.31/dist/p5.tree.esm.js](https://cdn.jsdelivr.net/npm/p5.tree@0.0.31/dist/p5.tree.esm.js)
662662
663663
---
664664

deps/tree/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ mat4PV mat4MV
289289
**Matrix construction from specs** (`form.js`):
290290
```
291291
mat4FromBasis — rigid frame from orthonormal basis + translation
292-
mat4LookAt — view matrix (world→eye) from lookat params
293-
mat4EyeMatrix — eye matrix (eye→world) from lookat params
292+
mat4View — view matrix (world→eye) from lookat params
293+
mat4Eye — eye matrix (eye→world) from lookat params
294294
mat4FromTRS — column-major mat4 from flat TRS scalars
295295
mat4FromTranslation — translation-only mat4
296296
mat4FromScale — scale-only mat4

deps/tree/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nakednous/tree",
3-
"version": "0.0.11",
3+
"version": "0.0.12",
44
"description": "tree — pure numeric core. Zero dependencies.",
55
"type": "module",
66
"main": "dist/index.js",

deps/tree/src/form.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Lookat constructors live here because a camera is just a frame — the eye
1515
* matrix is the camera object's model matrix, not a camera-specific concept.
16-
* There is no camera module; mat4LookAt and mat4EyeMatrix are frame
16+
* There is no camera module; mat4View and mat4Eye are frame
1717
* constructions that happen to use lookat parameterisation.
1818
*
1919
* Projection constructors live here because they construct matrices from
@@ -71,7 +71,7 @@ export function mat4FromBasis(out, rx,ry,rz, ux,uy,uz, fx,fy,fz, tx,ty,tz) {
7171
* @param {number} ux,uy,uz World up hint (need not be unit).
7272
* @returns {Float32Array|number[]} out
7373
*/
74-
export function mat4LookAt(out, ex,ey,ez, cx,cy,cz, ux,uy,uz) {
74+
export function mat4View(out, ex,ey,ez, cx,cy,cz, ux,uy,uz) {
7575
// z = normalize(eye - center) (camera +Z away from target)
7676
let zx=ex-cx, zy=ey-cy, zz=ez-cz;
7777
const zl=Math.sqrt(zx*zx+zy*zy+zz*zz)||1;
@@ -96,16 +96,16 @@ export function mat4LookAt(out, ex,ey,ez, cx,cy,cz, ux,uy,uz) {
9696
/**
9797
* Eye matrix (eye→world) from lookat parameters.
9898
* Transpose of the rotation block + direct translation column.
99-
* Same inputs as mat4LookAt.
99+
* Same inputs as mat4View.
100100
*
101101
* @param {Float32Array|number[]} out 16-element destination.
102102
* @param {number} ex,ey,ez Eye (camera) position.
103103
* @param {number} cx,cy,cz Center (look-at target).
104104
* @param {number} ux,uy,uz World up hint (need not be unit).
105105
* @returns {Float32Array|number[]} out
106106
*/
107-
export function mat4EyeMatrix(out, ex,ey,ez, cx,cy,cz, ux,uy,uz) {
108-
// Same basis computation as mat4LookAt.
107+
export function mat4Eye(out, ex,ey,ez, cx,cy,cz, ux,uy,uz) {
108+
// Same basis computation as mat4View.
109109
let zx=ex-cx, zy=ey-cy, zz=ez-cz;
110110
const zl=Math.sqrt(zx*zx+zy*zy+zz*zz)||1;
111111
zx/=zl; zy/=zl; zz/=zl;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p5.tree",
3-
"version": "0.0.30",
3+
"version": "0.0.31",
44
"description": "Render pipeline for p5.js v2 — pose and camera interpolation, space transforms, frustum visibility, HUD, post-processing pipe, picking, and declarative control panels.",
55
"type": "module",
66
"main": "dist/p5.tree.esm.js",
@@ -49,7 +49,7 @@
4949
"p5": "^2.2.3"
5050
},
5151
"dependencies": {
52-
"@nakednous/tree": "^0.0.11",
52+
"@nakednous/tree": "^0.0.12",
5353
"@nakednous/ui": "^0.0.8"
5454
},
5555
"devDependencies": {

src/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function installConstants(p5) {
1212
const CONST = value => ({ value, writable: false, enumerable: true, configurable: false });
1313

1414
Object.defineProperties(p5.Tree, {
15-
VERSION: CONST('0.0.30'),
15+
VERSION: CONST('0.0.31'),
1616
NONE: CONST(0),
1717

1818
// Core constants (spaces, visibility, NDC, basis vectors)

0 commit comments

Comments
 (0)