babylonjs-toolkit 9.9.1 → 9.9.3

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.
@@ -7,7 +7,7 @@ declare namespace TOOLKIT {
7
7
  * @class SceneManager - All rights reserved (c) 2024 Mackey Kinard
8
8
  */
9
9
  class SceneManager {
10
- /** Gets the toolkit framework version string (9.9.1 - R1) */
10
+ /** Gets the toolkit framework version string (9.9.3 - R1) */
11
11
  static get Version(): string;
12
12
  /** Gets the toolkit framework copyright notice */
13
13
  static get Copyright(): string;
@@ -1977,6 +1977,7 @@ declare namespace TOOLKIT {
1977
1977
  private _licenseName;
1978
1978
  private _licenseType;
1979
1979
  private _pendingReflectionTextures;
1980
+ private _deferredCustomMaterials;
1980
1981
  private static ScriptBundleCache;
1981
1982
  /** @hidden */
1982
1983
  constructor(loader: BABYLON.GLTF2.GLTFLoader);
@@ -1988,6 +1989,7 @@ declare namespace TOOLKIT {
1988
1989
  onReady(): void;
1989
1990
  /** @hidden */
1990
1991
  onComplete(): void;
1992
+ loadProjectScriptAsync(): Promise<void>;
1991
1993
  getScriptBundleTag(): string;
1992
1994
  getScriptBundleUrl(): string;
1993
1995
  finishComplete(): void;
@@ -2005,6 +2007,7 @@ declare namespace TOOLKIT {
2005
2007
  /** @hidden */
2006
2008
  loadSceneAsync(context: string, scene: BABYLON.GLTF2.Loader.IScene): Promise<void> | null;
2007
2009
  private _loadSceneInternalAsync;
2010
+ private _resolveDeferredCustomMaterials;
2008
2011
  private _loadSceneExAsync;
2009
2012
  /** @hidden */
2010
2013
  loadNodeAsync(context: string, node: BABYLON.GLTF2.Loader.INode, assign: (babylonMesh: BABYLON.TransformNode) => void): Promise<BABYLON.TransformNode> | null;
@@ -3615,6 +3618,2772 @@ declare namespace TOOLKIT {
3615
3618
  private getWGSLFragmentNormalCode;
3616
3619
  }
3617
3620
  }
3621
+ declare namespace PROJECT {
3622
+ /**
3623
+ * Babylon Script Component
3624
+ * @class CheckpointManager
3625
+ */
3626
+ class CheckpointManager extends TOOLKIT.ScriptComponent {
3627
+ private checkPointList;
3628
+ private checkPointCount;
3629
+ private checkPointIndex;
3630
+ private nextCheckPoint;
3631
+ private startRaceTime;
3632
+ private totalRaceTime;
3633
+ private lapNumber;
3634
+ private lapTimer;
3635
+ private lapTimes;
3636
+ private playerID;
3637
+ private playerName;
3638
+ private raceOver;
3639
+ register(id: number, name: string): void;
3640
+ getLapTimes(): number[];
3641
+ getLapNumber(): number;
3642
+ getCheckPoint(): number;
3643
+ getPlayerName(): string;
3644
+ getPlayerID(): number;
3645
+ getRaceTime(): number;
3646
+ getRaceOver(): boolean;
3647
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
3648
+ protected start(): void;
3649
+ private nextCheckPointName;
3650
+ protected update(): void;
3651
+ protected late(): void;
3652
+ startRaceTimer(): void;
3653
+ }
3654
+ }
3655
+ declare namespace PROJECT {
3656
+ interface ITrackNode {
3657
+ radius: number;
3658
+ position: TOOLKIT.IUnityVector3;
3659
+ rotation: TOOLKIT.IUnityVector4;
3660
+ localPosition: BABYLON.Vector3;
3661
+ localRotation: BABYLON.Quaternion;
3662
+ localDistance: number;
3663
+ }
3664
+ interface IControlPoint {
3665
+ speed: number;
3666
+ tvalue: number;
3667
+ position: TOOLKIT.IUnityVector3;
3668
+ }
3669
+ class RoutePoint {
3670
+ position: BABYLON.Vector3;
3671
+ direction: BABYLON.Vector3;
3672
+ }
3673
+ class PlayerRaceStats {
3674
+ id: number;
3675
+ name: string;
3676
+ position: number;
3677
+ }
3678
+ /**
3679
+ * Babylon Script Component
3680
+ * @class BT_RaceTrackManager
3681
+ */
3682
+ class RaceTrackManager extends TOOLKIT.ScriptComponent {
3683
+ static TrackLength: number;
3684
+ static TotalLapCount: number;
3685
+ static WinnerTransform: BABYLON.TransformNode;
3686
+ private static CheckPointTag;
3687
+ private static CheckPointList;
3688
+ private static LeaderBoardList;
3689
+ private static PlayerVehicleList;
3690
+ private trackNodes;
3691
+ private raceLineData_1;
3692
+ private raceLineData_2;
3693
+ private raceLineData_3;
3694
+ private raceLineData_4;
3695
+ private raceLineData_5;
3696
+ private raceLineColor_1;
3697
+ private raceLineColor_2;
3698
+ private raceLineColor_3;
3699
+ private raceLineColor_4;
3700
+ private raceLineColor_5;
3701
+ private debugMeshLines_1;
3702
+ private debugMeshLines_2;
3703
+ private debugMeshLines_3;
3704
+ private debugMeshLines_4;
3705
+ private debugMeshLines_5;
3706
+ private p0n;
3707
+ private p1n;
3708
+ private p2n;
3709
+ private p3n;
3710
+ private i;
3711
+ private static _EventBus;
3712
+ static get EventBus(): TOOLKIT.LocalMessageBus;
3713
+ drawDebugLines: boolean;
3714
+ getTrackNodes(): PROJECT.ITrackNode[];
3715
+ getControlPoints(line: number): PROJECT.IControlPoint[];
3716
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
3717
+ protected awake(): void;
3718
+ protected start(): void;
3719
+ protected after(): void;
3720
+ protected destroy(): void;
3721
+ getRoutePoint(distance: number): PROJECT.RoutePoint;
3722
+ getRoutePointToRef(distance: number, result: PROJECT.RoutePoint): void;
3723
+ getRoutePosition(distance: number): BABYLON.Vector3;
3724
+ getRoutePositionToRef(distance: number, result: BABYLON.Vector3): void;
3725
+ /** Gets the checkpoint tag identifier */
3726
+ static GetCheckpointTag(): string;
3727
+ /** Get the checkpoint position list */
3728
+ static GetCheckpointList(): BABYLON.AbstractMesh[];
3729
+ /** Get the total number of checkpoints */
3730
+ static GetCheckpointCount(): number;
3731
+ /** Calculates the fraction distance to next checkpoint */
3732
+ private static GetCheckpointDistance;
3733
+ /** Register vehicle with track manager */
3734
+ static RegisterVehicle(vehicle: BABYLON.TransformNode): void;
3735
+ /** Gets the registered player vehicles */
3736
+ static GetPlayerVehicles(): BABYLON.TransformNode[];
3737
+ /** Register player with track manager */
3738
+ static RegisterPlayer(id: number, name: string): void;
3739
+ /** Update player leaderboard information */
3740
+ static UpdateLeaderboard(id: number, lap: number, checkpoint: number, position: BABYLON.Vector3): void;
3741
+ /** Get player leaderboard position */
3742
+ static GetLeaderboardPosition(id: number): number;
3743
+ /** Get leaderboard position list */
3744
+ static GetLeaderboardPositionList(): PROJECT.PlayerRaceStats[];
3745
+ /** Sort leaderboard position list */
3746
+ private static SortLeaderboardPositionList;
3747
+ }
3748
+ }
3749
+ declare namespace PROJECT {
3750
+ /**
3751
+ * Babylon remote vehicle controller class (Colyseus Universal Game Room)
3752
+ * @class RemoteCarController
3753
+ */
3754
+ class RemoteCarController extends TOOLKIT.ScriptComponent {
3755
+ private static ShowSensorLines;
3756
+ centerOfMass: number;
3757
+ burnoutWheelPitch: number;
3758
+ linkTrackManager: boolean;
3759
+ playVehicleSounds: boolean;
3760
+ smokeTexture: BABYLON.Texture;
3761
+ skidThreashold: number;
3762
+ smokeIntensity: number;
3763
+ wheelDrawVelocity: number;
3764
+ smokeOpacity: number;
3765
+ smokeDonuts: number;
3766
+ private steeringWheelHub;
3767
+ private steeringWheelAxis;
3768
+ private maxSteeringAngle;
3769
+ private maxSteeringSpeed;
3770
+ private _animator;
3771
+ private _engineAudioSource;
3772
+ private _skidAudioSource;
3773
+ private brakeLightsMesh;
3774
+ private brakeLightsTrans;
3775
+ private reverseLightsMesh;
3776
+ private reverseLightsTrans;
3777
+ private frontLeftWheelTrans;
3778
+ private frontRightWheelTrans;
3779
+ private backLeftWheelTrans;
3780
+ private backRightWheelTrans;
3781
+ private frontLeftWheelMesh;
3782
+ private frontRightWheelMesh;
3783
+ private backLeftWheelMesh;
3784
+ private backRightWheelMesh;
3785
+ private frontLeftWheelEmitter;
3786
+ private frontRightWheelEmitter;
3787
+ private backLeftWheelEmitter;
3788
+ private backRightWheelEmitter;
3789
+ private frontLeftWheelParticle;
3790
+ private frontRightWheelParticle;
3791
+ private backLeftWheelParticle;
3792
+ private backRightWheelParticle;
3793
+ private frontLeftContact;
3794
+ private frontRightContact;
3795
+ private rearLeftContact;
3796
+ private rearRightContact;
3797
+ private frontLeftContactTag;
3798
+ private frontRightContactTag;
3799
+ private rearLeftContactTag;
3800
+ private rearRightContactTag;
3801
+ private frontLeftContactPoint;
3802
+ private frontRightContactPoint;
3803
+ private rearLeftContactPoint;
3804
+ private rearRightContactPoint;
3805
+ private frontLeftContactNormal;
3806
+ private frontRightContactNormal;
3807
+ private rearLeftContactNormal;
3808
+ private rearRightContactNormal;
3809
+ private startRaycastPosition;
3810
+ private endRaycastPosition;
3811
+ private smokeIntensityFactor;
3812
+ private downDirection;
3813
+ private downDistance;
3814
+ private lastPitch;
3815
+ private lastBrake;
3816
+ private lastReverse;
3817
+ private lastBurnout;
3818
+ private lastSteering;
3819
+ private lastSKID_FL;
3820
+ private lastSKID_FR;
3821
+ private lastSKID_RL;
3822
+ private lastSKID_RR;
3823
+ private lastSPIN_FL;
3824
+ private lastSPIN_FR;
3825
+ private lastSPIN_RL;
3826
+ private lastSPIN_RR;
3827
+ private PITCH_FL;
3828
+ private PITCH_FR;
3829
+ private PITCH_RL;
3830
+ private PITCH_RR;
3831
+ private WHEEL_SKID_PITCH;
3832
+ getFrontLeftWheelContact(): boolean;
3833
+ getFrontRightWheelContact(): boolean;
3834
+ getRearLeftWheelContact(): boolean;
3835
+ getRearRightWheelContact(): boolean;
3836
+ getFrontLeftWheelContactTag(): string;
3837
+ getFrontRightWheelContactTag(): string;
3838
+ getRearLeftWheelContactTag(): string;
3839
+ getRearRightWheelContactTag(): string;
3840
+ getFrontLeftWheelContactPoint(): BABYLON.Vector3;
3841
+ getFrontRightWheelContactPoint(): BABYLON.Vector3;
3842
+ getRearLeftWheelContactPoint(): BABYLON.Vector3;
3843
+ getRearRightWheelContactPoint(): BABYLON.Vector3;
3844
+ getFrontLeftWheelContactNormal(): BABYLON.Vector3;
3845
+ getFrontRightWheelContactNormal(): BABYLON.Vector3;
3846
+ getRearLeftWheelContactNormal(): BABYLON.Vector3;
3847
+ getRearRightWheelContactNormal(): BABYLON.Vector3;
3848
+ protected m_frontLeftWheelSkid: number;
3849
+ protected m_frontRightWheelSkid: number;
3850
+ protected m_backLeftWheelSkid: number;
3851
+ protected m_backRightWheelSkid: number;
3852
+ protected m_velocityOffset: BABYLON.Vector3;
3853
+ protected m_linearVelocity: BABYLON.Vector3;
3854
+ protected m_lastPosition: BABYLON.Vector3;
3855
+ protected m_positionCenter: BABYLON.Vector3;
3856
+ protected m_scaledVelocity: number;
3857
+ protected awake(): void;
3858
+ protected start(): void;
3859
+ protected update(): void;
3860
+ protected destroy(): void;
3861
+ protected updateVehicleProperties(): void;
3862
+ private createSmokeParticleSystem;
3863
+ }
3864
+ }
3865
+ declare namespace PROJECT {
3866
+ /**
3867
+ * Babylon Script Component
3868
+ * @class SideCameraController
3869
+ */
3870
+ class SideCameraController extends TOOLKIT.ScriptComponent {
3871
+ private _camera;
3872
+ private _adt;
3873
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
3874
+ protected awake(): void;
3875
+ protected start(): void;
3876
+ protected ready(): void;
3877
+ protected update(): void;
3878
+ protected late(): void;
3879
+ protected step(): void;
3880
+ protected fixed(): void;
3881
+ protected after(): void;
3882
+ protected reset(): void;
3883
+ protected destroy(): void;
3884
+ private enableWindowView;
3885
+ }
3886
+ }
3887
+ declare namespace PROJECT {
3888
+ /**
3889
+ * Babylon skidmark section class (Havok Physics Engine)
3890
+ * @class SkidMarkSection
3891
+ */
3892
+ class SkidMarkSection {
3893
+ Pos: BABYLON.Vector3;
3894
+ Normal: BABYLON.Vector3;
3895
+ Tangent: BABYLON.Vector4;
3896
+ Posl: BABYLON.Vector3;
3897
+ Posr: BABYLON.Vector3;
3898
+ Intensity: number;
3899
+ LastIndex: number;
3900
+ }
3901
+ /**
3902
+ * Babylon Script Component
3903
+ * @class SkidMarkManager
3904
+ */
3905
+ class SkidMarkManager extends TOOLKIT.ScriptComponent {
3906
+ private static MAX_MARKS;
3907
+ private static GROUND_OFFSET;
3908
+ private static GPU_TRIANGLES;
3909
+ private static MARK_COLOR;
3910
+ private static MARK_WIDTH;
3911
+ private static TEX_INTENSITY;
3912
+ private static MIN_DISTANCE;
3913
+ private static MIN_SQR_DISTANCE;
3914
+ private static TEXTURE_MARKS;
3915
+ private static SkidBufferPositions;
3916
+ private static SkidBufferNormals;
3917
+ private static SkidBufferTangents;
3918
+ private static SkidBufferColors;
3919
+ private static SkidBufferUvs;
3920
+ private static SkidBufferIndices;
3921
+ private static SkidMarkSections;
3922
+ private static SkidMarkIndex;
3923
+ private static SkidMarkMesh;
3924
+ private static SkidMarkUpdated;
3925
+ private static TempVector3_POS;
3926
+ private static TempVector3_DIR;
3927
+ private static TempVector3_XDIR;
3928
+ private static TempVector3_SDIR;
3929
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
3930
+ protected start(): void;
3931
+ protected update(): void;
3932
+ static AddSkidMarkSegment(pos: BABYLON.Vector3, normal: BABYLON.Vector3, intensity: number, lastIndex: number): BABYLON.Nullable<number>;
3933
+ private static CreateSkidMarkManager;
3934
+ private static AddSkidMarkVertexData;
3935
+ private static UpdateSkidMarkManager;
3936
+ }
3937
+ }
3938
+ declare namespace PROJECT {
3939
+ /**
3940
+ * Babylon standard rigidbody vehicle controller class (Native Bullet Physics 2.82)
3941
+ * @class StandardCarController
3942
+ */
3943
+ class StandardCarController extends TOOLKIT.ScriptComponent {
3944
+ static DEFAULT_SKID_FACTOR: number;
3945
+ static DEFAULT_PITCH_FACTOR: number;
3946
+ static DEFAULT_SPEED_FACTOR: number;
3947
+ static DEFAULT_DONUT_FACTOR: number;
3948
+ static DEFAULT_BRAKE_DEADZONE: number;
3949
+ static SimplexNoise2D: TOOLKIT.NoiseFunction2D;
3950
+ MIN_RPM: number;
3951
+ MAX_RPM: number;
3952
+ private _animator;
3953
+ private _rigidbody;
3954
+ private _engineAudioSource;
3955
+ private _skidAudioSource;
3956
+ private _nosAudioSource;
3957
+ private _positionLocked;
3958
+ private _prevHandBrakeRequested;
3959
+ private _donutEngineScale;
3960
+ private steeringWheelHub;
3961
+ private steeringWheelAxis;
3962
+ private maxSteeringAngle;
3963
+ private maxSteeringSpeed;
3964
+ private gearIndex;
3965
+ private shiftingTime;
3966
+ private shiftingSide;
3967
+ private shiftingBrake;
3968
+ private engineForce;
3969
+ private footBraking;
3970
+ private handBraking;
3971
+ private linearDamping;
3972
+ private angularDamping;
3973
+ private forwardSpeed;
3974
+ private absoluteSpeed;
3975
+ private americanSpeed;
3976
+ private gradientSpeed;
3977
+ private smoothedGradientSpeed;
3978
+ private smoothedSteeringSpeed;
3979
+ private frontWheelPower;
3980
+ private backWheelPower;
3981
+ private wheelBrakingForce;
3982
+ private enginePitchLevel;
3983
+ private smokeIntensityFactor;
3984
+ private handBrakingHoldTimer;
3985
+ private raycastVehicle;
3986
+ private brakeLightsMesh;
3987
+ private brakeLightsTrans;
3988
+ private reverseLightsMesh;
3989
+ private reverseLightsTrans;
3990
+ private frontLeftWheelTrans;
3991
+ private frontRightWheelTrans;
3992
+ private backLeftWheelTrans;
3993
+ private backRightWheelTrans;
3994
+ private frontLeftWheelMesh;
3995
+ private frontRightWheelMesh;
3996
+ private backLeftWheelMesh;
3997
+ private backRightWheelMesh;
3998
+ private frontLeftWheelEmitter;
3999
+ private frontRightWheelEmitter;
4000
+ private backLeftWheelEmitter;
4001
+ private backRightWheelEmitter;
4002
+ private frontLeftWheelParticle;
4003
+ private frontRightWheelParticle;
4004
+ private backLeftWheelParticle;
4005
+ private backRightWheelParticle;
4006
+ private frontLeftWheelCollider;
4007
+ private frontRightWheelCollider;
4008
+ private backLeftWheelCollider;
4009
+ private backRightWheelCollider;
4010
+ private engineTorqueCurve;
4011
+ private physicsSteerAngleL;
4012
+ private physicsSteerAngleR;
4013
+ private visualSteerAngleL;
4014
+ private visualSteerAngleR;
4015
+ private visualSteerBoostL;
4016
+ private visualSteerBoostR;
4017
+ private idleNoiseDelta;
4018
+ private driveNoiseDelta;
4019
+ private boostSpeedTimer;
4020
+ private burnoutMeter;
4021
+ private donutMeter;
4022
+ private wheelRadius;
4023
+ private engineRPM;
4024
+ private pitchRPM;
4025
+ private shiftRPM;
4026
+ private wheelRPM;
4027
+ private transmissionInputRPM;
4028
+ private actualEngineRPM;
4029
+ private targetEngineRPM;
4030
+ private throttleRPM;
4031
+ private engineLoad;
4032
+ private gearShiftCooldown;
4033
+ private isShifting;
4034
+ private shiftDirection;
4035
+ private clutchEngagement;
4036
+ private engineBraking;
4037
+ private shiftHysteresis;
4038
+ private SKID_FL;
4039
+ private SKID_FR;
4040
+ private SKID_RL;
4041
+ private SKID_RR;
4042
+ private PITCH_FL;
4043
+ private PITCH_FR;
4044
+ private PITCH_RL;
4045
+ private PITCH_RR;
4046
+ private FRONT_LEFT;
4047
+ private FRONT_RIGHT;
4048
+ private BACK_LEFT;
4049
+ private BACK_RIGHT;
4050
+ private WHEEL_SKID_PITCH;
4051
+ private POWER_BOOST_PITCH;
4052
+ private SPIN_FL_Rotation;
4053
+ private SPIN_FR_Rotation;
4054
+ private SPIN_RL_Rotation;
4055
+ private SPIN_RR_Rotation;
4056
+ isBraking(): boolean;
4057
+ isBoosting(): boolean;
4058
+ private allowRollingReverseBurnout;
4059
+ getFootBraking(): boolean;
4060
+ getHandBraking(): boolean;
4061
+ getLinearVelocity(): BABYLON.Vector3;
4062
+ getCurrentForward(): number;
4063
+ getCurrentTurning(): number;
4064
+ getCurrentSkidding(): boolean;
4065
+ getBurnoutButton(): boolean;
4066
+ getDonutButton(): boolean;
4067
+ getReverseThrottle(): boolean;
4068
+ getEnginePitchLevel(): number;
4069
+ getCurrentBurnout(): boolean;
4070
+ getFrontLeftSkid(): number;
4071
+ getFrontRightSkid(): number;
4072
+ getBackLeftSkid(): number;
4073
+ getBackRightSkid(): number;
4074
+ getWheelSkidPitch(): number;
4075
+ getRigidbodyPhysics(): TOOLKIT.RigidbodyPhysics;
4076
+ getRaycastVehicle(): TOOLKIT.RaycastVehicle;
4077
+ getGradientSpeed(): number;
4078
+ getForwardSpeed(): number;
4079
+ getAbsoluteSpeed(): number;
4080
+ getAmericanSpeed(): number;
4081
+ getTopEngineSpeed(): number;
4082
+ getNormalizedSpeed(): number;
4083
+ getMaxReversePower(): number;
4084
+ getCurrentGearIndex(): number;
4085
+ getCurrentEngineRPM(): number;
4086
+ getCurrentEngineForce(): number;
4087
+ getCurrentEnginePitch(): number;
4088
+ getGearShiftRatioCount(): number;
4089
+ getSmokeTextureMask(): BABYLON.Texture;
4090
+ getBrakeLightsMesh(): BABYLON.TransformNode;
4091
+ getReverseLightsMesh(): BABYLON.TransformNode;
4092
+ getFrontLeftWheelNode(): BABYLON.TransformNode;
4093
+ getFrontRightWheelNode(): BABYLON.TransformNode;
4094
+ getBackLeftWheelNode(): BABYLON.TransformNode;
4095
+ getBackRightWheelNode(): BABYLON.TransformNode;
4096
+ getWheelBurnoutEnabled(): boolean;
4097
+ getWheelDonutsEnabled(): boolean;
4098
+ getCurrentDonutSpinTime(): number;
4099
+ isStartPositionLocked(): boolean;
4100
+ /**
4101
+ * Snap the car to its current transform position and lock it there.
4102
+ * Engine revs, burnout state machine, and wheel spin visuals continue to run.
4103
+ * Call this when placing the car on the grid before the countdown starts.
4104
+ */
4105
+ lockStartPosition(): void;
4106
+ /**
4107
+ * Release the position lock. If the car had a stationary burnout actively built up,
4108
+ * the burnout launch kick fires immediately for an explosive start.
4109
+ * Call this on GO / when the countdown finishes.
4110
+ */
4111
+ unlockStartPosition(): void;
4112
+ getSmokeIntensityFactor(): number;
4113
+ getWheelVelocityOffset(): BABYLON.Vector3;
4114
+ smokeTexture: BABYLON.Texture;
4115
+ skidThreashold: number;
4116
+ wheelDrawVelocity: number;
4117
+ smokeIntensity: number;
4118
+ smokeOpacity: number;
4119
+ smokeDonuts: number;
4120
+ burnoutTurnFactor: number;
4121
+ maxSteerBoost: number;
4122
+ overSteerSpeed: number;
4123
+ overSteerTimeout: number;
4124
+ topEngineSpeed: number;
4125
+ topBoosterSpeed: number;
4126
+ powerChangeRate: number;
4127
+ powerCoefficient: number;
4128
+ boosterCoefficient: number;
4129
+ gravitationalForce: number;
4130
+ driftSpeedDampener: number;
4131
+ lowGearCoefficient: number;
4132
+ lowGearDampener: number;
4133
+ stationaryBoost: number;
4134
+ lowSpeedSteering: number;
4135
+ highSpeedSteering: number;
4136
+ steeringInputCurve: number;
4137
+ maximumYawRateLow: number;
4138
+ maximumYawRateHigh: number;
4139
+ debugBurnout: boolean;
4140
+ debugBurnoutEveryNFrames: number;
4141
+ debugSteering: boolean;
4142
+ debugSteeringEveryNFrames: number;
4143
+ private _debugSteeringCounter;
4144
+ debugDonut: boolean;
4145
+ debugDonutEveryNFrames: number;
4146
+ private _donutLogCounter;
4147
+ donutTurningRadius: number;
4148
+ donutPowerBlend: number;
4149
+ donutSpeedScaling: number;
4150
+ donutRotationBoost: number;
4151
+ donutAngularDamping: number;
4152
+ donutFrontFriction: number;
4153
+ donutRearFriction: number;
4154
+ donutFrontWheelPull: number;
4155
+ donutYawDegPerSec: number;
4156
+ donutYawResponse: number;
4157
+ donutSpeedGovernorEnabled: boolean;
4158
+ donutSpeedGovernorGain: number;
4159
+ donutSpeedGovernorResponse: number;
4160
+ donutSpeedGovernorMinScale: number;
4161
+ donutSpeedGovernorMaxScale: number;
4162
+ donutVelocityPinEnabled: boolean;
4163
+ donutVelocityPinResponse: number;
4164
+ roadConnectAccel: number;
4165
+ smoothFlyingImpulse: number;
4166
+ stableDownImpulse: number;
4167
+ constImpulseForce: number;
4168
+ transmissionRatio: number;
4169
+ differentialRatio: number;
4170
+ burnoutFirstGearMultiplier: number;
4171
+ maxBoosterTime: number;
4172
+ minBoosterSpeed: number;
4173
+ maxFrontBraking: number;
4174
+ maxReversePower: number;
4175
+ minBrakingForce: number;
4176
+ maxBrakingForce: number;
4177
+ handBrakingForce: number;
4178
+ handBrakingTimer: number;
4179
+ defaultBrakingWindow: number;
4180
+ counterSteerLockoutWindowPercent: number;
4181
+ counterSteerLockoutDeadzone: number;
4182
+ linearBrakingForce: number;
4183
+ angularBrakingForce: number;
4184
+ frontSkidFriction: number;
4185
+ rearSkidFriction: number;
4186
+ burnoutTimeDelay: number;
4187
+ burnoutWheelPitch: number;
4188
+ stationaryBurnoutSkidPitch: number;
4189
+ burnoutPeelAwaySkidPitch: number;
4190
+ burnoutPeelAwayPitchRampTime: number;
4191
+ burnoutLaunchChirpSound: string;
4192
+ burnoutCoefficient: number;
4193
+ burnoutTriggerMark: number;
4194
+ stationaryBurnoutPrimeSpeedMph: number;
4195
+ stationaryBurnoutPrimeHoldTime: number;
4196
+ stationaryBurnoutPrimeReleaseSpeedMph: number;
4197
+ stationaryBurnoutRevMinRpmOffset: number;
4198
+ stationaryBurnoutRevMaxFactor: number;
4199
+ stationaryBurnoutRevLerpSpeed: number;
4200
+ burnoutLaunchRpmCarryTime: number;
4201
+ burnoutLaunchRpmCarryFloorFactor: number;
4202
+ normalLaunchTractionRamp: number;
4203
+ normalLaunchTractionMin: number;
4204
+ burnoutLaunchKickDuration: number;
4205
+ burnoutLaunchKickMultiplier: number;
4206
+ burnoutLaunchFrictionRestore: number;
4207
+ debugLaunch: boolean;
4208
+ debugLaunchEveryNFrames: number;
4209
+ debugFrictionRestore: boolean;
4210
+ debugFrictionRestoreEveryNFrames: number;
4211
+ debugFrictionSnapDelta: number;
4212
+ skidReleaseBrakeFadeTime: number;
4213
+ skidReleaseFrictionLerpScale: number;
4214
+ skidReleaseFrictionRestoreSpeed: number;
4215
+ skidReleaseSnapRatio: number;
4216
+ skidStopFrictionResetSpeed: number;
4217
+ skidLaunchFrictionResetSpeed: number;
4218
+ burnoutStopFrictionResetSpeed: number;
4219
+ burnoutLaunchFrictionResetSpeed: number;
4220
+ burnoutExitArcadeFadeTime: number;
4221
+ burnoutExitFrictionRampTime: number;
4222
+ burnoutExitArcadeReleaseTime: number;
4223
+ enableAutoBurnouts: boolean;
4224
+ grassPenaltyMask: number;
4225
+ curbPenaltyMask: number;
4226
+ minPenaltySpeed: number;
4227
+ linearWheelDrag: number;
4228
+ frictionWheelSlip: number;
4229
+ showSensorLines: boolean;
4230
+ powerBooster: boolean;
4231
+ linkTrackManager: boolean;
4232
+ playVehicleSounds: boolean;
4233
+ postNetworkAttributes: boolean;
4234
+ wheelDriveType: number;
4235
+ gearBoxMultiplier: number;
4236
+ currentPitchScale: number;
4237
+ gearBoxPitchScale: number;
4238
+ gearBoxShiftDelay: number;
4239
+ gearBoxShiftRatios: number[];
4240
+ gearBoxShiftUpRanges: number[];
4241
+ gearBoxShiftDownRanges: number[];
4242
+ throttleBrakingForce: number;
4243
+ throttleEngineSpeed: number;
4244
+ frictionLerpSpeed: number;
4245
+ burnoutLerpSpeed: number;
4246
+ skidTurningAssist: number;
4247
+ skidSteeringKick: number;
4248
+ skidSteeringAngle: number;
4249
+ skidReleaseWindow: number;
4250
+ skidReleaseLinger: number;
4251
+ ackermanWheelBase: number;
4252
+ ackermanRearTrack: number;
4253
+ ackermanTurnRadius: number;
4254
+ ackermanMaxRadius: number;
4255
+ ackermanTurnFactor: number;
4256
+ radiusBrakingForce: number;
4257
+ steeringSlewTau: number;
4258
+ minSteeringSlew: number;
4259
+ readBurnoutMeter(): number;
4260
+ resetBurnoutMeter(): void;
4261
+ readDonutMeter(): number;
4262
+ resetDonutMeter(): void;
4263
+ getBoosterTime(): number;
4264
+ setBoosterTime(time: number): void;
4265
+ resetBoosterTime(): void;
4266
+ roadSurfaceFactor: number;
4267
+ movementTilting: boolean;
4268
+ surfaceDetection: boolean;
4269
+ idleShakeRate: number;
4270
+ idleShakeNoise: number;
4271
+ maxForwardAngle: number;
4272
+ maxLateralAngle: number;
4273
+ lerpForwardFactor: number;
4274
+ lerpLateralFactor: number;
4275
+ shiftForwardExtra: number;
4276
+ shiftLateralExtra: number;
4277
+ forwardPitchFactor: number;
4278
+ lateralRollFactor: number;
4279
+ forwardRecoverRate: number;
4280
+ lateralRecoverRate: number;
4281
+ lowSpeedScale: number;
4282
+ highSpeedScale: number;
4283
+ lowForwardNoise: number;
4284
+ highForwardNoise: number;
4285
+ lowLateralNoise: number;
4286
+ highLateralNoise: number;
4287
+ speedThreashold: number;
4288
+ boosterTransform: BABYLON.TransformNode;
4289
+ chassisTransform: BABYLON.TransformNode;
4290
+ tiltChassisEulers: BABYLON.Vector3;
4291
+ protected m_physicsWorld: any;
4292
+ protected m_frontLeftWheel: TOOLKIT.btWheelInfo;
4293
+ protected m_frontRightWheel: TOOLKIT.btWheelInfo;
4294
+ protected m_backLeftWheel: TOOLKIT.btWheelInfo;
4295
+ protected m_backRightWheel: TOOLKIT.btWheelInfo;
4296
+ protected m_frontLeftWheelSkid: number;
4297
+ protected m_frontRightWheelSkid: number;
4298
+ protected m_backLeftWheelSkid: number;
4299
+ protected m_backRightWheelSkid: number;
4300
+ protected m_angularDampener: BABYLON.Vector3;
4301
+ protected m_velocityOffset: BABYLON.Vector3;
4302
+ protected m_linearVelocity: BABYLON.Vector3;
4303
+ protected m_lastPosition: BABYLON.Vector3;
4304
+ protected m_scaledVelocity: number;
4305
+ protected awake(): void;
4306
+ protected start(): void;
4307
+ protected update(): void;
4308
+ protected destroy(): void;
4309
+ protected awakeVehicleState(): void;
4310
+ protected initVehicleState(): void;
4311
+ protected updateVehicleState(): void;
4312
+ protected destroyVehicleState(): void;
4313
+ private donutButton;
4314
+ private burnoutButton;
4315
+ private burnoutTimer;
4316
+ private burnoutElapsed;
4317
+ private restoreTimer;
4318
+ private restoreTimerDuration;
4319
+ private cooldownTimer;
4320
+ private wheelDonuts;
4321
+ private wheelBurnout;
4322
+ private _prevBurnoutButton;
4323
+ private _burnoutLatchedDriveSign;
4324
+ private _stationaryBurnoutPrimed;
4325
+ private _stationaryBurnoutPrimeTimer;
4326
+ private _prevStationaryBurnoutWanted;
4327
+ private _burnoutLaunchKickTimer;
4328
+ private _burnoutLaunchHoldRpm;
4329
+ private _burnoutLaunchRpmCarryTimer;
4330
+ private _burnoutLaunchRpmCarryDuration;
4331
+ private _burnoutPeelAwayPitchRampTimer;
4332
+ private _burnoutPeelAwayPitchRampDuration;
4333
+ private _stationaryLaunchSnapActive;
4334
+ private _burnoutLowGearClimbActive;
4335
+ private _burnoutLowGearClimbStationary;
4336
+ private _burnoutLowGearClimbDriveSign;
4337
+ private _burnoutStartedFromStationary;
4338
+ private _launchLogCounter;
4339
+ private _handBrakeEntrySteerSign;
4340
+ private _skidReleaseBrakeTimer;
4341
+ private _skidFrictionRestorePending;
4342
+ private _burnoutExitArcadeFadeTimer;
4343
+ private _burnoutExitFrictionRampTimer;
4344
+ private _burnoutExitArcadeReleaseTimer;
4345
+ private _burnoutResidualFrictionRestorePending;
4346
+ private _prevWheelBurnoutState;
4347
+ private _lockedPosition;
4348
+ private _lockedRotationQuaternion;
4349
+ private wheelSkidding;
4350
+ private donutSpinTime;
4351
+ private currentForward;
4352
+ private currentTurning;
4353
+ private rampedTurning;
4354
+ private currentBoosting;
4355
+ private currentSkidding;
4356
+ private currentDrivePower;
4357
+ private targetDrivePower;
4358
+ private animatorSteerAngle;
4359
+ /** Drives the raycast vehicle with the specfied movement properties. */
4360
+ drive(throttle: number, steering: number, braking: boolean, burnout: boolean, booster?: number, autopilot?: boolean, nos?: boolean, donut?: boolean): void;
4361
+ private processAckermanSteering;
4362
+ private syncVehicleState;
4363
+ private currentPitch;
4364
+ private currentRoll;
4365
+ private previousSpeed;
4366
+ private syncVehicleTilting;
4367
+ private updateGearShifting;
4368
+ private shouldUpshift;
4369
+ private shouldDownshift;
4370
+ private initiateGearShift;
4371
+ private armBurnoutLowGearClimb;
4372
+ private resetBurnoutLowGearClimb;
4373
+ private isBurnoutLowGearClimbActive;
4374
+ private updateBurnoutLowGearClimbState;
4375
+ private armBurnoutLaunchAudio;
4376
+ private isStationaryBurnoutSkidAudioActive;
4377
+ private isBurnoutPeelAwaySkidAudioActive;
4378
+ private getWheelSkidAudioPitchScale;
4379
+ private getBurnoutLaunchRpmCarryFloor;
4380
+ private updateClutchEngagement;
4381
+ private getIdleRPM;
4382
+ private writeTransformMetadata;
4383
+ private getVehicleEngineTorque;
4384
+ private createSmokeParticleSystem;
4385
+ private updateCurrentSkidInfo;
4386
+ private updateCurrentContactMask;
4387
+ private hasPenaltyContactMask;
4388
+ private updateCurrentBrakeDamping;
4389
+ private updateCurrentRotationDelta;
4390
+ private updateCurrentRotationBoost;
4391
+ private clearWheelRotationBoost;
4392
+ private hasBurnoutResidualState;
4393
+ private resetBurnoutFrictionForStopOrLaunch;
4394
+ private resetSkidFrictionForStopOrLaunch;
4395
+ private restoreWheelFrictionToDefault;
4396
+ private isWheelFrictionAtDefault;
4397
+ private updateCurrentFrictionSlip;
4398
+ private armBurnoutExitSmoothing;
4399
+ private clearBurnoutExitSmoothing;
4400
+ private frontLeftContact;
4401
+ private frontRightContact;
4402
+ private rearLeftContact;
4403
+ private rearRightContact;
4404
+ private frontLeftContactTag;
4405
+ private frontRightContactTag;
4406
+ private rearLeftContactTag;
4407
+ private rearRightContactTag;
4408
+ private frontLeftContactMask;
4409
+ private frontRightContactMask;
4410
+ private rearLeftContactMask;
4411
+ private rearRightContactMask;
4412
+ private frontLeftContactPoint;
4413
+ private frontRightContactPoint;
4414
+ private rearLeftContactPoint;
4415
+ private rearRightContactPoint;
4416
+ private frontLeftContactNormal;
4417
+ private frontRightContactNormal;
4418
+ private rearLeftContactNormal;
4419
+ private rearRightContactNormal;
4420
+ private frontLeftFrictionLerping;
4421
+ private frontRightFrictionLerping;
4422
+ private rearLeftFrictionLerping;
4423
+ private rearRightFrictionLerping;
4424
+ private frontLeftFrictionPenalty;
4425
+ private frontRightFrictionPenalty;
4426
+ private rearLeftFrictionPenalty;
4427
+ private rearRightFrictionPenalty;
4428
+ private startRaycastPosition;
4429
+ private endRaycastPosition;
4430
+ private downDirection;
4431
+ private downDistance;
4432
+ getFrontLeftWheelContact(): boolean;
4433
+ getFrontRightWheelContact(): boolean;
4434
+ getRearLeftWheelContact(): boolean;
4435
+ getRearRightWheelContact(): boolean;
4436
+ getFrontLeftWheelContactTag(): string;
4437
+ getFrontRightWheelContactTag(): string;
4438
+ getRearLeftWheelContactTag(): string;
4439
+ getRearRightWheelContactTag(): string;
4440
+ getFrontLeftWheelContactPoint(): BABYLON.Vector3;
4441
+ getFrontRightWheelContactPoint(): BABYLON.Vector3;
4442
+ getRearLeftWheelContactPoint(): BABYLON.Vector3;
4443
+ getRearRightWheelContactPoint(): BABYLON.Vector3;
4444
+ getFrontLeftWheelContactNormal(): BABYLON.Vector3;
4445
+ getFrontRightWheelContactNormal(): BABYLON.Vector3;
4446
+ getRearLeftWheelContactNormal(): BABYLON.Vector3;
4447
+ getRearRightWheelContactNormal(): BABYLON.Vector3;
4448
+ }
4449
+ }
4450
+ declare namespace PROJECT {
4451
+ /**
4452
+ * Babylon Script Component
4453
+ * @class VehicleCameraManager
4454
+ */
4455
+ class VehicleCameraManager extends TOOLKIT.ScriptComponent {
4456
+ enableCamera: boolean;
4457
+ followTarget: boolean;
4458
+ followHeight: number;
4459
+ pitchingAngle: number;
4460
+ rotationDamping: number;
4461
+ minimumDistance: number;
4462
+ maximumDistance: number;
4463
+ buttonCamera: number;
4464
+ keyboardCamera: number;
4465
+ tickRemoteEntities: boolean;
4466
+ fastMotionBlur: boolean;
4467
+ lowSpeedBlurring: number;
4468
+ highSpeedBlurring: number;
4469
+ motionBlurSamples: number;
4470
+ isObjectBasedBlur: boolean;
4471
+ fastCameraShake: boolean;
4472
+ lowSpeedShaking: number;
4473
+ highSpeedShaking: number;
4474
+ autoAttachCamera: boolean;
4475
+ private firstPerson;
4476
+ private cameraPivot;
4477
+ private targetEulers;
4478
+ private cameraRotation;
4479
+ private cameraPivotOffset;
4480
+ private motionBlurAttached;
4481
+ protected m_freeCamera: BABYLON.FreeCamera;
4482
+ protected m_motionBlur: BABYLON.MotionBlurPostProcess;
4483
+ protected m_cameraTransform: BABYLON.TransformNode;
4484
+ protected m_inputController: PROJECT.VehicleInputController;
4485
+ protected m_standardController: PROJECT.StandardCarController;
4486
+ protected m_firstPersonOffset: BABYLON.Vector3;
4487
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
4488
+ protected awake(): void;
4489
+ protected start(): void;
4490
+ protected late(): void;
4491
+ protected destroy(): void;
4492
+ protected awakeCameraManager(): void;
4493
+ protected initCameraManager(): void;
4494
+ protected lateUpdateCameraManager(): void;
4495
+ protected destroyCameraManager(): void;
4496
+ attachPlayerCamera(player: TOOLKIT.PlayerNumber): void;
4497
+ togglePlayerCamera(): void;
4498
+ firstPersonCamera(): void;
4499
+ thirdPersonCamera(): void;
4500
+ }
4501
+ }
4502
+ declare namespace PROJECT {
4503
+ /**
4504
+ * Babylon Script Component
4505
+ * @class VehicleInputController
4506
+ */
4507
+ interface ISteeringWheelDevice {
4508
+ deviceName: string;
4509
+ forwardButton: number;
4510
+ backwardButton: number;
4511
+ leftHandBrake: number;
4512
+ rightHandBrake: number;
4513
+ leftBurnoutBoost: number;
4514
+ rightBurnoutBoost: number;
4515
+ leftDonutBoost: number;
4516
+ rightDonutBoost: number;
4517
+ }
4518
+ class VehicleInputController extends TOOLKIT.ScriptComponent {
4519
+ private playerDeltaX;
4520
+ private playerDeltaY;
4521
+ private playerMouseX;
4522
+ private playerMouseY;
4523
+ private ackermanRadius;
4524
+ private autoturnRadius;
4525
+ private recoveryRadius;
4526
+ private waypointPosition;
4527
+ private waypointCount;
4528
+ private waypointIndex;
4529
+ private noMovementTime;
4530
+ private reverseFixMode;
4531
+ private recoveryFixMode;
4532
+ private nextTargetSpeed;
4533
+ private prevTargetSpeed;
4534
+ private vehicleResetCheck;
4535
+ private randomSkillFactor;
4536
+ private showChaseRabbit;
4537
+ private showSensorLines;
4538
+ private steeringWheelMode;
4539
+ private rabbitTrackerLine;
4540
+ private rabbitTrackerColor;
4541
+ private greenTrackingColor;
4542
+ private redTrackingColor;
4543
+ private localTargetPosition;
4544
+ private avoidPositionOffset;
4545
+ private avoidanceLerp;
4546
+ private avoidanceTimer;
4547
+ private avoidanceValue;
4548
+ private _avoidanceSteerSmoothed;
4549
+ private _debugAvoidanceCounter;
4550
+ private _frontThreatHit;
4551
+ private _frontThreatDistance;
4552
+ private _frontThreatSensor;
4553
+ private _frontThreatTag;
4554
+ private randomTurning;
4555
+ private randomBoosting;
4556
+ private randomDistance;
4557
+ private lastCheckpoint;
4558
+ private mainCenterSensorLine;
4559
+ private mainRightSensorLine;
4560
+ private mainLeftSensorLine;
4561
+ private angleRightSensorLine;
4562
+ private angleLeftSensorLine;
4563
+ private sideRightSensorLine;
4564
+ private sideLeftSensorLine;
4565
+ private backRightSensorLine;
4566
+ private backLeftSensorLine;
4567
+ private sidewaysOffsetVector;
4568
+ private backBumperEdgeVector;
4569
+ private sensorStartPos;
4570
+ private sensorPointPos;
4571
+ private sensorAnglePos;
4572
+ private rsideStartPos;
4573
+ private rsidePointPos;
4574
+ private lsideStartPos;
4575
+ private lsidePointPos;
4576
+ private tempScaleVector;
4577
+ private rbackStartPos;
4578
+ private rbackPointPos;
4579
+ private lbackStartPos;
4580
+ private lbackPointPos;
4581
+ private trackVehiclePosition;
4582
+ private trackRabbitPosition;
4583
+ getPlayerDeltaX(): number;
4584
+ getPlayerDeltaY(): number;
4585
+ getPlayerMouseX(): number;
4586
+ getPlayerMouseY(): number;
4587
+ getWaypointIndex(): number;
4588
+ getChaseRabbitMesh(): BABYLON.Mesh;
4589
+ resetChaseRabbitMesh(): void;
4590
+ getChasePointMesh(): BABYLON.Mesh;
4591
+ resetChasePointMesh(): void;
4592
+ enableInput: boolean;
4593
+ resetTiming: number;
4594
+ playerNumber: TOOLKIT.PlayerNumber;
4595
+ pedelForward: number;
4596
+ triggerForward: number;
4597
+ keyboardForawrd: number;
4598
+ auxKeyboardForawrd: number;
4599
+ pedalBackward: number;
4600
+ triggerBackwards: number;
4601
+ keyboardBackwards: number;
4602
+ auxKeyboardBackwards: number;
4603
+ pedalBooster: number;
4604
+ keyboardBooster: number;
4605
+ leftButtonBooster: number;
4606
+ rightButtonBooster: number;
4607
+ buttonHandbrake: number;
4608
+ keyboardHandbrake: number;
4609
+ leftWheelHandbrake: number;
4610
+ rightWheelHandbrake: number;
4611
+ keyboardBurnout: number;
4612
+ buttonBurnout: number;
4613
+ leftWheelBurnout: number;
4614
+ rightWheelBurnout: number;
4615
+ keyboardDonut: number;
4616
+ buttonDonut: number;
4617
+ leftWheelDonut: number;
4618
+ rightWheelDonut: number;
4619
+ raceLineNode: number;
4620
+ minLookAhead: number;
4621
+ maxLookAhead: number;
4622
+ driverSkillLevel: number;
4623
+ chaseRabbitSpeed: number;
4624
+ throttleSensitivity: number;
4625
+ steeringSensitivity: number;
4626
+ brakingSensitivity: number;
4627
+ brakingTurnAngle: number;
4628
+ brakingSpeedLimit: number;
4629
+ skiddingSpeedLimit: number;
4630
+ linearDampenForce: number;
4631
+ driveSpeedMultiplier: number;
4632
+ driveLineDistance: number;
4633
+ resetMovingTimeout: number;
4634
+ reverseThrottleTime: number;
4635
+ maxRaceTrackSpeed: number;
4636
+ trackManagerIdentity: string;
4637
+ vehicleTag: string;
4638
+ obstacleTag: string;
4639
+ sensorLength: number;
4640
+ spacerWidths: number;
4641
+ angleFactors: number;
4642
+ initialOffsetX: number;
4643
+ initialOffsetY: number;
4644
+ initialOffsetZ: number;
4645
+ sidewaysLength: number;
4646
+ sidewaysOffset: number;
4647
+ backBumperEdge: number;
4648
+ powerBoosting: number;
4649
+ wonderDistance: number;
4650
+ avoidanceFactor: number;
4651
+ avoidanceSpeed: number;
4652
+ avoidanceTimeout: number;
4653
+ avoidanceDistance: number;
4654
+ avoidanceSteeringGain: number;
4655
+ avoidanceSteeringGainHigh: number;
4656
+ avoidanceSteerSmoothing: number;
4657
+ avoidanceSteerDeadband: number;
4658
+ frontSlowdownGain: number;
4659
+ frontSlowdownMinThrottle: number;
4660
+ frontBrakeProximity: number;
4661
+ frontBrakeForce: number;
4662
+ frontHardBrakeProximity: number;
4663
+ frontHardBrakeStrength: number;
4664
+ avoidanceProximityBoost: number;
4665
+ avoidanceSteerCarryover: number;
4666
+ debugAvoidance: boolean;
4667
+ debugAvoidanceEveryNFrames: number;
4668
+ private reversingFlag;
4669
+ private reversingTime;
4670
+ private reversingWait;
4671
+ private reversingFor;
4672
+ protected m_chasePointMesh: BABYLON.Mesh;
4673
+ protected m_chaseRabbitMesh: BABYLON.Mesh;
4674
+ protected m_circuitInterfaces: PROJECT.ITrackNode[];
4675
+ protected m_circuitRaceLine_1: PROJECT.IControlPoint[];
4676
+ protected m_circuitRaceLine_2: PROJECT.IControlPoint[];
4677
+ protected m_circuitRaceLine_3: PROJECT.IControlPoint[];
4678
+ protected m_circuitRaceLine_4: PROJECT.IControlPoint[];
4679
+ protected m_circuitRaceLine_5: PROJECT.IControlPoint[];
4680
+ protected m_rigidbodyPhysics: TOOLKIT.RigidbodyPhysics;
4681
+ protected m_checkpointManager: PROJECT.CheckpointManager;
4682
+ protected m_standardCarController: PROJECT.StandardCarController;
4683
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
4684
+ protected awake(): void;
4685
+ protected start(): void;
4686
+ protected update(): void;
4687
+ protected destroy(): void;
4688
+ protected awakeVehicleController(): void;
4689
+ protected initVehicleController(): void;
4690
+ protected updateVehicleController(): void;
4691
+ protected updateManualInputDrive(): void;
4692
+ private autoDriveRaycastResult;
4693
+ protected updateAutoPilotDrive(): void;
4694
+ protected getDriverSkillFactor(): number;
4695
+ protected getCurrentTrackNode(index: number): PROJECT.ITrackNode;
4696
+ protected getCurrentControlPoint(lane: number, index: number): PROJECT.IControlPoint;
4697
+ protected getRandomNumber(min: number, max: number): number;
4698
+ protected generateRandonNumber(min: number, max: number, decimals?: number): number;
4699
+ protected destroyVehicleController(): void;
4700
+ }
4701
+ }
4702
+ declare namespace PROJECT {
4703
+ /**
4704
+ * Babylon Script Component
4705
+ * @class VehicleNetworkLabel
4706
+ */
4707
+ class VehicleNetworkLabel extends TOOLKIT.ScriptComponent {
4708
+ label: BABYLON.GUI.TextBlock;
4709
+ rect: BABYLON.GUI.Rectangle;
4710
+ autoCreate: boolean;
4711
+ offsetX: number;
4712
+ offsetY: number;
4713
+ labelColor: BABYLON.Color3;
4714
+ borderColor: BABYLON.Color3;
4715
+ backgroundColor: BABYLON.Color3;
4716
+ labelCreated: boolean;
4717
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
4718
+ protected update(): void;
4719
+ createLabel(name: string): void;
4720
+ protected destroy(): void;
4721
+ private static AdvDynamicTexture;
4722
+ /** Get the default fullscreen user interface advanced dynamic texture */
4723
+ static GetFullscreenUI(scene: BABYLON.Scene, sampling?: number): BABYLON.GUI.AdvancedDynamicTexture;
4724
+ }
4725
+ }
4726
+ declare namespace PROJECT {
4727
+ /**
4728
+ * Double Sided Shader Material (BABYLON.PBRMaterial)
4729
+ * Disables backface culling so both sides of geometry are rendered.
4730
+ * Ported from Unity "Custom/DoubleSided".
4731
+ * @class DoubleSided
4732
+ */
4733
+ class DoubleSided extends TOOLKIT.CustomShaderMaterial {
4734
+ constructor(name: string, scene: BABYLON.Scene);
4735
+ awake(): void;
4736
+ update(): void;
4737
+ getShaderName(): string;
4738
+ }
4739
+ }
4740
+ declare namespace PROJECT {
4741
+ /**
4742
+ * Vertex Color Splat Shader Material (BABYLON.PBRMaterial)
4743
+ * Blends albedo (Splat1) with a second texture (Splat3) using vertex color blue channel.
4744
+ * Ported from Unity "Custom/Vertex Color Splat Surf Shader".
4745
+ * @class Splat
4746
+ */
4747
+ class VertexSplat extends TOOLKIT.CustomShaderMaterial {
4748
+ constructor(name: string, scene: BABYLON.Scene);
4749
+ awake(): void;
4750
+ update(): void;
4751
+ getShaderName(): string;
4752
+ getCustomVertexCode(wgsl: boolean): string;
4753
+ }
4754
+ /**
4755
+ * Vertex Color Splat Shader Plugin (BABYLON.MaterialPluginBase)
4756
+ * @class VertexSplatPlugin
4757
+ */
4758
+ class VertexSplatPlugin extends TOOLKIT.CustomShaderMaterialPlugin {
4759
+ constructor(customMaterial: TOOLKIT.CustomShaderMaterial, shaderName: string);
4760
+ isCompatible(shaderLanguage: BABYLON.ShaderLanguage): boolean;
4761
+ getCustomCode(shaderType: string, shaderLanguage: BABYLON.ShaderLanguage): any;
4762
+ /** This gets the uniforms used in the shader code */
4763
+ getUniforms(shaderLanguage: BABYLON.ShaderLanguage): any;
4764
+ /** This gets the samplers used in the shader code */
4765
+ getSamplers(samplers: string[]): void;
4766
+ /** This get the attributes used in the shader code */
4767
+ getAttributes(attributes: string[], scene: BABYLON.Scene, mesh: BABYLON.AbstractMesh): void;
4768
+ /** This prepares the shader defines */
4769
+ prepareDefines(defines: BABYLON.MaterialDefines, scene: BABYLON.Scene, mesh: BABYLON.AbstractMesh): void;
4770
+ /** This is used to update the uniforms bound to a mesh */
4771
+ bindForSubMesh(uniformBuffer: BABYLON.UniformBuffer, scene: BABYLON.Scene, engine: BABYLON.AbstractEngine, subMesh: BABYLON.SubMesh): void;
4772
+ }
4773
+ }
4774
+ declare namespace PROJECT {
4775
+ /**
4776
+ * Babylon toolkit default camera system class
4777
+ * @class DefaultCameraSystem - All rights reserved (c) 2020 Mackey Kinard
4778
+ * https://doc.babylonjs.com/divingDeeper/postProcesses/defaultRenderingPipeline
4779
+ */
4780
+ class DefaultCameraSystem extends TOOLKIT.ScriptComponent {
4781
+ protected static PlayerOneCamera: BABYLON.FreeCamera;
4782
+ protected static PlayerTwoCamera: BABYLON.FreeCamera;
4783
+ protected static PlayerThreeCamera: BABYLON.FreeCamera;
4784
+ protected static PlayerFourCamera: BABYLON.FreeCamera;
4785
+ protected static XRExperienceHelper: BABYLON.WebXRDefaultExperience;
4786
+ private static multiPlayerView;
4787
+ private static multiPlayerCount;
4788
+ private static multiPlayerCameras;
4789
+ private static stereoCameras;
4790
+ private static startupMode;
4791
+ private static cameraReady;
4792
+ private static cameraInstance;
4793
+ private static renderingPipeline;
4794
+ private static screenSpacePipeline;
4795
+ static GetRenderingPipeline(): BABYLON.DefaultRenderingPipeline;
4796
+ static GetScreenSpacePipeline(): BABYLON.SSAORenderingPipeline;
4797
+ static IsCameraSystemReady(): boolean;
4798
+ /** Register handler that is triggered when the webxr experience helper has been created */
4799
+ static OnXRExperienceHelperObservable: BABYLON.Observable<BABYLON.WebXRDefaultExperience>;
4800
+ /** Default Follow Speed */
4801
+ static FOLLOW_SPEED: number;
4802
+ private mainCamera;
4803
+ private cameraType;
4804
+ private cameraInertia;
4805
+ private cameraController;
4806
+ private immersiveOptions;
4807
+ private arcRotateConfig;
4808
+ private multiPlayerSetup;
4809
+ private fullScreenToggle;
4810
+ private setPointerLock;
4811
+ private setCameraTarget;
4812
+ private setSpatialAudio;
4813
+ private editorPostProcessing;
4814
+ protected m_cameraRig: BABYLON.TargetCamera;
4815
+ isMainCamera(): boolean;
4816
+ getCameraType(): number;
4817
+ getTargetTransform(): BABYLON.TransformNode;
4818
+ setTargetTransform(target: BABYLON.TransformNode): void;
4819
+ enableSpatialAudio(value: boolean): void;
4820
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
4821
+ protected awake(): void;
4822
+ protected start(): void;
4823
+ protected update(): void;
4824
+ protected destroy(): void;
4825
+ protected awakeCameraSystemState(): void;
4826
+ protected startCameraSystemState(): Promise<void>;
4827
+ protected updateCameraSystemState(): void;
4828
+ protected cleanCameraSystemState(): void;
4829
+ protected destroyCameraSystemState(): void;
4830
+ /*********************************************/
4831
+ /** Follow Target Camera Controller Helpers */
4832
+ /*********************************************/
4833
+ targetCameraOffset: BABYLON.Vector3;
4834
+ getCameraPivotPosition(): BABYLON.Vector3;
4835
+ getCameraPivotRotation(): BABYLON.Quaternion;
4836
+ getCameraBoomNode(): BABYLON.TransformNode;
4837
+ getCameraTransform(): BABYLON.TransformNode;
4838
+ private cameraNode;
4839
+ private cameraPivot;
4840
+ private cameraDistance;
4841
+ private cameraPivotOffset;
4842
+ private cameraBoomPosition;
4843
+ private dollyDirection;
4844
+ private rotationEulers;
4845
+ private scaledCamDirection;
4846
+ private scaledMaxDirection;
4847
+ private parentNodePosition;
4848
+ private maximumCameraPos;
4849
+ private cameraRaycastShape;
4850
+ private targetRotationVector;
4851
+ private resetCameraRotation;
4852
+ private updateCameraController;
4853
+ getBoomArmMaxDistance(): number;
4854
+ setBoomArmMaxDistance(distance: number): void;
4855
+ setSmoothBoomArmLength(length: number, speed: number, updateMaxDistance?: boolean): void;
4856
+ private smoothBoomArmLength;
4857
+ private smoothBoomArmSpeed;
4858
+ private updateSmoothBoomArmLength;
4859
+ static EnableTracking(value: boolean): void;
4860
+ static IsTrackingEnabled(): boolean;
4861
+ static SetAutoUpdate(value: boolean): void;
4862
+ static IsAutoUpdateEnabled(): boolean;
4863
+ static GetFollowTarget(): BABYLON.TransformNode;
4864
+ static SetFollowTarget(target: BABYLON.TransformNode): void;
4865
+ static ResetFollowTarget(): void;
4866
+ static UpdateFollowTarget(): void;
4867
+ /** Get the WebXR default experience helper */
4868
+ static GetWebXR(): BABYLON.WebXRDefaultExperience;
4869
+ /** Is universal camera system in WebXR mode */
4870
+ static IsInWebXR(): boolean;
4871
+ /** Setup navigation mesh for WebXR */
4872
+ private static SetupNavigationWebXR;
4873
+ /** Get main camera rig for the scene */
4874
+ static GetMainCamera(scene: BABYLON.Scene, detach?: boolean): BABYLON.FreeCamera;
4875
+ /** Get universal camera rig for desired player */
4876
+ static GetPlayerCamera(scene: BABYLON.Scene, player?: TOOLKIT.PlayerNumber, detach?: boolean): BABYLON.FreeCamera;
4877
+ /** Get camera transform node for desired player */
4878
+ static GetCameraTransform(scene: BABYLON.Scene, player?: TOOLKIT.PlayerNumber): BABYLON.TransformNode;
4879
+ /** Are stereo side side camera services available. */
4880
+ static IsStereoCameras(): boolean;
4881
+ /** Are local multi player view services available. */
4882
+ static IsMultiPlayerView(): boolean;
4883
+ /** Get the current local multi player count */
4884
+ static GetMultiPlayerCount(): number;
4885
+ /** Activates current local multi player cameras. */
4886
+ static ActivateMultiPlayerCameras(scene: BABYLON.Scene): boolean;
4887
+ /** Disposes current local multiplayer cameras */
4888
+ static DisposeMultiPlayerCameras(): void;
4889
+ /** Sets the multi player camera view layout */
4890
+ static SetMultiPlayerViewLayout(scene: BABYLON.Scene, totalNumPlayers: number): boolean;
4891
+ }
4892
+ /*********************************************/
4893
+ /** Camera Editor Properties Support Classes */
4894
+ /*********************************************/
4895
+ interface IEditorArcRtotate {
4896
+ alpha: number;
4897
+ beta: number;
4898
+ radius: number;
4899
+ target: TOOLKIT.IUnityVector3;
4900
+ }
4901
+ interface IEditorPostProcessing {
4902
+ usePostProcessing: boolean;
4903
+ highDynamicRange: boolean;
4904
+ screenAntiAliasing: PROJECT.IEditorAntiAliasing;
4905
+ focalDepthOfField: PROJECT.IEditorDepthOfField;
4906
+ chromaticAberration: PROJECT.IEditorChromaticAberration;
4907
+ glowLayerProperties: PROJECT.IEditorGlowLayer;
4908
+ grainEffectProperties: PROJECT.IEditorGrainEffect;
4909
+ sharpEffectProperties: PROJECT.IEditorSharpenEffect;
4910
+ bloomEffectProperties: PROJECT.IEditorBloomProcessing;
4911
+ imageProcessingConfig: PROJECT.IEditorImageProcessing;
4912
+ screenSpaceRendering: PROJECT.IEditorScreenSpace;
4913
+ }
4914
+ interface IEditorScreenSpace {
4915
+ SSAO: boolean;
4916
+ SSAORatio: number;
4917
+ combineRatio: number;
4918
+ totalStrength: number;
4919
+ radius: number;
4920
+ area: number;
4921
+ fallOff: number;
4922
+ baseValue: number;
4923
+ }
4924
+ interface IEditorAntiAliasing {
4925
+ msaaSamples: number;
4926
+ fxaaEnabled: boolean;
4927
+ fxaaScaling: boolean;
4928
+ fxaaSamples: number;
4929
+ }
4930
+ interface IEditorDepthOfField {
4931
+ depthOfField: boolean;
4932
+ blurLevel: number;
4933
+ focalStop: number;
4934
+ focalLength: number;
4935
+ focusDistance: number;
4936
+ maxLensSize: number;
4937
+ }
4938
+ interface IEditorChromaticAberration {
4939
+ aberrationEnabled: boolean;
4940
+ aberrationAmount: number;
4941
+ adaptScaleViewport: boolean;
4942
+ alphaMode: number;
4943
+ alwaysForcePOT: boolean;
4944
+ pixelPerfectMode: boolean;
4945
+ fullscreenViewport: boolean;
4946
+ }
4947
+ interface IEditorGlowLayer {
4948
+ glowEnabled: boolean;
4949
+ glowIntensity: number;
4950
+ blurKernelSize: number;
4951
+ }
4952
+ interface IEditorGrainEffect {
4953
+ grainEnabled: boolean;
4954
+ grainAnimated: boolean;
4955
+ grainIntensity: number;
4956
+ adaptScaleViewport: boolean;
4957
+ }
4958
+ interface IEditorSharpenEffect {
4959
+ sharpenEnabled: boolean;
4960
+ sharpEdgeAmount: number;
4961
+ sharpColorAmount: number;
4962
+ adaptScaleViewport: boolean;
4963
+ }
4964
+ interface IEditorBloomProcessing {
4965
+ bloomEnabled: boolean;
4966
+ bloomKernel: number;
4967
+ bloomScale: number;
4968
+ bloomWeight: number;
4969
+ bloomThreshold: number;
4970
+ }
4971
+ interface IEditorColorCurves {
4972
+ curvesEnabled: boolean;
4973
+ globalDen: number;
4974
+ globalExp: number;
4975
+ globalHue: number;
4976
+ globalSat: number;
4977
+ highlightsDen: number;
4978
+ highlightsExp: number;
4979
+ highlightsHue: number;
4980
+ highlightsSat: number;
4981
+ midtonesDen: number;
4982
+ midtonesExp: number;
4983
+ midtonesHue: number;
4984
+ midtonesSat: number;
4985
+ shadowsDen: number;
4986
+ shadowsExp: number;
4987
+ shadowsHue: number;
4988
+ shadowsSat: number;
4989
+ }
4990
+ interface IEditorImageProcessing {
4991
+ imageProcessing: boolean;
4992
+ imageContrast: number;
4993
+ imageExposure: number;
4994
+ toneMapping: boolean;
4995
+ toneMapType: number;
4996
+ vignetteEnabled: boolean;
4997
+ vignetteBlendMode: number;
4998
+ vignetteCameraFov: number;
4999
+ vignetteStretch: number;
5000
+ vignetteCentreX: number;
5001
+ vignetteCentreY: number;
5002
+ vignetteWeight: number;
5003
+ vignetteColor: TOOLKIT.IUnityColor;
5004
+ useColorGrading: boolean;
5005
+ setGradingTexture: any;
5006
+ imagingColorCurves: PROJECT.IEditorColorCurves;
5007
+ }
5008
+ }
5009
+ declare namespace PROJECT {
5010
+ /**
5011
+ * Babylon Script Component
5012
+ * @class DebugInformation
5013
+ */
5014
+ class DebugInformation extends TOOLKIT.ScriptComponent {
5015
+ private keys;
5016
+ private show;
5017
+ private popup;
5018
+ private views;
5019
+ private xbox;
5020
+ private color;
5021
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5022
+ protected awake(): void;
5023
+ protected start(): void;
5024
+ protected destroy(): void;
5025
+ protected openFullscreen(elem: any): void;
5026
+ protected closeFullscreen(): void;
5027
+ /**
5028
+ * Ask the browser to promote the current element to fullscreen rendering mode
5029
+ * @param element defines the DOM element to promote
5030
+ */
5031
+ static _RequestFullscreen(element: HTMLElement): void;
5032
+ /**
5033
+ * Asks the browser to exit fullscreen mode
5034
+ */
5035
+ static _ExitFullscreen(): void;
5036
+ }
5037
+ }
5038
+ declare namespace PROJECT {
5039
+ /**
5040
+ * Babylon Script Component
5041
+ * @class AssetExporter
5042
+ */
5043
+ class AssetExporter extends TOOLKIT.ScriptComponent {
5044
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5045
+ protected awake(): void;
5046
+ protected start(): void;
5047
+ protected fixed(): void;
5048
+ protected update(): void;
5049
+ protected late(): void;
5050
+ protected after(): void;
5051
+ protected ready(): void;
5052
+ protected destroy(): void;
5053
+ }
5054
+ }
5055
+ declare namespace PROJECT {
5056
+ /**
5057
+ * Babylon Script Component
5058
+ * @class AssetPreloader
5059
+ */
5060
+ class AssetPreloader extends TOOLKIT.ScriptComponent implements TOOLKIT.IAssetPreloader {
5061
+ private parentMeshes;
5062
+ private importMeshes;
5063
+ private assetContainers;
5064
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5065
+ protected destroy(): void;
5066
+ /** Add asset preloader tasks (https://doc.babylonjs.com/divingDeeper/importers/assetManager) */
5067
+ addPreloaderTasks(assetsManager: TOOLKIT.PreloadAssetsManager): void;
5068
+ }
5069
+ }
5070
+ declare namespace PROJECT {
5071
+ /**
5072
+ * Babylon Script Component
5073
+ * @class NodeMaterialInstance
5074
+ */
5075
+ class NodeMaterialInstance extends TOOLKIT.ScriptComponent {
5076
+ private nodeMaterialData;
5077
+ private setCustomRootUrl;
5078
+ getMaterialInstance(): BABYLON.NodeMaterial;
5079
+ protected m_nodeMaterial: BABYLON.NodeMaterial;
5080
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5081
+ protected awake(): void;
5082
+ protected destroy(): void;
5083
+ }
5084
+ }
5085
+ declare namespace PROJECT {
5086
+ /**
5087
+ * Babylon Script Component
5088
+ * @class NodeMaterialParticle
5089
+ */
5090
+ class NodeMaterialParticle extends TOOLKIT.ScriptComponent {
5091
+ private nodeMaterialEditor;
5092
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5093
+ protected awake(): void;
5094
+ protected start(): void;
5095
+ protected setupNodeMaterial(materialInstance: BABYLON.NodeMaterial): void;
5096
+ protected update(): void;
5097
+ protected late(): void;
5098
+ protected after(): void;
5099
+ protected fixed(): void;
5100
+ protected ready(): void;
5101
+ protected destroy(): void;
5102
+ }
5103
+ }
5104
+ declare namespace PROJECT {
5105
+ /**
5106
+ * Babylon Script Component
5107
+ * @class NodeMaterialProcess
5108
+ */
5109
+ class NodeMaterialProcess extends TOOLKIT.ScriptComponent {
5110
+ private nodeMaterialEditor;
5111
+ private numberOfSamples;
5112
+ private samplingMode;
5113
+ private textureType;
5114
+ private textureFormat;
5115
+ private sizeRatio;
5116
+ private resuable;
5117
+ getPostProcess(): BABYLON.PostProcess;
5118
+ protected m_postProcess: BABYLON.PostProcess;
5119
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5120
+ protected start(): void;
5121
+ protected setupNodeMaterial(materialInstance: BABYLON.NodeMaterial): void;
5122
+ protected destroy(): void;
5123
+ }
5124
+ }
5125
+ declare namespace PROJECT {
5126
+ /**
5127
+ * Babylon Script Component
5128
+ * @class NodeMaterialTexture
5129
+ */
5130
+ class NodeMaterialTexture extends TOOLKIT.ScriptComponent {
5131
+ private nodeMaterialEditor;
5132
+ private textureSize;
5133
+ getProceduralTexture(): BABYLON.ProceduralTexture;
5134
+ protected m_proceduralTexture: BABYLON.ProceduralTexture;
5135
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5136
+ protected start(): void;
5137
+ protected setupNodeMaterial(materialInstance: BABYLON.NodeMaterial): void;
5138
+ protected destroy(): void;
5139
+ }
5140
+ }
5141
+ declare namespace PROJECT {
5142
+ /**
5143
+ * Babylon Script Component
5144
+ * @class MobileInputController
5145
+ */
5146
+ class MobileInputController extends TOOLKIT.ScriptComponent {
5147
+ static get Instance(): PROJECT.MobileInputController;
5148
+ private static StaticInstance;
5149
+ private styleSheet;
5150
+ private controlType;
5151
+ private parentElement;
5152
+ private maxReadyTimeout;
5153
+ private maxMoveDistance;
5154
+ private maxMoveDeadzone;
5155
+ private uiParentElement;
5156
+ private leftBaseElement;
5157
+ private rightBaseElement;
5158
+ private buttonBaseElement;
5159
+ private leftStickStyle;
5160
+ private rightStickStyle;
5161
+ private leftStickFactor;
5162
+ private rightStickFactor;
5163
+ private invertLeftStickY;
5164
+ private centerLeftJoystick;
5165
+ private enableLeftJoystick;
5166
+ private invertRightStickY;
5167
+ private centerRightJoystick;
5168
+ private enableRightJoystick;
5169
+ private enableMouseAxes;
5170
+ private enableVirtualButtons;
5171
+ private virtualButtonControls;
5172
+ protected m_leftStick: TOOLKIT.TouchJoystickHandler;
5173
+ protected m_rightStick: TOOLKIT.TouchJoystickHandler;
5174
+ protected m_mobileDevice: boolean;
5175
+ getLeftStick(): TOOLKIT.TouchJoystickHandler;
5176
+ getRightStick(): TOOLKIT.TouchJoystickHandler;
5177
+ getLeftStickEnabled(): boolean;
5178
+ getRightStickEnabled(): boolean;
5179
+ getLeftStickElement(): HTMLDivElement;
5180
+ getRightStickElement(): HTMLDivElement;
5181
+ showLeftStickElement(show: boolean): void;
5182
+ showRightStickElement(show: boolean): void;
5183
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5184
+ protected awake(): void;
5185
+ protected start(): void;
5186
+ protected ready(): void;
5187
+ protected update(): void;
5188
+ protected destroy(): void;
5189
+ protected loadStyleSheet(): void;
5190
+ protected loadHtmlMarkup(): void;
5191
+ protected createHtmlElements(): void;
5192
+ }
5193
+ /**
5194
+ * Manage the joystick inputs to control a free camera.
5195
+ * @see https://doc.babylonjs.com/how_to/customizing_camera_inputs
5196
+ */
5197
+ class FreeCameraTouchJoystickInput implements BABYLON.ICameraInput<BABYLON.FreeCamera> {
5198
+ /**
5199
+ * Define the camera the input is attached to.
5200
+ */
5201
+ camera: BABYLON.FreeCamera;
5202
+ /**
5203
+ * Define the joystick controlling the input
5204
+ */
5205
+ controller: BABYLON.Nullable<PROJECT.MobileInputController>;
5206
+ /**
5207
+ * Defines the joystick rotation sensiblity.
5208
+ * This is the threshold from when rotation starts to be accounted for to prevent jittering.
5209
+ */
5210
+ joystickAngularSensibility: number;
5211
+ /**
5212
+ * Defines the joystick move sensiblity.
5213
+ * This is the threshold from when moving starts to be accounted for for to prevent jittering.
5214
+ */
5215
+ joystickMoveSensibility: number;
5216
+ /**
5217
+ * Defines the minimum value at which any analog stick input is ignored.
5218
+ * Note: This value should only be a value between 0 and 1.
5219
+ */
5220
+ deadzoneDelta: number;
5221
+ private _yAxisScale;
5222
+ /**
5223
+ * Gets or sets a boolean indicating that Yaxis (for right stick) should be inverted
5224
+ */
5225
+ get invertYAxis(): boolean;
5226
+ set invertYAxis(value: boolean);
5227
+ private LSValues;
5228
+ private RSValues;
5229
+ private _cameraTransform;
5230
+ private _deltaTransform;
5231
+ private _vector3;
5232
+ private _vector2;
5233
+ private _attached;
5234
+ /**
5235
+ * Attach the input controls to a specific dom element to get the input from.
5236
+ */
5237
+ attachControl(): void;
5238
+ /**
5239
+ * Detach the current controls from the specified dom element.
5240
+ */
5241
+ detachControl(): void;
5242
+ /**
5243
+ * Update the current camera state depending on the inputs that have been used this frame.
5244
+ * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
5245
+ */
5246
+ checkInputs(): void;
5247
+ /**
5248
+ * Gets the class name of the current input.
5249
+ * @returns the class name
5250
+ */
5251
+ getClassName(): string;
5252
+ /**
5253
+ * Get the friendly name associated with the input class.
5254
+ * @returns the input friendly name
5255
+ */
5256
+ getSimpleName(): string;
5257
+ }
5258
+ }
5259
+ declare namespace PROJECT {
5260
+ /**
5261
+ * Babylon Script Component
5262
+ * @class MobileOccludeMaterial
5263
+ */
5264
+ class MobileOccludeMaterial extends TOOLKIT.ScriptComponent {
5265
+ private applyToMaterial;
5266
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5267
+ protected awake(): void;
5268
+ }
5269
+ }
5270
+ declare namespace PROJECT {
5271
+ /**
5272
+ * Babylon Script Component
5273
+ * @class MobileShadowMaterial
5274
+ */
5275
+ class MobileShadowMaterial extends TOOLKIT.ScriptComponent {
5276
+ private createNewMaterial;
5277
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5278
+ protected awake(): void;
5279
+ protected destroy(): void;
5280
+ }
5281
+ }
5282
+ declare namespace PROJECT {
5283
+ /**
5284
+ * Babylon Script Component
5285
+ * @class BallSocketJoint
5286
+ */
5287
+ class BallSocketJoint extends TOOLKIT.ScriptComponent {
5288
+ bodyA: BABYLON.TransformNode;
5289
+ bodyB: BABYLON.TransformNode;
5290
+ pivotA: BABYLON.Vector3;
5291
+ pivotB: BABYLON.Vector3;
5292
+ axisA: BABYLON.Vector3;
5293
+ axisB: BABYLON.Vector3;
5294
+ constraint: BABYLON.BallAndSocketConstraint;
5295
+ collisionsEnabled: boolean;
5296
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5297
+ protected awake(): void;
5298
+ protected destroy(): void;
5299
+ }
5300
+ }
5301
+ declare namespace PROJECT {
5302
+ /**
5303
+ * Babylon Script Component
5304
+ * @class DistanceJoint
5305
+ */
5306
+ class DistanceJoint extends TOOLKIT.ScriptComponent {
5307
+ bodyA: BABYLON.TransformNode;
5308
+ bodyB: BABYLON.TransformNode;
5309
+ maxDistance: number;
5310
+ constraint: BABYLON.DistanceConstraint;
5311
+ collisionsEnabled: boolean;
5312
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5313
+ protected awake(): void;
5314
+ protected destroy(): void;
5315
+ }
5316
+ }
5317
+ declare namespace PROJECT {
5318
+ /**
5319
+ * Babylon Script Component
5320
+ * @class FixedHingeJoint
5321
+ */
5322
+ class FixedHingeJoint extends TOOLKIT.ScriptComponent {
5323
+ bodyA: BABYLON.TransformNode;
5324
+ bodyB: BABYLON.TransformNode;
5325
+ pivotA: BABYLON.Vector3;
5326
+ pivotB: BABYLON.Vector3;
5327
+ constraint: BABYLON.HingeConstraint;
5328
+ collisionsEnabled: boolean;
5329
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5330
+ protected awake(): void;
5331
+ protected destroy(): void;
5332
+ }
5333
+ }
5334
+ declare namespace PROJECT {
5335
+ /**
5336
+ * Babylon Script Component
5337
+ * @class LockedJoint
5338
+ */
5339
+ class LockedJoint extends TOOLKIT.ScriptComponent {
5340
+ bodyA: BABYLON.TransformNode;
5341
+ bodyB: BABYLON.TransformNode;
5342
+ pivotA: BABYLON.Vector3;
5343
+ pivotB: BABYLON.Vector3;
5344
+ axisA: BABYLON.Vector3;
5345
+ axisB: BABYLON.Vector3;
5346
+ constraint: BABYLON.LockConstraint;
5347
+ collisionsEnabled: boolean;
5348
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5349
+ protected awake(): void;
5350
+ protected destroy(): void;
5351
+ }
5352
+ }
5353
+ declare namespace PROJECT {
5354
+ /**
5355
+ * Babylon Script Component
5356
+ * @class PrismaticJoint
5357
+ */
5358
+ class PrismaticJoint extends TOOLKIT.ScriptComponent {
5359
+ bodyA: BABYLON.TransformNode;
5360
+ bodyB: BABYLON.TransformNode;
5361
+ pivotA: BABYLON.Vector3;
5362
+ pivotB: BABYLON.Vector3;
5363
+ axisA: BABYLON.Vector3;
5364
+ axisB: BABYLON.Vector3;
5365
+ constraint: BABYLON.PrismaticConstraint;
5366
+ collisionsEnabled: boolean;
5367
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5368
+ protected awake(): void;
5369
+ protected destroy(): void;
5370
+ }
5371
+ }
5372
+ declare namespace PROJECT {
5373
+ /**
5374
+ * Babylon Script Component
5375
+ * @class SixdofJoint
5376
+ */
5377
+ class SixdofJoint extends TOOLKIT.ScriptComponent {
5378
+ bodyA: BABYLON.TransformNode;
5379
+ bodyB: BABYLON.TransformNode;
5380
+ pivotA: BABYLON.Vector3;
5381
+ pivotB: BABYLON.Vector3;
5382
+ perpAxisA: BABYLON.Vector3;
5383
+ perpAxisB: BABYLON.Vector3;
5384
+ axisLimits: BABYLON.Physics6DoFLimit[];
5385
+ constraint: BABYLON.Physics6DoFConstraint;
5386
+ collisionsEnabled: boolean;
5387
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5388
+ protected awake(): void;
5389
+ protected destroy(): void;
5390
+ }
5391
+ }
5392
+ declare namespace PROJECT {
5393
+ /**
5394
+ * Babylon Script Component
5395
+ * @class SliderJoint
5396
+ */
5397
+ class SliderJoint extends TOOLKIT.ScriptComponent {
5398
+ bodyA: BABYLON.TransformNode;
5399
+ bodyB: BABYLON.TransformNode;
5400
+ pivotA: BABYLON.Vector3;
5401
+ pivotB: BABYLON.Vector3;
5402
+ axisA: BABYLON.Vector3;
5403
+ axisB: BABYLON.Vector3;
5404
+ constraint: BABYLON.SliderConstraint;
5405
+ collisionsEnabled: boolean;
5406
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5407
+ protected awake(): void;
5408
+ protected destroy(): void;
5409
+ }
5410
+ }
5411
+ declare namespace PROJECT {
5412
+ /**
5413
+ * Babylon Script Component
5414
+ * @class RemotePlayerController
5415
+ */
5416
+ class RemotePlayerController extends TOOLKIT.ScriptComponent {
5417
+ updateStateParams: boolean;
5418
+ smoothMotionTime: number;
5419
+ smoothInputVectors: boolean;
5420
+ private animationState;
5421
+ private animationStateParams;
5422
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5423
+ protected awake(): void;
5424
+ protected update(): void;
5425
+ protected destroy(): void;
5426
+ private attachAnimationController;
5427
+ private validateAnimationStateParams;
5428
+ }
5429
+ }
5430
+ declare namespace PROJECT {
5431
+ /**
5432
+ * Babylon toolkit standard player controller class
5433
+ * @class StandardPlayerController - All rights reserved (c) 2020 Mackey Kinard
5434
+ */
5435
+ class StandardPlayerController extends TOOLKIT.ScriptComponent {
5436
+ static MIN_VERTICAL_VELOCITY: number;
5437
+ static MIN_GROUND_DISTANCE: number;
5438
+ static MIN_MOVE_EPSILON: number;
5439
+ static MIN_TIMER_OFFSET: number;
5440
+ static MIN_SLOPE_LIMIT: number;
5441
+ static PLAYER_HEIGHT: string;
5442
+ enableInput: boolean;
5443
+ attachCamera: boolean;
5444
+ rotateCamera: boolean;
5445
+ mouseWheel: boolean;
5446
+ toggleView: boolean;
5447
+ freeLooking: boolean;
5448
+ requireSprintButton: boolean;
5449
+ gravitationalForce: number;
5450
+ minFallVelocity: number;
5451
+ verticalStepSpeed: number;
5452
+ minStepUpHeight: number;
5453
+ rigidBodyMass: number;
5454
+ airbornTimeout: number;
5455
+ maxAngle: number;
5456
+ speedFactor: number;
5457
+ rootMotion: boolean;
5458
+ moveSpeed: number;
5459
+ walkSpeed: number;
5460
+ lookSpeed: number;
5461
+ jumpSpeed: number;
5462
+ jumpDelay: number;
5463
+ eyesHeight: number;
5464
+ pivotHeight: number;
5465
+ maxDistance: number;
5466
+ scrollSpeed: number;
5467
+ topLookLimit: number;
5468
+ downLookLimit: number;
5469
+ lowTurnSpeed: number;
5470
+ highTurnSpeed: number;
5471
+ smoothDampTime: number;
5472
+ smoothInputVectors: boolean;
5473
+ smoothAcceleration: boolean;
5474
+ accelerationSpeed: number;
5475
+ decelerationSpeed: number;
5476
+ avatarSkinTag: string;
5477
+ climbVolumeTag: string;
5478
+ vaultVolumeTag: string;
5479
+ maxHeightRanges: any;
5480
+ useClimbSystem: boolean;
5481
+ distanceFactor: number;
5482
+ cameraSmoothing: number;
5483
+ cameraCollisions: boolean;
5484
+ inputMagnitude: number;
5485
+ landingEpsilon: number;
5486
+ minimumDistance: number;
5487
+ movementAllowed: boolean;
5488
+ playerInputX: number;
5489
+ playerInputZ: number;
5490
+ playerMouseX: number;
5491
+ playerMouseY: number;
5492
+ runKeyRequired: boolean;
5493
+ buttonRun: number;
5494
+ keyboardRun: number;
5495
+ buttonJump: number;
5496
+ keyboardJump: number;
5497
+ buttonCamera: number;
5498
+ keyboardCamera: number;
5499
+ postNetworkAttributes: boolean;
5500
+ playerNumber: TOOLKIT.PlayerNumber;
5501
+ boomPosition: BABYLON.Vector3;
5502
+ airbornVelocity: BABYLON.Vector3;
5503
+ movementVelocity: BABYLON.Vector3;
5504
+ targetCameraOffset: BABYLON.Vector3;
5505
+ isAnimationEnabled(): boolean;
5506
+ isRunButtonPressed(): boolean;
5507
+ isJumpButtonPressed(): boolean;
5508
+ getPlayerJumped(): boolean;
5509
+ getPlayerJumping(): boolean;
5510
+ getPlayerFalling(): boolean;
5511
+ getPlayerSliding(): boolean;
5512
+ getPlayerGrounded(): boolean;
5513
+ getFallTriggered(): boolean;
5514
+ getMovementSpeed(): number;
5515
+ getCameraBoomNode(): BABYLON.TransformNode;
5516
+ getCameraTransform(): BABYLON.TransformNode;
5517
+ getAnimationState(): TOOLKIT.AnimationState;
5518
+ getVerticalVelocity(): number;
5519
+ getCharacterController(): TOOLKIT.CharacterController;
5520
+ getPlayerLookRotation(): BABYLON.Vector3;
5521
+ getPlayerMoveDirection(): PROJECT.PlayerMoveDirection;
5522
+ getInputMovementVector(): BABYLON.Vector3;
5523
+ getInputMagnitudeValue(): number;
5524
+ getCameraPivotPosition(): BABYLON.Vector3;
5525
+ getCameraPivotRotation(): BABYLON.Quaternion;
5526
+ rayClimbOffset: number;
5527
+ rayClimbLength: number;
5528
+ getClimbContact(): boolean;
5529
+ getClimbContactNode(): BABYLON.TransformNode;
5530
+ getClimbContactPoint(): BABYLON.Vector3;
5531
+ getClimbContactAngle(): number;
5532
+ getClimbContactNormal(): BABYLON.Vector3;
5533
+ getClimbContactDistance(): number;
5534
+ canClimbObstaclePredicate: (action: number) => boolean;
5535
+ rayHeightOffset: number;
5536
+ rayHeightLength: number;
5537
+ getHeightContact(): boolean;
5538
+ getHeightContactNode(): BABYLON.TransformNode;
5539
+ getHeightContactPoint(): BABYLON.Vector3;
5540
+ getHeightContactAngle(): number;
5541
+ getHeightContactNormal(): BABYLON.Vector3;
5542
+ getHeightContactDistance(): number;
5543
+ private abstractMesh;
5544
+ private cameraDistance;
5545
+ private forwardCamera;
5546
+ private avatarRadius;
5547
+ private groundingObject;
5548
+ private groundingCallback;
5549
+ private dollyDirection;
5550
+ private cameraEulers;
5551
+ private rotationEulers;
5552
+ private cameraPivotOffset;
5553
+ private cameraForwardVector;
5554
+ private cameraRightVector;
5555
+ private desiredForwardVector;
5556
+ private desiredRightVector;
5557
+ private lastRotationQuaternion;
5558
+ private scaledCamDirection;
5559
+ private scaledMaxDirection;
5560
+ private parentNodePosition;
5561
+ private maximumCameraPos;
5562
+ private tempWorldPosition;
5563
+ private cameraRaycastShape;
5564
+ private defaultRaycastGroup;
5565
+ private defaultRaycastMask;
5566
+ private cameraRaycastMask;
5567
+ private avatarSkins;
5568
+ private cameraNode;
5569
+ private cameraPivot;
5570
+ private navigationAgent;
5571
+ private characterController;
5572
+ private verticalVelocity;
5573
+ private smoothMotionSpeed;
5574
+ private movementSpeed;
5575
+ private isRunPressed;
5576
+ private isJumpPressed;
5577
+ private isCharacterSliding;
5578
+ private isCharacterFalling;
5579
+ private isCharacterGrounded;
5580
+ private isCharacterFallTriggered;
5581
+ private isCharacterJumpFrame;
5582
+ private isCharacterJumping;
5583
+ private isCharacterLanding;
5584
+ private isCharacterRising;
5585
+ private isCharacterNavigating;
5586
+ private navigationAngularSpeed;
5587
+ private updateStateParams;
5588
+ private animationStateParams;
5589
+ private sphereCollisionShape;
5590
+ private hasGroundedContact;
5591
+ private showDebugColliders;
5592
+ private colliderVisibility;
5593
+ private colliderRenderGroup;
5594
+ private groundCheckDistance;
5595
+ private deltaTime;
5596
+ private minJumpTimer;
5597
+ private delayJumpTimer;
5598
+ private playerControl;
5599
+ private canPlayerJump;
5600
+ private animationState;
5601
+ private lastJumpVelocity;
5602
+ private inputMovementVector;
5603
+ private playerLookRotation;
5604
+ private playerRotationVector;
5605
+ private playerMovementVelocity;
5606
+ private playerRotationQuaternion;
5607
+ private playerMoveDirection;
5608
+ private forwardDirection;
5609
+ private downDirection;
5610
+ private climbContact;
5611
+ private climbContactNode;
5612
+ private climbContactAngle;
5613
+ private climbContactPoint;
5614
+ private climbContactNormal;
5615
+ private climbContactDistance;
5616
+ private climbSensorLine;
5617
+ private offsetClimbRaycastPosition;
5618
+ private startClimbRaycastPosition;
5619
+ private endClimbRaycastPosition;
5620
+ private heightContact;
5621
+ private heightContactNode;
5622
+ private heightContactAngle;
5623
+ private heightContactPoint;
5624
+ private heightContactNormal;
5625
+ private heightContactDistance;
5626
+ private heightSensorLine;
5627
+ private offsetHeightRaycastPosition;
5628
+ private startHeightRaycastPosition;
5629
+ private endHeightRaycastPosition;
5630
+ protected m_velocityOffset: BABYLON.Vector3;
5631
+ protected m_actualVelocity: BABYLON.Vector3;
5632
+ protected m_linearVelocity: BABYLON.Vector3;
5633
+ protected m_lastPosition: BABYLON.Vector3;
5634
+ protected m_positionCenter: BABYLON.Vector3;
5635
+ protected m_scaledVelocity: number;
5636
+ protected playerDrawVelocity: number;
5637
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5638
+ protected awake(): void;
5639
+ protected start(): void;
5640
+ protected after(): void;
5641
+ protected update(): void;
5642
+ protected destroy(): void;
5643
+ /** Register handler that is triggered before the controller has been updated */
5644
+ onPreUpdateObservable: BABYLON.Observable<BABYLON.TransformNode>;
5645
+ /** Register handler that is triggered before the controller movement has been applied */
5646
+ onBeforeMoveObservable: BABYLON.Observable<BABYLON.TransformNode>;
5647
+ /** Register handler that is triggered after the controller has been updated */
5648
+ onPostUpdateObservable: BABYLON.Observable<BABYLON.TransformNode>;
5649
+ /** Register handler that is triggered after player input has been updated */
5650
+ onPlayerInputObservable: BABYLON.Observable<BABYLON.TransformNode>;
5651
+ /** Register handler that is triggered when player position should be updated */
5652
+ onPlayerPositionObservable: BABYLON.Observable<BABYLON.TransformNode>;
5653
+ /** Register handler that is triggered after performing action has been updated */
5654
+ onUpdateActionObservable: BABYLON.Observable<BABYLON.TransformNode>;
5655
+ private _deltaMotionPosition;
5656
+ getDeltaMotionPosition(): BABYLON.Vector3;
5657
+ private _deltaMotionRotation;
5658
+ getDeltaMotionRotation(): BABYLON.Quaternion;
5659
+ private isPerformingAction;
5660
+ private isRootMotionAction;
5661
+ private isActionInterruptable;
5662
+ private afterActionHandler;
5663
+ private performActionTimer;
5664
+ private performActionNumber;
5665
+ private playerRotationSpeed;
5666
+ private rotatePlayerTowards;
5667
+ private matchStartTime;
5668
+ private matchTargetTime;
5669
+ private matchTargetOffset;
5670
+ private matchTargetHeight;
5671
+ private lockTargetHeight;
5672
+ private lastStartHeight;
5673
+ private lastTargetHeight;
5674
+ private lastTargetNormal;
5675
+ private lastTargetRotation;
5676
+ private lastDeltaPosition;
5677
+ private lastDeltaRotation;
5678
+ getIsPerformingAction(): boolean;
5679
+ getIsRootMotionAction(): boolean;
5680
+ getIsActionInterruptable(): boolean;
5681
+ playActionAnimation(action: number, interruptableAction?: boolean, enableRootMotion?: boolean, afterActionComplete?: () => void): void;
5682
+ resetActionAnimationState(): void;
5683
+ private updateAnimationActionState;
5684
+ /** Set the player world position */
5685
+ setWorldPosition(x: number, y: number, z: number): void;
5686
+ /** TODO */
5687
+ setPlayerControl(mode: PROJECT.PlayerInputControl): void;
5688
+ /** TODO */
5689
+ togglePlayerControl(): void;
5690
+ private showAvatarSkins;
5691
+ /** TODO */
5692
+ attachPlayerCamera(player: TOOLKIT.PlayerNumber): void;
5693
+ private ikLeftFootTarget;
5694
+ private ikLeftPoleTarget;
5695
+ private ikRightFootTarget;
5696
+ private ikRightPoleTarget;
5697
+ private abstractSkinMesh;
5698
+ private rootBoneTransform;
5699
+ private leftFootTransform;
5700
+ private leftFootPoleOffset;
5701
+ private leftFootMaxAngle;
5702
+ private rightFootTransform;
5703
+ private rightFootPoleOffset;
5704
+ private rightFootMaxAngle;
5705
+ private ikLeftController;
5706
+ private ikRightController;
5707
+ onAnimatorIK: () => void;
5708
+ getPlayerMesh(): BABYLON.AbstractMesh;
5709
+ getRootHipBone(): BABYLON.Bone;
5710
+ getLeftFootBone(): BABYLON.Bone;
5711
+ getRightFootBone(): BABYLON.Bone;
5712
+ getLeftFootTarget(): BABYLON.Mesh;
5713
+ getRightFootTarget(): BABYLON.Mesh;
5714
+ getLeftFootPoleTarget(): BABYLON.Mesh;
5715
+ getRightFootPoleTarget(): BABYLON.Mesh;
5716
+ getRootBoneTransform(): BABYLON.TransformNode;
5717
+ getLeftFootTransform(): BABYLON.TransformNode;
5718
+ getRightFootTransform(): BABYLON.TransformNode;
5719
+ getLeftFootController(): BABYLON.BoneIKController;
5720
+ getRightFootController(): BABYLON.BoneIKController;
5721
+ isGroundedFootIKActive(): boolean;
5722
+ setupBoneControllers(): void;
5723
+ private attachAnimationController;
5724
+ private updateAnimatorTargetMeshes;
5725
+ /** TODO */
5726
+ enableCharacterController(state: boolean): void;
5727
+ /** TODO */
5728
+ resetPlayerRotation(): void;
5729
+ /** TODO */
5730
+ resetPlayerJumpingState(): void;
5731
+ private awakePlayerController;
5732
+ private startPlayerController;
5733
+ private updatePlayerPosition;
5734
+ private updatePlayerController;
5735
+ private afterPlayerController;
5736
+ private updateCharacterController;
5737
+ private updateCameraController;
5738
+ getBoomArmMaxDistance(): number;
5739
+ setBoomArmMaxDistance(distance: number): void;
5740
+ setSmoothBoomArmLength(length: number, speed: number, updateMaxDistance?: boolean): void;
5741
+ private smoothBoomArmLength;
5742
+ private smoothBoomArmSpeed;
5743
+ private updateSmoothBoomArmLength;
5744
+ private castPhysicsClimbingVolumeRay;
5745
+ private castPhysicsHeightCheckVolumeRay;
5746
+ private getCheckedVerticalVelocity;
5747
+ private destroyPlayerController;
5748
+ private validateAnimationStateParams;
5749
+ }
5750
+ /**
5751
+ * Babylon Interface Definition
5752
+ * @interface AnimationStateParams
5753
+ */
5754
+ interface AnimationStateParams {
5755
+ moveDirection: string;
5756
+ inputMagnitude: string;
5757
+ horizontalInput: string;
5758
+ verticalInput: string;
5759
+ mouseXInput: string;
5760
+ mouseYInput: string;
5761
+ heightInput: string;
5762
+ speedInput: string;
5763
+ jumpFrame: string;
5764
+ jumpState: string;
5765
+ actionState: string;
5766
+ fallingState: string;
5767
+ slidingState: string;
5768
+ groundedState: string;
5769
+ }
5770
+ /**
5771
+ * Babylon Enum Definition
5772
+ * @interface PlayerInputControl
5773
+ */
5774
+ enum PlayerInputControl {
5775
+ FirstPersonStrafing = 0,
5776
+ ThirdPersonStrafing = 1
5777
+ }
5778
+ /**
5779
+ * Babylon Enum Definition
5780
+ * @interface PlayerMoveDirection
5781
+ */
5782
+ enum PlayerMoveDirection {
5783
+ Stationary = 0,
5784
+ Forward = 1,
5785
+ ForwardLeft = 2,
5786
+ ForwardRight = 3,
5787
+ Backward = 4,
5788
+ BackwardLeft = 5,
5789
+ BackwardRight = 6,
5790
+ StrafingLeft = 7,
5791
+ StrafingRight = 8
5792
+ }
5793
+ /**
5794
+ * Babylon Enum Definition
5795
+ * @interface ActionAnimationType
5796
+ */
5797
+ enum ActionAnimationType {
5798
+ Neutral = 0,
5799
+ StepUp = 1,
5800
+ JumpUp = 2,
5801
+ ClimbUp = 3,
5802
+ VaultOver = 4
5803
+ }
5804
+ }
5805
+ declare namespace PROJECT {
5806
+ /**
5807
+ * Babylon toolkit third person player controller class
5808
+ * @class ThirdPersonPlayerController - All rights reserved (c) 2020 Mackey Kinard
5809
+ */
5810
+ class ThirdPersonPlayerController extends TOOLKIT.ScriptComponent {
5811
+ static MIN_VERTICAL_VELOCITY: number;
5812
+ static MIN_GROUND_DISTANCE: number;
5813
+ static MIN_MOVE_EPSILON: number;
5814
+ static MIN_TIMER_OFFSET: number;
5815
+ static MIN_SLOPE_LIMIT: number;
5816
+ static PLAYER_HEIGHT: string;
5817
+ enableInput: boolean;
5818
+ attachCamera: boolean;
5819
+ mouseWheel: boolean;
5820
+ requireSprintButton: boolean;
5821
+ gravitationalForce: number;
5822
+ minFallVelocity: number;
5823
+ verticalStepSpeed: number;
5824
+ minStepUpHeight: number;
5825
+ rigidBodyMass: number;
5826
+ airbornTimeout: number;
5827
+ maxAngle: number;
5828
+ speedFactor: number;
5829
+ rootMotion: boolean;
5830
+ moveSpeed: number;
5831
+ walkSpeed: number;
5832
+ jumpSpeed: number;
5833
+ jumpDelay: number;
5834
+ lowTurnSpeed: number;
5835
+ highTurnSpeed: number;
5836
+ smoothDampTime: number;
5837
+ smoothInputVectors: boolean;
5838
+ smoothAcceleration: boolean;
5839
+ accelerationSpeed: number;
5840
+ decelerationSpeed: number;
5841
+ climbVolumeTag: string;
5842
+ vaultVolumeTag: string;
5843
+ maxHeightRanges: any;
5844
+ useClimbSystem: boolean;
5845
+ distanceFactor: number;
5846
+ inputMagnitude: number;
5847
+ landingEpsilon: number;
5848
+ minimumDistance: number;
5849
+ movementAllowed: boolean;
5850
+ playerInputX: number;
5851
+ playerInputZ: number;
5852
+ playerMouseX: number;
5853
+ playerMouseY: number;
5854
+ runKeyRequired: boolean;
5855
+ buttonRun: number;
5856
+ keyboardRun: number;
5857
+ buttonJump: number;
5858
+ keyboardJump: number;
5859
+ buttonCamera: number;
5860
+ keyboardCamera: number;
5861
+ postNetworkAttributes: boolean;
5862
+ playerNumber: TOOLKIT.PlayerNumber;
5863
+ airbornVelocity: BABYLON.Vector3;
5864
+ movementVelocity: BABYLON.Vector3;
5865
+ isAnimationEnabled(): boolean;
5866
+ isRunButtonPressed(): boolean;
5867
+ isJumpButtonPressed(): boolean;
5868
+ getPlayerJumped(): boolean;
5869
+ getPlayerJumping(): boolean;
5870
+ getPlayerFalling(): boolean;
5871
+ getPlayerSliding(): boolean;
5872
+ getPlayerGrounded(): boolean;
5873
+ getFallTriggered(): boolean;
5874
+ getMovementSpeed(): number;
5875
+ getAnimationState(): TOOLKIT.AnimationState;
5876
+ getVerticalVelocity(): number;
5877
+ getCharacterController(): TOOLKIT.CharacterController;
5878
+ getPlayerLookRotation(): BABYLON.Vector3;
5879
+ getPlayerMoveDirection(): PROJECT.PlayerMoveDirection;
5880
+ getInputMovementVector(): BABYLON.Vector3;
5881
+ getInputMagnitudeValue(): number;
5882
+ rayClimbOffset: number;
5883
+ rayClimbLength: number;
5884
+ getClimbContact(): boolean;
5885
+ getClimbContactNode(): BABYLON.TransformNode;
5886
+ getClimbContactPoint(): BABYLON.Vector3;
5887
+ getClimbContactAngle(): number;
5888
+ getClimbContactNormal(): BABYLON.Vector3;
5889
+ getClimbContactDistance(): number;
5890
+ canClimbObstaclePredicate: (action: number) => boolean;
5891
+ rayHeightOffset: number;
5892
+ rayHeightLength: number;
5893
+ getHeightContact(): boolean;
5894
+ getHeightContactNode(): BABYLON.TransformNode;
5895
+ getHeightContactPoint(): BABYLON.Vector3;
5896
+ getHeightContactAngle(): number;
5897
+ getHeightContactNormal(): BABYLON.Vector3;
5898
+ getHeightContactDistance(): number;
5899
+ private freeCamera;
5900
+ private cameraForwardVector;
5901
+ private cameraRightVector;
5902
+ private desiredForwardVector;
5903
+ private desiredRightVector;
5904
+ private lastRotationQuaternion;
5905
+ private avatarSkins;
5906
+ private avatarRadius;
5907
+ private navigationAgent;
5908
+ private characterController;
5909
+ private verticalVelocity;
5910
+ private smoothMotionSpeed;
5911
+ private movementSpeed;
5912
+ private isRunPressed;
5913
+ private isJumpPressed;
5914
+ private isCharacterSliding;
5915
+ private isCharacterFalling;
5916
+ private isCharacterGrounded;
5917
+ private isCharacterFallTriggered;
5918
+ private isCharacterJumpFrame;
5919
+ private isCharacterJumping;
5920
+ private isCharacterRising;
5921
+ private isCharacterLanding;
5922
+ private isCharacterNavigating;
5923
+ private navigationAngularSpeed;
5924
+ private updateStateParams;
5925
+ private animationStateParams;
5926
+ private sphereCollisionShape;
5927
+ private hasGroundedContact;
5928
+ private showDebugColliders;
5929
+ private colliderVisibility;
5930
+ private colliderRenderGroup;
5931
+ private groundCheckDistance;
5932
+ private deltaTime;
5933
+ private delayJumpTimer;
5934
+ private canPlayerJump;
5935
+ private animationState;
5936
+ private lastJumpVelocity;
5937
+ private inputMovementVector;
5938
+ private playerLookRotation;
5939
+ private playerMovementVelocity;
5940
+ private playerRotationQuaternion;
5941
+ private playerMoveDirection;
5942
+ private forwardDirection;
5943
+ private downDirection;
5944
+ private climbContact;
5945
+ private climbContactNode;
5946
+ private climbContactAngle;
5947
+ private climbContactPoint;
5948
+ private climbContactNormal;
5949
+ private climbContactDistance;
5950
+ private climbSensorLine;
5951
+ private offsetClimbRaycastPosition;
5952
+ private startClimbRaycastPosition;
5953
+ private endClimbRaycastPosition;
5954
+ private heightContact;
5955
+ private heightContactNode;
5956
+ private heightContactAngle;
5957
+ private heightContactPoint;
5958
+ private heightContactNormal;
5959
+ private heightContactDistance;
5960
+ private heightSensorLine;
5961
+ private offsetHeightRaycastPosition;
5962
+ private startHeightRaycastPosition;
5963
+ private endHeightRaycastPosition;
5964
+ protected m_velocityOffset: BABYLON.Vector3;
5965
+ protected m_actualVelocity: BABYLON.Vector3;
5966
+ protected m_linearVelocity: BABYLON.Vector3;
5967
+ protected m_lastPosition: BABYLON.Vector3;
5968
+ protected m_positionCenter: BABYLON.Vector3;
5969
+ protected m_scaledVelocity: number;
5970
+ protected playerDrawVelocity: number;
5971
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
5972
+ protected awake(): void;
5973
+ protected start(): void;
5974
+ protected after(): void;
5975
+ protected update(): void;
5976
+ protected destroy(): void;
5977
+ /** Character controller position
5978
+ * @deprecated Moved to default camera controller
5979
+ * @see PROJECT.DefaultCameraSystem
5980
+ */
5981
+ boomPosition: BABYLON.Vector3;
5982
+ /** Register handler that is triggered before the controller has been updated */
5983
+ onPreUpdateObservable: BABYLON.Observable<BABYLON.TransformNode>;
5984
+ /** Register handler that is triggered before the controller movement has been applied */
5985
+ onBeforeMoveObservable: BABYLON.Observable<BABYLON.TransformNode>;
5986
+ /** Register handler that is triggered after the controller has been updated */
5987
+ onPostUpdateObservable: BABYLON.Observable<BABYLON.TransformNode>;
5988
+ /** Register handler that is triggered after player input has been updated */
5989
+ onPlayerInputObservable: BABYLON.Observable<BABYLON.TransformNode>;
5990
+ /** Register handler that is triggered when player position should be updated */
5991
+ onPlayerPositionObservable: BABYLON.Observable<BABYLON.TransformNode>;
5992
+ /** Register handler that is triggered after performing action has been updated */
5993
+ onUpdateActionObservable: BABYLON.Observable<BABYLON.TransformNode>;
5994
+ /** Register handler that is triggered after animation state has been updated */
5995
+ onAnimationStateObservable: BABYLON.Observable<BABYLON.TransformNode>;
5996
+ private _deltaMotionPosition;
5997
+ getDeltaMotionPosition(): BABYLON.Vector3;
5998
+ private _deltaMotionRotation;
5999
+ getDeltaMotionRotation(): BABYLON.Quaternion;
6000
+ private isPerformingAction;
6001
+ private isRootMotionAction;
6002
+ private isActionInterruptable;
6003
+ private afterActionHandler;
6004
+ private performActionTimer;
6005
+ private performActionNumber;
6006
+ private playerRotationSpeed;
6007
+ private rotatePlayerTowards;
6008
+ private matchStartTime;
6009
+ private matchTargetTime;
6010
+ private matchTargetOffset;
6011
+ private matchTargetHeight;
6012
+ private lockTargetHeight;
6013
+ private lastStartHeight;
6014
+ private lastTargetHeight;
6015
+ private lastTargetNormal;
6016
+ private lastTargetRotation;
6017
+ private lastDeltaPosition;
6018
+ private lastDeltaRotation;
6019
+ getIsPerformingAction(): boolean;
6020
+ getIsRootMotionAction(): boolean;
6021
+ getIsActionInterruptable(): boolean;
6022
+ playActionAnimation(action: number, interruptableAction?: boolean, enableRootMotion?: boolean, afterActionComplete?: () => void): void;
6023
+ resetActionAnimationState(): void;
6024
+ private updateAnimationActionState;
6025
+ /** Set the player world position */
6026
+ setWorldPosition(x: number, y: number, z: number): void;
6027
+ private ikLeftFootTarget;
6028
+ private ikLeftPoleTarget;
6029
+ private ikRightFootTarget;
6030
+ private ikRightPoleTarget;
6031
+ private abstractSkinMesh;
6032
+ private rootBoneTransform;
6033
+ private leftFootTransform;
6034
+ private leftFootPoleOffset;
6035
+ private leftFootMaxAngle;
6036
+ private rightFootTransform;
6037
+ private rightFootPoleOffset;
6038
+ private rightFootMaxAngle;
6039
+ private ikLeftController;
6040
+ private ikRightController;
6041
+ onAnimatorIK: () => void;
6042
+ getPlayerMesh(): BABYLON.AbstractMesh;
6043
+ getRootHipBone(): BABYLON.Bone;
6044
+ getLeftFootBone(): BABYLON.Bone;
6045
+ getRightFootBone(): BABYLON.Bone;
6046
+ getLeftFootTarget(): BABYLON.Mesh;
6047
+ getRightFootTarget(): BABYLON.Mesh;
6048
+ getLeftFootPoleTarget(): BABYLON.Mesh;
6049
+ getRightFootPoleTarget(): BABYLON.Mesh;
6050
+ getRootBoneTransform(): BABYLON.TransformNode;
6051
+ getLeftFootTransform(): BABYLON.TransformNode;
6052
+ getRightFootTransform(): BABYLON.TransformNode;
6053
+ getLeftFootController(): BABYLON.BoneIKController;
6054
+ getRightFootController(): BABYLON.BoneIKController;
6055
+ isGroundedFootIKActive(): boolean;
6056
+ setupBoneControllers(): void;
6057
+ private attachAnimationController;
6058
+ private updateAnimatorTargetMeshes;
6059
+ /** TODO */
6060
+ enableCharacterController(state: boolean): void;
6061
+ /** TODO */
6062
+ resetPlayerJumpingState(): void;
6063
+ private awakePlayerController;
6064
+ private startPlayerController;
6065
+ private updatePlayerPosition;
6066
+ private updatePlayerController;
6067
+ private afterPlayerController;
6068
+ private updateCharacterController;
6069
+ private castPhysicsClimbingVolumeRay;
6070
+ private castPhysicsHeightCheckVolumeRay;
6071
+ private getCheckedVerticalVelocity;
6072
+ private destroyPlayerController;
6073
+ private validateAnimationStateParams;
6074
+ }
6075
+ /**
6076
+ * Babylon Enum Definition
6077
+ * @interface ThirdPersonControl
6078
+ */
6079
+ enum ThirdPersonControl {
6080
+ ThirdPersonTurning = 0,
6081
+ ThirdPersonForward = 1
6082
+ }
6083
+ }
6084
+ declare namespace PROJECT {
6085
+ /**
6086
+ * Babylon Script Component
6087
+ * @class FxParticleSystem
6088
+ */
6089
+ class FxParticleSystem extends TOOLKIT.ScriptComponent {
6090
+ getParticleEmitter(): BABYLON.AbstractMesh;
6091
+ getParticleSystem(): BABYLON.ParticleSystem | BABYLON.GPUParticleSystem;
6092
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
6093
+ protected m_particleEmitter: BABYLON.AbstractMesh;
6094
+ protected m_particleSystem: BABYLON.ParticleSystem | BABYLON.GPUParticleSystem;
6095
+ protected awake(): void;
6096
+ protected destroy(): void;
6097
+ }
6098
+ }
6099
+ declare namespace PROJECT {
6100
+ /**
6101
+ * Babylon water material system pro class (Babylon Water Material)
6102
+ * @class SkyMaterialSystem - All rights reserved (c) 2020 Mackey Kinard
6103
+ */
6104
+ class SkyMaterialSystem extends TOOLKIT.ScriptComponent {
6105
+ private skyfog;
6106
+ private skysize;
6107
+ private probesize;
6108
+ private reflections;
6109
+ private reflectlevel;
6110
+ private skytintcolor;
6111
+ getSkyboxMesh(): BABYLON.AbstractMesh;
6112
+ getSkyMaterial(): BABYLON.SkyMaterial;
6113
+ getReflectionProbe(): BABYLON.ReflectionProbe;
6114
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
6115
+ protected awake(): void;
6116
+ protected start(): void;
6117
+ protected update(): void;
6118
+ protected late(): void;
6119
+ protected after(): void;
6120
+ protected destroy(): void;
6121
+ protected m_skyboxMesh: BABYLON.Mesh;
6122
+ protected m_skyMaterial: BABYLON.SkyMaterial;
6123
+ protected m_reflectProbe: BABYLON.ReflectionProbe;
6124
+ protected awakeSkyboxMaterial(): void;
6125
+ protected destroySkyboxMaterial(): void;
6126
+ /** Set Skybox Mesh tint color. (Box Mesh Vertex Colors) */
6127
+ setSkyboxTintColor(color: BABYLON.Color3): void;
6128
+ }
6129
+ }
6130
+ declare namespace PROJECT {
6131
+ /**
6132
+ * Babylon water system (Colyseus Universal Game Room)
6133
+ * @class WaterMaterialSystem - All rights reserved (c) 2020 Mackey Kinard
6134
+ */
6135
+ class WaterMaterialSystem extends TOOLKIT.ScriptComponent {
6136
+ private waterTag;
6137
+ private targetSize;
6138
+ private renderSize;
6139
+ private depthFactor;
6140
+ private reflectSkybox;
6141
+ private subDivisions;
6142
+ private heightOffset;
6143
+ private windDirection;
6144
+ private windForce;
6145
+ private waveSpeed;
6146
+ private waveLength;
6147
+ private waveHeight;
6148
+ private bumpHeight;
6149
+ private bumpSuperimpose;
6150
+ private bumpAffectsReflection;
6151
+ private waterColor;
6152
+ private colorBlendFactor;
6153
+ private waterColor2;
6154
+ private colorBlendFactor2;
6155
+ private disableClipPlane;
6156
+ private fresnelSeparate;
6157
+ getWaterGeometry(): BABYLON.AbstractMesh;
6158
+ getWaterMaterial(): BABYLON.WaterMaterial;
6159
+ protected m_waterGeometry: BABYLON.AbstractMesh;
6160
+ protected m_waterMaterial: BABYLON.WaterMaterial;
6161
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
6162
+ protected awake(): void;
6163
+ protected start(): void;
6164
+ protected update(): void;
6165
+ protected late(): void;
6166
+ protected after(): void;
6167
+ protected destroy(): void;
6168
+ }
6169
+ }
6170
+ declare namespace PROJECT {
6171
+ /**
6172
+ * Babylon Script Component
6173
+ * @class SnapshotManager
6174
+ */
6175
+ class SnapshotManager extends TOOLKIT.ScriptComponent {
6176
+ /** Is Snapshot Rendering Currently Enabled */
6177
+ static IsSnapshotRenderingEnabled(): boolean;
6178
+ /**
6179
+ * Enable snapshot rendering
6180
+ * Use this method instead of engine.snapshotRendering=true, to make sure everything is ready before enabling snapshot rendering.
6181
+ * Note that this method is ref-counted and works in pair with disableSnapshotRendering(): you should call enableSnapshotRendering() as many times as you call disableSnapshotRendering().
6182
+ */
6183
+ static EnableSnapshotRendering(): void;
6184
+ /**
6185
+ * Disable snapshot rendering
6186
+ * Note that this method is ref-counted and works in pair with disableSnapshotRendering(): you should call enableSnapshotRendering() as many times as you call disableSnapshotRendering().
6187
+ */
6188
+ static DisableSnapshotRendering(): void;
6189
+ /**
6190
+ * Reset the snapshot helper and the list of meshes to render snapshots for.
6191
+ * @param scene The scene to reset the snapshot helper for.
6192
+ */
6193
+ static ResetSnapshotHelper(scene: BABYLON.Scene): void;
6194
+ /**
6195
+ * Get the snapshot helper.
6196
+ * @returns The snapshot helper.
6197
+ */
6198
+ static GetSnapshotHelper(): BABYLON.SnapshotRenderingHelper;
6199
+ private static _HelperEnabled;
6200
+ private static _SnapshotHelper;
6201
+ private autoStart;
6202
+ private autoUpdate;
6203
+ private delayTimeout;
6204
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
6205
+ protected start(): void;
6206
+ protected ready(): void;
6207
+ protected update(): void;
6208
+ protected destroy(): void;
6209
+ }
6210
+ }
6211
+ declare namespace PROJECT {
6212
+ /**
6213
+ * Babylon Script Component
6214
+ * @class SnapshotRenderer
6215
+ */
6216
+ class SnapshotRenderer extends TOOLKIT.ScriptComponent {
6217
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
6218
+ protected start(): void;
6219
+ }
6220
+ }
6221
+ declare namespace PROJECT {
6222
+ /**
6223
+ * Babylon Script Component
6224
+ * @class DefaultMuteButton
6225
+ */
6226
+ class DefaultMuteButton extends TOOLKIT.ScriptComponent {
6227
+ private static audioSystemInitialized;
6228
+ static IsAudioSystemInitialized(): boolean;
6229
+ private buttonIdentifier;
6230
+ private buttonClassname;
6231
+ private buttonContainer;
6232
+ private buttonElement;
6233
+ private muteIconElement;
6234
+ private mutedIconElement;
6235
+ private muteButtonState;
6236
+ private mutedIconUrl;
6237
+ private muteIconUrl;
6238
+ private toggleEffects;
6239
+ private autoPlayList;
6240
+ private audioSources;
6241
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
6242
+ protected awake(): void;
6243
+ protected start(): void;
6244
+ protected ready(): void;
6245
+ protected createMuteButton(): void;
6246
+ protected handleButtonClick(): void;
6247
+ }
6248
+ }
6249
+ declare namespace PROJECT {
6250
+ /**
6251
+ * Babylon Script Component
6252
+ * @class SceneSoundSystem
6253
+ */
6254
+ class SceneSoundSystem extends TOOLKIT.ScriptComponent {
6255
+ private static _MUSIC;
6256
+ static get MUSIC(): PROJECT.SoundManager;
6257
+ private static _SFX;
6258
+ static get SFX(): PROJECT.SoundManager;
6259
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
6260
+ protected start(): void;
6261
+ }
6262
+ }
6263
+ declare namespace PROJECT {
6264
+ /**
6265
+ * Babylon Script Component
6266
+ * @class SoundManager
6267
+ */
6268
+ class SoundManager extends TOOLKIT.ScriptComponent {
6269
+ private groupName;
6270
+ private cachedVolume;
6271
+ private volumeProperty;
6272
+ getGroupName(): string;
6273
+ protected m_soundMap: Map<string, TOOLKIT.AudioSource>;
6274
+ protected m_soundList: TOOLKIT.AudioSource[];
6275
+ constructor(transform: BABYLON.TransformNode, scene: BABYLON.Scene, properties?: any, alias?: string);
6276
+ protected awake(): void;
6277
+ protected start(): void;
6278
+ protected update(): void;
6279
+ protected destroy(): void;
6280
+ /**
6281
+ * Is the sound track currently playing
6282
+ * @param name The name of the sound track to check is playing
6283
+ */
6284
+ isPlaying(name: string): boolean;
6285
+ /**
6286
+ * Is the sound track currently paused
6287
+ * @param name The name of the sound track to check is paused
6288
+ */
6289
+ isPaused(name: string): boolean;
6290
+ /**
6291
+ * Play the sound track by name
6292
+ * @param name The name of the sound track to play
6293
+ * @param time (optional) Start the sound after X seconds. Start immediately (0) by default.
6294
+ * @param offset (optional) Start the sound at a specific time in seconds
6295
+ * @param length (optional) Sound duration (in seconds)
6296
+ */
6297
+ playTrack(name: string, time?: number, offset?: number, length?: number): Promise<boolean>;
6298
+ /**
6299
+ * Pause the sound track by name
6300
+ * @param name The name of the sound track to play
6301
+ */
6302
+ pauseTrack(name: string): boolean;
6303
+ /**
6304
+ * Pause the sound for all tracks in the group
6305
+ */
6306
+ pauseAllTracks(): void;
6307
+ /**
6308
+ * Stop the sound track by name
6309
+ * @param name The name of the sound track to play
6310
+ * @param time (optional) Start the sound after X seconds. Start immediately (0) by default.
6311
+ */
6312
+ stopTrack(name: string, time?: number): boolean;
6313
+ /**
6314
+ * Stop the sound for all tracks in the group
6315
+ * @param time (optional) Stop the sound after X seconds. Stop immediately (0) by default.
6316
+ */
6317
+ stopAllTracks(time?: number): void;
6318
+ /**
6319
+ * Mute the sound track by name
6320
+ * @param name The name of the sound track to play
6321
+ * @param time (optional) Start the sound after X seconds. Start immediately (0) by default.
6322
+ */
6323
+ muteTrack(name: string, time?: number): boolean;
6324
+ /**
6325
+ * Unmute the sound track by name
6326
+ * @param name The name of the sound track to play
6327
+ * @param time (optional) Start the sound after X seconds. Start immediately (0) by default.
6328
+ */
6329
+ unmuteTrack(name: string, time?: number): boolean;
6330
+ /**
6331
+ * Mutes the volume for all sound tracks in the group
6332
+ * @param time Define time for gradual change to new volume
6333
+ */
6334
+ muteAllTracks(time?: number): void;
6335
+ /**
6336
+ * Unmutes the volume for all sound tracks in the group
6337
+ * @param time Define time for gradual change to new volume
6338
+ */
6339
+ unmuteAllTracks(time?: number): void;
6340
+ /**
6341
+ * Sets the volume for all sound tracks in the group
6342
+ * @param volume Define the new volume of the sound
6343
+ * @param time Define time for gradual change to new volume
6344
+ */
6345
+ setGroupVolume(volume: number, time?: number): void;
6346
+ /**
6347
+ * Get a sound source by name
6348
+ * @param name The name of the sound track to play
6349
+ */
6350
+ getAudioSource(name: string): TOOLKIT.AudioSource;
6351
+ }
6352
+ }
6353
+ declare namespace TOOLKIT {
6354
+ /**
6355
+ * Babylon windows platform pro class
6356
+ * @class WindowsPlatform - All rights reserved (c) 2020 Mackey Kinard
6357
+ */
6358
+ class WindowsPlatform {
6359
+ /** Is xbox live user signed in if platform services enabled. (WinRT) */
6360
+ static IsXboxLiveUserSignedIn(systemUser?: Windows.System.User, player?: TOOLKIT.PlayerNumber): boolean;
6361
+ /** Validated sign in xbox live user if platform services available. (WinRT) */
6362
+ static XboxLiveUserSignIn(player?: TOOLKIT.PlayerNumber, oncomplete?: (result: Microsoft.Xbox.Services.System.SignInResult) => void, onerror?: (error: any) => void, onprogress?: (progress: any) => void): void;
6363
+ /** Silent sign in xbox live user if platform services available. (WinRT) */
6364
+ static XboxLiveUserSilentSignIn(player?: TOOLKIT.PlayerNumber, oncomplete?: (result: Microsoft.Xbox.Services.System.SignInResult) => void, onerror?: (error: any) => void, onprogress?: (progress: any) => void): Windows.Foundation.Projections.Promise<void>;
6365
+ /** Dialog sign in xbox live user if platform services available. (WinRT) */
6366
+ static XboxLiveUserDialogSignIn(player?: TOOLKIT.PlayerNumber, oncomplete?: (result: Microsoft.Xbox.Services.System.SignInResult) => void, onerror?: (error: any) => void, onprogress?: (progress: any) => void): Windows.Foundation.Projections.Promise<void>;
6367
+ /** Loads a xbox live user profile if platform services available. (WinRT) */
6368
+ static LoadXboxLiveUserProfile(player?: TOOLKIT.PlayerNumber, oncomplete?: (result: Microsoft.Xbox.Services.Social.XboxUserProfile) => void, onerror?: (error: any) => void, onprogress?: (progress: any) => void): Windows.Foundation.Projections.Promise<void>;
6369
+ /** Get xbox live user if platform services available. (WinRT) */
6370
+ static GetXboxLiveUser(player?: TOOLKIT.PlayerNumber): Microsoft.Xbox.Services.System.XboxLiveUser;
6371
+ /** Get xbox live user if platform services available. (WinRT) */
6372
+ static GetXboxLiveSystemUser(systemUser: Windows.System.User, player?: TOOLKIT.PlayerNumber): Microsoft.Xbox.Services.System.XboxLiveUser;
6373
+ /** Get xbox live user context if platform services available. (WinRT) */
6374
+ static GetXboxLiveUserContext(player?: TOOLKIT.PlayerNumber): Microsoft.Xbox.Services.XboxLiveContext;
6375
+ /** Resets xbox live user context if platform services available. (WinRT) */
6376
+ static ResetXboxLiveUserContext(player?: TOOLKIT.PlayerNumber): void;
6377
+ /** Get xbox live context property if platform services available. (WinRT) */
6378
+ static GetXboxLiveContextProperty(name: any): any;
6379
+ /** Get xbox live context property if platform services available. (WinRT) */
6380
+ static SetXboxLiveContextProperty(name: any, property: any): void;
6381
+ /** Resets xbox live property context bag if platform services available. (WinRT) */
6382
+ static ResetXboxLivePropertyContexts(): void;
6383
+ /** Sets the Xbox User Sign Out Complete Handler (WinRT) */
6384
+ static SetXboxLiveSignOutHandler(handler?: (result: Microsoft.Xbox.Services.System.SignOutCompletedEventArgs) => void): void;
6385
+ }
6386
+ }
3618
6387
  /** Babylon Toolkit Namespace */
3619
6388
  declare namespace TOOLKIT {
3620
6389
  interface KeymapState {
@@ -7653,6 +10422,7 @@ declare namespace TOOLKIT {
7653
10422
  addPreloaderTasks(assetsManager: TOOLKIT.PreloadAssetsManager): void;
7654
10423
  }
7655
10424
  }
10425
+ export as namespace PROJECT;
7656
10426
  declare var SM: typeof TOOLKIT.SceneManager;
7657
10427
  declare var WM: typeof TOOLKIT.WindowManager;
7658
10428
  declare var UI: typeof TOOLKIT.UserInterface;