@hology/core 0.0.27 → 0.0.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/dist/effects/vfx/behaviours.d.ts +26 -0
  2. package/dist/effects/vfx/behaviours.js +5 -0
  3. package/dist/effects/vfx/index.d.ts +2 -0
  4. package/dist/effects/vfx/index.js +5 -0
  5. package/dist/effects/vfx/initializsers.d.ts +44 -0
  6. package/dist/effects/vfx/initializsers.js +5 -0
  7. package/dist/effects/vfx/rates.d.ts +6 -0
  8. package/dist/effects/vfx/rates.js +5 -0
  9. package/dist/effects/vfx/vfx-actor.d.ts +27 -0
  10. package/dist/effects/vfx/vfx-actor.js +5 -0
  11. package/dist/effects/vfx/vfx-asset.d.ts +99 -0
  12. package/dist/effects/vfx/vfx-asset.js +5 -0
  13. package/dist/effects/vfx/vfx-defs.d.ts +207 -0
  14. package/dist/effects/vfx/vfx-defs.js +5 -0
  15. package/dist/effects/vfx/vfx-materializer.d.ts +19 -0
  16. package/dist/effects/vfx/vfx-materializer.js +5 -0
  17. package/dist/effects/vfx/vfx-param.d.ts +13 -0
  18. package/dist/effects/vfx/vfx-param.js +5 -0
  19. package/dist/effects/vfx/zones.d.ts +74 -0
  20. package/dist/effects/vfx/zones.js +5 -0
  21. package/dist/gameplay/actors/builtin/components/character/character-movement.d.ts +5 -1
  22. package/dist/gameplay/actors/builtin/components/character/character-movement.js +1 -1
  23. package/dist/gameplay/actors/camera/third-party-camera-component.js +1 -1
  24. package/dist/gameplay/index.d.ts +1 -0
  25. package/dist/gameplay/index.js +1 -1
  26. package/dist/gameplay/initiate.d.ts +3 -0
  27. package/dist/gameplay/initiate.js +1 -1
  28. package/dist/gameplay/input/input-service.d.ts +4 -0
  29. package/dist/gameplay/input/input-service.js +1 -1
  30. package/dist/gameplay/polyfill.d.ts +1 -0
  31. package/dist/gameplay/polyfill.js +5 -0
  32. package/dist/gameplay/services/asset-loader.d.ts +9 -4
  33. package/dist/gameplay/services/asset-loader.js +1 -1
  34. package/dist/gameplay/services/render.d.ts +3 -2
  35. package/dist/rendering.d.ts +1 -0
  36. package/dist/rendering.js +1 -1
  37. package/dist/scene/materializer.d.ts +20 -3
  38. package/dist/scene/materializer.js +1 -1
  39. package/dist/scene/model.d.ts +8 -2
  40. package/dist/scene/model.js +1 -1
  41. package/dist/scene/objects/shapes.d.ts +4 -2
  42. package/dist/scene/scene-data-service.js +1 -1
  43. package/dist/scene/sky.d.ts +3 -0
  44. package/dist/scene/sky.js +1 -1
  45. package/dist/shader/parameter.d.ts +2 -1
  46. package/dist/shader-nodes/effects.d.ts +8 -0
  47. package/dist/shader-nodes/effects.js +5 -0
  48. package/dist/shader-nodes/glsl-node.d.ts +16 -0
  49. package/dist/shader-nodes/glsl-node.js +5 -0
  50. package/dist/shader-nodes/index.d.ts +4 -0
  51. package/dist/shader-nodes/index.js +1 -1
  52. package/dist/shader-nodes/math.d.ts +2 -0
  53. package/dist/shader-nodes/math.js +5 -0
  54. package/dist/shader-nodes/particle.d.ts +6 -0
  55. package/dist/shader-nodes/particle.js +5 -0
  56. package/dist/shader-nodes/shapes.d.ts +3 -0
  57. package/dist/shader-nodes/shapes.js +5 -0
  58. package/dist/shader-nodes/voronoi.d.ts +5 -0
  59. package/dist/shader-nodes/voronoi.js +5 -0
  60. package/dist/utils/math.js +1 -1
  61. package/package.json +3 -2
  62. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,26 @@
