@wandelbots/wandelbots-js-react-components 2.26.0-pr.feature-update-to-react-19.361.4e55758 → 2.26.0-pr.feature-update-to-react-19.361.edd4b6b

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/index.js CHANGED
@@ -22353,18 +22353,20 @@ function Lc({
22353
22353
  function i(u) {
22354
22354
  o.current = u, d.start(Object.assign({}, o.current));
22355
22355
  }
22356
- const [c, d] = Id(() => ({
22357
- ...Object.assign(
22358
- {},
22359
- e.state.joint_position.joints
22360
- ),
22361
- onChange: () => {
22362
- p(), s();
22363
- },
22364
- onResolve: () => {
22365
- p();
22366
- }
22367
- }));
22356
+ const [c, d] = Id(() => {
22357
+ const u = e.state.joint_position.joints.filter(
22358
+ (y) => y !== void 0
22359
+ );
22360
+ return {
22361
+ ...Object.assign({}, u),
22362
+ onChange: () => {
22363
+ p(), s();
22364
+ },
22365
+ onResolve: () => {
22366
+ p();
22367
+ }
22368
+ };
22369
+ });
22368
22370
  function p() {
22369
22371
  if (n.current.length === 0 || !n.current.every((y) => y != null))
22370
22372
  return;
@@ -22383,7 +22385,19 @@ function Lc({
22383
22385
  const u = e.state.joint_position.joints.filter(
22384
22386
  (y) => y !== void 0
22385
22387
  );
22386
- requestAnimationFrame(() => i(u));
22388
+ requestAnimationFrame(() => {
22389
+ const y = n.current.map(
22390
+ (m, x) => {
22391
+ var I;
22392
+ return ((I = c[x]) == null ? void 0 : I.get()) || 0;
22393
+ }
22394
+ );
22395
+ Math.max(
22396
+ ...u.map(
22397
+ (m, x) => Math.abs(m - (y[x] || 0))
22398
+ )
22399
+ ) > 0.05 ? (o.current = u, d.set(Object.assign({}, o.current)), p(), s()) : i(u);
22400
+ });
22387
22401
  }), /* @__PURE__ */ b.jsx("group", { ref: l, children: a });
22388
22402
  }
22389
22403
  const Gl = "line", Jl = "mesh";