@hology/core 0.0.171 → 0.0.173

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.
@@ -1,4 +1,4 @@
1
- import{Behaviour as o,Emitter as t}from"@hology/nebula";import{RayTestResult as i}from"../../gameplay/services/physics/physics-system.js";import{Color as e,Vector3 as l}from"three";export class WorldCollisionBehaviour extends o{constructor(o,t=0,i=0,e=0){super(),this.physics=o,this.bounce=t,this.friction=i,this.lifeLoss=e}initialize(o){null==o.old.rayFrom?o.old.rayFrom=new l:o.old.rayFrom.set(0,0,0),o.old.rayLength=-1,null==o.old.hitNormal?o.old.hitNormal=new l:o.old.hitNormal.set(0,0,0),o.old.hitDistance=-1}mutate(o,i,e){if(0===o.velocity.length())return;const l=.5*o.scale*.5;a.copy(o.velocity).normalize(),s.copy(o.velocity).multiplyScalar(i);const y=r.copy(o.old.velocity).normalize(),d=o.old.rayFrom,m=o.old.hitDistance,p=o.old.hitNormal,u=o.old.rayLength;if(y.dot(a)>.99&&o.position.distanceTo(d)+l<u)m>0?(n.hasHit=!0,n.distance=m-d.distanceTo(o.position),n.hitNormal.copy(p)):n.hasHit=!1;else{const t=15;c.copy(o.position).addScaledVector(o.velocity,i*t).addScaledVector(a,l),this.physics.rayTest(o.position,c,n),o.old.rayFrom.copy(o.position),o.old.hitDistance=n.hasHit?n.distance:-1,o.old.hitNormal.copy(n.hitNormal),o.old.rayLength=o.position.distanceTo(c)}var f,v,w;n.hasHit&&s.length()+l>n.distance&&(o.acceleration.set(0,0,0),this.bounce>0?(f=o.velocity,v=n.hitNormal,w=this.bounce,o.velocity.copy(f).sub(h.copy(v).multiplyScalar(2*f.dot(v))).multiplyScalar(w)):function(o,t,i=.95,e){const l=h.copy(t).multiplyScalar(o.dot(t)),s=e.sub(l).multiplyScalar(1-i)}(o.velocity,n.hitNormal,this.friction,o.velocity),o.old.hitDistance=-1,o.parent instanceof t&&o.parent.dispatch("PARTICLE_COLLISION",o),this.lifeLoss>0&&setTimeout(()=>{o.life-=this.lifeLoss+30},30))}}const s=new l,a=new l,c=new l,n=new i,r=(new l,new l),h=new l;(new e).setRGB(Math.random(),Math.random(),Math.random());/*
1
+ import{Behaviour as o,Emitter as t}from"@hology/nebula";import{RayTestResult as i}from"../../gameplay/services/physics/physics-system.js";import{Color as l,Vector3 as e}from"three";export class WorldCollisionBehaviour extends o{constructor(o,t=0,i=0,l=0){super(),this.physics=o,this.bounce=t,this.friction=i,this.lifeLoss=l}initialize(o){null==o.old.rayFrom?o.old.rayFrom=new e:o.old.rayFrom.set(0,0,0),o.old.rayLength=-1,null==o.old.hitNormal?o.old.hitNormal=new e:o.old.hitNormal.set(0,0,0),o.old.hitDistance=-1}mutate(o,i,l){if(0===o.velocity.length())return;const e=r(),c=.5*o.scale*.5;a.copy(o.velocity).normalize(),s.copy(o.velocity).multiplyScalar(i);const d=h.copy(o.old.velocity).normalize(),m=o.old.rayFrom,p=o.old.hitDistance,u=o.old.hitNormal,f=o.old.rayLength;if(d.dot(a)>.99&&o.position.distanceTo(m)+c<f)p>0?(e.hasHit=!0,e.distance=p-m.distanceTo(o.position),e.hitNormal.copy(u)):e.hasHit=!1;else{const t=15;n.copy(o.position).addScaledVector(o.velocity,i*t).addScaledVector(a,c),this.physics.rayTest(o.position,n,e),o.old.rayFrom.copy(o.position),o.old.hitDistance=e.hasHit?e.distance:-1,o.old.hitNormal.copy(e.hitNormal),o.old.rayLength=o.position.distanceTo(n)}var v,w,N;e.hasHit&&s.length()+c>e.distance&&(o.acceleration.set(0,0,0),this.bounce>0?(v=o.velocity,w=e.hitNormal,N=this.bounce,o.velocity.copy(v).sub(y.copy(w).multiplyScalar(2*v.dot(w))).multiplyScalar(N)):function(o,t,i=.95,l){const e=y.copy(t).multiplyScalar(o.dot(t)),s=l.sub(e).multiplyScalar(1-i)}(o.velocity,e.hitNormal,this.friction,o.velocity),o.old.hitDistance=-1,o.parent instanceof t&&o.parent.dispatch("PARTICLE_COLLISION",o),this.lifeLoss>0&&setTimeout(()=>{o.life-=this.lifeLoss+30},30))}}const s=new e,a=new e,n=new e;let c=null;function r(){return null===c&&(c=new i),c}new e;const h=new e,y=new e;(new l).setRGB(Math.random(),Math.random(),Math.random());/*
2
2
  * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,7 +1,8 @@
1
1
  import { CustomRenderer, MeshRenderer, Particle } from '@hology/nebula';
2
2
  import * as THREE from 'three';
3
3
  import { Object3D } from 'three';
4
- import { OutputTextureSetting, ViewController } from '../../gameplay';
4
+ import { ViewController } from '../../gameplay/services/render.js';
5
+ import { OutputTextureSetting } from './vfx-asset.js';
5
6
  export declare class MultiRenderer extends CustomRenderer {
6
7
  private worldContainer;
7
8
  private localContainer;
@@ -1,6 +1,7 @@
1
+ import * as THREE from 'three';
2
+ import { AnimationAction, Vector3 } from 'three';
1
3
  import { ActionInput, AxisInput, RotationInput } from '../../../../../gameplay/input/index.js';
2
4
  import { PhysicsSystem } from '../../../../../gameplay/services/physics/physics-system.js';
3
- import { Vector3, AnimationAction } from 'three';
4
5
  import { ActorComponent } from '../../../component.js';
5
6
  import { CharacterMovementMode } from './modes.js';
6
7
  export declare class CharacterMovementComponent extends ActorComponent {
@@ -45,7 +46,7 @@ export declare class CharacterMovementComponent extends ActorComponent {
45
46
  * inputs should be ignored.
46
47
  */
47
48
  enabled: boolean;
48
- readonly velocity: Vector3;
49
+ readonly velocity: THREE.Vector3;
49
50
  mode: CharacterMovementMode;
50
51
  isSprinting: boolean;
51
52
  pressedJump: boolean;
