import{V as c,Q as h,az as m}from"./index-6jOCfdig.js";import{S as p}from"./objectModelMapping-DT0r674A.js";import"./index-Ds2meNS5.js";import"./svelte/svelte_svelte.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_client.js";import"./svelte/svelte_internal_flags_async.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";function T(a,n,t,o){return c.FromArray(n,t).scaleInPlace(o)}function f(a,n,t,o){return h.FromArray(n,t).scaleInPlace(o)}function y(a,n,t,o){const i=new Array(a._numMorphTargets);for(let r=0;r<i.length;r++)i[r]=n[t++]*o;return i}class g{constructor(n,t,o,i){this.type=n,this.name=t,this.getValue=o,this.getStride=i}_buildAnimation(n,t,o){const i=new m(n,this.name,t,this.type);return i.setKeys(o,!0),i}}class l extends g{buildAnimations(n,t,o,i){const r=[];return r.push({babylonAnimatable:n._babylonTransformNode,babylonAnimation:this._buildAnimation(t,o,i)}),r}}class d extends g{buildAnimations(n,t,o,i){const r=[];if(n._numMorphTargets)for(let s=0;s<n._numMorphTargets;s++){const u=new m(`${t}_${s}`,this.name,o,this.type);if(u.setKeys(i.map(e=>({frame:e.frame,inTangent:e.inTangent?e.inTangent[s]:void 0,value:e.value[s],outTangent:e.outTangent?e.outTangent[s]:void 0,interpolation:e.interpolation})),!0),n._primitiveBabylonMeshes){for(const e of n._primitiveBabylonMeshes)if(e.morphTargetManager){const b=e.morphTargetManager.getTarget(s),A=u.clone();b.animations.push(A),r.push({babylonAnimatable:b,babylonAnimation:A})}}}return r}}p("/nodes/{}/translation",[new l(m.ANIMATIONTYPE_VECTOR3,"position",T,()=>3)]);p("/nodes/{}/rotation",[new l(m.ANIMATIONTYPE_QUATERNION,"rotationQuaternion",f,()=>4)]);p("/nodes/{}/scale",[new l(m.ANIMATIONTYPE_VECTOR3,"scaling",T,()=>3)]);p("/nodes/{}/weights",[new d(m.ANIMATIONTYPE_FLOAT,"influence",y,a=>a._numMorphTargets)]);export{g as AnimationPropertyInfo,l as TransformNodeAnimationPropertyInfo,d as WeightAnimationPropertyInfo,f as getQuaternion,T as getVector3,y as getWeights};