1
+ import { Behaviour, Emitter, Particle, EasingFunction } from "three-nebula";
2
+ /**
3
+ * Rotate position around an axis.
4
+ */
5
+ export declare class RotatePosition extends Behaviour {
6
+ private axis;
7
+ private angle;
8
+ constructor(axis: THREE.Vector3, angle: number);
9
+ private axis3D;
10
+ mutate(target: Particle | Emitter, time: number, index: number): void;
11
+ }
12
+ export declare class LinearDamping extends Behaviour {
13
+ private factor;
14
+ constructor(factor: number);
15
+ mutate(target: Particle | Emitter, time: number, index: number): void;
16
+ }
17
+ export declare class MoveOverLife extends Behaviour {
18
+ private x;
19
+ private y;
20
+ private z;
21
+ private displacement;
22
+ private initial;
23
+ constructor(x: number, y: number, z: number, easing?: EasingFunction);
24
+ initialize(particle: Particle): void;
25
+ mutate(target: Particle | Emitter, time: number, index: number): void;
26
+ }
@@ -0,0 +1,5 @@
1
+ import{Behaviour as i,Vector3D as t,ease as s}from"three-nebula";export class RotatePosition extends i{constructor(i,s){super(),this.axis=i,this.angle=s,this.axis3D=new t(this.axis.x,this.axis.y,this.axis.z)}mutate(i,t,s){this.energize(i,t),i.position.sub(i.parent.position),i.position.applyAxisAngle(this.axis3D,this.angle*t),i.position.add(i.parent.position)}}export class LinearDamping extends i{constructor(i){super(),this.factor=i}mutate(i,t,s){this.energize(i,t);const o=e.copy(i.velocity).multiplyScalar(-this.factor*t);i.velocity.add(o)}}const e=new t;export class MoveOverLife extends i{constructor(i,t,e,o=s.easeLinear){super(void 0,o,void 0,!0),this.x=i,this.y=t,this.z=e}initialize(i){i.transform.initialPos=i.position.clone()}mutate(i,t,s){this.energize(i,t);const e=i.transform.initialPos,o=1-this.energy;i.position.x=e.x+this.x*o,i.position.y=e.y+this.y*o,i.position.z=e.z+this.z*o}}
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,2 @@
1
+ export * from './vfx-asset';
2
+ export * from './vfx-materializer';
@@ -0,0 +1,5 @@
1
+ export*from"./vfx-asset";export*from"./vfx-materializer";
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,44 @@
1
+ import { Vector3 } from "three";
2
+ import Initializer, { Emitter, Particle } from "three-nebula";
3
+ export declare class Rotation extends Initializer {
4
+ private rotation;
5
+ constructor(rotation: Vector3);
6
+ init(emitter: Emitter, particle: Particle): void;
7
+ }
8
+ export declare class InitialScale extends Initializer {
9
+ private scale;
10
+ constructor(scale: number);
11
+ init(emitter: Emitter, particle: Particle): void;
12
+ }
13
+ export declare class AdditiveVelocity extends Initializer {
14
+ private velocity;
15
+ constructor(velocity: Vector3);
16
+ init(emitter: Emitter, particle: Particle): void;
17
+ }
18
+ export declare class RandomDirection extends Initializer {
19
+ private speed;
20
+ constructor(speed: number);
21
+ init(emitter: Emitter, particle: Particle): void;
22
+ }
23
+ /**
24
+ * Restrict randomness with two vectors
25
+ */
26
+ export declare class RandomComponentsDirection extends Initializer {
27
+ private speed;
28
+ private min;
29
+ private max;
30
+ private x;
31
+ private y;
32
+ private z;
33
+ constructor(speed: number, min: Vector3, max: Vector3);
34
+ init(emitter: Emitter, particle: Particle): void;
35
+ }
36
+ export declare class RandomVelocity extends Initializer {
37
+ private min;
38
+ private max;
39
+ private x;
40
+ private y;
41
+ private z;
42
+ constructor(min: Vector3, max: Vector3);
43
+ init(emitter: Emitter, particle: Particle): void;
44
+ }
@@ -0,0 +1,5 @@
1
+ import{Vector3 as t}from"three";import i,{Span as e}from"three-nebula";export class Rotation extends i{constructor(t){super(),this.rotation=t}init(t,i){"number"!=typeof i.rotation&&i.rotation.copy(this.rotation)}}export class InitialScale extends i{constructor(t){super(),this.scale=t}init(t,i){i.scale=this.scale}}export class AdditiveVelocity extends i{constructor(t){super(),this.velocity=t}init(t,i){i.velocity.x+=this.velocity.x,i.velocity.y+=this.velocity.y,i.velocity.z+=this.velocity.z}}export class RandomDirection extends i{constructor(t){super(),this.speed=t}init(t,i){s.set(2*Math.random()-1,2*Math.random()-1,2*Math.random()-1).normalize().multiplyScalar(this.speed),i.velocity.x+=s.x,i.velocity.y+=s.y,i.velocity.z+=s.z}}export class RandomComponentsDirection extends i{constructor(t,i,s){super(),this.speed=t,this.min=i,this.max=s,this.x=new e(this.min.x,this.max.x),this.y=new e(this.min.y,this.max.y),this.z=new e(this.min.z,this.max.z)}init(t,i){s.set(this.x.getValue(),this.y.getValue(),this.z.getValue()).normalize().multiplyScalar(this.speed),i.velocity.x+=s.x,i.velocity.y+=s.y,i.velocity.z+=s.z}}export class RandomVelocity extends i{constructor(t,i){super(),this.min=t,this.max=i,this.x=new e(this.min.x,this.max.x),this.y=new e(this.min.y,this.max.y),this.z=new e(this.min.z,this.max.z)}init(t,i){i.velocity.x+=this.x.getValue(),i.velocity.y+=this.y.getValue(),i.velocity.z+=this.z.getValue()}}const s=new t;
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,6 @@
1
+ import { Rate } from "three-nebula";
2
+ export { Rate } from 'three-nebula';
3
+ export declare class OnceRate extends Rate {
4
+ constructor(count?: number);
5
+ restart(): void;
6
+ }
@@ -0,0 +1,5 @@
1
+ import{Rate as e}from"three-nebula";export{Rate}from"three-nebula";export class OnceRate extends e{constructor(e=1){super(e,1/0)}restart(){this.nextTime=0}}
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,27 @@
1
+ import { BaseActor } from "../../gameplay";
2
+ import { VfxAsset } from "../../scene/model";
3
+ export declare class VfxActor extends BaseActor {
4
+ /**
5
+ * A multiplier for the speed of the visual effect.
6
+ */
7
+ timescale: number;
8
+ paused: boolean;
9
+ private system;
10
+ private disposeSystem;
11
+ private sourceAsset;
12
+ private assetLoader;
13
+ private world;
14
+ /**
15
+ * Replace visual effect with its definition in an asset
16
+ */
17
+ fromAsset(asset: VfxAsset): Promise<void>;
18
+ play(): void;
19
+ pause(): void;
20
+ stop(): void;
21
+ restart(): void;
22
+ private _worldPos;
23
+ private max;
24
+ onUpdate(deltaTime: number): void;
25
+ getParticleCount(): any;
26
+ onEndPlay(): void;
27
+ }
@@ -0,0 +1,5 @@
1
+ import{__awaiter as t,__decorate as s}from"tslib";import{Actor as e,BaseActor as i,AssetLoader as o,inject as r,World as a}from"../../gameplay";import{Rate as h}from"three-nebula";import{OnceRate as m}from"./rates";import{materializeVfx as l}from"./vfx-materializer";import*as d from"three";let n=class extends i{constructor(){super(...arguments),this.timescale=1,this.paused=!1,this.assetLoader=r(o),this.world=r(a),this._worldPos=new d.Vector3,this.max=0}fromAsset(s){return t(this,void 0,void 0,(function*(){null!=this.system&&(this.system.destroy(),this.system.emitters.forEach((t=>t.reset()))),this.sourceAsset=s,this.disposeSystem&&this.disposeSystem();const{system:t,dispose:e}=yield l(s,this.world.scene,{getMaterial:t=>this.assetLoader.getMaterialByAssetId(t),getTexture:t=>this.assetLoader.getTextureByAssetId(t),getMesh:t=>this.assetLoader.getModelByAssetId(t).then((t=>t.scene))});this.system=t,this.disposeSystem=e}))}play(){this.paused=!1;this.system.emitters.every((t=>t.dead))&&this.restart()}pause(){this.paused=!0}stop(){this.system.emitters.forEach((t=>{const s=t.rate;s instanceof h&&(console.log("set rate to infinity",s),s.nextTime=1/0)}))}restart(){for(const t of this.system.emitters){t.removeAllParticles();const s=t.rate;s.nextTime=0,s instanceof m&&s.restart()}}onUpdate(t){var s,e;this.paused||(this.object.getWorldPosition(this._worldPos),null===(s=this.system)||void 0===s||s.emitters.forEach((t=>{t.setPosition(this._worldPos)})),null===(e=this.system)||void 0===e||e.update(t*this.timescale))}getParticleCount(){var t,s;return null!==(s=null===(t=this.system)||void 0===t?void 0:t.getCount())&&void 0!==s?s:0}onEndPlay(){this.stop(),console.log("end play"),null!=this.disposeSystem&&this.disposeSystem()}};n=s([e()],n);export{n as VfxActor};
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,99 @@
1
+ import { LibraryShapeType } from "../../scene/objects/shapes";
2
+ import { AssetId, CustomParamValue, SerializedParamType } from "../../scene/model";
3
+ import { LibraryVfxBehaviourType, LibraryVfxInitalizerType } from './vfx-defs';
4
+ import * as THREE from "three";
5
+ export type OnceRateData = {
6
+ type: 'once';
7
+ count: number;
8
+ };
9
+ export type ContinuousRateData = {
10
+ type: 'continuous';
11
+ count: number;
12
+ time: number;
13
+ };
14
+ export type RateData = OnceRateData | ContinuousRateData;
15
+ export type InitializerData = {
16
+ id: string;
17
+ type: LibraryVfxInitalizerType;
18
+ params: Record<string, CustomParamValue>;
19
+ };
20
+ export interface BehaviourData {
21
+ id: string;
22
+ type: LibraryVfxBehaviourType;
23
+ params: Record<string, CustomParamValue>;
24
+ }
25
+ export type Vector3Data = [number, number, number];
26
+ export declare const BlendingModes: readonly ["additive", "subtractive", "multiply", "normal"];
27
+ export type BlendingMode = (typeof BlendingModes)[number];
28
+ export declare const ThreeBlendingMode: {
29
+ normal: THREE.Blending;
30
+ additive: THREE.Blending;
31
+ subtractive: THREE.Blending;
32
+ multiply: THREE.Blending;
33
+ };
34
+ export type SpriteOutput = {
35
+ type: 'sprite';
36
+ texture: string;
37
+ color: string;
38
+ blendingMode: BlendingMode;
39
+ };
40
+ export type MeshOutput = {
41
+ type: 'mesh';
42
+ assetId: AssetId;
43
+ };
44
+ export type ShapeOutput = {
45
+ type: 'shape';
46
+ shape: LibraryShapeType;
47
+ params: Record<string, CustomParamValue>;
48
+ material: AssetId;
49
+ };
50
+ export type EmitterOutput = SpriteOutput | MeshOutput | ShapeOutput;
51
+ export type EmitterData = {
52
+ id: string;
53
+ name: string;
54
+ rate: RateData;
55
+ position: Vector3Data;
56
+ rotation: Vector3Data;
57
+ initializers: InitializerData[];
58
+ behaviours: BehaviourData[];
59
+ children?: EmitterData[];
60
+ output: EmitterOutput;
61
+ };
62
+ export type VfxAssetData = {
63
+ /**
64
+ * Whether particles position should be relative to local space as opposed to world space.
65
+ * It is usually not realistic that particles moves along with it's parent object but
66
+ * it can be useful for certain effects.
67
+ */
68
+ localSpace?: boolean;
69
+ emitters: EmitterData[];
70
+ };
71
+ export declare function EmitterDataConstructor(): {
72
+ id: string;
73
+ name: string;
74
+ rate: {
75
+ type: "continuous";
76
+ count: number;
77
+ time: number;
78
+ };
79
+ position: [number, number, number];
80
+ rotation: [number, number, number];
81
+ initializers: {
82
+ id: string;
83
+ type: "lifetime";
84
+ params: {
85
+ duration: {
86
+ type: SerializedParamType.Number;
87
+ value: number;
88
+ };
89
+ };
90
+ }[];
91
+ behaviours: any[];
92
+ children: any[];
93
+ output: {
94
+ type: "sprite";
95
+ texture: any;
96
+ color: string;
97
+ blendingMode: "normal";
98
+ };
99
+ };
@@ -0,0 +1,5 @@
1
+ import{SerializedParamType as t}from"../../scene/model";import*as e from"three";import{randomString as i}from"../../utils/math";export const BlendingModes=["additive","subtractive","multiply","normal"];export const ThreeBlendingMode={normal:e.NormalBlending,additive:e.AdditiveBlending,subtractive:e.SubtractiveBlending,multiply:e.MultiplyBlending};export function EmitterDataConstructor(){return{id:i(),name:"Emitter",rate:{type:"continuous",count:1,time:.5},position:[0,0,0],rotation:[0,0,0],initializers:[{id:i(),type:"lifetime",params:{duration:{type:t.Number,value:1}}}],behaviours:[],children:[],output:{type:"sprite",texture:null,color:"#ffffff",blendingMode:"normal"}}}
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,207 @@
1
+ import { Vector2, Vector3 } from "three";
2
+ import { Behaviour } from "three-nebula";
3
+ import Initializer from "three-nebula/src/initializer/Initializer";
4
+ type HexColor = `#${string}`;
5
+ export type ShapeParameterDef<T = boolean | number | string | Vector3 | Vector2 | HexColor> = {
6
+ type: T extends number ? 'number' : T extends HexColor ? 'color' : T extends string ? 'string' | 'select' : T extends Vector2 ? 'vec2' : T extends Vector3 ? 'vec3' : T extends boolean ? 'boolean' : never;
7
+ default: T;
8
+ };
9
+ type FloatParameterDef = ShapeParameterDef<number> & {
10
+ float: boolean;
11
+ min?: number;
12
+ max?: number;
13
+ };
14
+ export type SelectParameterDef<T> = ShapeParameterDef<T> & {
15
+ type: 'select';
16
+ opts: Readonly<T[]>;
17
+ };
18
+ interface InitializerDefinition {
19
+ build(params?: any): Initializer;
20
+ parameters?: Record<string, ShapeParameterDef>;
21
+ }
22
+ interface BehaviourDefinition {
23
+ build(params?: any): Behaviour;
24
+ parameters?: Record<string, ShapeParameterDef>;
25
+ }
26
+ declare abstract class BaseBevDef<T extends DefBuilder> implements BehaviourDefinition {
27
+ abstract parameters: any;
28
+ build(params?: ParamsType<T>): Behaviour;
29
+ abstract make(params: ParamsType<T>): Behaviour;
30
+ }
31
+ declare abstract class BaseIniDef<T extends DefBuilder> implements InitializerDefinition {
32
+ abstract parameters: any;
33
+ build(params?: ParamsType<T>): Initializer;
34
+ abstract make(params: ParamsType<T>): Initializer;
35
+ }
36
+ export type DefBuilder = {
37
+ parameters?: Record<string, ShapeParameterDef>;
38
+ };
39
+ type ParamsType<T extends DefBuilder> = Partial<{
40
+ [K in keyof T['parameters']]: T['parameters'][K]['default'];
41
+ }>;
42
+ declare class LifetimeDef extends BaseIniDef<LifetimeDef> {
43
+ parameters: {
44
+ duration: ShapeParameterDef<number>;
45
+ };
46
+ make(params?: ParamsType<this>): Initializer;
47
+ }
48
+ declare class VelocityDef extends BaseIniDef<VelocityDef> {
49
+ parameters: {
50
+ velocity: ShapeParameterDef<Vector3>;
51
+ };
52
+ make(params?: ParamsType<this>): Initializer;
53
+ }
54
+ declare class PositionPointDef extends BaseIniDef<PositionPointDef> {
55
+ parameters: {
56
+ position: ShapeParameterDef<Vector3>;
57
+ };
58
+ make(params?: ParamsType<this>): Initializer;
59
+ }
60
+ declare class PositionBoxDef extends BaseIniDef<PositionBoxDef> {
61
+ parameters: {
62
+ position: ShapeParameterDef<Vector3>;
63
+ dimensions: ShapeParameterDef<Vector3>;
64
+ };
65
+ make(params?: ParamsType<this>): Initializer;
66
+ }
67
+ declare class PositionSphereDef extends BaseIniDef<PositionBoxDef> {
68
+ parameters: {
69
+ position: ShapeParameterDef<Vector3>;
70
+ radius: FloatParameterDef;
71
+ };
72
+ make(params?: ParamsType<this>): Initializer;
73
+ }
74
+ declare class PositionLineDef extends BaseIniDef<PositionLineDef> {
75
+ parameters: {
76
+ a: ShapeParameterDef<Vector3>;
77
+ b: ShapeParameterDef<Vector3>;
78
+ };
79
+ make(params?: ParamsType<this>): Initializer;
80
+ }
81
+ declare class RandomDirectionDef extends BaseIniDef<RandomDirectionDef> {
82
+ parameters: {
83
+ speed: FloatParameterDef;
84
+ };
85
+ make(params?: ParamsType<this>): Initializer;
86
+ }
87
+ declare class MassDef extends BaseIniDef<MassDef> {
88
+ parameters: {
89
+ min: FloatParameterDef;
90
+ };
91
+ make(params?: ParamsType<this>): Initializer;
92
+ }
93
+ declare class RotationDef extends BaseIniDef<RotationDef> {
94
+ parameters: {
95
+ rotation: ShapeParameterDef<Vector3>;
96
+ };
97
+ make(params?: ParamsType<this>): Initializer;
98
+ }
99
+ declare class InitialScaleDef extends BaseIniDef<InitialScaleDef> {
100
+ parameters: {
101
+ scale: FloatParameterDef;
102
+ };
103
+ make(params?: ParamsType<this>): Initializer;
104
+ }
105
+ declare class ForceDef extends BaseBevDef<ForceDef> {
106
+ parameters: {
107
+ force: ShapeParameterDef<Vector3>;
108
+ ease: SelectParameterDef<string>;
109
+ };
110
+ make(params?: ParamsType<this>): Behaviour;
111
+ }
112
+ declare class GravityDef extends BaseBevDef<GravityDef> {
113
+ parameters: {
114
+ gravity: FloatParameterDef;
115
+ };
116
+ make(params?: ParamsType<this>): Behaviour;
117
+ }
118
+ declare class ScaleDef extends BaseBevDef<ScaleDef> {
119
+ parameters: {
120
+ a: FloatParameterDef;
121
+ b: FloatParameterDef;
122
+ ease: SelectParameterDef<string>;
123
+ };
124
+ make(params?: ParamsType<this>): Behaviour;
125
+ }
126
+ declare class RandomDriftDef extends BaseBevDef<RandomDriftDef> {
127
+ parameters: {
128
+ drift: ShapeParameterDef<Vector3>;
129
+ delay: FloatParameterDef;
130
+ ease: SelectParameterDef<string>;
131
+ };
132
+ make(params?: ParamsType<this>): Behaviour;
133
+ }
134
+ declare class RotateDef extends BaseBevDef<RotateDef> {
135
+ parameters: {
136
+ rotation: ShapeParameterDef<Vector3>;
137
+ ease: SelectParameterDef<string>;
138
+ };
139
+ make(params?: ParamsType<this>): Behaviour;
140
+ }
141
+ declare class ChangeColorDef extends BaseBevDef<ChangeColorDef> {
142
+ parameters: {
143
+ a: ShapeParameterDef<`#${string}`>;
144
+ b: ShapeParameterDef<`#${string}`>;
145
+ ease: SelectParameterDef<string>;
146
+ };
147
+ make(params?: ParamsType<this>): Behaviour;
148
+ }
149
+ declare class ChangeOpacityDef extends BaseBevDef<ChangeOpacityDef> {
150
+ parameters: {
151
+ a: FloatParameterDef;
152
+ b: FloatParameterDef;
153
+ ease: SelectParameterDef<string>;
154
+ };
155
+ make(params?: ParamsType<this>): Behaviour;
156
+ }
157
+ declare class VortexDef extends BaseBevDef<VortexDef> {
158
+ parameters: {
159
+ axis: ShapeParameterDef<Vector3>;
160
+ amount: FloatParameterDef;
161
+ };
162
+ make(params?: ParamsType<this>): Behaviour;
163
+ }
164
+ declare class MoveToDef extends BaseBevDef<MoveToDef> {
165
+ parameters: {
166
+ target: ShapeParameterDef<Vector3>;
167
+ ease: SelectParameterDef<string>;
168
+ };
169
+ make(params?: ParamsType<this>): Behaviour;
170
+ }
171
+ declare class LinearDampingDef extends BaseBevDef<LinearDampingDef> {
172
+ parameters: {
173
+ factor: FloatParameterDef;
174
+ };
175
+ make(params?: ParamsType<this>): Behaviour;
176
+ }
177
+ declare const vfxInitializsers: {
178
+ lifetime: LifetimeDef;
179
+ positionPoint: PositionPointDef;
180
+ positionBox: PositionBoxDef;
181
+ positionSphere: PositionSphereDef;
182
+ positionLine: PositionLineDef;
183
+ rotation: RotationDef;
184
+ scale: InitialScaleDef;
185
+ mass: MassDef;
186
+ velocity: VelocityDef;
187
+ randomDirection: RandomDirectionDef;
188
+ };
189
+ declare const vfxBehaviours: {
190
+ force: ForceDef;
191
+ gravity: GravityDef;
192
+ scale: ScaleDef;
193
+ randomDrift: RandomDriftDef;
194
+ rotate: RotateDef;
195
+ changeColor: ChangeColorDef;
196
+ changeOpacity: ChangeOpacityDef;
197
+ vortex: VortexDef;
198
+ moveTo: MoveToDef;
199
+ linearDamping: LinearDampingDef;
200
+ };
201
+ export type LibraryVfxInitalizerType = keyof typeof vfxInitializsers;
202
+ export declare const VfxInitializserLibrary: Record<LibraryVfxInitalizerType, InitializerDefinition>;
203
+ export declare const VfxInitializserLibraryKeys: ("rotation" | "scale" | "mass" | "velocity" | "lifetime" | "positionPoint" | "positionBox" | "positionSphere" | "positionLine" | "randomDirection")[];
204
+ export type LibraryVfxBehaviourType = keyof typeof vfxBehaviours;
205
+ export declare const VfxBehaviourLibrary: Record<LibraryVfxBehaviourType, BehaviourDefinition>;
206
+ export declare const VfxBehaviourLibraryKeys: ("scale" | "rotate" | "force" | "gravity" | "randomDrift" | "changeColor" | "changeOpacity" | "vortex" | "moveTo" | "linearDamping")[];
207
+ export {};
@@ -0,0 +1,5 @@
1
+ import{Color as e,MathUtils as r,Vector2 as t,Vector3 as s}from"three";import{Life as n,Force as a,Gravity as o,Scale as i,RandomDrift as c,Color as u,Alpha as m,Rotate as p,Mass as d,ease as l,Position as f,BoxZone as w,LineZone as x}from"three-nebula";import{LinearDamping as y,MoveOverLife as h,RotatePosition as k}from"./behaviours";import{AdditiveVelocity as b,InitialScale as v,RandomDirection as z,Rotation as g}from"./initializsers";import{SphereZone as L,PointZone as V}from"./zones";class B{build(e={}){const r=R(e,this.parameters);return this.make(r)}}class O{build(e={}){const r=R(e,this.parameters);return this.make(r)}}function T(e,r,t){return{type:"number",default:e,float:!0,min:r,max:t}}function j(e){return{type:"vec3",default:(new s).fromArray(e)}}function D(e){return{type:"color",default:e}}function I(){return{type:"select",opts:Array.from(Object.keys(l)).map((e=>e.substring(4))),default:"Linear"}}function R(e,r){const t={};for(let s in r)null==e[s]?t[s]=r[s].default:t[s]=e[s];return t}function A(e){return null!=e?l["ease"+e]:l.easeLinear}const C={lifetime:new class extends O{constructor(){var e;super(...arguments),this.parameters={duration:(e=1,{type:"number",default:e})}}make(e={}){return new n(e.duration)}},positionPoint:new class extends O{constructor(){super(...arguments),this.parameters={position:j([0,0,0])}}make(e={}){const{x:r,y:t,z:s}=e.position;return new f(new V(r,t,s))}},positionBox:new class extends O{constructor(){super(...arguments),this.parameters={position:j([0,0,0]),dimensions:j([0,0,0])}}make(e={}){const{x:r,y:t,z:s}=e.position,{x:n,y:a,z:o}=e.dimensions;return new f(new w(r,t,s,n,a,o))}},positionSphere:new class extends O{constructor(){super(...arguments),this.parameters={position:j([0,0,0]),radius:T(1)}}make(e={}){const{x:r,y:t,z:s}=e.position;return new f(new L(r,t,s,e.radius))}},positionLine:new class extends O{constructor(){super(...arguments),this.parameters={a:j([0,0,0]),b:j([0,0,1])}}make(e={}){const{x:r,y:t,z:s}=e.a,{x:n,y:a,z:o}=e.b;return new f(new x(r,t,s,n,a,o))}},rotation:new class extends O{constructor(){super(...arguments),this.parameters={rotation:j([0,0,0])}}make(e={}){const{x:r,y:t,z:n}=e.rotation;return new g(new s(r,t,n))}},scale:new class extends O{constructor(){super(...arguments),this.parameters={scale:T(1)}}make(e={}){return new v(e.scale)}},mass:new class extends O{constructor(){super(...arguments),this.parameters={min:T(1)}}make(e={}){return new d(e.min)}},velocity:new class extends O{constructor(){super(...arguments),this.parameters={velocity:j([0,0,0])}}make(e={}){const{x:r,y:t,z:n}=e.velocity;return new b(new s(r,t,n))}},randomDirection:new class extends O{constructor(){super(...arguments),this.parameters={speed:T(1)}}make(e={}){return new z(e.speed)}}},K={force:new class extends B{constructor(){super(...arguments),this.parameters={force:j([0,0,0]),ease:I()}}make(e={}){return new a(e.force.x,e.force.y,e.force.z,void 0,A(e.ease))}},gravity:new class extends B{constructor(){super(...arguments),this.parameters={gravity:T(8)}}make(e={}){return new o(e.gravity)}},scale:new class extends B{constructor(){super(...arguments),this.parameters={a:T(1),b:T(1),ease:I()}}make(e={}){return new i(e.a,e.b,void 0,A(e.ease))}},randomDrift:new class extends B{constructor(){super(...arguments),this.parameters={drift:j([1,1,1]),delay:T(0),ease:I()}}make(e={}){return new c(e.drift.x,e.drift.y,e.drift.z,e.delay,void 0,A(e.ease))}},rotate:new class extends B{constructor(){super(...arguments),this.parameters={rotation:j([1,1,1]),ease:I()}}make(e={}){const{x:t,y:s,z:n}=e.rotation;return new p(r.degToRad(t),r.degToRad(s),r.degToRad(n),void 0,A(e.ease))}},changeColor:new class extends B{constructor(){super(...arguments),this.parameters={a:D("#ffffff"),b:D("#ffffff"),ease:I()}}make(r={}){return new u(new e(r.a),new e(r.b),void 0,A(r.ease))}},changeOpacity:new class extends B{constructor(){super(...arguments),this.parameters={a:T(1,0,1),b:T(0,0,1),ease:I()}}make(e={}){return new m(e.a,e.b,void 0,A(e.ease))}},vortex:new class extends B{constructor(){super(...arguments),this.parameters={axis:j([0,1,0]),amount:T(1)}}make(e={}){return new k(e.axis,e.amount)}},moveTo:new class extends B{constructor(){super(...arguments),this.parameters={target:j([0,1,0]),ease:I()}}make(e={}){return new h(e.target.x,e.target.y,e.target.z,A(e.ease))}},linearDamping:new class extends B{constructor(){super(...arguments),this.parameters={factor:T(.1,0,1)}}make(e={}){return new y(e.factor)}}};export const VfxInitializserLibrary=C;export const VfxInitializserLibraryKeys=Object.keys(VfxInitializserLibrary);export const VfxBehaviourLibrary=K;export const VfxBehaviourLibraryKeys=Object.keys(VfxBehaviourLibrary);
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,19 @@
1
+ import { VfxAsset } from "../../scene/model";
2
+ import { Object3D } from "three";
3
+ import * as THREE from 'three';
4
+ import System, { MeshRenderer, Rate } from "three-nebula";
5
+ export type VfxAssetProvider = {
6
+ getTexture(assetId: string): Promise<THREE.Texture>;
7
+ getMesh(assetId: string): Promise<THREE.Object3D>;
8
+ getMaterial(assetId: string): Promise<THREE.Material>;
9
+ };
10
+ export declare function materializeVfx(asset: VfxAsset, target: Object3D, assetProvider: VfxAssetProvider): Promise<{
11
+ system: System;
12
+ dispose: () => Object3D<THREE.Event>;
13
+ }>;
14
+ export declare function materializeVfxOld(asset: VfxAsset, target: Object3D): {
15
+ system: System;
16
+ rate: Rate;
17
+ renderer: MeshRenderer;
18
+ dispose: () => Object3D<THREE.Event>;
19
+ };
@@ -0,0 +1,5 @@
1
+ import{__awaiter as e}from"tslib";import{Object3D as t}from"three";import*as r from"three";import a,{Behaviour as n,Body as i,BoxZone as o,Emitter as s,Force as l,Life as d,Mass as m,MeshRenderer as c,PUID as u,PointZone as p,Position as h,RadialVelocity as w,Radius as f,Rate as A,Rotate as g,Scale as y,Span as v,Vector3D as b,ease as M}from"three-nebula";import{RotatePosition as x}from"./behaviours";import{OnceRate as B}from"./rates";import{VfxBehaviourLibrary as S,VfxInitializserLibrary as I}from"./vfx-defs";import{ThreeBlendingMode as E}from"./vfx-asset";import{ShapeLibrary as P}from"../../scene/objects/shapes";import{prepareShapeParameters as R,shapeDefaultColor as Q}from"../../scene/materializer";import{particleEnergyUniformName as U,particleVelcoityUniformName as V}from"../../shader-nodes/particle";import{NodeShaderMaterial as k}from"three-shader-graph";class F extends c{scale(e){e.target instanceof r.Sprite?e.target.scale.set(e.scale*e.radius,e.scale*e.radius,1):super.scale(e)}onParticleCreated(e){e.target||(e.body||(e.body=this._body),e.target=this._targetPool.get(e.body),(e.useAlpha||e.useColor)&&(e.target instanceof r.Mesh||e.target instanceof r.Sprite&&e.target.material instanceof r.Material)&&(e.target.material.__puid=u.id(e.body.material),e.target.material=this._materialPool.get(e.target.material))),e.target&&e.target instanceof t&&(e.target.position.set(e.position.x,e.position.y,e.position.z),this.container.add(e.target))}onParticleUpdate(e){const{target:t,useAlpha:a,useColor:n,rotation:i}=e;t&&(t.position.copy(e.position),this.isThreeSprite(e)||t.rotation.set(i.x,i.y,i.z),this.scale(e),t.material instanceof r.Material&&(a&&(t.material.opacity=e.alpha,t.material.transparent=!0),n&&t.material.color.copy(e.color)))}onParticleDead(e){e.target&&e.target.material&&((e.useAlpha||e.useColor)&&this._materialPool.expire(e.target.material),this._targetPool.expire(e.target),this.container.remove(e.target),e.target=null)}}export function materializeVfx(n,o,l){return e(this,void 0,void 0,(function*(){let d=o;if(!0!==n.vfx.localSpace)for(;null!=d.parent;)d=d.parent;const m=new t;m.name="particle system",d.add(m);const c=new F(m,r),u=(new r.Mesh(new r.BoxGeometry(.3,.3,.3),new r.MeshStandardMaterial({color:16777215})),new a),p=yield Promise.all(n.vfx.emitters.map((a=>e(this,void 0,void 0,(function*(){let n,o;switch(a.rate.type){case"continuous":n=new A(a.rate.count,a.rate.time);break;case"once":n=new B(a.rate.count);break;default:console.warn(`Failed to configure rate for emitter: ${JSON.stringify(a)}`),n=new A(0,1/0)}switch(a.output.type){case"sprite":o=new i(yield function(t,a){var n,i;return e(this,void 0,void 0,(function*(){const e=null!=t.texture?yield a.getTexture(t.texture):C;var o=new r.SpriteMaterial({map:e,color:null!==(n=t.color)&&void 0!==n?n:16777215,blending:null!==(i=E[t.blendingMode])&&void 0!==i?i:r.NormalBlending,fog:!0,transparent:!0});return new r.Sprite(o)}))}(a.output,l));break;case"shape":o=new i(yield function(a,n){var i;return e(this,void 0,void 0,(function*(){const e=P[a.shape];if(null==e)return console.error(`No shape with type ${a.shape}`),new t;const o=R(null!==(i=a.params)&&void 0!==i?i:{}),s=e.geometry(o),l=null!=a.material?yield n.getMaterial(a.material):new r.MeshStandardMaterial({color:Q});return new r.Mesh(s,l)}))}(a.output,l));break;case"mesh":o=new i(yield function(r,a){return e(this,void 0,void 0,(function*(){return null==r.assetId?(console.warn("Can't use mesh as particle without asset id"),new t):a.getMesh(r.assetId)}))}(a.output,l));break;default:console.error("Failed to create particly system body: "+JSON.stringify(a))}const d=(new s).setRate(n),m=yield Promise.all(a.initializers.filter((e=>null!=I[e.type])).map((t=>e(this,void 0,void 0,(function*(){var e;const r=I[t.type],a=yield R(null!==(e=t.params)&&void 0!==e?e:{});return r.build(a)})))));m.push(o),d.addInitializers(m);const c=yield Promise.all(a.behaviours.filter((e=>null!=S[e.type])).map((t=>e(this,void 0,void 0,(function*(){var e;const r=S[t.type],a=yield R(null!==(e=t.params)&&void 0!==e?e:{});return r.build(a)})))));return c.push(new H),d.addBehaviours(c),d.emit()})))));return p.forEach((e=>u.addEmitter(e))),u.addRenderer(c).emit({onEnd:()=>{console.log("ended")}}),{system:u,dispose:()=>m.removeFromParent()}}))}const C=(new r.TextureLoader).load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJkSURBVHjaxJeJbusgEEW94S1L//83X18M2MSuLd2pbqc4wZGqRLrKBsyZhQHny7Jk73xVL8xpVhWrcmiB5lX+6GJ5YgQ2owbAm8oIwH1VgKZUmGcRqKGGPgtEQQAzGR8hQ59fAmhJHSAagigJ4E7GPWRXOYC6owAd1JM6wDQPADyMWUqZRMqmAojHp1Vn6EQQEgUNMJLnUjMyJsM49wygBkAPw9dVFwXRkncCIIW3GRgoTQUZn6HxCMAFEFd8TwEQ78X4rHbILoAUmeT+RFG4UhQ6MiIAE4W/UsYFjuVjAIa2nIY4q1R0GFtQWG3E84lqw2GO2QOoCKBVu0BAPgDSU0eUDjjQenNkV/AW/pWChhpMTelo1a64AOKM30vk18GzTHXCNtI/Knz3DFBgsUqBGIjTInXRY1yA9xkVoqW5tVq3pDR9A0hfF5BSARmVnh7RMDCaIdcNgbPBkgzn1Bu+SfIEFSpSBmkxyrMicb0fAEuCZrWnN89veA/4XcakrPcjBWzkTuLjlbfTQPOlBhz+HwkqqPXmPQDdrQItxE1moGof1S74j/8txk8EHhTQrAE8qlwfqS5yukm1x/rAJ9Jiaa6nyATqD78aUVBhFo8b1V4DdTXdCW+IxA1zB4JhiOhZMEWO1HqnvdoHZ4FAMIhV9REF8FiUm0jsYPEJx/Fm/N8OhH90HI9YRHesWbXXZwAShU8qThe7H8YAuJmw5yOd989uRINKRTJAhoF8jbqrHKfeCYdIISZfSq26bk/K+yO3YvfKrVgiwQBHnwt8ynPB25+M8hceTt/ybPhnryJ78+tLgAEAuCFyiQgQB30AAAAASUVORK5CYII=");export function materializeVfxOld(e,n){let u=n;if(!0!==e.vfx.localSpace)for(;null!=u.parent;)u=u.parent;const S=new t;S.name="particle system",u.add(S);const I=new c(S,r),E=new r.Mesh(new r.BoxGeometry(.3,.3,.3),new r.MeshStandardMaterial({color:16777215})),P=new A(new v(3,9),new v(.02,.15)),R=new s,Q=new a;R.setLife(4).setRate(P).addInitializers([new m(1),new f(1),new d(1),new i(E),new h(new o(.5)),new w(10,new b(0,0,1),30)]).addBehaviours([new x(new r.Vector3(0,0,1),4),new l(0,0,.1),new g("random",2.5*-Math.PI,2*Math.PI,1,M.easeOutCubic),new y(1,.2)]).emit();const U=new B,V=(new s).setLife(5).addInitializers([new m(1),new f(1),new d(3),new i(E),new h(new p(0,0,0))]).addBehaviours([new y(4,6,void 0,M.easeOutExpo)]).setRate(U).emit();return U.nextTime=0,Q.addEmitter(R).addEmitter(V).addRenderer(I).emit({onEnd:()=>{console.log("ended")}}),{system:Q,rate:P,renderer:I,dispose:()=>S.removeFromParent()}}class H extends n{initialize(e){if(e.body instanceof r.Mesh){const t=e.body.material;t instanceof k&&(null!=t.uniforms[U]||null!=t.uniforms[V])&&(e.body.material=t.clone())}}mutate(e,t,a){if(e.target instanceof r.Mesh){const t=e.target.material;t instanceof k&&(null!=t.uniforms[U]&&(t.uniforms[U].value=this.energy),null!=t.uniforms[V]&&(t.uniforms[V].value=e.velocity))}}}
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,13 @@
1
+ import { Object3D } from "three";
2
+ import { VfxActor } from "./vfx-actor";
3
+ export declare class VisualEffect {
4
+ private actor;
5
+ constructor(actor: VfxActor);
6
+ play(): void;
7
+ stop(): void;
8
+ pause(): void;
9
+ restart(): void;
10
+ set timescale(value: number);
11
+ get timescale(): number;
12
+ get object(): Object3D;
13
+ }
@@ -0,0 +1,5 @@
1
+ export class VisualEffect{constructor(t){this.actor=t}play(){this.actor.play()}stop(){this.actor.stop()}pause(){this.actor.pause()}restart(){this.actor.restart()}set timescale(t){this.actor.timescale=t}get timescale(){return this.actor.timescale}get object(){return this.actor.object}}
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,74 @@
1
+ import { Vector3D } from "three-nebula";
2
+ declare const SphereZone_base: any;
3
+ /**
4
+ * A spherical zone for particles to be emitted within.
5
+ *
6
+ */
7
+ export declare class SphereZone extends SphereZone_base {
8
+ private x;
9
+ private y;
10
+ private z;
11
+ private radius;
12
+ private the;
13
+ private phi;
14
+ protected random: number;
15
+ protected vector: Vector3D;
16
+ /**
17
+ * @constructs {SphereZone}
18
+ *
19
+ * @param {number} centerX - the sphere's center x coordinate
20
+ * @param {number} centerY - the sphere's center y coordinate
21
+ * @param {number} centerZ - the sphere's center z coordinate
22
+ * @param {number} radius - the sphere's radius value
23
+ * @return void
24
+ */
25
+ constructor(x: number, y: number, z: number, radius: number);
26
+ /**
27
+ * Returns true to indicate this is a SphereZone.
28
+ *
29
+ * @return {boolean}
30
+ */
31
+ isSphereZone(): boolean;
32
+ /**
33
+ * Sets the particle to dead if the particle collides with the sphere.
34
+ *
35
+ * @param {object} particle
36
+ * @return void
37
+ */
38
+ _dead(particle: any): void;
39
+ /**
40
+ * Warns that this zone does not support the _cross method.
41
+ *
42
+ * @return void
43
+ */
44
+ _cross(): void;
45
+ getPosition: () => Vector3D;
46
+ _bound: (particle: any) => void;
47
+ }
48
+ declare const PointZone_base: any;
49
+ export declare class PointZone extends PointZone_base {
50
+ private x;
51
+ private y;
52
+ private z;
53
+ /**
54
+ * PointZone is a point zone
55
+ * @param {Number|Vector3D} x - the center's x value or a Vector3D Object
56
+ * @param {Number} y - the center's y value
57
+ * @param {Number} z - the center's z value
58
+ * @example
59
+ * var pointZone = new System.PointZone(0,30,10);
60
+ * or
61
+ * var pointZone = new System.PointZone(new System.Vector3D(0,30,10));
62
+ * @extends {Zone}
63
+ * @constructor
64
+ */
65
+ constructor(x: number, y: number, z: number);
66
+ /**
67
+ * Returns true to indicate this is a PointZone.
68
+ *
69
+ * @return {boolean}
70
+ */
71
+ isPointZone(): boolean;
72
+ getPosition(): any;
73
+ }
74
+ export {};
@@ -0,0 +1,5 @@
1
+ import{Vector3D as t}from"three-nebula";import{SphereZone as s}from"three-nebula";const o=Math.PI;export class SphereZone extends(Object.getPrototypeOf(s)){constructor(s,i,e,r){var h,n,a;super("SphereZone"),this.x=s,this.y=i,this.z=e,this.radius=r,this.the=0,this.phi=0,this.vector=new t,this.getPosition=(()=>{var t,s,i;return()=>(this.random=Math.random(),i=this.random*this.radius,t=o*Math.random(),s=2*o*Math.random(),this.vector.x=this.x+i*Math.sin(t)*Math.cos(s),this.vector.y=this.y+i*Math.sin(s)*Math.sin(t),this.vector.z=this.z+i*Math.cos(t),this.vector)})(),this._bound=(n=new t,a=new t,function(t){t.position.distanceTo(this)+t.radius>=this.radius&&(n.copy(t.position).sub(this).normalize(),a.copy(t.velocity),h=2*a.dot(n),t.velocity.sub(n.scalar(h)))})}isSphereZone(){return!0}_dead(t){t.position.distanceTo(this)-t.radius>this.radius&&(t.dead=!0)}_cross(){console.warn(`${this.constructor.name} does not support the _cross method`)}}export class PointZone extends(Object.getPrototypeOf(s)){constructor(t,s,o){super("PointZone"),this.x=t,this.y=s,this.z=o}isPointZone(){return!0}getPosition(){return this.vector.x=this.x,this.vector.y=this.y,this.vector.z=this.z,this.vector}}
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -1,6 +1,6 @@
1
1
  import { ActionInput, AxisInput, RotationInput } from "../../../../../gameplay/input";
2
2
  import { PhysicsSystem } from "../../../../../gameplay/services/physics/physics-system";
3
- import { Vector3 } from 'three';
3
+ import { Vector3, AnimationAction } from 'three';
4
4
  import { ActorComponent } from "../../../component";
5
5
  import { CharacterMovementMode } from "./modes";
6
6
  export declare class CharacterMovementComponent extends ActorComponent {
@@ -40,7 +40,11 @@ export declare class CharacterMovementComponent extends ActorComponent {
40
40
  private cc;
41
41
  private rayTestResult;
42
42
  constructor(physicsSystem: PhysicsSystem);
43
+ private resetRootMotion;
44
+ private rootMotionInterpolant;
43
45
  onInit(): void | Promise<void>;
46
+ private rootMotionAction;
47
+ setRootMotionAction(action: AnimationAction): void;
44
48
  private getWallDirection;
45
49
  private moveTo;
46
50
  getEffectiveGravity(): number;