@@ -1,4 +1,4 @@
1
- import{__decorate as t,__metadata as e}from"tslib";import{ActionInput as i,AxisInput as o,RotationInput as s}from"../../../../../gameplay/input/index.js";import{PhysicsSystem as n,RayTestResult as r}from"../../../../../gameplay/services/physics/physics-system.js";import{MathUtils as a,Vector3 as c,ArrowHelper as l}from"three";import{ActorComponent as h,Component as p}from"../../../component.js";import{CharacterMovementMode as m}from"./modes.js";import{CapsuleCollisionShape as u}from"../../../../../scene/collision/collision-shape.js";import{takeUntil as d}from"rxjs";import{PhysicsBodyType as y}from"../../../../services/physics/physics-system.js";import g from"@dimforge/rapier3d-compat";import{RootMotionClip as f}from"../../../../../gameplay/animation/root-motion.js";import*as S from"three";import{clamp as w}from"../../../../../utils/math.js";const v=new c,M=new c,x=1/30,T=131070;let b=class extends h{get autoStepMinWidth(){return this.cc.autostepMinWidth()}set autoStepMinWidth(t){this.cc.enableAutostep(this.cc.autostepMaxHeight(),t,this.cc.autostepIncludesDynamicBodies())}get autoStepDynamicObjects(){return this.cc.autostepIncludesDynamicBodies()}set autoStepDynamicObjects(t){this.cc.enableAutostep(this.cc.autostepMaxHeight(),this.cc.autostepMinWidth(),t)}get autoStepMaxHeight(){return this.cc.autostepMaxHeight()}set autoStepMaxHeight(t){this.cc.enableAutostep(t,this.cc.autostepMinWidth(),this.cc.autostepIncludesDynamicBodies())}get snapToGround(){return this.cc.snapToGroundDistance()}set snapToGround(t){this.cc.enableSnapToGround(t)}set offset(t){this.cc.setOffset(t)}get offset(){return this.cc.offset()}set normalNudgeFactor(t){this.cc.setNormalNudgeFactor(t)}get normalNudgeFactor(){return this.cc.normalNudgeFactor()}constructor(t){super(),this.physicsSystem=t,this.directionInput=new o,this.jumpInput=new i,this.sprintInput=new i,this.rotationInput=new s,this.horizontalSpeed=0,this.maxSpeed=8,this.maxSpeedBackwards=8,this.maxSpeedSprint=12,this.jumpVelocity=7,this.fallingMovementControl=.5,this.fallingReorientation=!1,this.gravityOverride=null,this.colliderHeight=2,this.colliderRadius=.5,this.jumpInAir=!1,this.mass=50,this.allowSliding=!0,this.minSlopeSlideAngle=a.degToRad(70),this.maxSlopeClimbAngle=a.degToRad(70),this.applyImpulsesToDynamicBodies=!0,this.characterCollision=!1,this.enabled=!0,this.velocity=new c,this.mode=m.walking,this.isSprinting=!1,this.pressedJump=!1,this.rayTestResult=new r,this.resetRootMotion=!1,this.rotateToMovementDirection=!1,this.smoothRotation=!0,this.impulse=new c,this.impulseDamping=2;const e=this.cc=this.physicsSystem.getCharacterController(.1);e.enableSnapToGround(.1),e.enableAutostep(0,.1,!1)}onInit(){const t=this.cc;t.setApplyImpulsesToDynamicBodies(this.applyImpulsesToDynamicBodies),t.setMinSlopeSlideAngle(this.minSlopeSlideAngle),t.setMaxSlopeClimbAngle(this.maxSlopeClimbAngle),t.setCharacterMass(this.mass),t.setSlideEnabled(this.allowSliding),this.physicsSystem.addActor(this.actor,[this.createCollisionShape()],{mass:0,type:y.kinematic,continousCollisionDetection:!1,friction:0,restitution:.5,ignoreForNavMesh:!0}),this.rotationInput.rotation.copy(this.actor.rotation);let e=this.rotationInput.rotation.y;const i=new c,o=new c,s=new c,n=new c(0,0,1),r=new c,l=new c,h=new c;let p=0,u=null;const g=new c,b=new c,j=new c,C=new c,R=new c,D=new c,k=this.characterCollision?null:T;let q=this.rotateToMovementDirection;this.physicsSystem.beforeStep.pipe(d(this.disposed)).subscribe(d=>{if(this.checkGrounded(d),!this.enabled)return;if(null!=this.rootMotionAction){if(this.rootMotionAction.getClip()instanceof f){const t=this.rootMotionInterpolant;this.resetRootMotion&&(g.fromArray(t.evaluate(0)),this.resetRootMotion=!1),C.fromArray(t.evaluate(this.rootMotionAction.time)),b.subVectors(C,g),g.copy(C),this.rootMotionAction.getRoot().getWorldScale(j),b.multiply(j)}}d>x&&(d=x);const y=null!=this.rootMotionAction&&this.rootMotionAction.enabled&&0!=b.length();this.pressedJump=this.jumpInput.activated,this.isSprinting=this.sprintInput.activated;const T=q!==this.rotateToMovementDirection;let B=this.rotationInput.rotation.y-e;T&&(this.actor.object.quaternion.setFromEuler(H.set(0,this.rotationInput.rotation.y,0)),q?this.actor.object.quaternion.setFromEuler(H.set(0,this.rotationInput.rotation.y,0)):(B=0,e=this.rotationInput.rotation.y,n.set(0,0,1)),q=this.rotateToMovementDirection),s.copy(this.actor.position),r.set(-this.directionInput.vector.x,0,this.directionInput.vector.y).normalize();const W=!this.rotateToMovementDirection&&r.z<0?this.maxSpeedBackwards:this.isSprinting?this.maxSpeedSprint:this.maxSpeed;if(h.set(0,0,0),this.rotateToMovementDirection){if(r.lengthSq()>0){this.smoothRotation?(P=r,Q=11*d,O=D,(N=n).normalize(),P.normalize(),z.setFromUnitVectors(N,P),F.identity(),F.slerp(z,Q),O.copy(N).applyQuaternion(F)):D.copy(r),z.setFromUnitVectors(n.clone().normalize(),D.clone().normalize()),n.copy(D);const t=(B%(2*Math.PI)+3*Math.PI)%(2*Math.PI)-Math.PI,i=Math.abs(t),o=this.smoothRotation?w(10*d*t,-i,i):t;E.setFromEuler(H.set(0,o,0)),z.multiply(E),this.actor.object.applyQuaternion(z),h.copy(this.actor.object.getWorldDirection(V).normalize()),e+=o}}else e+=B,this.actor.object.quaternion.multiply(z.setFromEuler(H.set(0,B,0))),r.lengthSq()>0&&h.copy(r).applyQuaternion(this.actor.object.quaternion).normalize();var N,P,Q,O;if(R.set(0,0,0),this.rayTestResult.hasHit&&null!=this.rayTestResult.actor&&this.physicsSystem.getLinearVelocity(this.rayTestResult.actor,R),this.mode===m.walking?(0!==h.lengthSq()?(p=Math.min(W,p),p=a.lerp(p,W,4*d)):p=0,l.copy(h).multiplyScalar(p),this.pressedJump&&(this.mode=m.falling,this.velocity.copy(l),this.velocity.y=this.jumpVelocity),l.y=d*this.getEffectiveGravity(),l.add(R)):this.mode===m.falling&&(this.pressedJump&&this.jumpInAir&&(this.mode=m.falling,this.velocity.copy(l),this.velocity.y=this.jumpVelocity),this.velocity.y+=d*this.getEffectiveGravity(),l.copy(this.velocity),l.addScaledVector(h,this.fallingMovementControl),this.fallingReorientation&&l.applyAxisAngle(new c(0,1,0),B)),this.impulse.lengthSq()>.1){const t=Math.min(1,this.impulse.length()/5);l.x=a.lerp(l.x,this.impulse.x,t),l.z=a.lerp(l.z,this.impulse.z,t),l.y+=this.impulse.y;const e=Math.exp(-this.impulseDamping*d);this.impulse.x*=e,this.impulse.y>0?this.impulse.y+=d*this.getEffectiveGravity():this.impulse.y*=e,this.impulse.z*=e}else this.impulse.set(0,0,0);if(o.copy(l).normalize(),i.copy(l),l.length()>0||!this.isGrounded||y){if(y?(b.applyQuaternion(this.actor.quaternion),b.y+=d*this.getEffectiveGravity(),v.copy(b)):v.copy(l).multiplyScalar(d),this.isGrounded&&this.mode===m.walking&&(this.rayTestResult.distance>t.offset()||(v.y=Math.max(0,R.y*d)),this.physicsSystem.getActorComputedMovement(this.actor,t,v,k),t.computedCollision(0,G),null!=G&&null!=G.normal1)){const e=(new S.Vector3).copy(G.normal1);Math.acos(e.dot(A))>t.maxSlopeClimbAngle()&&(v.y=.016*this.getEffectiveGravity()*.5)}M.copy(this.physicsSystem.getActorComputedMovement(this.actor,t,v,k))}else M.set(0,0,0);this.physicsSystem.setNextKinematicTranslation(this.actor,M);let J=function(t){if(t.numComputedCollisions()>0){const e=t.computedCollision(0);I.x=e.normal2.x,I.y=e.normal2.y,I.z=e.normal2.z;const i=I.angleTo(A);I.x=e.normal1.x,I.y=e.normal1.y,I.z=e.normal1.z;const o=I.angleTo(A);return!(i<100)&&o>t.minSlopeSlideAngle()}return!1}(t);y||this.isGrounded&&!J||this.mode!==m.falling&&(null==u?u=performance.now():performance.now()-u>100&&(this.mode=m.falling,this.velocity.copy(i))),this.isGrounded&&this.velocity.y<=0&&(this.mode,m.falling,this.mode=m.walking,this.velocity.y=0,u=null),this.mode,m.walking,this.horizontalSpeed=p})}applyImpulse(t){this.impulse.add(t)}debugDirection(){const t=new l(v,this.actor.position,1,65280);this.actor.object.parent.add(t),setTimeout(()=>{t.removeFromParent()},30);const e=new l(M,this.actor.position,1,16711680);this.actor.object.parent.add(e),setTimeout(()=>{e.removeFromParent()},30)}setRootMotionAction(t){const e=t?.getClip();if(e instanceof f){this.rootMotionAction=t,this.resetRootMotion=!0;const i=[];this.rootMotionInterpolant=e.motionTrack.InterpolantFactoryMethodSmooth(i)}}getWallDirection(t,e){const i=t.clone().negate().cross(A);return i.dot(e)<0?i.negate():i}moveTo(t){this.actor.position.copy(t),this.physicsSystem.updateActorTransform(this.actor)}getEffectiveGravity(){return this.gravityOverride??this.physicsSystem.getGravity().y}checkGrounded(t){this.colliderHeight,this.colliderRadius;D.y=-.05,this.physicsSystem.rayTest(j.addVectors(this.actor.position,R.set(0,this.offset,0)),C.addVectors(this.actor.position,D),this.rayTestResult,{excludeActor:this.actor,excludeTriggers:!0})}get isGrounded(){return this.rayTestResult.hasHit||this.cc.computedGrounded()}createCollisionShape(){const t=new u(this.colliderHeight,this.colliderRadius);return t.offset.y=this.colliderRadius+this.colliderHeight/2+this.offset,t.collisionGroup=T,t}step(t){}performMovement(t){}arrowHelper(t,e,i){const o=new l(t.clone().normalize(),e,1,i);this.actor.object.parent.add(o),setTimeout(()=>{o.removeFromParent()},30)}};b=t([p({inEditor:!1}),e("design:paramtypes",[n])],b);export{b as CharacterMovementComponent};const A=new c(0,1,0),I=new c;const j=new c,C=new c,R=new c(0,1,0),D=new c(0,-.1,0),G=(new c(0,-1,0),new g.CharacterCollision),z=new S.Quaternion,F=new S.Quaternion,E=new S.Quaternion,H=new S.Euler,V=new S.Vector3;/*
1
+ import{__decorate as t,__metadata as e}from"tslib";import i from"@dimforge/rapier3d-compat";import{takeUntil as o}from"rxjs";import*as s from"three";import{ArrowHelper as n,MathUtils as r,Vector3 as a}from"three";import{RootMotionClip as c}from"../../../../../gameplay/animation/root-motion.js";import{ActionInput as l,AxisInput as h,RotationInput as p}from"../../../../../gameplay/input/index.js";import{PhysicsSystem as m,RayTestResult as u}from"../../../../../gameplay/services/physics/physics-system.js";import{CapsuleCollisionShape as d}from"../../../../../scene/collision/collision-shape.js";import{clamp as y}from"../../../../../utils/math.js";import{PhysicsBodyType as g}from"../../../../services/physics/physics-system.js";import{ActorComponent as f,Component as S}from"../../../component.js";import{CharacterMovementMode as w}from"./modes.js";const v=new a,M=new a,x=1/30,T=131070;let b=class extends f{get autoStepMinWidth(){return this.cc.autostepMinWidth()}set autoStepMinWidth(t){this.cc.enableAutostep(this.cc.autostepMaxHeight(),t,this.cc.autostepIncludesDynamicBodies())}get autoStepDynamicObjects(){return this.cc.autostepIncludesDynamicBodies()}set autoStepDynamicObjects(t){this.cc.enableAutostep(this.cc.autostepMaxHeight(),this.cc.autostepMinWidth(),t)}get autoStepMaxHeight(){return this.cc.autostepMaxHeight()}set autoStepMaxHeight(t){this.cc.enableAutostep(t,this.cc.autostepMinWidth(),this.cc.autostepIncludesDynamicBodies())}get snapToGround(){return this.cc.snapToGroundDistance()}set snapToGround(t){this.cc.enableSnapToGround(t)}set offset(t){this.cc.setOffset(t)}get offset(){return this.cc.offset()}set normalNudgeFactor(t){this.cc.setNormalNudgeFactor(t)}get normalNudgeFactor(){return this.cc.normalNudgeFactor()}constructor(t){super(),this.physicsSystem=t,this.directionInput=new h,this.jumpInput=new l,this.sprintInput=new l,this.rotationInput=new p,this.horizontalSpeed=0,this.maxSpeed=8,this.maxSpeedBackwards=8,this.maxSpeedSprint=12,this.jumpVelocity=7,this.fallingMovementControl=.5,this.fallingReorientation=!1,this.gravityOverride=null,this.colliderHeight=2,this.colliderRadius=.5,this.jumpInAir=!1,this.mass=50,this.allowSliding=!0,this.minSlopeSlideAngle=r.degToRad(70),this.maxSlopeClimbAngle=r.degToRad(70),this.applyImpulsesToDynamicBodies=!0,this.characterCollision=!1,this.enabled=!0,this.velocity=new a,this.mode=w.walking,this.isSprinting=!1,this.pressedJump=!1,this.rayTestResult=new u,this.resetRootMotion=!1,this.rotateToMovementDirection=!1,this.smoothRotation=!0,this.impulse=new a,this.impulseDamping=2;const e=this.cc=this.physicsSystem.getCharacterController(.1);e.enableSnapToGround(.1),e.enableAutostep(0,.1,!1)}onInit(){const t=this.cc;t.setApplyImpulsesToDynamicBodies(this.applyImpulsesToDynamicBodies),t.setMinSlopeSlideAngle(this.minSlopeSlideAngle),t.setMaxSlopeClimbAngle(this.maxSlopeClimbAngle),t.setCharacterMass(this.mass),t.setSlideEnabled(this.allowSliding),this.physicsSystem.addActor(this.actor,[this.createCollisionShape()],{mass:0,type:g.kinematic,continousCollisionDetection:!1,friction:0,restitution:.5,ignoreForNavMesh:!0}),this.rotationInput.rotation.copy(this.actor.rotation);let e=this.rotationInput.rotation.y;const i=new a,n=new a,l=new a,h=new a(0,0,1),p=new a,m=new a,u=new a;let d=0,f=null;const S=new a,b=new a,j=new a,C=new a,R=new a,D=new a,k=this.characterCollision?null:T;let q=this.rotateToMovementDirection;this.physicsSystem.beforeStep.pipe(o(this.disposed)).subscribe(o=>{if(this.checkGrounded(o),!this.enabled)return;if(null!=this.rootMotionAction){if(this.rootMotionAction.getClip()instanceof c){const t=this.rootMotionInterpolant;this.resetRootMotion&&(S.fromArray(t.evaluate(0)),this.resetRootMotion=!1),C.fromArray(t.evaluate(this.rootMotionAction.time)),b.subVectors(C,S),S.copy(C),this.rootMotionAction.getRoot().getWorldScale(j),b.multiply(j)}}o>x&&(o=x);const g=null!=this.rootMotionAction&&this.rootMotionAction.enabled&&0!=b.length();this.pressedJump=this.jumpInput.activated,this.isSprinting=this.sprintInput.activated;const T=q!==this.rotateToMovementDirection;let B=this.rotationInput.rotation.y-e;T&&(this.actor.object.quaternion.setFromEuler(H.set(0,this.rotationInput.rotation.y,0)),q?this.actor.object.quaternion.setFromEuler(H.set(0,this.rotationInput.rotation.y,0)):(B=0,e=this.rotationInput.rotation.y,h.set(0,0,1)),q=this.rotateToMovementDirection),l.copy(this.actor.position),p.set(-this.directionInput.vector.x,0,this.directionInput.vector.y).normalize();const W=!this.rotateToMovementDirection&&p.z<0?this.maxSpeedBackwards:this.isSprinting?this.maxSpeedSprint:this.maxSpeed;if(u.set(0,0,0),this.rotateToMovementDirection){if(p.lengthSq()>0){this.smoothRotation?(P=p,Q=11*o,O=D,(N=h).normalize(),P.normalize(),z.setFromUnitVectors(N,P),F.identity(),F.slerp(z,Q),O.copy(N).applyQuaternion(F)):D.copy(p),z.setFromUnitVectors(h.clone().normalize(),D.clone().normalize()),h.copy(D);const t=(B%(2*Math.PI)+3*Math.PI)%(2*Math.PI)-Math.PI,i=Math.abs(t),s=this.smoothRotation?y(10*o*t,-i,i):t;E.setFromEuler(H.set(0,s,0)),z.multiply(E),this.actor.object.applyQuaternion(z),u.copy(this.actor.object.getWorldDirection(V).normalize()),e+=s}}else e+=B,this.actor.object.quaternion.multiply(z.setFromEuler(H.set(0,B,0))),p.lengthSq()>0&&u.copy(p).applyQuaternion(this.actor.object.quaternion).normalize();var N,P,Q,O;if(R.set(0,0,0),this.rayTestResult.hasHit&&null!=this.rayTestResult.actor&&this.physicsSystem.getLinearVelocity(this.rayTestResult.actor,R),this.mode===w.walking?(0!==u.lengthSq()?(d=Math.min(W,d),d=r.lerp(d,W,4*o)):d=0,m.copy(u).multiplyScalar(d),this.pressedJump&&(this.mode=w.falling,this.velocity.copy(m),this.velocity.y=this.jumpVelocity),m.y=o*this.getEffectiveGravity(),m.add(R)):this.mode===w.falling&&(this.pressedJump&&this.jumpInAir&&(this.mode=w.falling,this.velocity.copy(m),this.velocity.y=this.jumpVelocity),this.velocity.y+=o*this.getEffectiveGravity(),m.copy(this.velocity),m.addScaledVector(u,this.fallingMovementControl),this.fallingReorientation&&m.applyAxisAngle(new a(0,1,0),B)),this.impulse.lengthSq()>.1){const t=Math.min(1,this.impulse.length()/5);m.x=r.lerp(m.x,this.impulse.x,t),m.z=r.lerp(m.z,this.impulse.z,t),m.y+=this.impulse.y;const e=Math.exp(-this.impulseDamping*o);this.impulse.x*=e,this.impulse.y>0?this.impulse.y+=o*this.getEffectiveGravity():this.impulse.y*=e,this.impulse.z*=e}else this.impulse.set(0,0,0);if(n.copy(m).normalize(),i.copy(m),m.length()>0||!this.isGrounded||g){if(g?(b.applyQuaternion(this.actor.quaternion),b.y+=o*this.getEffectiveGravity(),v.copy(b)):v.copy(m).multiplyScalar(o),this.isGrounded&&this.mode===w.walking&&(this.rayTestResult.distance>t.offset()||(v.y=Math.max(0,R.y*o)),this.physicsSystem.getActorComputedMovement(this.actor,t,v,k),t.computedCollision(0,G),null!=G&&null!=G.normal1)){const e=(new s.Vector3).copy(G.normal1);Math.acos(e.dot(A))>t.maxSlopeClimbAngle()&&(v.y=.016*this.getEffectiveGravity()*.5)}M.copy(this.physicsSystem.getActorComputedMovement(this.actor,t,v,k))}else M.set(0,0,0);this.physicsSystem.setNextKinematicTranslation(this.actor,M);let J=function(t){if(t.numComputedCollisions()>0){const e=t.computedCollision(0);I.x=e.normal2.x,I.y=e.normal2.y,I.z=e.normal2.z;const i=I.angleTo(A);I.x=e.normal1.x,I.y=e.normal1.y,I.z=e.normal1.z;const o=I.angleTo(A);return!(i<100)&&o>t.minSlopeSlideAngle()}return!1}(t);g||this.isGrounded&&!J||this.mode!==w.falling&&(null==f?f=performance.now():performance.now()-f>100&&(this.mode=w.falling,this.velocity.copy(i))),this.isGrounded&&this.velocity.y<=0&&(this.mode,w.falling,this.mode=w.walking,this.velocity.y=0,f=null),this.mode,w.walking,this.horizontalSpeed=d})}applyImpulse(t){this.impulse.add(t)}debugDirection(){const t=new n(v,this.actor.position,1,65280);this.actor.object.parent.add(t),setTimeout(()=>{t.removeFromParent()},30);const e=new n(M,this.actor.position,1,16711680);this.actor.object.parent.add(e),setTimeout(()=>{e.removeFromParent()},30)}setRootMotionAction(t){const e=t?.getClip();if(e instanceof c){this.rootMotionAction=t,this.resetRootMotion=!0;const i=[];this.rootMotionInterpolant=e.motionTrack.InterpolantFactoryMethodSmooth(i)}}getWallDirection(t,e){const i=t.clone().negate().cross(A);return i.dot(e)<0?i.negate():i}moveTo(t){this.actor.position.copy(t),this.physicsSystem.updateActorTransform(this.actor)}getEffectiveGravity(){return this.gravityOverride??this.physicsSystem.getGravity().y}checkGrounded(t){this.colliderHeight,this.colliderRadius;D.y=-.05,this.physicsSystem.rayTest(j.addVectors(this.actor.position,R.set(0,this.offset,0)),C.addVectors(this.actor.position,D),this.rayTestResult,{excludeActor:this.actor,excludeTriggers:!0})}get isGrounded(){return this.rayTestResult.hasHit||this.cc.computedGrounded()}createCollisionShape(){const t=new d(this.colliderHeight,this.colliderRadius);return t.offset.y=this.colliderRadius+this.colliderHeight/2+this.offset,t.collisionGroup=T,t}step(t){}performMovement(t){}arrowHelper(t,e,i){const o=new n(t.clone().normalize(),e,1,i);this.actor.object.parent.add(o),setTimeout(()=>{o.removeFromParent()},30)}};b=t([S({inEditor:!1}),e("design:paramtypes",[m])],b);export{b as CharacterMovementComponent};const A=new a(0,1,0),I=new a;const j=new a,C=new a,R=new a(0,1,0),D=new a(0,-.1,0),G=(new a(0,-1,0),new i.CharacterCollision),z=new s.Quaternion,F=new s.Quaternion,E=new s.Quaternion,H=new s.Euler,V=new s.Vector3;/*
2
2
  * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -4,7 +4,8 @@ import { CharacterAnimationComponent } from './character/character-animation.js'
4
4
  import { TweenComponent } from './tween-component.js';
5
5
  import { TriggerVolumeComponent } from '../trigger-volume.js';
6
6
  import { PositionalAudioComponent } from '../positional-audio-actor.js';
7
- import { CameraComponent, ThirdPersonCameraComponent } from '../../../../gameplay/actors/index.js';
7
+ import { CameraComponent } from '../../camera/camera-component.js';
8
+ import { ThirdPersonCameraComponent } from '../../camera/third-person-camera-component.js';
8
9
  export declare const builtInComponents: {
9
10
  MeshComponent: typeof MeshComponent;
10
11
  TweenComponent: typeof TweenComponent;
@@ -1,4 +1,4 @@
1
- import{MeshComponent as o}from"./mesh-component.js";import{CharacterMovementComponent as t}from"./character/character-movement.js";import{CharacterAnimationComponent as e}from"./character/character-animation.js";import{TweenComponent as n}from"./tween-component.js";import{TriggerVolumeComponent as r}from"../trigger-volume.js";import{PositionalAudioComponent as m}from"../positional-audio-actor.js";import{CameraComponent as a,ThirdPersonCameraComponent as i}from"../../../../gameplay/actors/index.js";export const builtInComponents={MeshComponent:o,TweenComponent:n,CharacterMovementComponent:t,CharacterAnimationComponent:e,TriggerVolumeComponent:r,PositionalAudioComponent:m,CameraComponent:a,ThirdPersonCameraComponent:i};export default builtInComponents;/*
1
+ import{MeshComponent as o}from"./mesh-component.js";import{CharacterMovementComponent as e}from"./character/character-movement.js";import{CharacterAnimationComponent as r}from"./character/character-animation.js";import{TweenComponent as m}from"./tween-component.js";import{TriggerVolumeComponent as t}from"../trigger-volume.js";import{PositionalAudioComponent as n}from"../positional-audio-actor.js";import{CameraComponent as a}from"../../camera/camera-component.js";import{ThirdPersonCameraComponent as p}from"../../camera/third-person-camera-component.js";export const builtInComponents={MeshComponent:o,TweenComponent:m,CharacterMovementComponent:e,CharacterAnimationComponent:r,TriggerVolumeComponent:t,PositionalAudioComponent:n,CameraComponent:a,ThirdPersonCameraComponent:p};export default builtInComponents;/*
2
2
  * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
- import{__decorate as t,__metadata as i}from"tslib";import{PhysicsBodyType as s,PhysicsSystem as e}from"../../../../gameplay/services/physics/physics-system.js";import{AssetMeshInstance as o}from"../../../../scene/asset-resource-loader.js";import{PhysicalShapeMesh as n}from"../../../../index.js";import{Parameter as r}from"../../../../shader/parameter.js";import{Euler as c,Object3D as h,Vector3 as p}from"three";import{ActorComponent as l,Component as a}from"../../component.js";import{firstValueFrom as y}from"rxjs";const d={friction:.1,mass:0,restitution:1,bodyType:s.static,continousCollisionDetection:!1};let u=class extends l{constructor(t){super(),this.physicsSystem=t,this.position=new p,this.rotation=new c,this.scale=new p(1,1,1),this.collision=!0,this.bodyType=s.static,this.mass=d.mass,this.friction=d.friction,this.restitution=d.restitution,this.isTrigger=!1,this.continousCollisionDetection=d.continousCollisionDetection}onInit(){null!=this.object&&(this.currentMesh=this.object,this.updateMesh()),y(this.disposed).then(()=>{this.physicsSystem.removeActor(this.actor)})}setObject(t){null!=this.currentMesh&&this.actor.object.remove(this.currentMesh),this.object=this.currentMesh=t,this.updateMesh()}updateMesh(){this.currentMesh.position.copy(this.position),this.currentMesh.rotation.copy(this.rotation),this.currentMesh.scale.copy(this.scale);const t=this.getCollisionShapes();this.collision&&t.length>0&&this.physicsSystem.addActor(this.actor,t,{...d,isTrigger:this.isTrigger??!1,mass:this.mass,friction:this.friction,type:this.bodyType,continousCollisionDetection:this.continousCollisionDetection,restitution:this.restitution}),this.actor.object.add(this.currentMesh)}getCollisionShapes(){return this.currentMesh instanceof o?this.currentMesh.collisionShapes:this.currentMesh instanceof n?[this.currentMesh.collisionShape]:"collisionShape"in this.currentMesh?(console.error("Could not understand wehre to get collision shapes from. This is likely due to an import issue"),[this.currentMesh.collisionShape]):[]}};t([r({type:h,label:"Model"}),i("design:type",Object)],u.prototype,"object",void 0),t([r(),i("design:type",p)],u.prototype,"position",void 0),t([r(),i("design:type",c)],u.prototype,"rotation",void 0),t([r(),i("design:type",p)],u.prototype,"scale",void 0),t([r({help:"Whether this mesh should have collision and/or physics simulation"}),i("design:type",Boolean)],u.prototype,"collision",void 0),t([r({requires:{collision:!0},options:[{name:"Static",value:s.static},{name:"Kinematic",value:s.kinematic},{name:"Dynamic",value:s.dynamic}]}),i("design:type",Number)],u.prototype,"bodyType",void 0),t([r({help:"Only for dynamic objects.",requires:{collision:!0,bodyType:s.dynamic}}),i("design:type",Number)],u.prototype,"mass",void 0),t([r({help:"How much it slows down when touching other objects. Only for dynamic objects.",requires:{collision:!0,bodyType:s.dynamic}}),i("design:type",Number)],u.prototype,"friction",void 0),t([r({help:"Control how much to bounce. Only for dynamic objects.",requires:{collision:!0,bodyType:s.dynamic}}),i("design:type",Number)],u.prototype,"restitution",void 0),t([r({requires:{collision:!0}}),i("design:type",Boolean)],u.prototype,"isTrigger",void 0),u=t([a({inEditor:!0}),i("design:paramtypes",[e])],u);export{u as MeshComponent};/*
1
+ import{__decorate as t,__metadata as i}from"tslib";import{PhysicsBodyType as e,PhysicsSystem as s}from"../../../../gameplay/services/physics/physics-system.js";import{AssetMeshInstance as o}from"../../../../scene/asset-resource-loader.js";import{PhysicalShapeMesh as r}from"../../../../index.js";import{Parameter as n}from"../../../../shader/parameter.js";import{Euler as h,Object3D as c,Vector3 as p}from"three";import{ActorComponent as l,Component as a}from"../../component.js";import{firstValueFrom as y}from"rxjs";let u=null;let d=class extends l{constructor(t){super(),this.physicsSystem=t,this.position=new p,this.rotation=new h,this.scale=new p(1,1,1),this.collision=!0,this.bodyType=2,this.mass=0,this.friction=.1,this.restitution=1,this.isTrigger=!1,this.continousCollisionDetection=!1}onInit(){null!=this.object&&(this.currentMesh=this.object,this.updateMesh()),y(this.disposed).then(()=>{this.physicsSystem.removeActor(this.actor)})}setObject(t){null!=this.currentMesh&&this.actor.object.remove(this.currentMesh),this.object=this.currentMesh=t,this.updateMesh()}updateMesh(){this.currentMesh.position.copy(this.position),this.currentMesh.rotation.copy(this.rotation),this.currentMesh.scale.copy(this.scale);const t=this.getCollisionShapes();this.collision&&t.length>0&&this.physicsSystem.addActor(this.actor,t,{...(null===u&&(u={friction:.1,mass:0,restitution:1,bodyType:e.static,continousCollisionDetection:!1}),u),isTrigger:this.isTrigger??!1,mass:this.mass,friction:this.friction,type:this.bodyType,continousCollisionDetection:this.continousCollisionDetection,restitution:this.restitution}),this.actor.object.add(this.currentMesh)}getCollisionShapes(){return this.currentMesh instanceof o?this.currentMesh.collisionShapes:this.currentMesh instanceof r?[this.currentMesh.collisionShape]:"collisionShape"in this.currentMesh?(console.error("Could not understand wehre to get collision shapes from. This is likely due to an import issue"),[this.currentMesh.collisionShape]):[]}};t([n({type:c,label:"Model"}),i("design:type",Object)],d.prototype,"object",void 0),t([n(),i("design:type",p)],d.prototype,"position",void 0),t([n(),i("design:type",h)],d.prototype,"rotation",void 0),t([n(),i("design:type",p)],d.prototype,"scale",void 0),t([n({help:"Whether this mesh should have collision and/or physics simulation"}),i("design:type",Boolean)],d.prototype,"collision",void 0),t([n({requires:{collision:!0},options:[{name:"Static",value:2},{name:"Kinematic",value:4},{name:"Dynamic",value:1}]}),i("design:type",Number)],d.prototype,"bodyType",void 0),t([n({help:"Only for dynamic objects.",requires:{collision:!0,bodyType:1}}),i("design:type",Number)],d.prototype,"mass",void 0),t([n({help:"How much it slows down when touching other objects. Only for dynamic objects.",requires:{collision:!0,bodyType:1}}),i("design:type",Number)],d.prototype,"friction",void 0),t([n({help:"Control how much to bounce. Only for dynamic objects.",requires:{collision:!0,bodyType:1}}),i("design:type",Number)],d.prototype,"restitution",void 0),t([n({requires:{collision:!0}}),i("design:type",Boolean)],d.prototype,"isTrigger",void 0),d=t([a({inEditor:!0}),i("design:paramtypes",[s])],d);export{d as MeshComponent};/*
2
2
  * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
- import{__decorate as t,__metadata as i}from"tslib";import{Euler as e,Vector3 as o}from"three";import{Subject as s}from"rxjs";import{ActorComponent as a,Component as n}from"../../component.js";import{Parameter as h}from"../../../../shader/parameter.js";import{Curve2 as r}from"../../../../utils/curve.js";import{inject as l}from"../../../../gameplay/inject.js";import{PhysicsSystem as p}from"../../../../gameplay/index.js";let d=class extends a{constructor(){super(...arguments),this.animatePosition=!1,this.targetPosition=new o(0,1,0),this.animateRotation=!1,this.targetRotation=new o(0,0,0),this.animateScale=!1,this.targetScale=new o(1,1,1),this.duration=1,this.delay=0,this.easing=r.linear(),this.relative=!0,this.loop=!1,this.pingPong=!1,this.autoPlay=!0,this.inEditor=!1,this.onComplete=new s,this.onLoop=new s,this.isPlaying=!1,this.isPaused=!1,this.elapsed=0,this.delayRemaining=0,this.direction=1,this.loopCount=0,this.startPosition=new o,this.startRotation=new e,this.startScale=new o,this.endPosition=new o,this.endRotation=new e,this.endScale=new o,this.physics=l(p)}onInit(){this.autoPlay&&this.inEditor&&this.play()}onBeginPlay(){this.autoPlay&&!this.inEditor&&this.play()}onEndPlay(){this.onComplete.complete(),this.onLoop.complete()}play(){this.isPlaying&&!this.isPaused||(this.isPlaying||(this.captureStartValues(),this.computeEndValues(),this.elapsed=0,this.delayRemaining=this.delay,this.direction=1,this.loopCount=0),this.isPlaying=!0,this.isPaused=!1,this.physics.updateActorTransform(this.actor))}pause(){this.isPaused=!0}stop(){this.isPlaying=!1,this.isPaused=!1,this.elapsed=0,this.applyValues(0)}reverse(){this.direction*=-1}restart(){this.stop(),this.play()}get progress(){return this.duration>0?this.elapsed/this.duration:0}get playing(){return this.isPlaying&&!this.isPaused}onUpdate(t){if(!this.isPlaying||this.isPaused)return;if(this.delayRemaining>0)return void(this.delayRemaining-=t);this.elapsed+=t*this.direction,this.elapsed>=this.duration?(this.elapsed=this.duration,this.handleComplete()):this.elapsed<=0&&(this.elapsed=0,this.handleComplete());const i=this.elapsed/this.duration,e=this.easing.getY(i);this.applyValues(e)}captureStartValues(){this.startPosition.copy(this.actor.position),this.startRotation.copy(this.actor.rotation),this.startScale.copy(this.actor.object.scale)}computeEndValues(){if(this.animatePosition&&(this.relative?this.endPosition.copy(this.startPosition).add(this.targetPosition):this.endPosition.copy(this.targetPosition)),this.animateRotation){const t=new o(this.targetRotation.x*Math.PI/180,this.targetRotation.y*Math.PI/180,this.targetRotation.z*Math.PI/180);this.relative?this.endRotation.set(this.startRotation.x+t.x,this.startRotation.y+t.y,this.startRotation.z+t.z):this.endRotation.set(t.x,t.y,t.z)}this.animateScale&&(this.relative?this.endScale.set(this.startScale.x*this.targetScale.x,this.startScale.y*this.targetScale.y,this.startScale.z*this.targetScale.z):this.endScale.copy(this.targetScale))}applyValues(t){this.animatePosition&&this.actor.position.lerpVectors(this.startPosition,this.endPosition,t),this.animateRotation&&this.actor.rotation.set(this.startRotation.x+(this.endRotation.x-this.startRotation.x)*t,this.startRotation.y+(this.endRotation.y-this.startRotation.y)*t,this.startRotation.z+(this.endRotation.z-this.startRotation.z)*t),this.animateScale&&this.actor.object.scale.lerpVectors(this.startScale,this.endScale,t)}handleComplete(){this.loopCount++,this.onLoop.next(this.loopCount),this.loop?this.pingPong?this.direction*=-1:this.elapsed=0:(this.isPlaying=!1,this.onComplete.next())}};t([h({help:"Enable position animation"}),i("design:type",Boolean)],d.prototype,"animatePosition",void 0),t([h({help:"The position to animate to (relative offset or absolute world position)",requires:{animatePosition:!0}}),i("design:type",o)],d.prototype,"targetPosition",void 0),t([h({help:"Enable rotation animation"}),i("design:type",Boolean)],d.prototype,"animateRotation",void 0),t([h({help:"The rotation to animate to in degrees (relative offset or absolute)",requires:{animateRotation:!0}}),i("design:type",o)],d.prototype,"targetRotation",void 0),t([h({label:"Animate Scale",help:"Enable scale animation"}),i("design:type",Boolean)],d.prototype,"animateScale",void 0),t([h({help:"The scale to animate to (relative multiplier or absolute)",requires:{animateScale:!0}}),i("design:type",o)],d.prototype,"targetScale",void 0),t([h({help:"Animation duration in seconds",range:[.01,60],precision:2}),i("design:type",Number)],d.prototype,"duration",void 0),t([h({help:"Delay before animation starts in seconds",range:[0,60],precision:2}),i("design:type",Number)],d.prototype,"delay",void 0),t([h({help:"The easing curve for the animation"}),i("design:type",r)],d.prototype,"easing",void 0),t([h({help:"If true, targets are offsets from initial values. If false, targets are absolute values."}),i("design:type",Boolean)],d.prototype,"relative",void 0),t([h({help:"Repeat the animation forever"}),i("design:type",Boolean)],d.prototype,"loop",void 0),t([h({help:"Reverse direction each loop (yo-yo effect)",requires:{loop:!0}}),i("design:type",Boolean)],d.prototype,"pingPong",void 0),t([h({help:"Start animation automatically when the actor spawns"}),i("design:type",Boolean)],d.prototype,"autoPlay",void 0),t([h({help:"Play the animation in the editor. Useful for testing."}),i("design:type",Boolean)],d.prototype,"inEditor",void 0),d=t([n({inEditor:!0})],d);export{d as TweenComponent};/*
1
+ import{__decorate as t,__metadata as i}from"tslib";import{Euler as e,Vector3 as o}from"three";import{Subject as s}from"rxjs";import{ActorComponent as a,Component as n}from"../../component.js";import{Parameter as h}from"../../../../shader/parameter.js";import{Curve2 as r}from"../../../../utils/curve.js";import{inject as l}from"../../../../gameplay/inject.js";import{PhysicsSystem as p}from"../../../../gameplay/services/physics/physics-system.js";let d=class extends a{constructor(){super(...arguments),this.animatePosition=!1,this.targetPosition=new o(0,1,0),this.animateRotation=!1,this.targetRotation=new o(0,0,0),this.animateScale=!1,this.targetScale=new o(1,1,1),this.duration=1,this.delay=0,this.easing=r.linear(),this.relative=!0,this.loop=!1,this.pingPong=!1,this.autoPlay=!0,this.inEditor=!1,this.onComplete=new s,this.onLoop=new s,this.isPlaying=!1,this.isPaused=!1,this.elapsed=0,this.delayRemaining=0,this.direction=1,this.loopCount=0,this.startPosition=new o,this.startRotation=new e,this.startScale=new o,this.endPosition=new o,this.endRotation=new e,this.endScale=new o,this.physics=l(p)}onInit(){this.autoPlay&&this.inEditor&&this.play()}onBeginPlay(){this.autoPlay&&!this.inEditor&&this.play()}onEndPlay(){this.onComplete.complete(),this.onLoop.complete()}play(){this.isPlaying&&!this.isPaused||(this.isPlaying||(this.captureStartValues(),this.computeEndValues(),this.elapsed=0,this.delayRemaining=this.delay,this.direction=1,this.loopCount=0),this.isPlaying=!0,this.isPaused=!1,this.physics.updateActorTransform(this.actor))}pause(){this.isPaused=!0}stop(){this.isPlaying=!1,this.isPaused=!1,this.elapsed=0,this.applyValues(0)}reverse(){this.direction*=-1}restart(){this.stop(),this.play()}get progress(){return this.duration>0?this.elapsed/this.duration:0}get playing(){return this.isPlaying&&!this.isPaused}onUpdate(t){if(!this.isPlaying||this.isPaused)return;if(this.delayRemaining>0)return void(this.delayRemaining-=t);this.elapsed+=t*this.direction,this.elapsed>=this.duration?(this.elapsed=this.duration,this.handleComplete()):this.elapsed<=0&&(this.elapsed=0,this.handleComplete());const i=this.elapsed/this.duration,e=this.easing.getY(i);this.applyValues(e)}captureStartValues(){this.startPosition.copy(this.actor.position),this.startRotation.copy(this.actor.rotation),this.startScale.copy(this.actor.object.scale)}computeEndValues(){if(this.animatePosition&&(this.relative?this.endPosition.copy(this.startPosition).add(this.targetPosition):this.endPosition.copy(this.targetPosition)),this.animateRotation){const t=new o(this.targetRotation.x*Math.PI/180,this.targetRotation.y*Math.PI/180,this.targetRotation.z*Math.PI/180);this.relative?this.endRotation.set(this.startRotation.x+t.x,this.startRotation.y+t.y,this.startRotation.z+t.z):this.endRotation.set(t.x,t.y,t.z)}this.animateScale&&(this.relative?this.endScale.set(this.startScale.x*this.targetScale.x,this.startScale.y*this.targetScale.y,this.startScale.z*this.targetScale.z):this.endScale.copy(this.targetScale))}applyValues(t){this.animatePosition&&this.actor.position.lerpVectors(this.startPosition,this.endPosition,t),this.animateRotation&&this.actor.rotation.set(this.startRotation.x+(this.endRotation.x-this.startRotation.x)*t,this.startRotation.y+(this.endRotation.y-this.startRotation.y)*t,this.startRotation.z+(this.endRotation.z-this.startRotation.z)*t),this.animateScale&&this.actor.object.scale.lerpVectors(this.startScale,this.endScale,t)}handleComplete(){this.loopCount++,this.onLoop.next(this.loopCount),this.loop?this.pingPong?this.direction*=-1:this.elapsed=0:(this.isPlaying=!1,this.onComplete.next())}};t([h({help:"Enable position animation"}),i("design:type",Boolean)],d.prototype,"animatePosition",void 0),t([h({help:"The position to animate to (relative offset or absolute world position)",requires:{animatePosition:!0}}),i("design:type",o)],d.prototype,"targetPosition",void 0),t([h({help:"Enable rotation animation"}),i("design:type",Boolean)],d.prototype,"animateRotation",void 0),t([h({help:"The rotation to animate to in degrees (relative offset or absolute)",requires:{animateRotation:!0}}),i("design:type",o)],d.prototype,"targetRotation",void 0),t([h({label:"Animate Scale",help:"Enable scale animation"}),i("design:type",Boolean)],d.prototype,"animateScale",void 0),t([h({help:"The scale to animate to (relative multiplier or absolute)",requires:{animateScale:!0}}),i("design:type",o)],d.prototype,"targetScale",void 0),t([h({help:"Animation duration in seconds",range:[.01,60],precision:2}),i("design:type",Number)],d.prototype,"duration",void 0),t([h({help:"Delay before animation starts in seconds",range:[0,60],precision:2}),i("design:type",Number)],d.prototype,"delay",void 0),t([h({help:"The easing curve for the animation"}),i("design:type",r)],d.prototype,"easing",void 0),t([h({help:"If true, targets are offsets from initial values. If false, targets are absolute values."}),i("design:type",Boolean)],d.prototype,"relative",void 0),t([h({help:"Repeat the animation forever"}),i("design:type",Boolean)],d.prototype,"loop",void 0),t([h({help:"Reverse direction each loop (yo-yo effect)",requires:{loop:!0}}),i("design:type",Boolean)],d.prototype,"pingPong",void 0),t([h({help:"Start animation automatically when the actor spawns"}),i("design:type",Boolean)],d.prototype,"autoPlay",void 0),t([h({help:"Play the animation in the editor. Useful for testing."}),i("design:type",Boolean)],d.prototype,"inEditor",void 0),d=t([n({inEditor:!0})],d);export{d as TweenComponent};/*
2
2
  * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,7 +1,7 @@
1
1
  import { BaseActor } from "../..";
2
2
  import { Texture } from 'three';
3
3
  import * as THREE from 'three';
4
- import { ActorComponent } from "../../../gameplay";
4
+ import { ActorComponent } from "../../actors/component.js";
5
5
  export type PostProcessingVolumeShape = {
6
6
  kind: 'box';
7
7
  box: THREE.Box3;
@@ -1,4 +1,4 @@
1
- import{__decorate as e,__metadata as t}from"tslib";import{Actor as o,Attach as i,attach as r,BaseActor as p,Component as s,inject as n,Parameter as d}from"../..";import{Texture as m}from"three";import{tonemapMappings as y}from"../../../rendering/tone-mapping";import{OBB as u}from"three/examples/jsm/math/OBB.js";import{Vector3 as a}from"three";import*as b from"three";import{RenderingView as g}from"../../../rendering.js";import{TriggerVolumeMesh as h}from"./components/volume-editor-component.js";import{ActorComponent as l}from"../../../gameplay";let v=class extends l{};e([d({options:y}),t("design:type",Number)],v.prototype,"tonemapMapping",void 0),e([d(),t("design:type",Number)],v.prototype,"tonemapExposure",void 0),e([d(),t("design:type",m)],v.prototype,"envTexture",void 0),e([d(),t("design:type",Number)],v.prototype,"envIntensity",void 0),e([d(),t("design:type",Number)],v.prototype,"vignetteIntensity",void 0),e([d(),t("design:type",b.Color)],v.prototype,"colorTint",void 0),e([d(),t("design:type",Number)],v.prototype,"colorTintIntensity",void 0),e([d(),t("design:type",Number)],v.prototype,"depthFocus",void 0),e([d(),t("design:type",Number)],v.prototype,"depthAperture",void 0),e([d(),t("design:type",Number)],v.prototype,"depthMaxBlur",void 0),e([d({range:[1e3,4e4],precision:.1}),t("design:type",Number)],v.prototype,"temperature",void 0),e([d({range:[-1,1]}),t("design:type",Number)],v.prototype,"temperatureTint",void 0),e([d({label:"LUT"}),t("design:type",m)],v.prototype,"lut",void 0),e([d({label:"LUT Intensity",range:[0,1]}),t("design:type",Number)],v.prototype,"lutIntensity",void 0),v=e([s()],v);export{v as PostProcessSettings};let c=class extends p{constructor(){super(),this.bounded=!1,this.priority=0,this.blendWeight=1,this.blendRadius=0,this.box=new u(void 0,new b.Vector3(.5,.5,.5)),this.view=n(g),this.editorView=r(h),this.disposed.subscribe(()=>{this.view.removePostProcessVolume(this)})}onInit(){this.view.addPostProcessVolume(this),this.editorView.visible=this.bounded}containsPoint(e){return!this.bounded||(this.resetBox(),this.box.containsPoint(e))}distanceToPoint(e){return this.bounded?(this.resetBox(),this.box.clampPoint(e,N),N.distanceTo(e)):0}resetBox(){const e=this.box;e.center.set(0,0,0),e.halfSize.set(.5,.5,.5),e.rotation.copy(x.rotation),e.applyMatrix4(this.object.matrixWorld)}};e([i(),t("design:type",v)],c.prototype,"settings",void 0),e([d(),t("design:type",Boolean)],c.prototype,"bounded",void 0),e([d({precision:0}),t("design:type",Number)],c.prototype,"priority",void 0),e([d({range:[0,1]}),t("design:type",Number)],c.prototype,"blendWeight",void 0),e([d(),t("design:type",Number)],c.prototype,"blendRadius",void 0),c=e([o(),t("design:paramtypes",[])],c);export{c as PostProcessVolume};const x=new u,N=new a;/*
1
+ import{__decorate as e,__metadata as t}from"tslib";import{Actor as o,Attach as i,attach as r,BaseActor as p,Component as s,inject as n,Parameter as d}from"../..";import{Texture as m}from"three";import{tonemapMappings as y}from"../../../rendering/tone-mapping";import{OBB as u}from"three/examples/jsm/math/OBB.js";import{Vector3 as a}from"three";import*as b from"three";import{RenderingView as h}from"../../../rendering.js";import{TriggerVolumeMesh as g}from"./components/volume-editor-component.js";import{ActorComponent as l}from"../../actors/component.js";let v=class extends l{};e([d({options:y}),t("design:type",Number)],v.prototype,"tonemapMapping",void 0),e([d(),t("design:type",Number)],v.prototype,"tonemapExposure",void 0),e([d(),t("design:type",m)],v.prototype,"envTexture",void 0),e([d(),t("design:type",Number)],v.prototype,"envIntensity",void 0),e([d(),t("design:type",Number)],v.prototype,"vignetteIntensity",void 0),e([d(),t("design:type",b.Color)],v.prototype,"colorTint",void 0),e([d(),t("design:type",Number)],v.prototype,"colorTintIntensity",void 0),e([d(),t("design:type",Number)],v.prototype,"depthFocus",void 0),e([d(),t("design:type",Number)],v.prototype,"depthAperture",void 0),e([d(),t("design:type",Number)],v.prototype,"depthMaxBlur",void 0),e([d({range:[1e3,4e4],precision:.1}),t("design:type",Number)],v.prototype,"temperature",void 0),e([d({range:[-1,1]}),t("design:type",Number)],v.prototype,"temperatureTint",void 0),e([d({label:"LUT"}),t("design:type",m)],v.prototype,"lut",void 0),e([d({label:"LUT Intensity",range:[0,1]}),t("design:type",Number)],v.prototype,"lutIntensity",void 0),v=e([s()],v);export{v as PostProcessSettings};let c=class extends p{constructor(){super(),this.bounded=!1,this.priority=0,this.blendWeight=1,this.blendRadius=0,this.box=new u(void 0,new b.Vector3(.5,.5,.5)),this.view=n(h),this.editorView=r(g),this.disposed.subscribe(()=>{this.view.removePostProcessVolume(this)})}onInit(){this.view.addPostProcessVolume(this),this.editorView.visible=this.bounded}containsPoint(e){return!this.bounded||(this.resetBox(),this.box.containsPoint(e))}distanceToPoint(e){return this.bounded?(this.resetBox(),this.box.clampPoint(e,N),N.distanceTo(e)):0}resetBox(){const e=this.box;e.center.set(0,0,0),e.halfSize.set(.5,.5,.5),e.rotation.copy(x.rotation),e.applyMatrix4(this.object.matrixWorld)}};e([i(),t("design:type",v)],c.prototype,"settings",void 0),e([d(),t("design:type",Boolean)],c.prototype,"bounded",void 0),e([d({precision:0}),t("design:type",Number)],c.prototype,"priority",void 0),e([d({range:[0,1]}),t("design:type",Number)],c.prototype,"blendWeight",void 0),e([d(),t("design:type",Number)],c.prototype,"blendRadius",void 0),c=e([o(),t("design:paramtypes",[])],c);export{c as PostProcessVolume};const x=new u,N=new a;/*
2
2
  * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
- import{__decorate as t,__metadata as e}from"tslib";import{Raycaster as i,Vector2 as o}from"three";import{Service as n}from"typedi";import{ViewController as s}from"./render";import{World as r}from"./world";import{inject as c}from"../../gameplay";import{Subject as h,tap as p,map as a,filter as d,takeUntil as l,withLatestFrom as b,mergeMap as P,merge as u,from as j}from"rxjs";let w=class{constructor(){this.view=c(s),this.world=c(r),this.enabled=!1,this.stopped=new h,this.monitoredObjects=new Map,this.useCache=!1,this.cachePointerPosition=new o,this.pointerPosition=new o,this.adjustedPosition=new o,this.raycastIntersectionResult=[],this.raycaster=new i,this.onClick=new h,this.onDoubleClick=new h,this.onPointerMove=new h,this.onPointerDown=new h,this.onPointerUp=new h,this.onPointerEnterObject3D=t=>{let e=!1;return this.onPointerMove.pipe(this.tapUsingPointerMove(),this.tapMonitorObject(t),a(()=>this.findIntersection(t)),p(t=>{null==t&&(e=!1)}),d(t=>null!=t&&!e),p(()=>{e=!0}),a(e=>({intersection:e,object:t})))},this.onPointerEnterActor=t=>this.onPointerEnterObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerEnterActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerEnterActor(t))),this.onPointerLeaveObject3D=t=>{let e=!1;return this.onPointerMove.pipe(this.tapUsingPointerMove(),this.tapMonitorObject(t),a(()=>this.findIntersection(t)),p(t=>{null!=t&&(e=!1)}),d(t=>null==t&&!e),p(()=>{e=!0}),a(e=>({intersection:e,object:t})))},this.onPointerLeaveActor=t=>this.onPointerLeaveObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerLeaveActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerLeaveActor(t))),this.onClickObject3D=t=>{const e=this.onPointerDown.pipe(a(()=>this.findIntersection(t)));return this.onPointerUp.pipe(a(()=>this.findIntersection(t))).pipe(this.tapMonitorObject(t),b(e),d(([t,e])=>null!=t&&null!=e),a(([e])=>({intersection:e,object:t})))},this.onClickActor=t=>this.onClickObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onClickActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onClickActor(t))),this.onPointerDownActor=t=>this.onPointerDownObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerDownActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerDownActor(t))),this.onPointerDownObject3D=t=>this.onPointerDown.pipe(this.tapMonitorObject(t),a(()=>this.findIntersection(t)),d(t=>null!=t),a(e=>({intersection:e,object:t}))),this.onPointerUpActor=t=>this.onPointerUpObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerUpActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerUpActor(t))),this.onPointerUpObject3D=t=>this.onPointerUp.pipe(this.tapMonitorObject(t),a(()=>this.findIntersection(t)),d(t=>null!=t),a(e=>({intersection:e,object:t}))),this.onPointerMoveActor=t=>this.onPointerMoveObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerMoveActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerMoveActor(t))),this.onPointerMoveObject3D=t=>this.onPointerMove.pipe(this.tapUsingPointerMove(),this.tapMonitorObject(t),a(()=>this.findIntersection(t)),d(t=>null!=t),a(e=>({intersection:e,object:t}))),this.usingPointerMoveEvents=!1,this.handlers={click:t=>{this.onClick.next(t)},dblclick:t=>{this.onDoubleClick.next(t)},pointermove:t=>{this.onPointerMove.next(t)},pointerup:t=>{this.onPointerUp.next(t)},pointerdown:t=>{this.onPointerDown.next(t)}},this.raycaster.firstHitOnly=!0}start(){this.enabled||(this.enabled=!0,Object.entries(this.handlers).forEach(([t,e])=>{this.view.htmlElement.addEventListener(t,i=>{("pointermove"!==t||this.usingPointerMoveEvents)&&(this.updateRaycast(i),e(i))})}),this.view.onLateUpdate().pipe(l(this.stopped)).subscribe(()=>this.useCache=!1))}stop(){this.enabled=!1,Object.entries(this.handlers).forEach(([t,e])=>{document.removeEventListener(t,e)}),this.stopped.next(!0),this.onClick.complete(),this.onDoubleClick.complete(),this.onPointerMove.complete(),this.onPointerDown.complete(),this.onPointerUp.complete()}addMonitoredObject(t){const e=this.monitoredObjects.get(t)??0;this.monitoredObjects.set(t,e+1)}removeMonitoriedObject(t){const e=this.monitoredObjects.get(t);null!=e&&(e>1?this.monitoredObjects.set(t,e-1):this.monitoredObjects.delete(t))}updateRaycast(t){this.pointerPosition.set(t.x,t.y),this.useCache&&this.cachePointerPosition.equals(this.pointerPosition)||(this.cachePointerPosition.copy(this.pointerPosition),this.useCache=!0,this.adjustedPosition.x=t.offsetX/this.view.htmlElement.offsetWidth*2-1,this.adjustedPosition.y=-t.offsetY/this.view.htmlElement.offsetHeight*2+1,this.raycaster.setFromCamera(this.adjustedPosition,this.view.getCamera()),this.raycastIntersectionResult.length=0,this.raycaster.intersectObject(this.world.scene,!0,this.raycastIntersectionResult))}tapUsingPointerMove(){return p({subscribe:()=>{this.usingPointerMoveEvents=!0},unsubscribe:()=>{}})}tapMonitorObject(t){return p({subscribe:()=>{this.addMonitoredObject(t)},unsubscribe:()=>{this.removeMonitoriedObject(t)}})}findIntersection(t){if(this.raycastIntersectionResult.length>0){let e=this.raycastIntersectionResult[0].object;for(;null!=e;){if(e.uuid===t.uuid)return this.raycastIntersectionResult[0];e=e.parent}}return null}};w=t([n(),e("design:paramtypes",[])],w);export{w as PointerEvents};/*
1
+ import{__decorate as t,__metadata as e}from"tslib";import{Raycaster as i,Vector2 as o}from"three";import{Service as n}from"typedi";import{ViewController as s}from"./render";import{World as r}from"./world";import{inject as c}from"../inject.js";import{Subject as h,tap as p,map as a,filter as d,takeUntil as l,withLatestFrom as b,mergeMap as P,merge as u,from as j}from"rxjs";let w=class{constructor(){this.view=c(s),this.world=c(r),this.enabled=!1,this.stopped=new h,this.monitoredObjects=new Map,this.useCache=!1,this.cachePointerPosition=new o,this.pointerPosition=new o,this.adjustedPosition=new o,this.raycastIntersectionResult=[],this.raycaster=new i,this.onClick=new h,this.onDoubleClick=new h,this.onPointerMove=new h,this.onPointerDown=new h,this.onPointerUp=new h,this.onPointerEnterObject3D=t=>{let e=!1;return this.onPointerMove.pipe(this.tapUsingPointerMove(),this.tapMonitorObject(t),a(()=>this.findIntersection(t)),p(t=>{null==t&&(e=!1)}),d(t=>null!=t&&!e),p(()=>{e=!0}),a(e=>({intersection:e,object:t})))},this.onPointerEnterActor=t=>this.onPointerEnterObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerEnterActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerEnterActor(t))),this.onPointerLeaveObject3D=t=>{let e=!1;return this.onPointerMove.pipe(this.tapUsingPointerMove(),this.tapMonitorObject(t),a(()=>this.findIntersection(t)),p(t=>{null!=t&&(e=!1)}),d(t=>null==t&&!e),p(()=>{e=!0}),a(e=>({intersection:e,object:t})))},this.onPointerLeaveActor=t=>this.onPointerLeaveObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerLeaveActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerLeaveActor(t))),this.onClickObject3D=t=>{const e=this.onPointerDown.pipe(a(()=>this.findIntersection(t)));return this.onPointerUp.pipe(a(()=>this.findIntersection(t))).pipe(this.tapMonitorObject(t),b(e),d(([t,e])=>null!=t&&null!=e),a(([e])=>({intersection:e,object:t})))},this.onClickActor=t=>this.onClickObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onClickActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onClickActor(t))),this.onPointerDownActor=t=>this.onPointerDownObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerDownActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerDownActor(t))),this.onPointerDownObject3D=t=>this.onPointerDown.pipe(this.tapMonitorObject(t),a(()=>this.findIntersection(t)),d(t=>null!=t),a(e=>({intersection:e,object:t}))),this.onPointerUpActor=t=>this.onPointerUpObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerUpActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerUpActor(t))),this.onPointerUpObject3D=t=>this.onPointerUp.pipe(this.tapMonitorObject(t),a(()=>this.findIntersection(t)),d(t=>null!=t),a(e=>({intersection:e,object:t}))),this.onPointerMoveActor=t=>this.onPointerMoveObject3D(t.object).pipe(l(t.disposed),a(({intersection:e})=>({intersection:e,actor:t}))),this.onPointerMoveActorType=t=>u(j(this.world.actors),this.world.actorAdded).pipe(d(e=>e instanceof t),P(t=>this.onPointerMoveActor(t))),this.onPointerMoveObject3D=t=>this.onPointerMove.pipe(this.tapUsingPointerMove(),this.tapMonitorObject(t),a(()=>this.findIntersection(t)),d(t=>null!=t),a(e=>({intersection:e,object:t}))),this.usingPointerMoveEvents=!1,this.handlers={click:t=>{this.onClick.next(t)},dblclick:t=>{this.onDoubleClick.next(t)},pointermove:t=>{this.onPointerMove.next(t)},pointerup:t=>{this.onPointerUp.next(t)},pointerdown:t=>{this.onPointerDown.next(t)}},this.raycaster.firstHitOnly=!0}start(){this.enabled||(this.enabled=!0,Object.entries(this.handlers).forEach(([t,e])=>{this.view.htmlElement.addEventListener(t,i=>{("pointermove"!==t||this.usingPointerMoveEvents)&&(this.updateRaycast(i),e(i))})}),this.view.onLateUpdate().pipe(l(this.stopped)).subscribe(()=>this.useCache=!1))}stop(){this.enabled=!1,Object.entries(this.handlers).forEach(([t,e])=>{document.removeEventListener(t,e)}),this.stopped.next(!0),this.onClick.complete(),this.onDoubleClick.complete(),this.onPointerMove.complete(),this.onPointerDown.complete(),this.onPointerUp.complete()}addMonitoredObject(t){const e=this.monitoredObjects.get(t)??0;this.monitoredObjects.set(t,e+1)}removeMonitoriedObject(t){const e=this.monitoredObjects.get(t);null!=e&&(e>1?this.monitoredObjects.set(t,e-1):this.monitoredObjects.delete(t))}updateRaycast(t){this.pointerPosition.set(t.x,t.y),this.useCache&&this.cachePointerPosition.equals(this.pointerPosition)||(this.cachePointerPosition.copy(this.pointerPosition),this.useCache=!0,this.adjustedPosition.x=t.offsetX/this.view.htmlElement.offsetWidth*2-1,this.adjustedPosition.y=-t.offsetY/this.view.htmlElement.offsetHeight*2+1,this.raycaster.setFromCamera(this.adjustedPosition,this.view.getCamera()),this.raycastIntersectionResult.length=0,this.raycaster.intersectObject(this.world.scene,!0,this.raycastIntersectionResult))}tapUsingPointerMove(){return p({subscribe:()=>{this.usingPointerMoveEvents=!0},unsubscribe:()=>{}})}tapMonitorObject(t){return p({subscribe:()=>{this.addMonitoredObject(t)},unsubscribe:()=>{this.removeMonitoriedObject(t)}})}findIntersection(t){if(this.raycastIntersectionResult.length>0){let e=this.raycastIntersectionResult[0].object;for(;null!=e;){if(e.uuid===t.uuid)return this.raycastIntersectionResult[0];e=e.parent}}return null}};w=t([n(),e("design:paramtypes",[])],w);export{w as PointerEvents};/*
2
2
  * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,6 +1,6 @@
1
1
  import { Object3D } from "three";
2
2
  import { Asset } from "../model";
3
- import { BaseActor } from "../../gameplay";
3
+ import { BaseActor } from "../../gameplay/actors/actor.js";
4
4
  export declare class Prefab {
5
5
  asset: Asset;
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hology/core",
3
- "version": "0.0.171",
3
+ "version": "0.0.173",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",