@certe/atmos-editor 0.8.3 → 0.8.5

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.
Files changed (2) hide show
  1. package/bin/atmos-init.mjs +13 -1
  2. package/package.json +6 -6
@@ -241,6 +241,8 @@ import { Vec3, Quat, Mat4 } from '@certe/atmos-math';
241
241
  // Vec3 — Float32Array[3]
242
242
  const v = Vec3.fromValues(1, 2, 3);
243
243
  const result = Vec3.create();
244
+ Vec3.set(result, x, y, z);
245
+ Vec3.copy(result, v);
244
246
  Vec3.add(result, a, b);
245
247
  Vec3.sub(result, a, b);
246
248
  Vec3.scale(result, v, 2.0);
@@ -250,13 +252,23 @@ Vec3.lerp(result, a, b, 0.5);
250
252
  Vec3.dot(a, b); // returns number
251
253
  Vec3.length(v); // returns number
252
254
  Vec3.distance(a, b); // returns number
255
+ Vec3.transformQuat(out, v, q); // rotate vector by quaternion
253
256
 
254
257
  // Quat — Float32Array[4] as [x, y, z, w]
255
258
  const q = Quat.create(); // identity
256
259
  Quat.fromAxisAngle(q, axis, radians);
257
260
  Quat.fromEuler(q, xRad, yRad, zRad);
261
+ Quat.lookRotation(q, forwardDir); // orient -Z toward direction
262
+ Quat.lookRotation(q, forwardDir, upHint); // with custom up vector
258
263
  Quat.multiply(out, a, b);
259
- Quat.slerp(out, a, b, t);
264
+ Quat.slerp(out, a, b, t); // spherical interpolation
265
+ Quat.invert(out, q);
266
+ Quat.normalize(out, q);
267
+ Quat.rotateX(out, q, radians); // rotate around local axis
268
+ Quat.rotateY(out, q, radians);
269
+ Quat.rotateZ(out, q, radians);
270
+ Quat.toEuler(vec3Out, q); // extract euler angles
271
+ Quat.copy(out, q);
260
272
  Vec3.transformQuat(out, vec, quat); // rotate vector by quaternion
261
273
 
262
274
  // Mat4 — Float32Array[16], column-major
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@certe/atmos-editor",
3
3
  "description": "Browser-based Unity-style editor for the Atmos Engine — hierarchy, inspector, gizmos",
4
- "version": "0.8.3",
4
+ "version": "0.8.5",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/certesolutions-cyber/atmos.git",
@@ -56,11 +56,11 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@certe/atmos-animation": "^0.8.3",
60
- "@certe/atmos-assets": "^0.8.3",
61
- "@certe/atmos-core": "^0.8.3",
62
- "@certe/atmos-math": "^0.8.3",
63
- "@certe/atmos-renderer": "^0.8.3",
59
+ "@certe/atmos-animation": "^0.8.5",
60
+ "@certe/atmos-assets": "^0.8.5",
61
+ "@certe/atmos-core": "^0.8.5",
62
+ "@certe/atmos-math": "^0.8.5",
63
+ "@certe/atmos-renderer": "^0.8.5",
64
64
  "react": "^19.0.0",
65
65
  "react-dom": "^19.0.0"
66
66
  },