@babylonjs-toolkit/next 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +319 -0
- package/lib/blendtreeposition.d.ts +5 -0
- package/lib/blendtreeposition.d.ts.map +1 -0
- package/lib/blendtreeposition.js +5 -0
- package/lib/channelmixerplugin.d.ts +11 -0
- package/lib/channelmixerplugin.d.ts.map +1 -0
- package/lib/channelmixerplugin.js +34 -0
- package/lib/collisioncontact.d.ts +7 -0
- package/lib/collisioncontact.d.ts.map +1 -0
- package/lib/collisioncontact.js +7 -0
- package/lib/collisionfilters.d.ts +10 -0
- package/lib/collisionfilters.d.ts.map +1 -0
- package/lib/collisionfilters.js +10 -0
- package/lib/collisionflags.d.ts +14 -0
- package/lib/collisionflags.d.ts.map +1 -0
- package/lib/collisionflags.js +14 -0
- package/lib/collisionstate.d.ts +8 -0
- package/lib/collisionstate.d.ts.map +1 -0
- package/lib/collisionstate.js +8 -0
- package/lib/customloadingscreen.d.ts +16 -0
- package/lib/customloadingscreen.d.ts.map +1 -0
- package/lib/customloadingscreen.js +48 -0
- package/lib/entitycontroller.d.ts +11 -0
- package/lib/entitycontroller.d.ts.map +1 -0
- package/lib/entitycontroller.js +41 -0
- package/lib/fontmanifestentry.d.ts +8 -0
- package/lib/fontmanifestentry.d.ts.map +1 -0
- package/lib/fontmanifestentry.js +1 -0
- package/lib/handedness.d.ts +6 -0
- package/lib/handedness.d.ts.map +1 -0
- package/lib/handedness.js +6 -0
- package/lib/ianimationcurve.d.ts +14 -0
- package/lib/ianimationcurve.d.ts.map +1 -0
- package/lib/ianimationcurve.js +1 -0
- package/lib/index.d.ts +43 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +42 -0
- package/lib/intersectionprecision.d.ts +5 -0
- package/lib/intersectionprecision.d.ts.map +1 -0
- package/lib/intersectionprecision.js +5 -0
- package/lib/iparticlesystemtransform.d.ts +9 -0
- package/lib/iparticlesystemtransform.d.ts.map +1 -0
- package/lib/iparticlesystemtransform.js +1 -0
- package/lib/irecastnavigationplugin.d.ts +92 -0
- package/lib/irecastnavigationplugin.d.ts.map +1 -0
- package/lib/irecastnavigationplugin.js +1 -0
- package/lib/linesmeshrenderer.d.ts +22 -0
- package/lib/linesmeshrenderer.d.ts.map +1 -0
- package/lib/linesmeshrenderer.js +79 -0
- package/lib/localmessagebus.d.ts +9 -0
- package/lib/localmessagebus.d.ts.map +1 -0
- package/lib/localmessagebus.js +44 -0
- package/lib/lutblendplugin.d.ts +13 -0
- package/lib/lutblendplugin.d.ts.map +1 -0
- package/lib/lutblendplugin.js +153 -0
- package/lib/mousebuttonmode.d.ts +6 -0
- package/lib/mousebuttonmode.d.ts.map +1 -0
- package/lib/mousebuttonmode.js +6 -0
- package/lib/movementtype.d.ts +5 -0
- package/lib/movementtype.d.ts.map +1 -0
- package/lib/movementtype.js +5 -0
- package/lib/noisefunction2d.d.ts +2 -0
- package/lib/noisefunction2d.d.ts.map +1 -0
- package/lib/noisefunction2d.js +1 -0
- package/lib/noisefunction3d.d.ts +2 -0
- package/lib/noisefunction3d.d.ts.map +1 -0
- package/lib/noisefunction3d.js +1 -0
- package/lib/noisefunction4d.d.ts +2 -0
- package/lib/noisefunction4d.d.ts.map +1 -0
- package/lib/noisefunction4d.js +1 -0
- package/lib/perlin2d.d.ts +9 -0
- package/lib/perlin2d.d.ts.map +1 -0
- package/lib/perlin2d.js +45 -0
- package/lib/playercontrol.d.ts +5 -0
- package/lib/playercontrol.d.ts.map +1 -0
- package/lib/playercontrol.js +5 -0
- package/lib/prefabobjectpool.d.ts +20 -0
- package/lib/prefabobjectpool.d.ts.map +1 -0
- package/lib/prefabobjectpool.js +96 -0
- package/lib/randomfn.d.ts +2 -0
- package/lib/randomfn.d.ts.map +1 -0
- package/lib/randomfn.js +1 -0
- package/lib/raycasthitresult.d.ts +21 -0
- package/lib/raycasthitresult.d.ts.map +1 -0
- package/lib/raycasthitresult.js +36 -0
- package/lib/recastclassctor.d.ts +2 -0
- package/lib/recastclassctor.d.ts.map +1 -0
- package/lib/recastclassctor.js +1 -0
- package/lib/roomerrormessage.d.ts +5 -0
- package/lib/roomerrormessage.d.ts.map +1 -0
- package/lib/roomerrormessage.js +2 -0
- package/lib/scenemanager.d.ts +4141 -0
- package/lib/scenemanager.d.ts.map +1 -0
- package/lib/scenemanager.js +29628 -0
- package/lib/simplexnoise.d.ts +21 -0
- package/lib/simplexnoise.d.ts.map +1 -0
- package/lib/simplexnoise.js +362 -0
- package/lib/touchjoystickhandler.d.ts +39 -0
- package/lib/touchjoystickhandler.d.ts.map +1 -0
- package/lib/touchjoystickhandler.js +175 -0
- package/lib/touchmousebutton.d.ts +6 -0
- package/lib/touchmousebutton.d.ts.map +1 -0
- package/lib/touchmousebutton.js +6 -0
- package/lib/treebranchmaterial.d.ts +31 -0
- package/lib/treebranchmaterial.d.ts.map +1 -0
- package/lib/treebranchmaterial.js +369 -0
- package/lib/triggervolume.d.ts +6 -0
- package/lib/triggervolume.d.ts.map +1 -0
- package/lib/triggervolume.js +6 -0
- package/lib/unitydropdownmenu.d.ts +20 -0
- package/lib/unitydropdownmenu.d.ts.map +1 -0
- package/lib/unitydropdownmenu.js +144 -0
- package/lib/unityscrollbar.d.ts +11 -0
- package/lib/unityscrollbar.d.ts.map +1 -0
- package/lib/unityscrollbar.js +38 -0
- package/lib/unityslider.d.ts +4 -0
- package/lib/unityslider.d.ts.map +1 -0
- package/lib/unityslider.js +3 -0
- package/lib/universalcharactercontroller.d.ts +3 -0
- package/lib/universalcharactercontroller.d.ts.map +1 -0
- package/lib/universalcharactercontroller.js +1 -0
- package/lib/universalterrainmaterial.d.ts +48 -0
- package/lib/universalterrainmaterial.d.ts.map +1 -0
- package/lib/universalterrainmaterial.js +639 -0
- package/lib/userinputpointer.d.ts +6 -0
- package/lib/userinputpointer.d.ts.map +1 -0
- package/lib/userinputpointer.js +6 -0
- package/lib/xbox360trigger.d.ts +5 -0
- package/lib/xbox360trigger.d.ts.map +1 -0
- package/lib/xbox360trigger.js +5 -0
- package/package.json +211 -0
|
@@ -0,0 +1,4141 @@
|
|
|
1
|
+
import { AssetContainer, InstantiatedEntries } from '@babylonjs/core/assetContainer';
|
|
2
|
+
import { AbstractEngine } from '@babylonjs/core/Engines/abstractEngine';
|
|
3
|
+
import { Mesh } from '@babylonjs/core/Meshes/mesh';
|
|
4
|
+
import { Scene } from '@babylonjs/core/scene';
|
|
5
|
+
import { AssetsManager, BinaryFileAssetTask, ContainerAssetTask, MeshAssetTask, TextFileAssetTask, ImageAssetTask, AbstractAssetTask } from '@babylonjs/core/Misc/assetsManager';
|
|
6
|
+
import { TransformNode } from '@babylonjs/core/Meshes/transformNode';
|
|
7
|
+
import { ShadowLight, IShadowLight } from '@babylonjs/core/Lights/shadowLight';
|
|
8
|
+
import { AbstractMesh } from '@babylonjs/core/Meshes/abstractMesh';
|
|
9
|
+
import { ISceneLoaderProgressEvent, ISceneLoaderPluginAsync, ISceneLoaderPlugin } from '@babylonjs/core/Loading/sceneLoader';
|
|
10
|
+
import { Node as BabylonNode } from '@babylonjs/core/node';
|
|
11
|
+
import { Light } from '@babylonjs/core/Lights/light';
|
|
12
|
+
import { Vector3, Quaternion, Vector2, Vector4, Matrix } from '@babylonjs/core/Maths/math.vector';
|
|
13
|
+
import { ICrowd, IAgentParameters } from '@babylonjs/core/Navigation';
|
|
14
|
+
import { FreeCamera } from '@babylonjs/core/Cameras/freeCamera';
|
|
15
|
+
import { IAction } from '@babylonjs/core/Actions/action';
|
|
16
|
+
import { Engine } from '@babylonjs/core/Engines/engine';
|
|
17
|
+
import { SphericalPolynomial, PostProcess, DefaultRenderingPipeline, SSAORenderingPipeline, SSRRenderingPipeline } from '@babylonjs/core';
|
|
18
|
+
import { Nullable, DeepImmutable } from '@babylonjs/core/types';
|
|
19
|
+
import { Material } from '@babylonjs/core/Materials/material';
|
|
20
|
+
import { InstancedMesh } from '@babylonjs/core/Meshes/instancedMesh';
|
|
21
|
+
import { RecastNavigationJSPluginV2 } from '@babylonjs/addons';
|
|
22
|
+
import { Animation } from '@babylonjs/core/Animations/animation';
|
|
23
|
+
import { EasingFunction } from '@babylonjs/core/Animations/easing';
|
|
24
|
+
import { Color4, Color3 } from '@babylonjs/core/Maths/math.color';
|
|
25
|
+
import { AnimationGroup, TargetedAnimation } from '@babylonjs/core/Animations/animationGroup';
|
|
26
|
+
import { Space } from '@babylonjs/core/Maths/math.axis';
|
|
27
|
+
import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial';
|
|
28
|
+
import { PBRMaterial } from '@babylonjs/core/Materials/PBR/pbrMaterial';
|
|
29
|
+
import { Animatable } from '@babylonjs/core/Animations/animatable';
|
|
30
|
+
import { Observable, Observer, EventState } from '@babylonjs/core/Misc/observable';
|
|
31
|
+
import { WebGPUEngine } from '@babylonjs/core/Engines/webgpuEngine';
|
|
32
|
+
import { Camera } from '@babylonjs/core/Cameras/camera';
|
|
33
|
+
import { Sound } from '@babylonjs/core/Audio/sound';
|
|
34
|
+
import { Skeleton } from '@babylonjs/core/Bones/skeleton';
|
|
35
|
+
import { Control } from '@babylonjs/gui/2D/controls/control';
|
|
36
|
+
import { Effect } from '@babylonjs/core/Materials/effect';
|
|
37
|
+
import { PhysicsBody, IPhysicsEnabledObject, PhysicsShape, PhysicsShapeCapsule, PhysicsRaycastResult, PhysicsMotionType, IRaycastQuery, ShapeCastResult, PhysicsShapeSphere, PhysicsShapeMesh, PhysicsShapeConvexHull, PhysicsShapeBox, PhysicsShapeCylinder } from '@babylonjs/core/Physics';
|
|
38
|
+
import { HavokPlugin } from '@babylonjs/core/Physics/v2/Plugins/havokPlugin';
|
|
39
|
+
import { GLTFLoader } from '@babylonjs/loaders/glTF/2.0/glTFLoader';
|
|
40
|
+
import { IScene, INode, IMaterial, IAnimation, IMesh } from '@babylonjs/loaders/glTF/2.0/glTFLoaderInterfaces';
|
|
41
|
+
import { Texture } from '@babylonjs/core/Materials/Textures/texture';
|
|
42
|
+
import { BaseTexture } from '@babylonjs/core/Materials/Textures/baseTexture';
|
|
43
|
+
import { IGLTFLoaderExtension } from '@babylonjs/loaders/glTF/2.0/glTFLoaderExtension';
|
|
44
|
+
import { CubeTexture } from '@babylonjs/core/Materials/Textures/cubeTexture';
|
|
45
|
+
import { SubMesh } from '@babylonjs/core/Meshes/subMesh';
|
|
46
|
+
import { MaterialDefines } from '@babylonjs/core/Materials/materialDefines';
|
|
47
|
+
import { UniformBuffer } from '@babylonjs/core/Materials/uniformBuffer';
|
|
48
|
+
import { MaterialPluginBase } from '@babylonjs/core/Materials/materialPluginBase';
|
|
49
|
+
import { IAnimatable } from '@babylonjs/core/Animations';
|
|
50
|
+
import { ShaderLanguage } from '@babylonjs/core/Materials';
|
|
51
|
+
import { StaticSound, IStaticSoundOptions, AudioEngineV2, StaticSoundBuffer, StreamingSound, IWebAudioEngineOptions, AbstractSpatialAudio, IStaticSoundBufferOptions, IStreamingSoundOptions } from '@babylonjs/core/AudioV2';
|
|
52
|
+
import { VertexData } from '@babylonjs/core/Meshes/mesh.vertexData';
|
|
53
|
+
import { IFileRequest } from '@babylonjs/core/Misc/fileRequest';
|
|
54
|
+
import { Bone } from '@babylonjs/core/Bones/bone';
|
|
55
|
+
import { WebRequest } from '@babylonjs/core/Misc/webRequest';
|
|
56
|
+
import { Gamepad } from '@babylonjs/core/Gamepads/gamepad';
|
|
57
|
+
import { GamepadManager } from '@babylonjs/core/Gamepads/gamepadManager';
|
|
58
|
+
import { ParticleSystem } from '@babylonjs/core/Particles/particleSystem';
|
|
59
|
+
import { GPUParticleSystem } from '@babylonjs/core/Particles/gpuParticleSystem';
|
|
60
|
+
import { AdvancedDynamicTexture } from '@babylonjs/gui/2D/advancedDynamicTexture';
|
|
61
|
+
import { Vector2WithInfo } from '@babylonjs/gui/2D/math2D';
|
|
62
|
+
import { VideoTexture } from '@babylonjs/core/Materials/Textures/videoTexture';
|
|
63
|
+
export declare class SceneManager {
|
|
64
|
+
static get Version(): string;
|
|
65
|
+
static get Copyright(): string;
|
|
66
|
+
static GlobalOptions: any;
|
|
67
|
+
static WindowState: any;
|
|
68
|
+
static ServerEndPoint: string;
|
|
69
|
+
static EnableDebugMode: boolean;
|
|
70
|
+
static EnableUserInput: boolean;
|
|
71
|
+
static RenderLoopReady: boolean;
|
|
72
|
+
static PauseRenderLoop: boolean;
|
|
73
|
+
static LostRenderContext: boolean;
|
|
74
|
+
static AutoUpdateProgress: boolean;
|
|
75
|
+
static PhysicsCapsuleShape: number;
|
|
76
|
+
static SupportSRGBBuffers: boolean;
|
|
77
|
+
static AnimationStartMode: number;
|
|
78
|
+
static AnimationTargetFps: number;
|
|
79
|
+
static DefaultConvexHullMargin: number;
|
|
80
|
+
static DefaultHeightFieldMargin: number;
|
|
81
|
+
static AmbientLightIntensity: number;
|
|
82
|
+
static PointLightIntensity: number;
|
|
83
|
+
static SpotLightIntensity: number;
|
|
84
|
+
static DirectionalLightIntensity: number;
|
|
85
|
+
static FogExpDensityScale: number;
|
|
86
|
+
static FogExp2DensityScale: number;
|
|
87
|
+
static FogLinearDensityScale: number;
|
|
88
|
+
static TerrainColorCorrection: number;
|
|
89
|
+
static AllowCameraMovement: boolean;
|
|
90
|
+
static AllowCameraRotation: boolean;
|
|
91
|
+
static VirtualJoystickEnabled: boolean;
|
|
92
|
+
static GameTimeMilliseconds: number;
|
|
93
|
+
static ParseScriptComponents: boolean;
|
|
94
|
+
static AutoLoadScriptBundles: boolean;
|
|
95
|
+
static AutoStripNamespacePrefix: boolean;
|
|
96
|
+
static UniversalModuleDefinition: boolean;
|
|
97
|
+
static WaitForSeconds: (seconds: number) => Promise<void>;
|
|
98
|
+
static OnPreRenderLoopObservable: Observable<void>;
|
|
99
|
+
static OnPostRenderLoopObservable: Observable<void>;
|
|
100
|
+
static OnSceneReadyObservable: Observable<string>;
|
|
101
|
+
static OnEngineResizeObservable: Observable<AbstractEngine>;
|
|
102
|
+
static OnLoadCompleteObservable: Observable<AbstractEngine>;
|
|
103
|
+
static OnRebuildContextObservable: Observable<AbstractEngine>;
|
|
104
|
+
static OnAssetManagerProgress: (event: ProgressEvent) => void;
|
|
105
|
+
static readonly AllLayerMask: number;
|
|
106
|
+
static readonly DefaultLayerMask: number;
|
|
107
|
+
static readonly HiddenLayerMask: number;
|
|
108
|
+
private static _HideLoadingScreen;
|
|
109
|
+
static CVTOOLS_NAME: string;
|
|
110
|
+
static CVTOOLS_MESH: string;
|
|
111
|
+
static CVTOOLS_HAND: string;
|
|
112
|
+
static CVTOOLS_NAME_REGISTERED: boolean;
|
|
113
|
+
static CVTOOLS_MESH_REGISTERED: boolean;
|
|
114
|
+
static CVTOOLS_HAND_REGISTERED: boolean;
|
|
115
|
+
static GetEngine(scene: Scene): Engine | WebGPUEngine;
|
|
116
|
+
static GetClass(name: string): any;
|
|
117
|
+
static RegisterClass(name: string, klass: any): void;
|
|
118
|
+
static GetAuxiliaryData(scene: Scene): string;
|
|
119
|
+
static SetAuxiliaryData(scene: Scene, data: string): void;
|
|
120
|
+
private static _EventBus;
|
|
121
|
+
static get EventBus(): GlobalMessageBus;
|
|
122
|
+
static get PlaygroundCdn(): string;
|
|
123
|
+
static get PlaygroundRepo(): string;
|
|
124
|
+
static InitializePlayground(engine: Engine | WebGPUEngine | AbstractEngine, options?: IRuntimeOptions): Promise<void>;
|
|
125
|
+
static InitializeRuntime(engine: Engine | WebGPUEngine | AbstractEngine, options?: IRuntimeOptions): Promise<void>;
|
|
126
|
+
static InitializeSceneLoaderPlugin(): void;
|
|
127
|
+
static LoadRuntimeAssets(assetsManager: AssetsManager, requiredFilenames: string[], readyHandler: () => void, maxTimeout?: number, debugMode?: boolean): Promise<void>;
|
|
128
|
+
static ShowLoadingScreen(engine: Engine | WebGPUEngine | AbstractEngine, hideLoadingUIWithEngine?: boolean, defaultLoadingUIMarginTop?: string): void;
|
|
129
|
+
static HideLoadingScreen(engine: Engine | WebGPUEngine | AbstractEngine, fade?: boolean): void;
|
|
130
|
+
static ForceHideLoadingScreen(): void;
|
|
131
|
+
private static DoForceHideLoadingScreen;
|
|
132
|
+
static FocusRenderCanvas(scene: Scene): void;
|
|
133
|
+
private static SceneLoaderFileNames;
|
|
134
|
+
private static SceneLoaderPropertyBag;
|
|
135
|
+
private static SceneLoaderHandledFlag;
|
|
136
|
+
static SetOnSceneReadyHandler(filenames: string[], handler: () => void, timeout?: number, debug?: boolean): void;
|
|
137
|
+
static NavigateTo(scene: Scene, route: string, options?: any, useWindowLocation?: boolean): void;
|
|
138
|
+
static SetReactNavigationHook(scene: Scene, navigateToFunction: any): void;
|
|
139
|
+
static DeleteReactNavigationHook(scene: Scene): void;
|
|
140
|
+
private static SceneParsingEnabled;
|
|
141
|
+
static EnableSceneParsing(enabled: boolean): void;
|
|
142
|
+
static IsSceneParsingEnabled(): boolean;
|
|
143
|
+
static HasSceneBeenPreLoaded(scene: Scene): boolean;
|
|
144
|
+
static GetDefaultSkybox(scene: Scene): AbstractMesh;
|
|
145
|
+
static GetIntensityFactor(): number;
|
|
146
|
+
static GetRenderQuality(): RenderQuality;
|
|
147
|
+
static SetRenderQuality(quality: RenderQuality): void;
|
|
148
|
+
static GetEngineVersionString(scene: Scene): string;
|
|
149
|
+
static GetImageBasedLighting(scene: Scene): SphericalPolynomial;
|
|
150
|
+
static SetWindowState(name: string, data: any): void;
|
|
151
|
+
static GetWindowState<T>(name: string): T;
|
|
152
|
+
static IsDebugMode(): boolean;
|
|
153
|
+
static ConsoleLog(...data: any[]): void;
|
|
154
|
+
static ConsoleInfo(...data: any[]): void;
|
|
155
|
+
static ConsoleWarn(...data: any[]): void;
|
|
156
|
+
static ConsoleError(...data: any[]): void;
|
|
157
|
+
static LogMessage(message: string): void;
|
|
158
|
+
static LogWarning(warning: string): void;
|
|
159
|
+
static LogError(error: string): void;
|
|
160
|
+
static GetTime(): number;
|
|
161
|
+
static GetTimeMs(): number;
|
|
162
|
+
static GetGameTime(): number;
|
|
163
|
+
static GetGameTimeMs(): number;
|
|
164
|
+
static GetDeltaTime(scene: Scene, applyAnimationRatio?: boolean): number;
|
|
165
|
+
static GetDeltaSeconds(scene: Scene, applyAnimationRatio?: boolean): number;
|
|
166
|
+
static GetDeltaMilliseconds(scene: Scene, applyAnimationRatio?: boolean): number;
|
|
167
|
+
static GetTimeMilliseconds(): number;
|
|
168
|
+
static GetAnimationRatio(scene: Scene): number;
|
|
169
|
+
static RunOnce(scene: Scene, func: () => void, timeout?: number): void;
|
|
170
|
+
static DisposeScene(scene: Scene, clearColor?: Color4): void;
|
|
171
|
+
static SafeDestroy(transform: TransformNode, delay?: number, disable?: boolean): void;
|
|
172
|
+
static GetRootUrl(scene: Scene): string;
|
|
173
|
+
static SetRootUrl(scene: Scene, url: string): void;
|
|
174
|
+
static GetSceneFile(scene: Scene): string;
|
|
175
|
+
static SetSceneFile(scene: Scene, fileName: string): void;
|
|
176
|
+
static AddShadowCaster(light: ShadowLight, transform: TransformNode, children?: boolean): void;
|
|
177
|
+
static AddShadowCastersToLight(light: IShadowLight, transforms: TransformNode[], includeChildren?: boolean): void;
|
|
178
|
+
static RefreshShadowCascades(light: ShadowLight): void;
|
|
179
|
+
static RefreshAllShadowCascades(scene: Scene): void;
|
|
180
|
+
private static PhysicsViewersEnabled;
|
|
181
|
+
static IsPhysicsViewerEnabled(): boolean;
|
|
182
|
+
static TogglePhysicsViewer(scene: Scene): void;
|
|
183
|
+
static GetImportMeshes(scene: Scene, name: string): AbstractMesh[];
|
|
184
|
+
static GetImportMeshesMap(scene: Scene): Map<string, AbstractMesh[]>;
|
|
185
|
+
static ClearImportMeshes(scene: Scene): void;
|
|
186
|
+
static RegisterImportMeshes(scene: Scene, name: string, meshes: AbstractMesh[]): void;
|
|
187
|
+
static LoadImportMeshes(meshNames: string | readonly string[] | null | undefined, rootUrl: string, sceneFilename?: string, scene?: Nullable<Scene>, onSuccess?: (container: AbstractMesh[]) => void, onProgress?: (event: ISceneLoaderProgressEvent) => void, onError?: (scene: Scene, message: string, exception?: any) => void, pluginExtension?: Nullable<string>, name?: string): Nullable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
188
|
+
static LoadImportMeshesAsync(meshNames: string | readonly string[] | null | undefined, rootUrl: string, sceneFilename?: string, scene?: Nullable<Scene>, onProgress?: (event: ISceneLoaderProgressEvent) => void, pluginExtension?: Nullable<string>, name?: string): Promise<AbstractMesh[]>;
|
|
189
|
+
static GetAssetContainer(scene: Scene, name: string): AssetContainer;
|
|
190
|
+
static GetAssetContainerMap(scene: Scene): Map<string, AssetContainer>;
|
|
191
|
+
static ClearAssetContainers(scene: Scene): void;
|
|
192
|
+
static RegisterAssetContainer(scene: Scene, name: string, container: AssetContainer): void;
|
|
193
|
+
static LoadAssetContainer(rootUrl: string, sceneFilename?: string, scene?: Scene, onSuccess?: (container: AssetContainer) => void, onProgress?: (event: ISceneLoaderProgressEvent) => void, onError?: (scene: Scene, message: string, exception?: any) => void, pluginExtension?: Nullable<string>, name?: string): void;
|
|
194
|
+
static LoadAssetContainerAsync(rootUrl: string, sceneFilename?: string, scene?: Nullable<Scene>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<AssetContainer>;
|
|
195
|
+
static GetMesh(scene: Scene, name: string): Mesh;
|
|
196
|
+
static GetMeshByID(scene: Scene, id: string): Mesh;
|
|
197
|
+
static GetAbstractMesh(scene: Scene, name: string): AbstractMesh;
|
|
198
|
+
static GetAbstractMeshByID(scene: Scene, id: string): AbstractMesh;
|
|
199
|
+
static GetTransformNode(scene: Scene, name: string): TransformNode;
|
|
200
|
+
static GetTransformNodeByID(scene: Scene, id: string): TransformNode;
|
|
201
|
+
static GetTransformDetailMesh(transform: TransformNode): AbstractMesh;
|
|
202
|
+
static GetSkinnedMesh(transform: TransformNode): AbstractMesh;
|
|
203
|
+
static GetPrimitiveMeshes(transform: TransformNode): AbstractMesh[];
|
|
204
|
+
static GetTransformLayer(transform: TransformNode): number;
|
|
205
|
+
static GetTransformLayerMask(transform: TransformNode): number;
|
|
206
|
+
static GetTransformLayerName(transform: TransformNode): string;
|
|
207
|
+
static GetTransformTag(transform: TransformNode): string;
|
|
208
|
+
static HasTransformTags(transform: TransformNode, query: string): boolean;
|
|
209
|
+
static HasSoundManager(): boolean;
|
|
210
|
+
static IsSoundEffectPlaying(name: string): boolean;
|
|
211
|
+
static IsMusicTrackPlaying(name: string): boolean;
|
|
212
|
+
static PlayOneShot(name: string, time?: number, offset?: number, length?: number): Promise<boolean>;
|
|
213
|
+
static PlayMusicTrack(name: string, time?: number, offset?: number, length?: number): Promise<boolean>;
|
|
214
|
+
static PauseMusicTrack(name: string): boolean;
|
|
215
|
+
static MuteMusicTrack(name: string, time?: number): boolean;
|
|
216
|
+
static UnmuteMusicTrack(name: string, time?: number): boolean;
|
|
217
|
+
static StopMusicTrack(name: string, time?: number): boolean;
|
|
218
|
+
static StopAllMusicTracks(): void;
|
|
219
|
+
static PauseAllMusicTracks(): void;
|
|
220
|
+
static MuteAllMusicTracks(time?: number): void;
|
|
221
|
+
static UnmuteAllMusicTracks(time?: number): void;
|
|
222
|
+
static TextureFloatSupported(scene: Scene): boolean;
|
|
223
|
+
static RegisterClickAction(scene: Scene, mesh: AbstractMesh, func: () => void): IAction;
|
|
224
|
+
static UnregisterClickAction(mesh: AbstractMesh, action: IAction): boolean;
|
|
225
|
+
static GetMaterialWithName(scene: Scene, name: string): Material;
|
|
226
|
+
static GetAllMaterialsWithName(scene: Scene, name: string): Material[];
|
|
227
|
+
static InstantiatePrefabFromScene(scene: Scene, prefabName: string, newName: string, newParent?: Nullable<TransformNode>, newPosition?: Nullable<Vector3>, newRotation?: Nullable<Quaternion>, newScaling?: Nullable<Vector3>, cloneAnimations?: boolean): TransformNode;
|
|
228
|
+
static InstantiatePrefabFromContainer(container: AssetContainer, prefabName: string, newName: string, newParent?: Nullable<TransformNode>, newPosition?: Nullable<Vector3>, newRotation?: Nullable<Quaternion>, newScaling?: Nullable<Vector3>, cloneAnimations?: boolean, makeNewMaterials?: boolean): TransformNode;
|
|
229
|
+
static InstantiateModelsFromContainer(container: AssetContainer, nameFunction?: (sourceName: string) => string, createInstances?: boolean, cloneMaterials?: boolean, rebuildBoundingInfo?: boolean, filterPredicate?: any): TransformNode[];
|
|
230
|
+
static CreateInstancedModelsFromContainer(container: AssetContainer, newName?: string, newParent?: Nullable<TransformNode>, newPosition?: Nullable<Vector3>, newRotation?: Nullable<Quaternion>, newScaling?: Nullable<Vector3>, cloneAnimations?: boolean, makeNewMaterials?: boolean, rebuildBoundingInfo?: boolean): InstantiatedEntries;
|
|
231
|
+
static CloneTransformNode(container: AssetContainer, nodeName: string, newName: string, newParent?: Nullable<TransformNode>, newPosition?: Nullable<Vector3>, newRotation?: Nullable<Quaternion>, newScaling?: Nullable<Vector3>): TransformNode;
|
|
232
|
+
static CloneAbstractMesh(container: AssetContainer, nodeName: string, newName: string, newParent?: Nullable<TransformNode>, newPosition?: Nullable<Vector3>, newRotation?: Nullable<Quaternion>, newScaling?: Nullable<Vector3>): AbstractMesh;
|
|
233
|
+
static CreateInstancedMesh(container: AssetContainer, meshName: string, newName: string, newParent?: Nullable<TransformNode>, newPosition?: Nullable<Vector3>, newRotation?: Nullable<Quaternion>, newScaling?: Nullable<Vector3>): InstancedMesh;
|
|
234
|
+
static RebuildBoundingBoxInfo(transforms: TransformNode[]): void;
|
|
235
|
+
static AttachScriptComponent(instance: ScriptComponent, alias: string, validate?: boolean): void;
|
|
236
|
+
static DestroyScriptComponent(instance: ScriptComponent): void;
|
|
237
|
+
static DestroyGameObject(transform: TransformNode): void;
|
|
238
|
+
static GetComponent<T extends ScriptComponent>(transform: TransformNode, klass: string, recursive?: boolean): T;
|
|
239
|
+
static GetComponents<T extends ScriptComponent>(transform: TransformNode, recursive?: boolean): T[];
|
|
240
|
+
static FindGameObject(scene: Scene, path: string): TransformNode;
|
|
241
|
+
private static FindGameObjectExactPath;
|
|
242
|
+
private static FindGameObjectRecursive;
|
|
243
|
+
static DebugSceneHierarchy(scene: Scene, maxDepth?: number): void;
|
|
244
|
+
static LegacySearchForGameObject(scene: Scene, path: string): TransformNode;
|
|
245
|
+
static FindGameObjectWithTag(scene: Scene, tag: string): TransformNode;
|
|
246
|
+
static FindGameObjectsWithTag(scene: Scene, tag: string): TransformNode[];
|
|
247
|
+
static FindScriptComponents<T extends ScriptComponent>(transform: TransformNode, recursive?: boolean): T[];
|
|
248
|
+
static FindScriptComponent<T extends ScriptComponent>(transform: TransformNode, klass: string, recursive?: boolean): T;
|
|
249
|
+
static FindAllScriptComponents<T extends ScriptComponent>(transform: TransformNode, klass: string, recursive?: boolean): T[];
|
|
250
|
+
static FindSceneMetadata(transform: TransformNode): any;
|
|
251
|
+
static FindSceneCameraRig(transform: TransformNode): FreeCamera;
|
|
252
|
+
static FindSceneLightRig(transform: TransformNode): Light;
|
|
253
|
+
static FindTransformWithScript(scene: Scene, klass: string): TransformNode;
|
|
254
|
+
static FindAllTransformsWithScript(scene: Scene, klass: string): TransformNode[];
|
|
255
|
+
static FindChildTransformNode(parent: TransformNode, name: string, searchType?: SearchType, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode;
|
|
256
|
+
static FindChildTransformWithTags(parent: TransformNode, query: string, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode;
|
|
257
|
+
static FindAllChildTransformsWithTags(parent: TransformNode, query: string, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode[];
|
|
258
|
+
static FindChildTransformWithScript(parent: TransformNode, klass: string, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode;
|
|
259
|
+
static FindAllChildTransformsWithScript(parent: TransformNode, klass: string, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode[];
|
|
260
|
+
static FindComponentInParent<T extends ScriptComponent>(scene: Scene, transform: TransformNode, klass: string): T;
|
|
261
|
+
static FindComponentsInParent<T extends ScriptComponent>(scene: Scene, transform: TransformNode, klass: string): T[];
|
|
262
|
+
static FindComponentInChildren<T extends ScriptComponent>(scene: Scene, transform: TransformNode, klass: string): T;
|
|
263
|
+
static FindComponentsInChildren<T extends ScriptComponent>(scene: Scene, transform: TransformNode, klass: string): T[];
|
|
264
|
+
static SearchForScriptComponentByName<T extends ScriptComponent>(scene: Scene, klass: string): T;
|
|
265
|
+
static SearchForAllScriptComponentsByName<T extends ScriptComponent>(scene: Scene, klass: string): T[];
|
|
266
|
+
static MoveWithCollisions(entity: AbstractMesh, velocity: Vector3): void;
|
|
267
|
+
static MoveWithTranslation(entity: TransformNode, velocity: Vector3): void;
|
|
268
|
+
static TurnWithRotation(entity: TransformNode, radians: number, space?: Space): void;
|
|
269
|
+
static MAX_AGENT_COUNT: number;
|
|
270
|
+
static MAX_AGENT_RADIUS: number;
|
|
271
|
+
static OnNavMeshReadyObservable: Observable<Mesh>;
|
|
272
|
+
private static NavMeshPlugin;
|
|
273
|
+
private static NavMeshSurface;
|
|
274
|
+
private static NavMeshDebugger;
|
|
275
|
+
private static NavMeshMaterial;
|
|
276
|
+
private static CrowdInterface;
|
|
277
|
+
static HasNavigationData(): boolean;
|
|
278
|
+
static GetNavigationData(): any | null;
|
|
279
|
+
static GetNavigationMesh(): Mesh | null;
|
|
280
|
+
static GetNavigationDebug(): Mesh | null;
|
|
281
|
+
static GetNavigationPlugin(): RecastNavigationJSPluginV2 | null;
|
|
282
|
+
static GetCrowdInterface(scene: Scene): ICrowd;
|
|
283
|
+
static LoadNavigationMeshDataAsync(scene: Scene, binaryUrl: string, heightMesh?: Mesh, createDebugMesh?: boolean): Promise<void>;
|
|
284
|
+
static BuildNavigationMeshDataAsync(scene: Scene, binaryData: Uint8Array, heightMesh?: Mesh, createDebugMesh?: boolean): Promise<void>;
|
|
285
|
+
static BuildNavigationMeshTileCacheAsync(scene: Scene, tileCacheData: Uint8Array, tileCacheMeshProcess?: any, heightMesh?: Mesh, createDebugMesh?: boolean): Promise<void>;
|
|
286
|
+
static CreateNavigationMeshSceneDataAsync(scene: Scene, properties: IUnityNavigationOptions, geometry: Mesh[], heightMesh?: Mesh, createDebugMesh?: boolean): Promise<void>;
|
|
287
|
+
static DestroyNavigationMeshData(): void;
|
|
288
|
+
static ToggleFullscreenMode(scene: Scene, requestPointerLock?: boolean): void;
|
|
289
|
+
static EnterFullscreenMode(scene: Scene, requestPointerLock?: boolean): void;
|
|
290
|
+
static ExitFullscreenMode(scene: Scene): void;
|
|
291
|
+
private static GotoFullscreenBrowser;
|
|
292
|
+
private static RequestBrowserPointerLock;
|
|
293
|
+
private static ExitFromFullscreenBrowser;
|
|
294
|
+
private static CreateEasingFunction;
|
|
295
|
+
private static GetPropertyValue;
|
|
296
|
+
private static SetPropertyValue;
|
|
297
|
+
private static IsGUIControl;
|
|
298
|
+
private static IsGUIPositionProperty;
|
|
299
|
+
private static ExtractGUINumericValue;
|
|
300
|
+
private static CreateGUIAnimationProxy;
|
|
301
|
+
private static GetAnimationType;
|
|
302
|
+
private static CreateTweenAnimations;
|
|
303
|
+
static TweenTo(target: any, to: any, options?: ITweenOptions, scene?: Scene): ITweenResult;
|
|
304
|
+
static TweenToAsync(target: any, to: any, options?: ITweenOptions, scene?: Scene): Promise<void>;
|
|
305
|
+
static TweenFromTo(target: any, from: any, to: any, options?: ITweenOptions, scene?: Scene): ITweenResult;
|
|
306
|
+
static TweenFromToAsync(target: any, from: any, to: any, options?: ITweenOptions, scene?: Scene): Promise<void>;
|
|
307
|
+
static TweenGroupAsync(tweenFunctions: (() => Promise<any> | ITweenResult)[], options?: IGroupTweenOptions, scene?: Scene): Promise<void>;
|
|
308
|
+
}
|
|
309
|
+
export interface ITweenOptions {
|
|
310
|
+
duration?: number;
|
|
311
|
+
delay?: number;
|
|
312
|
+
ease?: string | EasingFunction;
|
|
313
|
+
autoStart?: boolean;
|
|
314
|
+
loop?: boolean;
|
|
315
|
+
repeat?: number;
|
|
316
|
+
yoyo?: boolean;
|
|
317
|
+
yoyoCount?: number;
|
|
318
|
+
speed?: number;
|
|
319
|
+
onStart?: () => void;
|
|
320
|
+
onComplete?: () => void;
|
|
321
|
+
onUpdate?: () => void;
|
|
322
|
+
onRepeat?: () => void;
|
|
323
|
+
}
|
|
324
|
+
export interface IGroupTweenOptions {
|
|
325
|
+
mode?: "all" | "sequence";
|
|
326
|
+
stagger?: number;
|
|
327
|
+
onComplete?: () => void;
|
|
328
|
+
}
|
|
329
|
+
export interface ITweenResult {
|
|
330
|
+
animations: Animatable[];
|
|
331
|
+
finished: Promise<void>;
|
|
332
|
+
}
|
|
333
|
+
export interface IUnityNavigationOptions {
|
|
334
|
+
cs: number;
|
|
335
|
+
ch: number;
|
|
336
|
+
tilesize: number;
|
|
337
|
+
walkableradius: number;
|
|
338
|
+
walkableheight: number;
|
|
339
|
+
walkableclimb: number;
|
|
340
|
+
walkableslopeangle: number;
|
|
341
|
+
minregionarea: number;
|
|
342
|
+
maxedgelen: number;
|
|
343
|
+
mergeregionarea: number;
|
|
344
|
+
maxsimplificationerror: number;
|
|
345
|
+
maxvertsperpoly: number;
|
|
346
|
+
detailsampledist: number;
|
|
347
|
+
detailsamplemaxerror: number;
|
|
348
|
+
buildheightmesh: boolean;
|
|
349
|
+
}
|
|
350
|
+
export declare abstract class ScriptComponent {
|
|
351
|
+
private _update;
|
|
352
|
+
private _late;
|
|
353
|
+
private _step;
|
|
354
|
+
private _fixed;
|
|
355
|
+
private _after;
|
|
356
|
+
private _ready;
|
|
357
|
+
private _lateUpdate;
|
|
358
|
+
private _properties;
|
|
359
|
+
private _awoken;
|
|
360
|
+
private _started;
|
|
361
|
+
private _scene;
|
|
362
|
+
private _delyed;
|
|
363
|
+
private _transform;
|
|
364
|
+
private _scriptReady;
|
|
365
|
+
private _registeredClassname;
|
|
366
|
+
private _registerComponentAlias;
|
|
367
|
+
private _lateUpdateObserver;
|
|
368
|
+
resetScriptComponent: () => void;
|
|
369
|
+
isReady(): boolean;
|
|
370
|
+
get scene(): Scene;
|
|
371
|
+
get transform(): TransformNode;
|
|
372
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
373
|
+
dispose(): void;
|
|
374
|
+
getClassName(): string;
|
|
375
|
+
getProperties(): any;
|
|
376
|
+
getProperty<T>(name: string, defaultValue?: T): T;
|
|
377
|
+
setProperty(name: string, propertyValue: any): void;
|
|
378
|
+
getTime(): number;
|
|
379
|
+
getTimeMs(): number;
|
|
380
|
+
getGameTime(): number;
|
|
381
|
+
getGameTimeMs(): number;
|
|
382
|
+
getDeltaTime(): number;
|
|
383
|
+
getDeltaSeconds(): number;
|
|
384
|
+
getDeltaMilliseconds(): number;
|
|
385
|
+
getAnimationRatio(): number;
|
|
386
|
+
hasSkinnedMesh(): boolean;
|
|
387
|
+
getSkinnedMesh(): AbstractMesh;
|
|
388
|
+
getTransformMesh(): Mesh;
|
|
389
|
+
getAbstractMesh(): AbstractMesh;
|
|
390
|
+
getInstancedMesh(): InstancedMesh;
|
|
391
|
+
getPrimitiveMeshes(): AbstractMesh[];
|
|
392
|
+
getMetadata(): any;
|
|
393
|
+
getComponent<T extends ScriptComponent>(klass: string, recursive?: boolean): T;
|
|
394
|
+
getComponents<T extends ScriptComponent>(klass: string, recursive?: boolean): T[];
|
|
395
|
+
getLightRig(): Light;
|
|
396
|
+
getCameraRig(): FreeCamera;
|
|
397
|
+
getTransformTag(): string;
|
|
398
|
+
hasTransformTags(query: string): boolean;
|
|
399
|
+
getChildNode(name: string, searchType?: SearchType, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode;
|
|
400
|
+
getChildWithTags(query: string, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode;
|
|
401
|
+
getChildrenWithTags(query: string, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode[];
|
|
402
|
+
getChildWithScript(klass: string, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode;
|
|
403
|
+
getChildrenWithScript(klass: string, directDecendantsOnly?: boolean, predicate?: (node: BabylonNode) => boolean): TransformNode[];
|
|
404
|
+
private _bodyCollisionObserver;
|
|
405
|
+
private _bodyCollisionEndedObserver;
|
|
406
|
+
private _worldTriggerEventObserver;
|
|
407
|
+
enableCollisionEvents(): void;
|
|
408
|
+
disableCollisionEvents(): void;
|
|
409
|
+
onCollisionEnterObservable: Observable<TransformNode>;
|
|
410
|
+
onCollisionStayObservable: Observable<TransformNode>;
|
|
411
|
+
onCollisionExitObservable: Observable<TransformNode>;
|
|
412
|
+
onTriggerEnterObservable: Observable<TransformNode>;
|
|
413
|
+
onTriggerExitObservable: Observable<TransformNode>;
|
|
414
|
+
setTransformPosition(position: Vector3): void;
|
|
415
|
+
setTransformRotation(rotation: Quaternion): void;
|
|
416
|
+
registerOnClickAction(func: () => void): IAction;
|
|
417
|
+
unregisterOnClickAction(action: IAction): boolean;
|
|
418
|
+
private registerComponentInstance;
|
|
419
|
+
private delayComponentInstance;
|
|
420
|
+
private destroyComponentInstance;
|
|
421
|
+
private setupStepComponentInstance;
|
|
422
|
+
private removeStepComponentInstance;
|
|
423
|
+
private setupFixedComponentInstance;
|
|
424
|
+
private removeFixedComponentInstance;
|
|
425
|
+
private static RegisterInstance;
|
|
426
|
+
private static UpdateInstance;
|
|
427
|
+
private static LateInstance;
|
|
428
|
+
private static AfterInstance;
|
|
429
|
+
private static StepInstance;
|
|
430
|
+
private static FixedInstance;
|
|
431
|
+
private static ReadyInstance;
|
|
432
|
+
private static ResetInstance;
|
|
433
|
+
private static DestroyInstance;
|
|
434
|
+
private static ParseAutoProperties;
|
|
435
|
+
private static UnpackObjectProperty;
|
|
436
|
+
}
|
|
437
|
+
export declare enum System {
|
|
438
|
+
Deg2Rad,
|
|
439
|
+
Rad2Deg,
|
|
440
|
+
Epsilon = 0.000001,
|
|
441
|
+
SingleEpsilon = 1.401298e-45,
|
|
442
|
+
EpsilonNormalSqrt = 1e-15,
|
|
443
|
+
Kph2Mph = 0.621371,
|
|
444
|
+
Mph2Kph = 1.60934,
|
|
445
|
+
Mps2Kph = 3.6,
|
|
446
|
+
Mps2Mph = 2.23694,
|
|
447
|
+
Meter2Inch = 39.3701,
|
|
448
|
+
Inch2Meter = 0.0254,
|
|
449
|
+
Gravity = 9.81,
|
|
450
|
+
Gravity3G = 29.400000000000002,
|
|
451
|
+
SkidFactor = 0.25,
|
|
452
|
+
MaxInteger = 2147483647,
|
|
453
|
+
WalkingVelocity = 4.4,
|
|
454
|
+
TerminalVelocity = 55,
|
|
455
|
+
SmoothDeltaFactor = 0.2,
|
|
456
|
+
ToLinearSpace = 2.2,
|
|
457
|
+
ToGammaSpace = 0.45454545454545453
|
|
458
|
+
}
|
|
459
|
+
export declare enum SearchType {
|
|
460
|
+
ExactMatch = 0,
|
|
461
|
+
StartsWith = 1,
|
|
462
|
+
EndsWith = 2,
|
|
463
|
+
IndexOf = 3
|
|
464
|
+
}
|
|
465
|
+
export declare enum PlayerNumber {
|
|
466
|
+
Auto = 0,
|
|
467
|
+
One = 1,
|
|
468
|
+
Two = 2,
|
|
469
|
+
Three = 3,
|
|
470
|
+
Four = 4
|
|
471
|
+
}
|
|
472
|
+
export declare enum RenderQuality {
|
|
473
|
+
High = 0,
|
|
474
|
+
Medium = 1,
|
|
475
|
+
Low = 2
|
|
476
|
+
}
|
|
477
|
+
export declare enum GamepadType {
|
|
478
|
+
None = -1,
|
|
479
|
+
Generic = 0,
|
|
480
|
+
Xbox360 = 1,
|
|
481
|
+
DualShock = 2,
|
|
482
|
+
PoseController = 3
|
|
483
|
+
}
|
|
484
|
+
export declare enum UserInputAxis {
|
|
485
|
+
Horizontal = 0,
|
|
486
|
+
Vertical = 1,
|
|
487
|
+
ClientX = 2,
|
|
488
|
+
ClientY = 3,
|
|
489
|
+
MouseX = 4,
|
|
490
|
+
MouseY = 5,
|
|
491
|
+
Wheel = 6
|
|
492
|
+
}
|
|
493
|
+
export declare enum UserInputKey {
|
|
494
|
+
BackSpace = 8,
|
|
495
|
+
Tab = 9,
|
|
496
|
+
Enter = 13,
|
|
497
|
+
Shift = 16,
|
|
498
|
+
Ctrl = 17,
|
|
499
|
+
Alt = 18,
|
|
500
|
+
Pause = 19,
|
|
501
|
+
Break = 19,
|
|
502
|
+
CapsLock = 20,
|
|
503
|
+
Escape = 27,
|
|
504
|
+
SpaceBar = 32,
|
|
505
|
+
PageUp = 33,
|
|
506
|
+
PageDown = 34,
|
|
507
|
+
End = 35,
|
|
508
|
+
Home = 36,
|
|
509
|
+
LeftArrow = 37,
|
|
510
|
+
UpArrow = 38,
|
|
511
|
+
RightArrow = 39,
|
|
512
|
+
DownArrow = 40,
|
|
513
|
+
Insert = 45,
|
|
514
|
+
Delete = 46,
|
|
515
|
+
Num0 = 48,
|
|
516
|
+
Num1 = 49,
|
|
517
|
+
Num2 = 50,
|
|
518
|
+
Num3 = 51,
|
|
519
|
+
Num4 = 52,
|
|
520
|
+
Num5 = 53,
|
|
521
|
+
Num6 = 54,
|
|
522
|
+
Num7 = 55,
|
|
523
|
+
Num8 = 56,
|
|
524
|
+
Num9 = 57,
|
|
525
|
+
A = 65,
|
|
526
|
+
B = 66,
|
|
527
|
+
C = 67,
|
|
528
|
+
D = 68,
|
|
529
|
+
E = 69,
|
|
530
|
+
F = 70,
|
|
531
|
+
G = 71,
|
|
532
|
+
H = 72,
|
|
533
|
+
I = 73,
|
|
534
|
+
J = 74,
|
|
535
|
+
K = 75,
|
|
536
|
+
L = 76,
|
|
537
|
+
M = 77,
|
|
538
|
+
N = 78,
|
|
539
|
+
O = 79,
|
|
540
|
+
P = 80,
|
|
541
|
+
Q = 81,
|
|
542
|
+
R = 82,
|
|
543
|
+
S = 83,
|
|
544
|
+
T = 84,
|
|
545
|
+
U = 85,
|
|
546
|
+
V = 86,
|
|
547
|
+
W = 87,
|
|
548
|
+
X = 88,
|
|
549
|
+
Y = 89,
|
|
550
|
+
Z = 90,
|
|
551
|
+
LeftWindowKey = 91,
|
|
552
|
+
RightWindowKey = 92,
|
|
553
|
+
SelectKey = 93,
|
|
554
|
+
Numpad0 = 96,
|
|
555
|
+
Numpad1 = 97,
|
|
556
|
+
Numpad2 = 98,
|
|
557
|
+
Numpad3 = 99,
|
|
558
|
+
Numpad4 = 100,
|
|
559
|
+
Numpad5 = 101,
|
|
560
|
+
Numpad6 = 102,
|
|
561
|
+
Numpad7 = 103,
|
|
562
|
+
Numpad8 = 104,
|
|
563
|
+
Numpad9 = 105,
|
|
564
|
+
Multiply = 106,
|
|
565
|
+
Add = 107,
|
|
566
|
+
Subtract = 109,
|
|
567
|
+
DecimalPoint = 110,
|
|
568
|
+
Divide = 111,
|
|
569
|
+
F1 = 112,
|
|
570
|
+
F2 = 113,
|
|
571
|
+
F3 = 114,
|
|
572
|
+
F4 = 115,
|
|
573
|
+
F5 = 116,
|
|
574
|
+
F6 = 117,
|
|
575
|
+
F7 = 118,
|
|
576
|
+
F8 = 119,
|
|
577
|
+
F9 = 120,
|
|
578
|
+
F10 = 121,
|
|
579
|
+
F11 = 122,
|
|
580
|
+
F12 = 123,
|
|
581
|
+
NumLock = 144,
|
|
582
|
+
ScrollLock = 145,
|
|
583
|
+
SemiColon = 186,
|
|
584
|
+
EqualSign = 187,
|
|
585
|
+
Comma = 188,
|
|
586
|
+
Dash = 189,
|
|
587
|
+
Period = 190,
|
|
588
|
+
ForwardSlash = 191,
|
|
589
|
+
GraveAccent = 192,
|
|
590
|
+
OpenBracket = 219,
|
|
591
|
+
BackSlash = 220,
|
|
592
|
+
CloseBraket = 221,
|
|
593
|
+
SingleQuote = 222
|
|
594
|
+
}
|
|
595
|
+
export interface UserInputPress {
|
|
596
|
+
index: number;
|
|
597
|
+
action: () => void;
|
|
598
|
+
}
|
|
599
|
+
export type UserInputAction = (index: number) => void;
|
|
600
|
+
export declare class UserInputOptions {
|
|
601
|
+
static KeyboardSmoothing: boolean;
|
|
602
|
+
static KeyboardMoveSensibility: number;
|
|
603
|
+
static KeyboardArrowSensibility: number;
|
|
604
|
+
static KeyboardMoveDeadZone: number;
|
|
605
|
+
static GamepadDeadStickValue: number;
|
|
606
|
+
static GamepadLStickXInverted: boolean;
|
|
607
|
+
static GamepadLStickYInverted: boolean;
|
|
608
|
+
static GamepadRStickXInverted: boolean;
|
|
609
|
+
static GamepadRStickYInverted: boolean;
|
|
610
|
+
static GamepadLStickSensibility: number;
|
|
611
|
+
static GamepadRStickSensibility: number;
|
|
612
|
+
static SupportedInputDevices: any[];
|
|
613
|
+
static BabylonAngularSensibility: number;
|
|
614
|
+
static DefaultAngularSensibility: number;
|
|
615
|
+
static PointerWheelDeadZone: number;
|
|
616
|
+
static PointerMouseDeadZone: number;
|
|
617
|
+
static PointerMouseInverted: boolean;
|
|
618
|
+
static UseCanvasElement: boolean;
|
|
619
|
+
static UseArrowKeyRotation: boolean;
|
|
620
|
+
static EnableBabylonRotation: boolean;
|
|
621
|
+
}
|
|
622
|
+
export interface IRuntimeOptions {
|
|
623
|
+
hardwareScalingLevel?: number;
|
|
624
|
+
initSceneFileLoaders?: boolean;
|
|
625
|
+
loadAsyncRuntimeLibs?: boolean;
|
|
626
|
+
loadProjectScriptBundle?: boolean;
|
|
627
|
+
projectScriptBundleUrl?: string;
|
|
628
|
+
showDefaultLoadingScreen?: boolean;
|
|
629
|
+
hideLoadingUIWithEngine?: boolean;
|
|
630
|
+
defaultLoadingUIMarginTop?: string;
|
|
631
|
+
}
|
|
632
|
+
export interface IAssetPreloader {
|
|
633
|
+
addPreloaderTasks(assetsManager: PreloadAssetsManager): void;
|
|
634
|
+
}
|
|
635
|
+
export interface IWindowMessage {
|
|
636
|
+
source: string;
|
|
637
|
+
command: string;
|
|
638
|
+
[key: string]: any;
|
|
639
|
+
}
|
|
640
|
+
export interface IUnityTransform {
|
|
641
|
+
type: string;
|
|
642
|
+
id: string;
|
|
643
|
+
tag: string;
|
|
644
|
+
name: string;
|
|
645
|
+
layer: number;
|
|
646
|
+
}
|
|
647
|
+
export interface IUnityCurve {
|
|
648
|
+
type: string;
|
|
649
|
+
length: number;
|
|
650
|
+
prewrapmode: string;
|
|
651
|
+
postwrapmode: string;
|
|
652
|
+
animation: any;
|
|
653
|
+
}
|
|
654
|
+
export interface IUnityMaterial {
|
|
655
|
+
type: string;
|
|
656
|
+
id: string;
|
|
657
|
+
name: string;
|
|
658
|
+
shader: string;
|
|
659
|
+
gltf: number;
|
|
660
|
+
}
|
|
661
|
+
export interface IUnityTexture {
|
|
662
|
+
type: string;
|
|
663
|
+
name: string;
|
|
664
|
+
width: number;
|
|
665
|
+
height: number;
|
|
666
|
+
filename: string;
|
|
667
|
+
wrapmode: string;
|
|
668
|
+
filtermode: string;
|
|
669
|
+
anisolevel: number;
|
|
670
|
+
}
|
|
671
|
+
export interface IUnityCubemap {
|
|
672
|
+
type: string;
|
|
673
|
+
name: string;
|
|
674
|
+
info: any;
|
|
675
|
+
width: number;
|
|
676
|
+
height: number;
|
|
677
|
+
filename: string;
|
|
678
|
+
extension: string;
|
|
679
|
+
wrapmode: string;
|
|
680
|
+
filtermode: string;
|
|
681
|
+
anisolevel: number;
|
|
682
|
+
texelsizex: number;
|
|
683
|
+
texelsizey: number;
|
|
684
|
+
dimension: number;
|
|
685
|
+
format: number;
|
|
686
|
+
mipmapbias: number;
|
|
687
|
+
mipmapcount: number;
|
|
688
|
+
}
|
|
689
|
+
export interface IUnityAudioClip {
|
|
690
|
+
type: string;
|
|
691
|
+
name: string;
|
|
692
|
+
filename: string;
|
|
693
|
+
length: number;
|
|
694
|
+
channels: number;
|
|
695
|
+
frequency: number;
|
|
696
|
+
samples: number;
|
|
697
|
+
}
|
|
698
|
+
export interface IUnityVideoClip {
|
|
699
|
+
type: string;
|
|
700
|
+
name: string;
|
|
701
|
+
filename: string;
|
|
702
|
+
length: number;
|
|
703
|
+
width: number;
|
|
704
|
+
height: number;
|
|
705
|
+
framerate: number;
|
|
706
|
+
framecount: number;
|
|
707
|
+
audiotracks: number;
|
|
708
|
+
}
|
|
709
|
+
export interface IUnityFontAsset {
|
|
710
|
+
type: string;
|
|
711
|
+
filename: string;
|
|
712
|
+
format: string;
|
|
713
|
+
}
|
|
714
|
+
export interface IUnityTextAsset {
|
|
715
|
+
type: string;
|
|
716
|
+
filename: string;
|
|
717
|
+
base64: string;
|
|
718
|
+
json: boolean;
|
|
719
|
+
}
|
|
720
|
+
export interface IUnityDefaultAsset {
|
|
721
|
+
type: string;
|
|
722
|
+
filename: string;
|
|
723
|
+
base64: string;
|
|
724
|
+
json: boolean;
|
|
725
|
+
}
|
|
726
|
+
export interface IUnityVector2 {
|
|
727
|
+
x: number;
|
|
728
|
+
y: number;
|
|
729
|
+
}
|
|
730
|
+
export interface IUnityVector3 {
|
|
731
|
+
x: number;
|
|
732
|
+
y: number;
|
|
733
|
+
z: number;
|
|
734
|
+
}
|
|
735
|
+
export interface IUnityVector4 {
|
|
736
|
+
x: number;
|
|
737
|
+
y: number;
|
|
738
|
+
z: number;
|
|
739
|
+
w: number;
|
|
740
|
+
}
|
|
741
|
+
export interface IUnityColor {
|
|
742
|
+
r: number;
|
|
743
|
+
g: number;
|
|
744
|
+
b: number;
|
|
745
|
+
a: number;
|
|
746
|
+
}
|
|
747
|
+
export declare class RequestHeader {
|
|
748
|
+
name: string;
|
|
749
|
+
value: string;
|
|
750
|
+
}
|
|
751
|
+
export declare class GlobalMessageBus {
|
|
752
|
+
constructor();
|
|
753
|
+
OnMessage<T>(message: string, handler: (data: T) => void): void;
|
|
754
|
+
PostMessage(message: string, data?: any, target?: string, transfer?: Transferable[] | undefined): void;
|
|
755
|
+
RemoveHandler(message: string, handler: (data: any) => void): void;
|
|
756
|
+
ResetHandlers(): void;
|
|
757
|
+
Dispose(): void;
|
|
758
|
+
private HandleWindowMessage;
|
|
759
|
+
private OnDispatchMessage;
|
|
760
|
+
private ListenerDictionary;
|
|
761
|
+
}
|
|
762
|
+
export declare class PreloadAssetsManager extends AssetsManager {
|
|
763
|
+
addContainerTask(taskName: string, meshesNames: any, rootUrl: string, sceneFilename: string): ContainerAssetTask;
|
|
764
|
+
addMeshTask(taskName: string, meshesNames: any, rootUrl: string, sceneFilename: string): MeshAssetTask;
|
|
765
|
+
addTextFileTask(taskName: string, url: string): TextFileAssetTask;
|
|
766
|
+
addBinaryFileTask(taskName: string, url: string): BinaryFileAssetTask;
|
|
767
|
+
addImageTask(taskName: string, url: string): ImageAssetTask;
|
|
768
|
+
private handlePreloadingProgress;
|
|
769
|
+
}
|
|
770
|
+
export declare enum MaterialAlphaMode {
|
|
771
|
+
OPAQUE = "OPAQUE",
|
|
772
|
+
MASK = "MASK",
|
|
773
|
+
BLEND = "BLEND"
|
|
774
|
+
}
|
|
775
|
+
export declare class CubeTextureLoader {
|
|
776
|
+
name: string;
|
|
777
|
+
size: number;
|
|
778
|
+
mapkey: string;
|
|
779
|
+
material: Material;
|
|
780
|
+
extension: string;
|
|
781
|
+
prefiltered: boolean;
|
|
782
|
+
boundingBoxSize: Vector3;
|
|
783
|
+
boundingBoxPosition: Vector3;
|
|
784
|
+
reflectionProbePower: number;
|
|
785
|
+
}
|
|
786
|
+
export declare class CVTOOLS_unity_metadata implements IGLTFLoaderExtension {
|
|
787
|
+
readonly name: string;
|
|
788
|
+
static readonly IBL_TINY_VALUE: number;
|
|
789
|
+
static readonly IBL_SPEC_FACTOR: number;
|
|
790
|
+
static readonly IBL_PROBE_FACTOR: number;
|
|
791
|
+
enabled: boolean;
|
|
792
|
+
private _webgpu;
|
|
793
|
+
private _loader;
|
|
794
|
+
private _babylonScene;
|
|
795
|
+
private _metadataParser;
|
|
796
|
+
private _loaderScene;
|
|
797
|
+
private _assetsManager;
|
|
798
|
+
private _parserList;
|
|
799
|
+
private _masterList;
|
|
800
|
+
private _detailList;
|
|
801
|
+
private _shaderList;
|
|
802
|
+
private _readyList;
|
|
803
|
+
private _preloadList;
|
|
804
|
+
private _animationGroups;
|
|
805
|
+
private _materialMap;
|
|
806
|
+
private _lightmapMap;
|
|
807
|
+
private _reflectionMap;
|
|
808
|
+
private _reflectionCache;
|
|
809
|
+
private _assetContainer;
|
|
810
|
+
private _activeMeshes;
|
|
811
|
+
private _parseScene;
|
|
812
|
+
private _leftHanded;
|
|
813
|
+
private _disposeRoot;
|
|
814
|
+
private _sceneParsed;
|
|
815
|
+
private _preWarmTime;
|
|
816
|
+
private _hideLoader;
|
|
817
|
+
private _rootUrl;
|
|
818
|
+
private _fileName;
|
|
819
|
+
private _licenseName;
|
|
820
|
+
private _licenseType;
|
|
821
|
+
private _pendingReflectionTextures;
|
|
822
|
+
private static ScriptBundleCache;
|
|
823
|
+
constructor(loader: GLTFLoader);
|
|
824
|
+
dispose(): void;
|
|
825
|
+
onLoading(): void;
|
|
826
|
+
onReady(): void;
|
|
827
|
+
onComplete(): void;
|
|
828
|
+
getScriptBundleTag(): string;
|
|
829
|
+
getScriptBundleUrl(): string;
|
|
830
|
+
finishComplete(): void;
|
|
831
|
+
onValidate(): void;
|
|
832
|
+
onCleanup(): void;
|
|
833
|
+
setupLoader(): void;
|
|
834
|
+
startParsing(): void;
|
|
835
|
+
private _processActiveMeshes;
|
|
836
|
+
private _processUnityMeshes;
|
|
837
|
+
private _processPreloadTimeout;
|
|
838
|
+
loadSceneAsync(context: string, scene: IScene): Promise<void> | null;
|
|
839
|
+
private _loadSceneInternalAsync;
|
|
840
|
+
private _loadSceneExAsync;
|
|
841
|
+
loadNodeAsync(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Promise<TransformNode> | null;
|
|
842
|
+
loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
|
|
843
|
+
private _getCachedMaterialByIndex;
|
|
844
|
+
private _getCachedLightmapByIndex;
|
|
845
|
+
createMaterial(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;
|
|
846
|
+
loadAnimationAsync(context: string, animation: IAnimation): Promise<AnimationGroup>;
|
|
847
|
+
_loadMeshPrimitiveAsync(context: string, name: string, node: INode, mesh: IMesh, primitive: any, assign: (babylonMesh: AbstractMesh) => void): Promise<AbstractMesh>;
|
|
848
|
+
private _setupBabylonMesh;
|
|
849
|
+
private _setupBabylonMultiMaterials;
|
|
850
|
+
private _processLevelOfDetail;
|
|
851
|
+
private _processShaderMaterials;
|
|
852
|
+
private preProcessSceneProperties;
|
|
853
|
+
private postProcessSceneProperties;
|
|
854
|
+
private updateSkyboxEnvironment;
|
|
855
|
+
private generateSphericalHarmonics;
|
|
856
|
+
private lateProcessSceneProperties;
|
|
857
|
+
private _preloadRawMaterialsAsync;
|
|
858
|
+
private _parseMultiMaterialAsync;
|
|
859
|
+
private _parseCommonConstantProperties;
|
|
860
|
+
private _parseUniformAndSamplerProperties;
|
|
861
|
+
}
|
|
862
|
+
export declare class CVTOOLS_babylon_mesh implements IGLTFLoaderExtension {
|
|
863
|
+
readonly name: string;
|
|
864
|
+
enabled: boolean;
|
|
865
|
+
private _loader;
|
|
866
|
+
constructor(loader: GLTFLoader);
|
|
867
|
+
dispose(): void;
|
|
868
|
+
}
|
|
869
|
+
export declare class CVTOOLS_left_handed implements IGLTFLoaderExtension {
|
|
870
|
+
readonly name: string;
|
|
871
|
+
enabled: boolean;
|
|
872
|
+
private _loader;
|
|
873
|
+
constructor(loader: GLTFLoader);
|
|
874
|
+
dispose(): void;
|
|
875
|
+
}
|
|
876
|
+
export declare class CustomShaderMaterial extends PBRMaterial {
|
|
877
|
+
universalMaterial: boolean;
|
|
878
|
+
private _defines;
|
|
879
|
+
private _uniforms;
|
|
880
|
+
private _samplers;
|
|
881
|
+
private _attributes;
|
|
882
|
+
private _textures;
|
|
883
|
+
private _vectors4;
|
|
884
|
+
private _vectors3;
|
|
885
|
+
private _vectors2;
|
|
886
|
+
private _floats;
|
|
887
|
+
private _bools;
|
|
888
|
+
private _ubos;
|
|
889
|
+
private _wgslSamplers;
|
|
890
|
+
private _noMatrixTextures;
|
|
891
|
+
protected shader: string;
|
|
892
|
+
protected plugin: MaterialPluginBase;
|
|
893
|
+
private _unityLightingPlugin;
|
|
894
|
+
getPlugin(): MaterialPluginBase;
|
|
895
|
+
getClassName(): string;
|
|
896
|
+
constructor(name: string, scene: Scene);
|
|
897
|
+
initMaterial(): void;
|
|
898
|
+
addAttribute(attributeName: string): void;
|
|
899
|
+
checkUniform(uniformName: string, type: string, value?: any): void;
|
|
900
|
+
checkSampler(samplerName: string, texture?: any): void;
|
|
901
|
+
splitLighting(diffuseIbl: number, specularIbl: number): void;
|
|
902
|
+
addTextureUniform(name: string, texture: Texture): CustomShaderMaterial;
|
|
903
|
+
setTextureValue(name: string, texture: Texture): CustomShaderMaterial;
|
|
904
|
+
markTextureAsRaw(name: string): void;
|
|
905
|
+
getTextureValue(name: string): Texture;
|
|
906
|
+
addVector4Uniform(name: string, value: Vector4): CustomShaderMaterial;
|
|
907
|
+
setVector4Value(name: string, value: Vector4): CustomShaderMaterial;
|
|
908
|
+
getVector4Value(name: string): Vector4;
|
|
909
|
+
addVector3Uniform(name: string, value: Vector3): CustomShaderMaterial;
|
|
910
|
+
setVector3Value(name: string, value: Vector3): CustomShaderMaterial;
|
|
911
|
+
getVector3Value(name: string): Vector3;
|
|
912
|
+
addVector2Uniform(name: string, value: Vector2): CustomShaderMaterial;
|
|
913
|
+
setVector2Value(name: string, value: Vector2): CustomShaderMaterial;
|
|
914
|
+
getVector2Value(name: string): Vector2;
|
|
915
|
+
addFloatUniform(name: string, value: number): CustomShaderMaterial;
|
|
916
|
+
setFloatValue(name: string, value: number): CustomShaderMaterial;
|
|
917
|
+
getFloatValue(name: string): number;
|
|
918
|
+
addBoolUniform(name: string, value: boolean): CustomShaderMaterial;
|
|
919
|
+
setBoolValue(name: string, value: boolean): CustomShaderMaterial;
|
|
920
|
+
getBoolValue(name: string): boolean;
|
|
921
|
+
getAnimatables(): IAnimatable[];
|
|
922
|
+
getActiveTextures(): BaseTexture[];
|
|
923
|
+
hasTexture(texture: BaseTexture): boolean;
|
|
924
|
+
getCustomUniforms(wgsl: boolean): any;
|
|
925
|
+
getCustomSamplers(): string[];
|
|
926
|
+
getCustomAttributes(): string[];
|
|
927
|
+
getCustomVertexCode(wgsl: boolean): string;
|
|
928
|
+
getCustomFragmentCode(wgsl: boolean): string;
|
|
929
|
+
prepareCustomDefines(defines: MaterialDefines): void;
|
|
930
|
+
updateCustomBindings(effectOrUniformBuffer: UniformBuffer | Effect): void;
|
|
931
|
+
legacyUpdateCustomBindings(effect: UniformBuffer): void;
|
|
932
|
+
protected buildUniformProperty(uniformName: string, uniformType: string, uniformValue: any): void;
|
|
933
|
+
}
|
|
934
|
+
export declare class CustomShaderMaterialPlugin extends MaterialPluginBase {
|
|
935
|
+
private _isEnabled;
|
|
936
|
+
getClassName(): string;
|
|
937
|
+
constructor(material: Material, name: string, priority: number, defines?: {}, addToPluginList?: boolean, enable?: boolean, resolveIncludes?: boolean);
|
|
938
|
+
getIsEnabled(): boolean;
|
|
939
|
+
setIsEnabled(enabled: boolean): void;
|
|
940
|
+
vertexDefinitions: string;
|
|
941
|
+
fragmentDefinitions: string;
|
|
942
|
+
getCustomShaderMaterial(): CustomShaderMaterial;
|
|
943
|
+
}
|
|
944
|
+
export declare class UnityStyleLightingPlugin extends CustomShaderMaterialPlugin {
|
|
945
|
+
constructor(material: CustomShaderMaterial, shaderName: string);
|
|
946
|
+
isCompatible(shaderLanguage: ShaderLanguage): boolean;
|
|
947
|
+
getClassName(): string;
|
|
948
|
+
getCustomCode(shaderType: string, shaderLanguage: ShaderLanguage): any;
|
|
949
|
+
getUniforms(shaderLanguage: ShaderLanguage): any;
|
|
950
|
+
prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void;
|
|
951
|
+
bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: AbstractEngine, subMesh: SubMesh): void;
|
|
952
|
+
}
|
|
953
|
+
export type CustomUniformProperty = {
|
|
954
|
+
name: string;
|
|
955
|
+
size: number;
|
|
956
|
+
type: string;
|
|
957
|
+
arraySize?: number;
|
|
958
|
+
};
|
|
959
|
+
export declare class UniversalShaderMaterial extends CustomShaderMaterial {
|
|
960
|
+
constructor(name: string, scene: Scene);
|
|
961
|
+
getShaderName(): string;
|
|
962
|
+
}
|
|
963
|
+
export declare class MetadataParser {
|
|
964
|
+
private _physicList;
|
|
965
|
+
private _shadowList;
|
|
966
|
+
private _freezeList;
|
|
967
|
+
private _scriptList;
|
|
968
|
+
private _babylonScene;
|
|
969
|
+
constructor(scene: Scene);
|
|
970
|
+
parseSceneComponents(entity: TransformNode): void;
|
|
971
|
+
postProcessSceneComponents(preloadList: Array<ScriptComponent>, readyList: Array<ScriptComponent>): void;
|
|
972
|
+
private static DoParseSceneComponents;
|
|
973
|
+
private static DoProcessPendingScripts;
|
|
974
|
+
private static DoProcessPendingShadows;
|
|
975
|
+
private static DoProcessPendingPhysics;
|
|
976
|
+
private static DoProcessPendingFreezes;
|
|
977
|
+
private static SetupCameraComponent;
|
|
978
|
+
private static SetupLightComponent;
|
|
979
|
+
}
|
|
980
|
+
export declare class StandardShaderMaterial extends StandardMaterial {
|
|
981
|
+
universalMaterial: boolean;
|
|
982
|
+
private _defines;
|
|
983
|
+
private _uniforms;
|
|
984
|
+
private _samplers;
|
|
985
|
+
private _attributes;
|
|
986
|
+
private _textures;
|
|
987
|
+
private _vectors4;
|
|
988
|
+
private _vectors3;
|
|
989
|
+
private _vectors2;
|
|
990
|
+
private _floats;
|
|
991
|
+
private _bools;
|
|
992
|
+
private _ubos;
|
|
993
|
+
private _wgslSamplers;
|
|
994
|
+
protected shader: string;
|
|
995
|
+
protected plugin: MaterialPluginBase;
|
|
996
|
+
getClassName(): string;
|
|
997
|
+
constructor(name: string, scene: Scene);
|
|
998
|
+
initMaterial(): void;
|
|
999
|
+
addAttribute(attributeName: string): void;
|
|
1000
|
+
checkUniform(uniformName: string, type: string, value?: any): void;
|
|
1001
|
+
checkSampler(samplerName: string, texture?: any): void;
|
|
1002
|
+
addTextureUniform(name: string, texture: Texture): StandardShaderMaterial;
|
|
1003
|
+
setTextureValue(name: string, texture: Texture): StandardShaderMaterial;
|
|
1004
|
+
getTextureValue(name: string): Texture;
|
|
1005
|
+
addVector4Uniform(name: string, value: Vector4): StandardShaderMaterial;
|
|
1006
|
+
setVector4Value(name: string, value: Vector4): StandardShaderMaterial;
|
|
1007
|
+
getVector4Value(name: string): Vector4;
|
|
1008
|
+
addVector3Uniform(name: string, value: Vector3): StandardShaderMaterial;
|
|
1009
|
+
setVector3Value(name: string, value: Vector3): StandardShaderMaterial;
|
|
1010
|
+
getVector3Value(name: string): Vector3;
|
|
1011
|
+
addVector2Uniform(name: string, value: Vector2): StandardShaderMaterial;
|
|
1012
|
+
setVector2Value(name: string, value: Vector2): StandardShaderMaterial;
|
|
1013
|
+
getVector2Value(name: string): Vector2;
|
|
1014
|
+
addFloatUniform(name: string, value: number): StandardShaderMaterial;
|
|
1015
|
+
setFloatValue(name: string, value: number): StandardShaderMaterial;
|
|
1016
|
+
getFloatValue(name: string): number;
|
|
1017
|
+
addBoolUniform(name: string, value: boolean): StandardShaderMaterial;
|
|
1018
|
+
setBoolValue(name: string, value: boolean): StandardShaderMaterial;
|
|
1019
|
+
getBoolValue(name: string): boolean;
|
|
1020
|
+
getAnimatables(): IAnimatable[];
|
|
1021
|
+
getActiveTextures(): BaseTexture[];
|
|
1022
|
+
hasTexture(texture: BaseTexture): boolean;
|
|
1023
|
+
getCustomUniforms(wgsl: boolean): any;
|
|
1024
|
+
getCustomSamplers(): string[];
|
|
1025
|
+
getCustomAttributes(): string[];
|
|
1026
|
+
getCustomVertexCode(wgsl: boolean): string;
|
|
1027
|
+
getCustomFragmentCode(wgsl: boolean): string;
|
|
1028
|
+
prepareCustomDefines(defines: MaterialDefines): void;
|
|
1029
|
+
updateCustomBindings(effectOrUniformBuffer: UniformBuffer | Effect): void;
|
|
1030
|
+
legacyUpdateCustomBindings(effect: UniformBuffer): void;
|
|
1031
|
+
protected buildUniformProperty(uniformName: string, uniformType: string, uniformValue: any): void;
|
|
1032
|
+
}
|
|
1033
|
+
export declare class StandardShaderMaterialPlugin extends MaterialPluginBase {
|
|
1034
|
+
private _isEnabled;
|
|
1035
|
+
getClassName(): string;
|
|
1036
|
+
constructor(material: Material, name: string, priority: number, defines?: {}, addToPluginList?: boolean, enable?: boolean, resolveIncludes?: boolean);
|
|
1037
|
+
getIsEnabled(): boolean;
|
|
1038
|
+
setIsEnabled(enabled: boolean): void;
|
|
1039
|
+
vertexDefinitions: string;
|
|
1040
|
+
fragmentDefinitions: string;
|
|
1041
|
+
getCustomShaderMaterial(): StandardShaderMaterial;
|
|
1042
|
+
}
|
|
1043
|
+
export declare class Utilities {
|
|
1044
|
+
private static UpVector;
|
|
1045
|
+
private static AuxVector;
|
|
1046
|
+
private static ZeroVector;
|
|
1047
|
+
private static TempMatrix;
|
|
1048
|
+
private static TempMatrix2;
|
|
1049
|
+
private static TempVector2;
|
|
1050
|
+
private static TempVector3;
|
|
1051
|
+
private static TempQuaternion;
|
|
1052
|
+
private static TempQuaternion2;
|
|
1053
|
+
private static TempQuaternion3;
|
|
1054
|
+
private static TempDirectionBuffer;
|
|
1055
|
+
private static LoadingState;
|
|
1056
|
+
static ZeroPad(num: number, places: number): string;
|
|
1057
|
+
static ShiftArray(arr: any[], reverse: boolean): any[];
|
|
1058
|
+
static OnPreloaderProgress: (remainingCount: number, totalCount: number, lastFinishedTask: AbstractAssetTask) => void;
|
|
1059
|
+
static OnPreloaderComplete: (tasks: AbstractAssetTask[]) => void;
|
|
1060
|
+
static GetLayerMask(layer: number): number;
|
|
1061
|
+
static IsLayerMasked(mask: number, layer: number): boolean;
|
|
1062
|
+
static GetHavokPlugin(): HavokPlugin;
|
|
1063
|
+
static GetLoadingState(): number;
|
|
1064
|
+
static GetRandomRange(min: number, max: number, last?: Nullable<number>, retries?: Nullable<number>): number;
|
|
1065
|
+
static GetRandomFloat(min: number, max: number, last?: Nullable<number>, retries?: Nullable<number>): number;
|
|
1066
|
+
static GetRandomInteger(min: number, max: number, last?: Nullable<number>, retries?: Nullable<number>): number;
|
|
1067
|
+
static Approximately(a: number, b: number): boolean;
|
|
1068
|
+
static GetVertexDataFromMesh(mesh: Mesh): VertexData;
|
|
1069
|
+
static CalculateDestinationPoint(origin: Vector3, direction: Vector3, length: number): Vector3;
|
|
1070
|
+
static CalculateDestinationPointToRef(origin: Vector3, direction: Vector3, length: number, result: Vector3): void;
|
|
1071
|
+
static UpdateAbstractMeshMaterial(mesh: AbstractMesh, material: Material, materialIndex: number): void;
|
|
1072
|
+
static HermiteVector3(value1: DeepImmutable<Vector3>, tangent1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, tangent2: DeepImmutable<Vector3>, amount: number): Vector3;
|
|
1073
|
+
static HermiteVector3ToRef(value1: DeepImmutable<Vector3>, tangent1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, tangent2: DeepImmutable<Vector3>, amount: number, result: Vector3): void;
|
|
1074
|
+
static ExpSmoothing(dt: number, timeConstant: number): number;
|
|
1075
|
+
static LerpLog(a: number, b: number, t: number): number;
|
|
1076
|
+
static LerpExp(a: number, b: number, t: number): number;
|
|
1077
|
+
static LerpUnclamped(a: number, b: number, t: number): number;
|
|
1078
|
+
static LerpUnclampedColor3(a: Color3, b: Color3, t: number): Color3;
|
|
1079
|
+
static LerpUnclampedColor3ToRef(a: Color3, b: Color3, t: number, result: Color3): void;
|
|
1080
|
+
static LerpUnclampedColor4(a: Color4, b: Color4, t: number): Color4;
|
|
1081
|
+
static LerpUnclampedColor4ToRef(a: Color4, b: Color4, t: number, result: Color4): void;
|
|
1082
|
+
static LerpUnclampedVector2(a: Vector2, b: Vector2, t: number): Vector2;
|
|
1083
|
+
static LerpUnclampedVector2ToRef(a: Vector2, b: Vector2, t: number, result: Vector2): void;
|
|
1084
|
+
static LerpUnclampedVector3(a: Vector3, b: Vector3, t: number): Vector3;
|
|
1085
|
+
static LerpUnclampedVector3ToRef(a: Vector3, b: Vector3, t: number, result: Vector3): void;
|
|
1086
|
+
static LerpUnclampedVector4(a: Vector4, b: Vector4, t: number): Vector4;
|
|
1087
|
+
static LerpUnclampedVector4ToRef(a: Vector4, b: Vector4, t: number, result: Vector4): void;
|
|
1088
|
+
static IsEqualUsingDot(dot: number): boolean;
|
|
1089
|
+
static QuaternionAngle(a: Quaternion, b: Quaternion): number;
|
|
1090
|
+
static QuaternionLengthSquared(quat: Quaternion): number;
|
|
1091
|
+
static QuaternionRotateTowards(from: Quaternion, to: Quaternion, maxDegreesDelta: number): Quaternion;
|
|
1092
|
+
static QuaternionRotateTowardsToRef(from: Quaternion, to: Quaternion, maxDegreesDelta: number, result: Quaternion): void;
|
|
1093
|
+
static QuaternionSlerpUnclamped(from: Quaternion, to: Quaternion, t: number): Quaternion;
|
|
1094
|
+
static QuaternionSlerpUnclampedToRef(a: Quaternion, b: Quaternion, t: number, result: Quaternion): void;
|
|
1095
|
+
static MoveTowards(current: number, target: number, maxDelta: number): number;
|
|
1096
|
+
static MoveTowardsVector2(current: Vector2, target: Vector2, maxDistanceDelta: number): Vector2;
|
|
1097
|
+
static MoveTowardsVector2ToRef(current: Vector2, target: Vector2, maxDistanceDelta: number, result: Vector2): void;
|
|
1098
|
+
static MoveTowardsVector3(current: Vector3, target: Vector3, maxDistanceDelta: number): Vector3;
|
|
1099
|
+
static MoveTowardsVector3ToRef(current: Vector3, target: Vector3, maxDistanceDelta: number, result: Vector3): void;
|
|
1100
|
+
static MoveTowardsVector4(current: Vector4, target: Vector4, maxDistanceDelta: number): Vector4;
|
|
1101
|
+
static MoveTowardsVector4ToRef(current: Vector4, target: Vector4, maxDistanceDelta: number, result: Vector4): void;
|
|
1102
|
+
static ClampMagnitudeVector2(vector: Vector2, length: number): Vector2;
|
|
1103
|
+
static ClampMagnitudeVector2ToRef(vector: Vector2, length: number, result: Vector2): void;
|
|
1104
|
+
static ClampMagnitudeVector3(vector: Vector3, length: number): Vector3;
|
|
1105
|
+
static ClampMagnitudeVector3ToRef(vector: Vector3, length: number, result: Vector3): void;
|
|
1106
|
+
static GetAngle(from: Vector3, to: Vector3): number;
|
|
1107
|
+
static GetAngleRadians(from: Vector3, to: Vector3): number;
|
|
1108
|
+
static ClampAngle(angle: number, min: number, max: number): number;
|
|
1109
|
+
static ClampAngle180(angle: number, min: number, max: number): number;
|
|
1110
|
+
static ClampAngle360(angle: number, min: number, max: number): number;
|
|
1111
|
+
static SmoothDamp(current: number, target: number, smoothTime: number, maxSpeed: number, deltaTime: number, currentVelocity: Vector2): number;
|
|
1112
|
+
static SmoothDampAngle(current: number, target: number, smoothTime: number, maxSpeed: number, deltaTime: number, currentVelocity: Vector2): number;
|
|
1113
|
+
static SmoothDampVector2(current: Vector2, target: Vector2, smoothTime: number, maxSpeed: number, deltaTime: number, currentVelocity: Vector2): Vector2;
|
|
1114
|
+
static SmoothDampVector2ToRef(current: Vector2, target: Vector2, smoothTime: number, maxSpeed: number, deltaTime: number, currentVelocity: Vector2, result: Vector2): void;
|
|
1115
|
+
static SmoothDampVector3(current: Vector3, target: Vector3, smoothTime: number, maxSpeed: number, deltaTime: number, currentVelocity: Vector3): Vector3;
|
|
1116
|
+
static SmoothDampVector3ToRef(current: Vector3, target: Vector3, smoothTime: number, maxSpeed: number, deltaTime: number, currentVelocity: Vector3, result: Vector3): void;
|
|
1117
|
+
static ToMatrix(x: number, y: number, z: number): Matrix;
|
|
1118
|
+
static ToMatrixToRef(x: number, y: number, z: number, result: Matrix): void;
|
|
1119
|
+
static FastMatrixLerp(startValue: Matrix, endValue: Matrix, gradient: number, result: Matrix): void;
|
|
1120
|
+
static FastMatrixSlerp(startValue: Matrix, endValue: Matrix, gradient: number, result: Matrix): void;
|
|
1121
|
+
static ToEuler(quaternion: Quaternion): Vector3;
|
|
1122
|
+
static ToEulerToRef(quaternion: Quaternion, result: Vector3): void;
|
|
1123
|
+
static FromEuler(x: number, y: number, z: number): Quaternion;
|
|
1124
|
+
static FromEulerToRef(x: number, y: number, z: number, result: Quaternion): void;
|
|
1125
|
+
static QuaternionDiff(a: Quaternion, b: Quaternion): Quaternion;
|
|
1126
|
+
static QuaternionDiffToRef(a: Quaternion, b: Quaternion, result: Quaternion): void;
|
|
1127
|
+
static QuaternionSubtractToRef(source: Quaternion, other: Quaternion, result: Quaternion): void;
|
|
1128
|
+
static RotateVector(vec: Vector3, quat: Quaternion): Vector3;
|
|
1129
|
+
static RotateVectorToRef(vec: Vector3, quat: Quaternion, result: Vector3): void;
|
|
1130
|
+
static LookRotation(direction: Vector3): Quaternion;
|
|
1131
|
+
static LookRotationToRef(direction: Vector3, result: Quaternion): void;
|
|
1132
|
+
static Vector3Rad2Deg(vector: Vector3): Vector3;
|
|
1133
|
+
static Vector3Rad2DegToRef(vector: Vector3, result: Vector3): void;
|
|
1134
|
+
static MultiplyQuaternionByVector(rotation: Quaternion, point: Vector3): Vector3;
|
|
1135
|
+
static MultiplyQuaternionByVectorToRef(rotation: Quaternion, point: Vector3, result: Vector3): void;
|
|
1136
|
+
static ValidateTransformRotation(transform: TransformNode): void;
|
|
1137
|
+
static ValidateTransformQuaternion(transform: TransformNode): void;
|
|
1138
|
+
static GetKeyboardInputValue(scene: Scene, currentValue: number, targetValue: number): number;
|
|
1139
|
+
static GenerateRandonNumber(min: number, max: number, decimals?: number): number;
|
|
1140
|
+
static ProjectVector(vector: Vector3, onnormal: Vector3): Vector3;
|
|
1141
|
+
static ProjectVectorToRef(vector: Vector3, onnormal: Vector3, result: Vector3): void;
|
|
1142
|
+
static ProjectVectorOnPlane(vector: Vector3, planenormal: Vector3): Vector3;
|
|
1143
|
+
static ProjectVectorOnPlaneToRef(vector: Vector3, planenormal: Vector3, result: Vector3): void;
|
|
1144
|
+
static AreVectorsEqual(v1: Vector3, v2: Vector3, p: number): boolean;
|
|
1145
|
+
static GetVerticalSlopeAngle(v: Vector3, max?: number): number;
|
|
1146
|
+
static DownloadEnvironment(cubemap: CubeTexture, success?: () => void, failure?: () => void): void;
|
|
1147
|
+
static HasOwnProperty(object: any, property: string): boolean;
|
|
1148
|
+
static FindMeshCollider(scene: Scene, object: IPhysicsEnabledObject): IPhysicsEnabledObject;
|
|
1149
|
+
static ColliderInstances(): boolean;
|
|
1150
|
+
static ReparentColliders(): boolean;
|
|
1151
|
+
static UseTriangleNormals(): boolean;
|
|
1152
|
+
static UseConvexTriangles(): boolean;
|
|
1153
|
+
static DefaultRenderGroup(): number;
|
|
1154
|
+
static ShowDebugColliders(): boolean;
|
|
1155
|
+
static ColliderVisibility(): number;
|
|
1156
|
+
static ColliderRenderGroup(): number;
|
|
1157
|
+
static CollisionWireframe(): boolean;
|
|
1158
|
+
static GetColliderMaterial(scene: Scene): Material;
|
|
1159
|
+
static CalculateCombinedFriction(friction0: number, friction1: number): number;
|
|
1160
|
+
static CalculateCombinedRestitution(restitution0: number, restitution1: number): number;
|
|
1161
|
+
private static LoaderItemsMarkedForDisposal;
|
|
1162
|
+
static AddLoaderItemMarkedForDisposal(node: TransformNode): void;
|
|
1163
|
+
static ResetLoaderItemsMarkedForDisposal(): void;
|
|
1164
|
+
static RemoveLoaderItemsMarkedForDisposal(): void;
|
|
1165
|
+
static GetDirectTargetAngle(transform: TransformNode, worldSpaceTarget: Vector3): number;
|
|
1166
|
+
static GetSmoothTargetAngle(transform: TransformNode, worldSpaceTarget: Vector3): number;
|
|
1167
|
+
static CalculatCatmullRom(p0: Vector3, p1: Vector3, p2: Vector3, p3: Vector3, i: number): Vector3;
|
|
1168
|
+
static CalculatCatmullRomToRef(p0: Vector3, p1: Vector3, p2: Vector3, p3: Vector3, i: number, result: Vector3): void;
|
|
1169
|
+
static MakeProper(name: string): string;
|
|
1170
|
+
static StartsWith(source: string, word: string): boolean;
|
|
1171
|
+
static EndsWith(source: string, word: string): boolean;
|
|
1172
|
+
static ReplaceAll(source: string, word: string, replace: string): string;
|
|
1173
|
+
static IsNullOrEmpty(source: string): boolean;
|
|
1174
|
+
static SafeStringPush(array: string[], value: string): void;
|
|
1175
|
+
static ParseColor3(source: IUnityColor, defaultValue?: Color3, toLinearSpace?: boolean): Color3;
|
|
1176
|
+
static ParseColor4(source: IUnityColor, defaultValue?: Color4, toLinearSpace?: boolean): Color4;
|
|
1177
|
+
static ParseVector2(source: IUnityVector2, defaultValue?: Vector2): Vector2;
|
|
1178
|
+
static ParseVector3(source: IUnityVector3, defaultValue?: Vector3): Vector3;
|
|
1179
|
+
static ParseVector4(source: IUnityVector4, defaultValue?: Vector4): Vector4;
|
|
1180
|
+
static ParseSound(source: IUnityAudioClip, scene: Scene, name: string, callback?: Nullable<() => void>, options?: IStaticSoundOptions): Promise<StaticSound>;
|
|
1181
|
+
static ParseTexture(source: IUnityTexture, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message?: string, exception?: any) => void>, buffer?: Nullable<any>, deleteBuffer?: boolean, format?: number): Texture;
|
|
1182
|
+
static ParseCubemap(source: IUnityCubemap, scene: Scene): CubeTexture;
|
|
1183
|
+
static ParseTextAsset(source: IUnityTextAsset, defaultValue?: string): string;
|
|
1184
|
+
static ParseJsonAsset<T>(source: IUnityTextAsset, defaultValue?: string, reviver?: (this: any, key: string, value: any) => any): T;
|
|
1185
|
+
static ParseTransformByID(source: IUnityTransform, scene: Scene, defaultValue?: TransformNode): TransformNode;
|
|
1186
|
+
static ParseTransformByName(source: IUnityTransform, scene: Scene, defaultValue?: TransformNode): TransformNode;
|
|
1187
|
+
static ParseChildTransform(parent: TransformNode, source: IUnityTransform, defaultValue?: TransformNode): TransformNode;
|
|
1188
|
+
static SetAbsolutePosition(transform: TransformNode, position: Vector3): void;
|
|
1189
|
+
static GetAbsolutePosition(transform: TransformNode, offsetPosition?: Vector3, computeMatrix?: boolean): Vector3;
|
|
1190
|
+
static GetAbsolutePositionToRef(transform: TransformNode, result: Vector3, offsetPosition?: Vector3, computeMatrix?: boolean): void;
|
|
1191
|
+
static SetAbsoluteRotation(transform: TransformNode, rotation: Quaternion): void;
|
|
1192
|
+
static GetAbsoluteRotation(transform: TransformNode): Quaternion;
|
|
1193
|
+
static GetAbsoluteRotationToRef(transform: TransformNode, result: Quaternion): void;
|
|
1194
|
+
static TransformPoint(owner: TransformNode | Camera, position: Vector3, computeMatrix?: boolean): Vector3;
|
|
1195
|
+
static InverseTransformPoint(owner: TransformNode | Camera, position: Vector3, computeMatrix?: boolean): Vector3;
|
|
1196
|
+
static TransformPointToRef(owner: TransformNode | Camera, position: Vector3, result: Vector3, computeMatrix?: boolean): void;
|
|
1197
|
+
static InverseTransformPointToRef(owner: TransformNode | Camera, position: Vector3, result: Vector3, computeMatrix?: boolean): void;
|
|
1198
|
+
static TransformDirection(owner: TransformNode | Camera, direction: Vector3, computeMatrix?: boolean): Vector3;
|
|
1199
|
+
static InverseTransformDirection(owner: TransformNode | Camera, direction: Vector3, computeMatrix?: boolean): Vector3;
|
|
1200
|
+
static TransformDirectionToRef(owner: TransformNode | Camera, direction: Vector3, result: Vector3, computeMatrix?: boolean): void;
|
|
1201
|
+
static InverseTransformDirectionToRef(owner: TransformNode | Camera, direction: Vector3, result: Vector3, computeMatrix?: boolean): void;
|
|
1202
|
+
static RecomputeCenterPivotPoint(owner: AbstractMesh): void;
|
|
1203
|
+
static GetDirectionVector(owner: TransformNode | Camera, vector: Vector3): Vector3;
|
|
1204
|
+
static GetDirectionVectorToRef(owner: TransformNode | Camera, vector: Vector3, result: Vector3): void;
|
|
1205
|
+
static GetForwardVector(owner: TransformNode | Camera): Vector3;
|
|
1206
|
+
static GetForwardVectorToRef(owner: TransformNode | Camera, result: Vector3): void;
|
|
1207
|
+
static GetRightVector(owner: TransformNode | Camera): Vector3;
|
|
1208
|
+
static GetRightVectorToRef(owner: TransformNode | Camera, result: Vector3): void;
|
|
1209
|
+
static GetUpVector(owner: TransformNode | Camera): Vector3;
|
|
1210
|
+
static GetUpVectorToRef(owner: TransformNode | Camera, result: Vector3): void;
|
|
1211
|
+
static BlendFloatValue(source: number, value: number, weight: number): number;
|
|
1212
|
+
static BlendVector2Value(source: Vector2, value: Vector2, weight: number): void;
|
|
1213
|
+
static BlendVector3Value(source: Vector3, value: Vector3, weight: number): void;
|
|
1214
|
+
static BlendQuaternionValue(source: Quaternion, value: Quaternion, weight: number): void;
|
|
1215
|
+
static SetAnimationTargetProperty(animation: Animation, property: string): void;
|
|
1216
|
+
static SampleAnimationFloat(animation: Animation, time: number, loopMode?: number, gltfAnimation?: boolean): number;
|
|
1217
|
+
static SampleAnimationVector2(animation: Animation, time: number, loopMode?: number, gltfAnimation?: boolean): Vector2;
|
|
1218
|
+
static SampleAnimationVector3(animation: Animation, time: number, loopMode?: number, gltfAnimation?: boolean): Vector3;
|
|
1219
|
+
static SampleAnimationQuaternion(animation: Animation, time: number, loopMode?: number, gltfAnimation?: boolean): Quaternion;
|
|
1220
|
+
static SampleAnimationMatrix(animation: Animation, time: number, loopMode?: number, gltfAnimation?: boolean): Matrix;
|
|
1221
|
+
static GetLastKeyFrameIndex(animation: Animation): number;
|
|
1222
|
+
private static InterpolateAnimation;
|
|
1223
|
+
static UpdateLoopBlendPositionSettings(animationTrack: AnimationGroup, loopBlendPositionY: boolean, loopBlendPositionXZ: boolean): void;
|
|
1224
|
+
static TakeScreenSnapshot(scene: Scene, engine: AbstractEngine, size?: {
|
|
1225
|
+
width?: number;
|
|
1226
|
+
height?: number;
|
|
1227
|
+
precision?: number;
|
|
1228
|
+
}, bitmapOptions?: ImageBitmapOptions, onComplete?: (bmd: ImageBitmap | null) => void): void;
|
|
1229
|
+
static DownloadImageBitmap(bmp: ImageBitmap | null, filename?: string, type?: "image/png" | "image/jpeg", quality?: number): HTMLCanvasElement | OffscreenCanvas;
|
|
1230
|
+
static MarkLinear(t?: BaseTexture | null): void;
|
|
1231
|
+
static MarkGamma(t?: BaseTexture | null): void;
|
|
1232
|
+
static WorldToScreenPoint(scene: Scene, position: Vector3, camera?: Camera): Vector3;
|
|
1233
|
+
static ScreenToWorldPoint(scene: Scene, position: Vector3): Vector3;
|
|
1234
|
+
static LoadTextFile(url: string, onSuccess: (data: string | ArrayBuffer) => void, onProgress?: (data: any) => void, onError?: (request?: WebRequest, exception?: any) => void): IFileRequest;
|
|
1235
|
+
static LoadTextFileAsync(url: string): Promise<string>;
|
|
1236
|
+
static GetHttpRequest(url: string, headers?: RequestHeader[], onSuccess?: (xhr: XMLHttpRequest) => void, onFailure?: (reason: any) => void, onProgress?: (evt: ProgressEvent) => void, useArrayBuffer?: boolean, overrideMimeType?: string): XMLHttpRequest;
|
|
1237
|
+
static GetHttpRequestAsync(url: string, headers?: RequestHeader[], onProgress?: (evt: ProgressEvent) => void, useArrayBuffer?: boolean, overrideMimeType?: string): Promise<XMLHttpRequest>;
|
|
1238
|
+
static PostHttpRequest(url: string, data: any, headers?: RequestHeader[], contentType?: string, onSuccess?: (xhr: XMLHttpRequest) => void, onFailure?: (reason: any) => void, onProgress?: (evt: ProgressEvent) => void, useArrayBuffer?: boolean, overrideMimeType?: string): XMLHttpRequest;
|
|
1239
|
+
static PostHttpRequestAsync(url: string, data: any, headers?: RequestHeader[], contentType?: string, onProgress?: (evt: ProgressEvent) => void, useArrayBuffer?: boolean, overrideMimeType?: string): Promise<XMLHttpRequest>;
|
|
1240
|
+
static RemapValueToRange(value: number, a1: number, a2: number, b1: number, b2: number): number;
|
|
1241
|
+
static CloneSkeletonPrefab(scene: Scene, skeleton: Skeleton, name: string, id?: string, root?: TransformNode): Skeleton;
|
|
1242
|
+
static GetSceneTransforms(scene: Scene): TransformNode[];
|
|
1243
|
+
static PostParseSceneComponents(scene: Scene, transforms: TransformNode[], preloadList: Array<ScriptComponent>, readyList: Array<ScriptComponent>): MetadataParser;
|
|
1244
|
+
static GetDefaultReflectionTexture(scene: Scene): CubeTexture;
|
|
1245
|
+
static GetNeutralReflectionTexture(scene: Scene, grayValue?: number, level?: number): CubeTexture;
|
|
1246
|
+
static GetAssetContainerMesh(container: AssetContainer, meshName: string): Mesh;
|
|
1247
|
+
static GetAssetContainerNode(container: AssetContainer, nodeName: string): TransformNode;
|
|
1248
|
+
static CloneAssetContainerItem(container: AssetContainer, assetName: string, nameFunction?: (sourceName: string) => string, newParent?: Nullable<TransformNode>, makeNewMaterials?: boolean, cloneAnimations?: boolean): TransformNode;
|
|
1249
|
+
static AssignAnimationGroupsToInstance(root: TransformNode, groups: AnimationGroup[]): void;
|
|
1250
|
+
static AssignAnimationGroupsToNode(transform: TransformNode, groups: AnimationGroup[]): void;
|
|
1251
|
+
static UnitySlopeAngleToCosine(unitySlopeAngleDegrees: number): number;
|
|
1252
|
+
static InstantiateHierarchy(node: TransformNode, newParent?: Nullable<TransformNode>, onNewNodeCreated?: (source: TransformNode, clone: TransformNode) => void): Nullable<TransformNode>;
|
|
1253
|
+
static InstantiateNodeHierarchy(node: TransformNode, newParent?: Nullable<TransformNode>, onNewNodeCreated?: (source: TransformNode, clone: TransformNode) => void): Nullable<TransformNode>;
|
|
1254
|
+
static InstantiateMeshHierarchy(mesh: Mesh, newParent: Nullable<TransformNode>, createInstance: boolean, onNewNodeCreated?: (source: TransformNode, clone: TransformNode) => void): Nullable<TransformNode>;
|
|
1255
|
+
static PrepareSkeletonForRendering(skeleton: Skeleton, dontCheckFrameId?: boolean): void;
|
|
1256
|
+
static RetargetAnimationGroupSkeleton(animationGroup: AnimationGroup, targetSkeleton: Skeleton, targetArmatureNode?: TransformNode): void;
|
|
1257
|
+
static RetargetAnimationGroupBlendShapes(animationGroup: AnimationGroup, targetMesh: Mesh): void;
|
|
1258
|
+
static LinkSkeletonMeshes(master: Skeleton, slave: Skeleton): void;
|
|
1259
|
+
static FindBoneByName(skeleton: Skeleton, name: string): Bone;
|
|
1260
|
+
static SwitchHandednessVector3(input: Vector3): Vector3;
|
|
1261
|
+
static SwitchHandednessVector4(input: Vector4): Vector4;
|
|
1262
|
+
static SwitchHandednessQuaternion(input: Quaternion): Quaternion;
|
|
1263
|
+
static ComputeBlendingSpeed(rate: number, duration: number, dampen?: boolean): number;
|
|
1264
|
+
static CalculateCameraDistance(farClipPlane: number, lodPercent: number, clipPlaneScale?: number): number;
|
|
1265
|
+
static EvalSphericalPolynomialRGB(poly: SphericalPolynomial, n: Vector3): Color3;
|
|
1266
|
+
static BestFitScale(unityRGB: number[], babRGB: number[]): number;
|
|
1267
|
+
static ComputeSHEval6Fit(sp: SphericalPolynomial, unityEval6: number[]): {
|
|
1268
|
+
scale: number;
|
|
1269
|
+
rmse: number;
|
|
1270
|
+
perChannelRMSE: number[];
|
|
1271
|
+
perDir: Array<any>;
|
|
1272
|
+
};
|
|
1273
|
+
static InstantiateClass(className: string): any;
|
|
1274
|
+
static GetSimpleClassName(obj: any): string;
|
|
1275
|
+
static DisposeEntity(entity: AbstractMesh): void;
|
|
1276
|
+
static SearchTransformNodes(name: string, nodes: BabylonNode[], searchType?: SearchType): BabylonNode;
|
|
1277
|
+
static SearchTransformNodeForTags(query: string, nodes: BabylonNode[]): BabylonNode;
|
|
1278
|
+
static SearchAllTransformNodesForTags(query: string, nodes: BabylonNode[]): BabylonNode[];
|
|
1279
|
+
static SearchTransformNodeForScript(klass: string, nodes: BabylonNode[]): BabylonNode;
|
|
1280
|
+
static SearchAllTransformNodesForScript(klass: string, nodes: BabylonNode[]): BabylonNode[];
|
|
1281
|
+
static CreateGuid(suffix?: string): string;
|
|
1282
|
+
static ValidateTransformGuid(node: TransformNode): void;
|
|
1283
|
+
static RegisterInstancedMeshBuffers(mesh: Mesh): void;
|
|
1284
|
+
static CloneValue(source: any, destinationObject: any): any;
|
|
1285
|
+
static CloneEntityMetadata(source: any): any;
|
|
1286
|
+
static FastJsonCopy(val: any): any;
|
|
1287
|
+
static DeepCopyProperties(source: any, destination: any, doNotCopyList?: string[], mustCopyList?: string[]): void;
|
|
1288
|
+
static ValidateTransformMetadata(transform: TransformNode): void;
|
|
1289
|
+
}
|
|
1290
|
+
export declare class GrassStandardMaterial extends StandardShaderMaterial {
|
|
1291
|
+
private _windTimeAccum;
|
|
1292
|
+
private _lastUpdateFrame;
|
|
1293
|
+
constructor(name: string, scene: Scene);
|
|
1294
|
+
awake(): void;
|
|
1295
|
+
update(): void;
|
|
1296
|
+
getShaderName(): string;
|
|
1297
|
+
getMaxDistance(): number;
|
|
1298
|
+
setMaxDistance(distance: number): void;
|
|
1299
|
+
getFadeStart(): number;
|
|
1300
|
+
setFadeStart(distance: number): void;
|
|
1301
|
+
getWaveSpeed(): number;
|
|
1302
|
+
setWaveSpeed(speed: number): void;
|
|
1303
|
+
getWaveSize(): number;
|
|
1304
|
+
setWaveSize(size: number): void;
|
|
1305
|
+
getWindAmount(): number;
|
|
1306
|
+
setWindAmount(amount: number): void;
|
|
1307
|
+
getWindTint(): Vector4;
|
|
1308
|
+
setWindTint(tint: Vector4): void;
|
|
1309
|
+
getShadowIntensity(): number;
|
|
1310
|
+
setShadowIntensity(intensity: number): void;
|
|
1311
|
+
}
|
|
1312
|
+
export declare class GrassStandardMaterialPlugin extends StandardShaderMaterialPlugin {
|
|
1313
|
+
constructor(customMaterial: StandardShaderMaterial, shaderName: string);
|
|
1314
|
+
isCompatible(shaderLanguage: ShaderLanguage): boolean;
|
|
1315
|
+
getCustomCode(shaderType: string, shaderLanguage: ShaderLanguage): any;
|
|
1316
|
+
private getWGSLVertexMainEnd;
|
|
1317
|
+
private getWGSLVaryingDefinitions;
|
|
1318
|
+
private getWGSLVertexWorldPos;
|
|
1319
|
+
private getGLSLVertexDefinitions;
|
|
1320
|
+
private getGLSLVertexMainEnd;
|
|
1321
|
+
private getGLSLVertexWorldPos;
|
|
1322
|
+
private getWGSLFragmentCode;
|
|
1323
|
+
private getGLSLFragmentCode;
|
|
1324
|
+
private getGLSLFragmentDefinitions;
|
|
1325
|
+
getUniforms(shaderLanguage: ShaderLanguage): any;
|
|
1326
|
+
getSamplers(samplers: string[]): void;
|
|
1327
|
+
getAttributes(attributes: string[], scene: Scene, mesh: AbstractMesh): void;
|
|
1328
|
+
prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void;
|
|
1329
|
+
bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: AbstractEngine, subMesh: SubMesh): void;
|
|
1330
|
+
}
|
|
1331
|
+
export declare class GrassBillboardMaterial extends StandardShaderMaterial {
|
|
1332
|
+
private _windTimeAccum;
|
|
1333
|
+
private _lastUpdateFrame;
|
|
1334
|
+
constructor(name: string, scene: Scene);
|
|
1335
|
+
awake(): void;
|
|
1336
|
+
update(): void;
|
|
1337
|
+
getShaderName(): string;
|
|
1338
|
+
getMaxDistance(): number;
|
|
1339
|
+
setMaxDistance(distance: number): void;
|
|
1340
|
+
getFadeStart(): number;
|
|
1341
|
+
setFadeStart(distance: number): void;
|
|
1342
|
+
getWaveSpeed(): number;
|
|
1343
|
+
setWaveSpeed(speed: number): void;
|
|
1344
|
+
getWaveSize(): number;
|
|
1345
|
+
setWaveSize(size: number): void;
|
|
1346
|
+
getWindAmount(): number;
|
|
1347
|
+
setWindAmount(amount: number): void;
|
|
1348
|
+
getWindTint(): Vector4;
|
|
1349
|
+
setWindTint(tint: Vector4): void;
|
|
1350
|
+
getShadowIntensity(): number;
|
|
1351
|
+
setShadowIntensity(intensity: number): void;
|
|
1352
|
+
getSphericalBillboardEnabled(): boolean;
|
|
1353
|
+
setSphericalBillboardEnabled(enabled: boolean): void;
|
|
1354
|
+
}
|
|
1355
|
+
export declare class GrassBillboardMaterialPlugin extends StandardShaderMaterialPlugin {
|
|
1356
|
+
constructor(customMaterial: StandardShaderMaterial, shaderName: string);
|
|
1357
|
+
isCompatible(shaderLanguage: ShaderLanguage): boolean;
|
|
1358
|
+
getCustomCode(shaderType: string, shaderLanguage: ShaderLanguage): any;
|
|
1359
|
+
private getWGSLVertexMainEnd;
|
|
1360
|
+
private getWGSLVaryingDefinitions;
|
|
1361
|
+
private getWGSLVertexWorldPos;
|
|
1362
|
+
private getGLSLVertexDefinitions;
|
|
1363
|
+
private getGLSLVertexMainEnd;
|
|
1364
|
+
private getGLSLVertexWorldPos;
|
|
1365
|
+
private getWGSLFragmentCode;
|
|
1366
|
+
private getGLSLFragmentCode;
|
|
1367
|
+
private getGLSLFragmentDefinitions;
|
|
1368
|
+
getUniforms(shaderLanguage: ShaderLanguage): any;
|
|
1369
|
+
getSamplers(samplers: string[]): void;
|
|
1370
|
+
getAttributes(attributes: string[], scene: Scene, mesh: AbstractMesh): void;
|
|
1371
|
+
prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void;
|
|
1372
|
+
bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: AbstractEngine, subMesh: SubMesh): void;
|
|
1373
|
+
}
|
|
1374
|
+
export declare class VertexAnimationMaterial extends CustomShaderMaterial {
|
|
1375
|
+
controller: VertexAnimationController;
|
|
1376
|
+
runtimeAlbedoSkins: BaseTexture;
|
|
1377
|
+
runtimeNormalSkins: BaseTexture;
|
|
1378
|
+
constructor(name: string, scene: Scene);
|
|
1379
|
+
awake(): void;
|
|
1380
|
+
update(): void;
|
|
1381
|
+
getShaderName(): string;
|
|
1382
|
+
getController(): VertexAnimationController;
|
|
1383
|
+
cloneForInstance(instanceName: string): VertexAnimationMaterial;
|
|
1384
|
+
setRuntimeSkinArrays(albedoArray: BaseTexture, normalArray: BaseTexture, nullOutDefaults?: boolean): void;
|
|
1385
|
+
clearRuntimeSkinArrays(): void;
|
|
1386
|
+
installSkinsFromUrlsAsync(layers: {
|
|
1387
|
+
albedo: string;
|
|
1388
|
+
normal: string;
|
|
1389
|
+
}[], width: number, height: number, options?: {
|
|
1390
|
+
nullOutDefaults?: boolean;
|
|
1391
|
+
rootUrl?: string;
|
|
1392
|
+
generateMipMaps?: boolean;
|
|
1393
|
+
samplingMode?: number;
|
|
1394
|
+
}): Promise<void>;
|
|
1395
|
+
private _notifyPluginOfRuntimeSkinChange;
|
|
1396
|
+
}
|
|
1397
|
+
export interface IVertexAnimationRendererReference {
|
|
1398
|
+
name?: string;
|
|
1399
|
+
vertexrenderer?: string;
|
|
1400
|
+
vertexindex?: number;
|
|
1401
|
+
vertexcontroller?: string;
|
|
1402
|
+
vertextransform: string;
|
|
1403
|
+
vertexguid: string;
|
|
1404
|
+
vertexpath?: string;
|
|
1405
|
+
vertexmesh?: string;
|
|
1406
|
+
vertexsubmeshes?: number;
|
|
1407
|
+
}
|
|
1408
|
+
export interface IVertexAnimationSettings extends IVertexAnimationRendererReference {
|
|
1409
|
+
name: string;
|
|
1410
|
+
vertex: string;
|
|
1411
|
+
vertexnormal: string;
|
|
1412
|
+
vertextextureformat: "png" | "exr";
|
|
1413
|
+
vertexpacking: "separate" | "none";
|
|
1414
|
+
vertexframes: number;
|
|
1415
|
+
vertexfps: number;
|
|
1416
|
+
vertexwidth: number;
|
|
1417
|
+
vertexheight: number;
|
|
1418
|
+
vertexcount: number;
|
|
1419
|
+
vertexrowsperframe: number;
|
|
1420
|
+
vertexposmin: [number, number, number];
|
|
1421
|
+
vertexposmax: [number, number, number];
|
|
1422
|
+
vertexmethod: "soft";
|
|
1423
|
+
vertexlooptime: boolean;
|
|
1424
|
+
vertexloopblend: boolean;
|
|
1425
|
+
vertexcombined?: boolean;
|
|
1426
|
+
vertexfromrow?: number;
|
|
1427
|
+
vertextorow?: number;
|
|
1428
|
+
}
|
|
1429
|
+
export interface IVertexAnimationRendererClip {
|
|
1430
|
+
guid: string;
|
|
1431
|
+
settings: IVertexAnimationSettings;
|
|
1432
|
+
positionTexture: Texture | null;
|
|
1433
|
+
normalTexture: Texture | null;
|
|
1434
|
+
posMinV3: Vector3;
|
|
1435
|
+
posMaxV3: Vector3;
|
|
1436
|
+
fromRow: number;
|
|
1437
|
+
}
|
|
1438
|
+
export interface IVertexAnimationClip {
|
|
1439
|
+
name: string;
|
|
1440
|
+
renderers: {
|
|
1441
|
+
[guid: string]: IVertexAnimationRendererClip;
|
|
1442
|
+
};
|
|
1443
|
+
firstRendererGuid: string;
|
|
1444
|
+
duration: number;
|
|
1445
|
+
loop: boolean;
|
|
1446
|
+
loopBlend: boolean;
|
|
1447
|
+
}
|
|
1448
|
+
export declare class VertexAnimationController {
|
|
1449
|
+
private static _registry;
|
|
1450
|
+
private static _globalTextureCache;
|
|
1451
|
+
static Find(guid: string): VertexAnimationController;
|
|
1452
|
+
static GetOrCreate(guid: string, scene: Scene, rootUrl?: string, lazyLoadTextures?: boolean): VertexAnimationController;
|
|
1453
|
+
static CollectRendererTargets(settings: IVertexAnimationSettings[]): IVertexAnimationRendererReference[];
|
|
1454
|
+
static SetSkinIndex(mesh: AbstractMesh, skinIndex: number): void;
|
|
1455
|
+
static GetSkinIndex(mesh: AbstractMesh): number;
|
|
1456
|
+
static DisposeAll(scene?: Scene): void;
|
|
1457
|
+
readonly guid: string;
|
|
1458
|
+
readonly scene: Scene;
|
|
1459
|
+
rootUrl: string;
|
|
1460
|
+
private _plugins;
|
|
1461
|
+
private _clips;
|
|
1462
|
+
private _currentClip;
|
|
1463
|
+
private _previousClip;
|
|
1464
|
+
private _time;
|
|
1465
|
+
private _previousTime;
|
|
1466
|
+
private _speed;
|
|
1467
|
+
private _loop;
|
|
1468
|
+
private _loopBlend;
|
|
1469
|
+
private _manualLoopOverride;
|
|
1470
|
+
private _playing;
|
|
1471
|
+
private _blendDuration;
|
|
1472
|
+
private _blendElapsed;
|
|
1473
|
+
private _blendWeight;
|
|
1474
|
+
private _mode;
|
|
1475
|
+
private _normalMode;
|
|
1476
|
+
private _lazyLoad;
|
|
1477
|
+
private _tickObserver;
|
|
1478
|
+
private _disposeObserver;
|
|
1479
|
+
private _lastFrameId;
|
|
1480
|
+
private _textureCache;
|
|
1481
|
+
private _textureCacheKeys;
|
|
1482
|
+
private _instanceMeshes;
|
|
1483
|
+
setInstanceMesh(rendererGuid: string, mesh: AbstractMesh): void;
|
|
1484
|
+
private constructor();
|
|
1485
|
+
dispose(): void;
|
|
1486
|
+
get currentClip(): IVertexAnimationClip;
|
|
1487
|
+
get previousClip(): IVertexAnimationClip;
|
|
1488
|
+
get currentTime(): number;
|
|
1489
|
+
get previousTime(): number;
|
|
1490
|
+
get blendWeight(): number;
|
|
1491
|
+
get isPlaying(): boolean;
|
|
1492
|
+
get normalMode(): "separate" | "none";
|
|
1493
|
+
get loopBlend(): boolean;
|
|
1494
|
+
get mode(): "auto" | "drive";
|
|
1495
|
+
get speed(): number;
|
|
1496
|
+
get loopOverride(): boolean | null;
|
|
1497
|
+
getClip(name: string): IVertexAnimationClip | null;
|
|
1498
|
+
setSpeed(speed: number): void;
|
|
1499
|
+
setLoop(loop: boolean): void;
|
|
1500
|
+
setRuntimeSkinArrays(albedoArray: BaseTexture, normalArray: BaseTexture, nullOutDefaults?: boolean): void;
|
|
1501
|
+
clearRuntimeSkinArrays(): void;
|
|
1502
|
+
installSkinsFromUrlsAsync(layers: {
|
|
1503
|
+
albedo: string;
|
|
1504
|
+
normal: string;
|
|
1505
|
+
}[], width: number, height: number, options?: {
|
|
1506
|
+
nullOutDefaults?: boolean;
|
|
1507
|
+
rootUrl?: string;
|
|
1508
|
+
generateMipMaps?: boolean;
|
|
1509
|
+
samplingMode?: number;
|
|
1510
|
+
}): Promise<void>;
|
|
1511
|
+
setCurrentTime(time: number): void;
|
|
1512
|
+
getCurrentTime(): number;
|
|
1513
|
+
addPlugin(plugin: VertexAnimationMaterialPlugin): void;
|
|
1514
|
+
removePlugin(plugin: VertexAnimationMaterialPlugin): void;
|
|
1515
|
+
loadAnimations(settings: IVertexAnimationSettings[]): void;
|
|
1516
|
+
play(clipName: string, blendDuration?: number): boolean;
|
|
1517
|
+
pause(): void;
|
|
1518
|
+
resume(): void;
|
|
1519
|
+
stop(): void;
|
|
1520
|
+
driveBlend(primaryName: string, primaryTimeSec: number, secondaryName: string | null, secondaryTimeSec: number, blendWeight: number): boolean;
|
|
1521
|
+
getCurrentRendererClip(rendererGuid: string): IVertexAnimationRendererClip;
|
|
1522
|
+
getPreviousRendererClip(rendererGuid: string): IVertexAnimationRendererClip;
|
|
1523
|
+
private _tick;
|
|
1524
|
+
private _getOrCreateVATBuffer;
|
|
1525
|
+
private _isRendererPositionReady;
|
|
1526
|
+
private _areBlendTargetsReady;
|
|
1527
|
+
private _wrapTime;
|
|
1528
|
+
private _ensureClipTexturesLoaded;
|
|
1529
|
+
private _getOrAcquireTexture;
|
|
1530
|
+
private static _acquireVATTexture;
|
|
1531
|
+
private static _releaseVATTexture;
|
|
1532
|
+
private static _makeVATTextureCacheKey;
|
|
1533
|
+
private static _createVATTexture;
|
|
1534
|
+
private _resolveUrl;
|
|
1535
|
+
private _getRendererClip;
|
|
1536
|
+
}
|
|
1537
|
+
export declare class VertexAnimationMaterialPlugin extends CustomShaderMaterialPlugin {
|
|
1538
|
+
vertexAnimations: IVertexAnimationSettings[];
|
|
1539
|
+
controller: VertexAnimationController;
|
|
1540
|
+
private _rendererTargets;
|
|
1541
|
+
private _targetRendererGuid;
|
|
1542
|
+
private _placeholderTexture;
|
|
1543
|
+
private _placeholderAlbedoArray;
|
|
1544
|
+
private _placeholderNormalArray;
|
|
1545
|
+
private _cc_posTex;
|
|
1546
|
+
private _cc_normTex;
|
|
1547
|
+
private _cc_prevPosTex;
|
|
1548
|
+
private _cc_prevNormTex;
|
|
1549
|
+
private _cc_texW;
|
|
1550
|
+
private _cc_texH;
|
|
1551
|
+
private _cc_rowsPF;
|
|
1552
|
+
private _cc_vCount;
|
|
1553
|
+
private _cc_posMin;
|
|
1554
|
+
private _cc_posMax;
|
|
1555
|
+
private _cc_prevTexW;
|
|
1556
|
+
private _cc_prevTexH;
|
|
1557
|
+
private _cc_prevRowsPF;
|
|
1558
|
+
private _cc_prevPosMin;
|
|
1559
|
+
private _cc_prevPosMax;
|
|
1560
|
+
private static readonly _zeroV3;
|
|
1561
|
+
private static readonly _oneV3;
|
|
1562
|
+
constructor(customMaterial: CustomShaderMaterial, shaderName: string);
|
|
1563
|
+
dispose(): void;
|
|
1564
|
+
isCompatible(shaderLanguage: ShaderLanguage): boolean;
|
|
1565
|
+
getCustomCode(shaderType: string, shaderLanguage: ShaderLanguage): any;
|
|
1566
|
+
getUniforms(shaderLanguage: ShaderLanguage): any;
|
|
1567
|
+
getSamplers(samplers: string[]): void;
|
|
1568
|
+
getAttributes(attributes: string[], scene: Scene, mesh: AbstractMesh): void;
|
|
1569
|
+
prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void;
|
|
1570
|
+
onRuntimeSkinArraysChanged(): void;
|
|
1571
|
+
bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: AbstractEngine, subMesh: SubMesh): void;
|
|
1572
|
+
private _pushRuntimeSkinSamplers;
|
|
1573
|
+
setupAnimations(settings: IVertexAnimationSettings[], controllerId: string, rootUrl?: string, lazyLoadTextures?: boolean): VertexAnimationController;
|
|
1574
|
+
private _captureRendererTarget;
|
|
1575
|
+
private _resolveRendererTarget;
|
|
1576
|
+
private _matchRendererByGuid;
|
|
1577
|
+
private _matchRendererByPath;
|
|
1578
|
+
private _matchRendererByName;
|
|
1579
|
+
private _readMetadataString;
|
|
1580
|
+
private _buildNodePath;
|
|
1581
|
+
private _pathEndsWith;
|
|
1582
|
+
syncFromController(material: VertexAnimationMaterial, controller?: VertexAnimationController): void;
|
|
1583
|
+
bindVATToEffect(effect: Effect): void;
|
|
1584
|
+
private _pushVATUniforms;
|
|
1585
|
+
private getGLSLVertexDefinitions;
|
|
1586
|
+
private getGLSLVertexPositionCode;
|
|
1587
|
+
private getGLSLVertexNormalCode;
|
|
1588
|
+
private getWGSLVertexDefinitions;
|
|
1589
|
+
private getWGSLVertexPositionCode;
|
|
1590
|
+
private getWGSLVertexNormalCode;
|
|
1591
|
+
private getGLSLVertexMainEnd;
|
|
1592
|
+
private getWGSLVertexMainEnd;
|
|
1593
|
+
private getGLSLFragmentDefinitions;
|
|
1594
|
+
private getGLSLFragmentAlbedoCode;
|
|
1595
|
+
private getGLSLFragmentNormalCode;
|
|
1596
|
+
private getWGSLFragmentDefinitions;
|
|
1597
|
+
private getWGSLFragmentAlbedoCode;
|
|
1598
|
+
private getWGSLFragmentNormalCode;
|
|
1599
|
+
}
|
|
1600
|
+
export interface KeymapState {
|
|
1601
|
+
result: boolean | number;
|
|
1602
|
+
pressTime: number;
|
|
1603
|
+
releaseTime: number;
|
|
1604
|
+
}
|
|
1605
|
+
export declare enum DragDirection {
|
|
1606
|
+
None = 0,
|
|
1607
|
+
Up = 1,
|
|
1608
|
+
Down = 2,
|
|
1609
|
+
Right = 3,
|
|
1610
|
+
Left = 4
|
|
1611
|
+
}
|
|
1612
|
+
export declare enum PinchZoomState {
|
|
1613
|
+
None = 0,
|
|
1614
|
+
ZoomIn = 1,
|
|
1615
|
+
ZoomOut = 2
|
|
1616
|
+
}
|
|
1617
|
+
export declare class InputController {
|
|
1618
|
+
static MOUSE_DAMPENER: number;
|
|
1619
|
+
static TAP_THRESHOLD_MS: number;
|
|
1620
|
+
static GamepadManager: GamepadManager;
|
|
1621
|
+
static GamepadConnected: (pad: Gamepad, state: EventState) => void;
|
|
1622
|
+
static GamepadDisconnected: (pad: Gamepad, state: EventState) => void;
|
|
1623
|
+
static GetMouseButtonsDown(): number;
|
|
1624
|
+
static GetLeftButtonDown(): boolean;
|
|
1625
|
+
static GetMiddleButtonDown(): boolean;
|
|
1626
|
+
static GetRightButtonDown(): boolean;
|
|
1627
|
+
static GetMouseDownTarget(): any;
|
|
1628
|
+
static GetMouseDragTarget(): any;
|
|
1629
|
+
static GetPinchZoomState(): PinchZoomState;
|
|
1630
|
+
static AllowMobileControls: boolean;
|
|
1631
|
+
static MobileControlsActive: boolean;
|
|
1632
|
+
static EnablePinchZoomTracking: boolean;
|
|
1633
|
+
static EnableUserInput(engine: AbstractEngine, scene: Scene, options?: {
|
|
1634
|
+
contextMenu?: boolean;
|
|
1635
|
+
pointerLock?: boolean;
|
|
1636
|
+
preventDefault?: boolean;
|
|
1637
|
+
useCapture?: boolean;
|
|
1638
|
+
}): void;
|
|
1639
|
+
static ConfigureUserInput(engine: AbstractEngine, scene: Scene, options?: {
|
|
1640
|
+
contextMenu?: boolean;
|
|
1641
|
+
pointerLock?: boolean;
|
|
1642
|
+
preventDefault?: boolean;
|
|
1643
|
+
useCapture?: boolean;
|
|
1644
|
+
}): void;
|
|
1645
|
+
static SetLeftJoystickBuffer(leftStickX: number, leftStickY: number, invertY?: boolean): void;
|
|
1646
|
+
static SetRightJoystickBuffer(rightStickX: number, rightStickY: number, invertY?: boolean): void;
|
|
1647
|
+
static DisableUserInput(scene: Scene, useCapture?: boolean): void;
|
|
1648
|
+
static LockMousePointer(scene: Scene, lock: boolean): void;
|
|
1649
|
+
private static LastMousePosition;
|
|
1650
|
+
private static PointerLockedFlag;
|
|
1651
|
+
static IsPointerLocked(): boolean;
|
|
1652
|
+
private static LockMousePointerObserver;
|
|
1653
|
+
static IsPointerLockHandled(): boolean;
|
|
1654
|
+
static GetUserInput(input: UserInputAxis, player?: PlayerNumber): number;
|
|
1655
|
+
static OnKeyboardUp(callback: (keycode: number) => void): void;
|
|
1656
|
+
static OnKeyboardDown(callback: (keycode: number) => void): void;
|
|
1657
|
+
static OnKeyboardPress(keycode: number, callback: () => void): void;
|
|
1658
|
+
static GetKeyboardInput(keycode: number): boolean;
|
|
1659
|
+
static IsKeyboardButtonHeld(keycode: number): boolean;
|
|
1660
|
+
static WasKeyboardButtonTapped(keycode: number, reset?: boolean): boolean;
|
|
1661
|
+
static ResetKeyboardButtonTapped(keycode: number): void;
|
|
1662
|
+
static OnPointerUp(callback: (button: number) => void): void;
|
|
1663
|
+
static OnPointerDown(callback: (button: number) => void): void;
|
|
1664
|
+
static OnPointerPress(button: number, callback: () => void): void;
|
|
1665
|
+
static GetPointerInput(button: number): boolean;
|
|
1666
|
+
static IsPointerButtonHeld(button: number): boolean;
|
|
1667
|
+
static WasPointerButtonTapped(number: number, reset?: boolean): boolean;
|
|
1668
|
+
static ResetPointerButtonTapped(button: number): void;
|
|
1669
|
+
static GetPointerDragDirection(mousex: number, mousey: number, buttondown: boolean): DragDirection;
|
|
1670
|
+
static ResetPinchZoomTracking(): void;
|
|
1671
|
+
static GetMousePosition(scene: Scene, bottomUp?: boolean): Vector3;
|
|
1672
|
+
static IsWheelScrolling(): boolean;
|
|
1673
|
+
static OnGamepadButtonUp(callback: (button: number) => void, player?: PlayerNumber): void;
|
|
1674
|
+
static OnGamepadButtonDown(callback: (button: number) => void, player?: PlayerNumber): void;
|
|
1675
|
+
static OnGamepadButtonPress(button: number, callback: () => void, player?: PlayerNumber): void;
|
|
1676
|
+
static GetGamepadButtonInput(button: number, player?: PlayerNumber): boolean;
|
|
1677
|
+
static IsGamepadButtonHeld(button: number, player?: PlayerNumber): boolean;
|
|
1678
|
+
static IsGamepadButtonTapped(button: number, player?: PlayerNumber): boolean;
|
|
1679
|
+
static ResetGamepadButtonTapped(button: number, player?: PlayerNumber): void;
|
|
1680
|
+
static OnGamepadDirectionUp(callback: (direction: number) => void, player?: PlayerNumber): void;
|
|
1681
|
+
static OnGamepadDirectionDown(callback: (direction: number) => void, player?: PlayerNumber): void;
|
|
1682
|
+
static OnGamepadDirectionPress(direction: number, callback: () => void, player?: PlayerNumber): void;
|
|
1683
|
+
static GetGamepadDirectionInput(direction: number, player?: PlayerNumber): boolean;
|
|
1684
|
+
static IsGamepadDirectionHeld(direction: number, player?: PlayerNumber): boolean;
|
|
1685
|
+
static IsGamepadDirectionTapped(direction: number, player?: PlayerNumber): boolean;
|
|
1686
|
+
static ResetGamepadDirectionTapped(direction: number, player?: PlayerNumber): void;
|
|
1687
|
+
static OnGamepadTriggerLeft(callback: (value: number) => void, player?: PlayerNumber): void;
|
|
1688
|
+
static OnGamepadTriggerRight(callback: (value: number) => void, player?: PlayerNumber): void;
|
|
1689
|
+
static GetGamepadTriggerInput(trigger: number, player?: PlayerNumber): number;
|
|
1690
|
+
static IsGamepadTriggerHeld(trigger: number, player?: PlayerNumber): boolean;
|
|
1691
|
+
static IsGamepadTriggerTapped(trigger: number, player?: PlayerNumber): boolean;
|
|
1692
|
+
static ResetGamepadTriggerTapped(trigger: number, player?: PlayerNumber): void;
|
|
1693
|
+
static GetGamepadType(player?: PlayerNumber): GamepadType;
|
|
1694
|
+
static GetGamepad(player?: PlayerNumber): Gamepad;
|
|
1695
|
+
static InputKeyDownHandler(keyCode: number, event?: MouseEvent | TouchEvent | PointerEvent | KeyboardEvent): any;
|
|
1696
|
+
static InputKeyUpHandler(keyCode: number, event?: MouseEvent | TouchEvent | PointerEvent | KeyboardEvent): any;
|
|
1697
|
+
private static input;
|
|
1698
|
+
private static keymap;
|
|
1699
|
+
private static scroll;
|
|
1700
|
+
private static wheel;
|
|
1701
|
+
private static mousex;
|
|
1702
|
+
private static mousey;
|
|
1703
|
+
private static vertical;
|
|
1704
|
+
private static horizontal;
|
|
1705
|
+
private static mousex2;
|
|
1706
|
+
private static mousey2;
|
|
1707
|
+
private static vertical2;
|
|
1708
|
+
private static horizontal2;
|
|
1709
|
+
private static mousex3;
|
|
1710
|
+
private static mousey3;
|
|
1711
|
+
private static vertical3;
|
|
1712
|
+
private static horizontal3;
|
|
1713
|
+
private static mousex4;
|
|
1714
|
+
private static mousey4;
|
|
1715
|
+
private static vertical4;
|
|
1716
|
+
private static horizontal4;
|
|
1717
|
+
private static a_mousex;
|
|
1718
|
+
private static x_scroll;
|
|
1719
|
+
private static x_wheel;
|
|
1720
|
+
private static x_mousex;
|
|
1721
|
+
private static x_mousey;
|
|
1722
|
+
private static x_vertical;
|
|
1723
|
+
private static x_horizontal;
|
|
1724
|
+
private static k_mousex;
|
|
1725
|
+
private static k_mousey;
|
|
1726
|
+
private static k_vertical;
|
|
1727
|
+
private static k_horizontal;
|
|
1728
|
+
private static j_mousex;
|
|
1729
|
+
private static j_mousey;
|
|
1730
|
+
private static j_vertical;
|
|
1731
|
+
private static j_horizontal;
|
|
1732
|
+
private static g_mousex1;
|
|
1733
|
+
private static g_mousey1;
|
|
1734
|
+
private static g_vertical1;
|
|
1735
|
+
private static g_horizontal1;
|
|
1736
|
+
private static g_mousex2;
|
|
1737
|
+
private static g_mousey2;
|
|
1738
|
+
private static g_vertical2;
|
|
1739
|
+
private static g_horizontal2;
|
|
1740
|
+
private static g_mousex3;
|
|
1741
|
+
private static g_mousey3;
|
|
1742
|
+
private static g_vertical3;
|
|
1743
|
+
private static g_horizontal3;
|
|
1744
|
+
private static g_mousex4;
|
|
1745
|
+
private static g_mousey4;
|
|
1746
|
+
private static g_vertical4;
|
|
1747
|
+
private static g_horizontal4;
|
|
1748
|
+
private static dragDirection;
|
|
1749
|
+
private static pinchZoomState;
|
|
1750
|
+
private static pinchZoomEvents;
|
|
1751
|
+
private static pinchZoomDistance;
|
|
1752
|
+
private static mouseDownTarget;
|
|
1753
|
+
private static mouseDragTarget;
|
|
1754
|
+
private static leftButtonDown;
|
|
1755
|
+
private static middleButtonDown;
|
|
1756
|
+
private static rightButtonDown;
|
|
1757
|
+
private static mouseButtonsDown;
|
|
1758
|
+
private static mouseButtonPress;
|
|
1759
|
+
private static mouseButtonDown;
|
|
1760
|
+
private static mouseButtonUp;
|
|
1761
|
+
private static keyButtonPress;
|
|
1762
|
+
private static keyButtonDown;
|
|
1763
|
+
private static keyButtonUp;
|
|
1764
|
+
private static previousPosition;
|
|
1765
|
+
private static preventDefault;
|
|
1766
|
+
private static lastClientX;
|
|
1767
|
+
private static lastClientY;
|
|
1768
|
+
private static virtualClientX;
|
|
1769
|
+
private static virtualClientY;
|
|
1770
|
+
private static rightHanded;
|
|
1771
|
+
private static gamepad1;
|
|
1772
|
+
private static gamepad1Type;
|
|
1773
|
+
private static gamepad1ButtonPress;
|
|
1774
|
+
private static gamepad1ButtonDown;
|
|
1775
|
+
private static gamepad1ButtonUp;
|
|
1776
|
+
private static gamepad1DpadPress;
|
|
1777
|
+
private static gamepad1DpadDown;
|
|
1778
|
+
private static gamepad1DpadUp;
|
|
1779
|
+
private static gamepad1LeftTrigger;
|
|
1780
|
+
private static gamepad1RightTrigger;
|
|
1781
|
+
private static gamepad2;
|
|
1782
|
+
private static gamepad2Type;
|
|
1783
|
+
private static gamepad2ButtonPress;
|
|
1784
|
+
private static gamepad2ButtonDown;
|
|
1785
|
+
private static gamepad2ButtonUp;
|
|
1786
|
+
private static gamepad2DpadPress;
|
|
1787
|
+
private static gamepad2DpadDown;
|
|
1788
|
+
private static gamepad2DpadUp;
|
|
1789
|
+
private static gamepad2LeftTrigger;
|
|
1790
|
+
private static gamepad2RightTrigger;
|
|
1791
|
+
private static gamepad3;
|
|
1792
|
+
private static gamepad3Type;
|
|
1793
|
+
private static gamepad3ButtonPress;
|
|
1794
|
+
private static gamepad3ButtonDown;
|
|
1795
|
+
private static gamepad3ButtonUp;
|
|
1796
|
+
private static gamepad3DpadPress;
|
|
1797
|
+
private static gamepad3DpadDown;
|
|
1798
|
+
private static gamepad3DpadUp;
|
|
1799
|
+
private static gamepad3LeftTrigger;
|
|
1800
|
+
private static gamepad3RightTrigger;
|
|
1801
|
+
private static gamepad4;
|
|
1802
|
+
private static gamepad4Type;
|
|
1803
|
+
private static gamepad4ButtonPress;
|
|
1804
|
+
private static gamepad4ButtonDown;
|
|
1805
|
+
private static gamepad4ButtonUp;
|
|
1806
|
+
private static gamepad4DpadPress;
|
|
1807
|
+
private static gamepad4DpadDown;
|
|
1808
|
+
private static gamepad4DpadUp;
|
|
1809
|
+
private static gamepad4LeftTrigger;
|
|
1810
|
+
private static gamepad4RightTrigger;
|
|
1811
|
+
private static tickKeyboardInput;
|
|
1812
|
+
private static updateUserInput;
|
|
1813
|
+
private static resetUserInput;
|
|
1814
|
+
private static resetKeyMapHandler;
|
|
1815
|
+
private static getPinchZoomDistance;
|
|
1816
|
+
private static cachePinchZoomPointer;
|
|
1817
|
+
private static removePinchZoomPointer;
|
|
1818
|
+
private static processPinchZoomTracking;
|
|
1819
|
+
private static inputKeyDownHandler;
|
|
1820
|
+
private static inputKeyUpHandler;
|
|
1821
|
+
private static inputPointerWheelHandler;
|
|
1822
|
+
private static inputPointerDownHandler;
|
|
1823
|
+
private static inputPointerUpHandler;
|
|
1824
|
+
private static inputPointerMoveHandler;
|
|
1825
|
+
private static inputOneButtonDownHandler;
|
|
1826
|
+
private static inputOneButtonUpHandler;
|
|
1827
|
+
private static inputOneXboxDPadDownHandler;
|
|
1828
|
+
private static inputOneShockDPadDownHandler;
|
|
1829
|
+
private static inputOneXboxDPadUpHandler;
|
|
1830
|
+
private static inputOneShockDPadUpHandler;
|
|
1831
|
+
private static inputOneXboxLeftTriggerHandler;
|
|
1832
|
+
private static inputOneXboxRightTriggerHandler;
|
|
1833
|
+
private static inputOneLeftStickHandler;
|
|
1834
|
+
private static inputOneRightStickHandler;
|
|
1835
|
+
private static inputTwoButtonDownHandler;
|
|
1836
|
+
private static inputTwoButtonUpHandler;
|
|
1837
|
+
private static inputTwoXboxDPadDownHandler;
|
|
1838
|
+
private static inputTwoShockDPadDownHandler;
|
|
1839
|
+
private static inputTwoXboxDPadUpHandler;
|
|
1840
|
+
private static inputTwoShockDPadUpHandler;
|
|
1841
|
+
private static inputTwoXboxLeftTriggerHandler;
|
|
1842
|
+
private static inputTwoXboxRightTriggerHandler;
|
|
1843
|
+
private static inputTwoLeftStickHandler;
|
|
1844
|
+
private static inputTwoRightStickHandler;
|
|
1845
|
+
private static inputThreeButtonDownHandler;
|
|
1846
|
+
private static inputThreeButtonUpHandler;
|
|
1847
|
+
private static inputThreeXboxDPadDownHandler;
|
|
1848
|
+
private static inputThreeShockDPadDownHandler;
|
|
1849
|
+
private static inputThreeXboxDPadUpHandler;
|
|
1850
|
+
private static inputThreeShockDPadUpHandler;
|
|
1851
|
+
private static inputThreeXboxLeftTriggerHandler;
|
|
1852
|
+
private static inputThreeXboxRightTriggerHandler;
|
|
1853
|
+
private static inputThreeLeftStickHandler;
|
|
1854
|
+
private static inputThreeRightStickHandler;
|
|
1855
|
+
private static inputFourButtonDownHandler;
|
|
1856
|
+
private static inputFourButtonUpHandler;
|
|
1857
|
+
private static inputFourXboxDPadDownHandler;
|
|
1858
|
+
private static inputFourShockDPadDownHandler;
|
|
1859
|
+
private static inputFourXboxDPadUpHandler;
|
|
1860
|
+
private static inputFourShockDPadUpHandler;
|
|
1861
|
+
private static inputFourXboxLeftTriggerHandler;
|
|
1862
|
+
private static inputFourXboxRightTriggerHandler;
|
|
1863
|
+
private static inputFourLeftStickHandler;
|
|
1864
|
+
private static inputFourRightStickHandler;
|
|
1865
|
+
private static inputManagerGamepadConnected;
|
|
1866
|
+
private static inputManagerGamepadDisconnected;
|
|
1867
|
+
}
|
|
1868
|
+
export declare class WindowManager {
|
|
1869
|
+
static IsWindows(): boolean;
|
|
1870
|
+
static IsCordova(): boolean;
|
|
1871
|
+
static IsWebAssembly(): boolean;
|
|
1872
|
+
static IsOculusBrowser(): boolean;
|
|
1873
|
+
static IsSamsungBrowser(): boolean;
|
|
1874
|
+
static IsWindowsPhone(): boolean;
|
|
1875
|
+
static IsBlackBerry(): boolean;
|
|
1876
|
+
static IsOperaMini(): boolean;
|
|
1877
|
+
static IsAndroid(): boolean;
|
|
1878
|
+
static IsWebOS(): boolean;
|
|
1879
|
+
static IsIOS(): boolean;
|
|
1880
|
+
static IsIPHONE(): boolean;
|
|
1881
|
+
static IsIPAD(): boolean;
|
|
1882
|
+
static IsIPOD(): boolean;
|
|
1883
|
+
static IsIE11(): boolean;
|
|
1884
|
+
static IsMobile(): boolean;
|
|
1885
|
+
static IsHighEndMobile(): boolean;
|
|
1886
|
+
static IsHighEndMobileAsync(): Promise<boolean>;
|
|
1887
|
+
static IsDesktop(): boolean;
|
|
1888
|
+
static IsPlaystation(): boolean;
|
|
1889
|
+
static IsXboxConsole(): boolean;
|
|
1890
|
+
static IsXboxLive(): boolean;
|
|
1891
|
+
static IsFrameWindow(): boolean;
|
|
1892
|
+
static IsPortraitWindow(): boolean;
|
|
1893
|
+
static IsLandscapeWindow(): boolean;
|
|
1894
|
+
static IsStandaloneWindow(): boolean;
|
|
1895
|
+
static IsFullscreenWindow(): boolean;
|
|
1896
|
+
static IsProgressiveWindow(): boolean;
|
|
1897
|
+
static GetDisplayMode(): string;
|
|
1898
|
+
static GetOrientation(): string;
|
|
1899
|
+
static AlertMessage(text: string, title?: string): any;
|
|
1900
|
+
static GetQueryStringParam(name: string, url: string): string;
|
|
1901
|
+
static PostWindowMessage(msg: IWindowMessage, targetOrigin?: string, localWindow?: boolean): void;
|
|
1902
|
+
static ShowSceneLoader(): void;
|
|
1903
|
+
static HideSceneLoader(): void;
|
|
1904
|
+
static UpdateLoaderStatus(status: string, details: string, state: number): void;
|
|
1905
|
+
static UpdateLoaderDetails(details: string, state: number): void;
|
|
1906
|
+
static UpdateLoaderProgress(progress: string, state: number): void;
|
|
1907
|
+
static ShowPageErrorMessage(message: string, title?: string, timeout?: number): void;
|
|
1908
|
+
static SetTimeout(timeout: number, func: () => void): number;
|
|
1909
|
+
static ClearTimeout(handle: number): void;
|
|
1910
|
+
static SetInterval(interval: number, func: () => void): number;
|
|
1911
|
+
static ClearInterval(handle: number): void;
|
|
1912
|
+
static Atob(data: string): string;
|
|
1913
|
+
static Btoa(data: string): string;
|
|
1914
|
+
static PopupDebug(scene: Scene): void;
|
|
1915
|
+
static ToggleDebug(scene: Scene, embed?: boolean, parent?: HTMLElement): void;
|
|
1916
|
+
private static debugLayerVisible;
|
|
1917
|
+
static GetLocalStorageItem(key: string): string;
|
|
1918
|
+
static SetLocalStorageItem(key: string, value: string): void;
|
|
1919
|
+
static GetSessionStorageItem(key: string): string;
|
|
1920
|
+
static SetSessionStorageItem(key: string, value: string): void;
|
|
1921
|
+
static GetFilenameFromUrl(url: string): string;
|
|
1922
|
+
static GetUrlParameter(key: string): string;
|
|
1923
|
+
static GetVirtualRealityEnabled(): boolean;
|
|
1924
|
+
static SetVirtualRealityEnabled(enabled: boolean): void;
|
|
1925
|
+
static SetWindowsLaunchMode(mode?: number): void;
|
|
1926
|
+
static GetHardwareScalingLevel(): number;
|
|
1927
|
+
static QuitWindowsApplication(): void;
|
|
1928
|
+
static PrintToScreen(text: string, color?: string): void;
|
|
1929
|
+
private static PrintElement;
|
|
1930
|
+
}
|
|
1931
|
+
export declare class AnimationState extends ScriptComponent {
|
|
1932
|
+
static FPS: number;
|
|
1933
|
+
static EXIT: string;
|
|
1934
|
+
static TIME: number;
|
|
1935
|
+
private _looptime;
|
|
1936
|
+
private _loopblend;
|
|
1937
|
+
private _frametime;
|
|
1938
|
+
private _layercount;
|
|
1939
|
+
private _updatemode;
|
|
1940
|
+
private _hasrootmotion;
|
|
1941
|
+
private _animationplaying;
|
|
1942
|
+
private _initialtargetblending;
|
|
1943
|
+
private _hastransformhierarchy;
|
|
1944
|
+
private _leftfeetbottomheight;
|
|
1945
|
+
private _rightfeetbottomheight;
|
|
1946
|
+
private _runtimecontroller;
|
|
1947
|
+
private _executed;
|
|
1948
|
+
private _awakened;
|
|
1949
|
+
private _initialized;
|
|
1950
|
+
private _checkers;
|
|
1951
|
+
private _source;
|
|
1952
|
+
private _machine;
|
|
1953
|
+
private _animationmode;
|
|
1954
|
+
private _animationrig;
|
|
1955
|
+
private _deltaPosition;
|
|
1956
|
+
private _deltaRotation;
|
|
1957
|
+
private _angularVelocity;
|
|
1958
|
+
private _rootMotionSpeed;
|
|
1959
|
+
private _lastMotionSpeed;
|
|
1960
|
+
private _loopMotionSpeed;
|
|
1961
|
+
private _lastRotateSpeed;
|
|
1962
|
+
private _loopRotateSpeed;
|
|
1963
|
+
private _lastMotionRotation;
|
|
1964
|
+
private _lastMotionPosition;
|
|
1965
|
+
private _positionWeight;
|
|
1966
|
+
private _rootBoneWeight;
|
|
1967
|
+
private _rotationWeight;
|
|
1968
|
+
private _rootQuatWeight;
|
|
1969
|
+
private _rootBoneTransform;
|
|
1970
|
+
private _positionHolder;
|
|
1971
|
+
private _rootBoneHolder;
|
|
1972
|
+
private _rotationHolder;
|
|
1973
|
+
private _rootQuatHolder;
|
|
1974
|
+
private _rootMotionMatrix;
|
|
1975
|
+
private _rootMotionScaling;
|
|
1976
|
+
private _rootMotionRotation;
|
|
1977
|
+
private _rootMotionPosition;
|
|
1978
|
+
private _dirtyMotionMatrix;
|
|
1979
|
+
private _dirtyBlenderMatrix;
|
|
1980
|
+
private _targetPosition;
|
|
1981
|
+
private _targetRotation;
|
|
1982
|
+
private _targetScaling;
|
|
1983
|
+
private _updateMatrix;
|
|
1984
|
+
private _blenderMatrix;
|
|
1985
|
+
private _blendWeights;
|
|
1986
|
+
private _emptyScaling;
|
|
1987
|
+
private _emptyPosition;
|
|
1988
|
+
private _emptyRotation;
|
|
1989
|
+
private _ikFrameEanbled;
|
|
1990
|
+
private _data;
|
|
1991
|
+
private _anims;
|
|
1992
|
+
private _clips;
|
|
1993
|
+
private _numbers;
|
|
1994
|
+
private _booleans;
|
|
1995
|
+
private _triggers;
|
|
1996
|
+
private _parameters;
|
|
1997
|
+
private _smoothTargets;
|
|
1998
|
+
delayStart: number;
|
|
1999
|
+
speedRatio: number;
|
|
2000
|
+
delayUpdateUntilReady: boolean;
|
|
2001
|
+
enableAnimations: boolean;
|
|
2002
|
+
applyRootMotion: boolean;
|
|
2003
|
+
awakened(): boolean;
|
|
2004
|
+
initialized(): boolean;
|
|
2005
|
+
hasRootMotion(): boolean;
|
|
2006
|
+
isFirstFrame(): boolean;
|
|
2007
|
+
isLastFrame(): boolean;
|
|
2008
|
+
ikFrameEnabled(): boolean;
|
|
2009
|
+
getAnimationTime(): number;
|
|
2010
|
+
getFrameLoopTime(): boolean;
|
|
2011
|
+
getFrameLoopBlend(): boolean;
|
|
2012
|
+
getAnimationPlaying(): boolean;
|
|
2013
|
+
getRuntimeController(): string;
|
|
2014
|
+
getRootBoneTransform(): TransformNode;
|
|
2015
|
+
getDeltaRootMotionAngle(): number;
|
|
2016
|
+
getDeltaRootMotionSpeed(): number;
|
|
2017
|
+
getDeltaRootMotionPosition(): Vector3;
|
|
2018
|
+
getDeltaRootMotionRotation(): Quaternion;
|
|
2019
|
+
getFixedRootMotionPosition(): Vector3;
|
|
2020
|
+
getFixedRootMotionRotation(): Quaternion;
|
|
2021
|
+
getVertexAnimationController(): VertexAnimationController;
|
|
2022
|
+
isVertexAnimationModeEnabled(): boolean;
|
|
2023
|
+
getVertexAnimationMaterial(rendererIndex?: number, subMeshIndex?: number): VertexAnimationMaterial;
|
|
2024
|
+
onAnimationAwakeObservable: Observable<TransformNode>;
|
|
2025
|
+
onAnimationInitObservable: Observable<TransformNode>;
|
|
2026
|
+
onAnimationIKObservable: Observable<number>;
|
|
2027
|
+
onAnimationEndObservable: Observable<number>;
|
|
2028
|
+
onAnimationLoopObservable: Observable<number>;
|
|
2029
|
+
onAnimationEventObservable: Observable<IAnimatorEvent>;
|
|
2030
|
+
onAnimationUpdateObservable: Observable<TransformNode>;
|
|
2031
|
+
onAnimationTransitionObservable: Observable<TransformNode>;
|
|
2032
|
+
protected m_zeroVector: Vector3;
|
|
2033
|
+
protected m_defaultGroup: AnimationGroup;
|
|
2034
|
+
protected m_animationTargets: TargetedAnimation[];
|
|
2035
|
+
protected m_rotationIdentity: Quaternion;
|
|
2036
|
+
protected m_timelineScrubbing: boolean;
|
|
2037
|
+
protected m_vertexAnimationMode: boolean;
|
|
2038
|
+
protected m_vertexAnimationRenderers: Mesh[];
|
|
2039
|
+
protected m_vertexAnimationController: VertexAnimationController;
|
|
2040
|
+
protected m_vertexAnimationDefaultClip: string;
|
|
2041
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
2042
|
+
protected awake(): void;
|
|
2043
|
+
protected update(): void;
|
|
2044
|
+
protected destroy(): void;
|
|
2045
|
+
playDefault(transitionDuration?: number, animationLayer?: number, frameRate?: number): boolean;
|
|
2046
|
+
playAnimation(state: string, transitionDuration?: number, animationLayer?: number, frameRate?: number): boolean;
|
|
2047
|
+
stopAnimation(animationLayer?: number): boolean;
|
|
2048
|
+
killAnimations(): boolean;
|
|
2049
|
+
setTimelineScrubbing(isScrubbing: boolean): void;
|
|
2050
|
+
getIsTimelineScrubbing(): boolean;
|
|
2051
|
+
setAnimationTime(seconds: number): boolean;
|
|
2052
|
+
setAnimationSpeed(speed: number): boolean;
|
|
2053
|
+
setAnimationLoop(loop: boolean): boolean;
|
|
2054
|
+
hasBool(name: string): boolean;
|
|
2055
|
+
getBool(name: string): boolean;
|
|
2056
|
+
setBool(name: string, value: boolean): void;
|
|
2057
|
+
hasFloat(name: string): boolean;
|
|
2058
|
+
getFloat(name: string): number;
|
|
2059
|
+
setFloat(name: string, value: number): void;
|
|
2060
|
+
hasInteger(name: string): boolean;
|
|
2061
|
+
getInteger(name: string): number;
|
|
2062
|
+
setInteger(name: string, value: number): void;
|
|
2063
|
+
hasTrigger(name: string): boolean;
|
|
2064
|
+
getTrigger(name: string): boolean;
|
|
2065
|
+
setTrigger(name: string): void;
|
|
2066
|
+
resetTrigger(name: string): void;
|
|
2067
|
+
setSmoothFloat(name: string, targetValue: number, dampTime?: number, _deltaTime?: number): void;
|
|
2068
|
+
setSmoothInteger(name: string, targetValue: number, dampTime?: number, _deltaTime?: number): void;
|
|
2069
|
+
private updateSmoothParameters;
|
|
2070
|
+
private getMachineState;
|
|
2071
|
+
private setMachineState;
|
|
2072
|
+
getCurrentState(layer: number): MachineState;
|
|
2073
|
+
getDefaultClips(): any[];
|
|
2074
|
+
getDefaultSource(): string;
|
|
2075
|
+
setLayerWeight(layer: number, weight: number): void;
|
|
2076
|
+
private sourceAnimationGroups;
|
|
2077
|
+
fixAnimationGroup(group: AnimationGroup): string;
|
|
2078
|
+
getAnimationGroup(name: string): AnimationGroup;
|
|
2079
|
+
getAnimationGroups(): AnimationGroup[];
|
|
2080
|
+
setAnimationGroups(groups: AnimationGroup[]): void;
|
|
2081
|
+
private updateAnimationGroups;
|
|
2082
|
+
private setupSourceAnimationGroups;
|
|
2083
|
+
private awakeStateMachine;
|
|
2084
|
+
private updateStateMachine;
|
|
2085
|
+
private destroyStateMachine;
|
|
2086
|
+
private updateAnimationState;
|
|
2087
|
+
private updateVertexAnimationLayer;
|
|
2088
|
+
private updateAnimationTargets;
|
|
2089
|
+
private updateBlendableTargets;
|
|
2090
|
+
private finalizeAnimationTargets;
|
|
2091
|
+
private checkStateMachine;
|
|
2092
|
+
private checkStateTransitions;
|
|
2093
|
+
private playCurrentAnimationState;
|
|
2094
|
+
private stopCurrentAnimationState;
|
|
2095
|
+
private checkAvatarTransformPath;
|
|
2096
|
+
private filterTargetAvatarMask;
|
|
2097
|
+
private sortWeightedBlendingList;
|
|
2098
|
+
private computeWeightedFrameRatio;
|
|
2099
|
+
private getFirstMotion;
|
|
2100
|
+
private getLastMotion;
|
|
2101
|
+
private setupTreeBranches;
|
|
2102
|
+
private parseTreeBranches;
|
|
2103
|
+
private parse1DSimpleTreeBranches;
|
|
2104
|
+
private parse2DSimpleDirectionalTreeBranches;
|
|
2105
|
+
private parse2DFreeformDirectionalTreeBranches;
|
|
2106
|
+
private parse2DFreeformCartesianTreeBranches;
|
|
2107
|
+
}
|
|
2108
|
+
export declare class BlendTreeValue {
|
|
2109
|
+
source: IBlendTreeChild;
|
|
2110
|
+
motion: string;
|
|
2111
|
+
posX: number;
|
|
2112
|
+
posY: number;
|
|
2113
|
+
weight: number;
|
|
2114
|
+
constructor(config: {
|
|
2115
|
+
source: IBlendTreeChild;
|
|
2116
|
+
motion: string;
|
|
2117
|
+
posX?: number;
|
|
2118
|
+
posY?: number;
|
|
2119
|
+
weight?: number;
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
export declare class BlendTreeUtils {
|
|
2123
|
+
static ClampValue(num: number, min: number, max: number): number;
|
|
2124
|
+
static GetSignedAngle(a: Vector2, b: Vector2): number;
|
|
2125
|
+
static GetLinearInterpolation(x0: number, y0: number, x1: number, y1: number, x: number): number;
|
|
2126
|
+
static GetRightNeighbourIndex(inputX: number, blendTreeArray: BlendTreeValue[]): number;
|
|
2127
|
+
}
|
|
2128
|
+
export declare class BlendTreeSystem {
|
|
2129
|
+
static Calculate1DSimpleBlendTree(inputX: number, blendTreeArray: BlendTreeValue[]): void;
|
|
2130
|
+
static Calculate2DFreeformDirectional(inputX: number, inputY: number, blendTreeArray: BlendTreeValue[]): void;
|
|
2131
|
+
static Calculate2DFreeformCartesian(inputX: number, inputY: number, blendTreeArray: BlendTreeValue[]): void;
|
|
2132
|
+
private static TempVector2_IP;
|
|
2133
|
+
private static TempVector2_POSI;
|
|
2134
|
+
private static TempVector2_POSJ;
|
|
2135
|
+
private static TempVector2_POSIP;
|
|
2136
|
+
private static TempVector2_POSIJ;
|
|
2137
|
+
}
|
|
2138
|
+
export declare class MachineState {
|
|
2139
|
+
hash: number;
|
|
2140
|
+
name: string;
|
|
2141
|
+
tag: string;
|
|
2142
|
+
time: number;
|
|
2143
|
+
type: MotionType;
|
|
2144
|
+
rate: number;
|
|
2145
|
+
length: number;
|
|
2146
|
+
layer: string;
|
|
2147
|
+
layerIndex: number;
|
|
2148
|
+
played: number;
|
|
2149
|
+
machine: string;
|
|
2150
|
+
motionid: number;
|
|
2151
|
+
interrupted: boolean;
|
|
2152
|
+
apparentSpeed: number;
|
|
2153
|
+
averageAngularSpeed: number;
|
|
2154
|
+
averageDuration: number;
|
|
2155
|
+
averageSpeed: number[];
|
|
2156
|
+
cycleOffset: number;
|
|
2157
|
+
cycleOffsetParameter: string;
|
|
2158
|
+
cycleOffsetParameterActive: boolean;
|
|
2159
|
+
iKOnFeet: boolean;
|
|
2160
|
+
mirror: boolean;
|
|
2161
|
+
mirrorParameter: string;
|
|
2162
|
+
mirrorParameterActive: boolean;
|
|
2163
|
+
speed: number;
|
|
2164
|
+
speedParameter: string;
|
|
2165
|
+
speedParameterActive: boolean;
|
|
2166
|
+
blendtree: IBlendTree;
|
|
2167
|
+
transitions: ITransition[];
|
|
2168
|
+
behaviours: IBehaviour[];
|
|
2169
|
+
events: IAnimatorEvent[];
|
|
2170
|
+
ccurves: IUnityCurve[];
|
|
2171
|
+
tcurves: Animation[];
|
|
2172
|
+
constructor();
|
|
2173
|
+
}
|
|
2174
|
+
export declare class TransitionCheck {
|
|
2175
|
+
result: string;
|
|
2176
|
+
offest: number;
|
|
2177
|
+
blending: number;
|
|
2178
|
+
duration: number;
|
|
2179
|
+
triggered: string[];
|
|
2180
|
+
}
|
|
2181
|
+
export declare class AnimationMixer {
|
|
2182
|
+
influenceBuffer: number;
|
|
2183
|
+
positionBuffer: Vector3;
|
|
2184
|
+
rotationBuffer: Quaternion;
|
|
2185
|
+
scalingBuffer: Vector3;
|
|
2186
|
+
originalMatrix: Matrix;
|
|
2187
|
+
blendingFactor: number;
|
|
2188
|
+
blendingSpeed: number;
|
|
2189
|
+
rootPosition: Vector3;
|
|
2190
|
+
rootRotation: Quaternion;
|
|
2191
|
+
}
|
|
2192
|
+
export declare class BlendingWeights {
|
|
2193
|
+
primary: IBlendTreeChild;
|
|
2194
|
+
secondary: IBlendTreeChild;
|
|
2195
|
+
}
|
|
2196
|
+
export declare enum MotionType {
|
|
2197
|
+
Clip = 0,
|
|
2198
|
+
Tree = 1
|
|
2199
|
+
}
|
|
2200
|
+
export declare enum ConditionMode {
|
|
2201
|
+
If = 1,
|
|
2202
|
+
IfNot = 2,
|
|
2203
|
+
Greater = 3,
|
|
2204
|
+
Less = 4,
|
|
2205
|
+
Equals = 6,
|
|
2206
|
+
NotEqual = 7
|
|
2207
|
+
}
|
|
2208
|
+
export declare enum InterruptionSource {
|
|
2209
|
+
None = 0,
|
|
2210
|
+
Source = 1,
|
|
2211
|
+
Destination = 2,
|
|
2212
|
+
SourceThenDestination = 3,
|
|
2213
|
+
DestinationThenSource = 4
|
|
2214
|
+
}
|
|
2215
|
+
export declare enum BlendTreeType {
|
|
2216
|
+
Simple1D = 0,
|
|
2217
|
+
SimpleDirectional2D = 1,
|
|
2218
|
+
FreeformDirectional2D = 2,
|
|
2219
|
+
FreeformCartesian2D = 3,
|
|
2220
|
+
Direct = 4,
|
|
2221
|
+
Clip = 5
|
|
2222
|
+
}
|
|
2223
|
+
export declare enum AnimatorParameterType {
|
|
2224
|
+
Float = 1,
|
|
2225
|
+
Int = 3,
|
|
2226
|
+
Bool = 4,
|
|
2227
|
+
Trigger = 9
|
|
2228
|
+
}
|
|
2229
|
+
export interface IAnimatorEvent {
|
|
2230
|
+
id: number;
|
|
2231
|
+
clip: string;
|
|
2232
|
+
time: number;
|
|
2233
|
+
function: string;
|
|
2234
|
+
intParameter: number;
|
|
2235
|
+
floatParameter: number;
|
|
2236
|
+
stringParameter: string;
|
|
2237
|
+
objectIdParameter: string;
|
|
2238
|
+
objectNameParameter: string;
|
|
2239
|
+
}
|
|
2240
|
+
export interface IAvatarMask {
|
|
2241
|
+
hash: number;
|
|
2242
|
+
maskName: string;
|
|
2243
|
+
maskType: string;
|
|
2244
|
+
transformCount: number;
|
|
2245
|
+
transformPaths: string[];
|
|
2246
|
+
}
|
|
2247
|
+
export interface IAnimationLayer {
|
|
2248
|
+
owner: string;
|
|
2249
|
+
hash: number;
|
|
2250
|
+
name: string;
|
|
2251
|
+
index: number;
|
|
2252
|
+
entry: string;
|
|
2253
|
+
machine: string;
|
|
2254
|
+
iKPass: boolean;
|
|
2255
|
+
avatarMask: IAvatarMask;
|
|
2256
|
+
blendingMode: number;
|
|
2257
|
+
defaultWeight: number;
|
|
2258
|
+
syncedLayerIndex: number;
|
|
2259
|
+
syncedLayerAffectsTiming: boolean;
|
|
2260
|
+
animationTime: number;
|
|
2261
|
+
animationNormal: number;
|
|
2262
|
+
animationMaskMap: Map<string, number>;
|
|
2263
|
+
animationFirstRun: boolean;
|
|
2264
|
+
animationEndFrame: boolean;
|
|
2265
|
+
animationLoopFrame: boolean;
|
|
2266
|
+
animationLoopCount: number;
|
|
2267
|
+
animationLoopEvents: any;
|
|
2268
|
+
animationStateMachine: MachineState;
|
|
2269
|
+
vatTransitionActive?: boolean;
|
|
2270
|
+
vatTransitionElapsed?: number;
|
|
2271
|
+
vatTransitionDuration?: number;
|
|
2272
|
+
vatSourceClipName?: string;
|
|
2273
|
+
vatSourceTimeSec?: number;
|
|
2274
|
+
}
|
|
2275
|
+
export interface IBehaviour {
|
|
2276
|
+
hash: number;
|
|
2277
|
+
name: string;
|
|
2278
|
+
layerIndex: number;
|
|
2279
|
+
properties: any;
|
|
2280
|
+
}
|
|
2281
|
+
export interface ITransition {
|
|
2282
|
+
hash: number;
|
|
2283
|
+
anyState: boolean;
|
|
2284
|
+
layerIndex: number;
|
|
2285
|
+
machineLayer: string;
|
|
2286
|
+
machineName: string;
|
|
2287
|
+
canTransitionToSelf: boolean;
|
|
2288
|
+
destination: string;
|
|
2289
|
+
duration: number;
|
|
2290
|
+
exitTime: number;
|
|
2291
|
+
hasExitTime: boolean;
|
|
2292
|
+
fixedDuration: boolean;
|
|
2293
|
+
intSource: InterruptionSource;
|
|
2294
|
+
isExit: boolean;
|
|
2295
|
+
mute: boolean;
|
|
2296
|
+
name: string;
|
|
2297
|
+
offset: number;
|
|
2298
|
+
orderedInt: boolean;
|
|
2299
|
+
solo: boolean;
|
|
2300
|
+
conditions: ICondition[];
|
|
2301
|
+
}
|
|
2302
|
+
export interface ICondition {
|
|
2303
|
+
hash: number;
|
|
2304
|
+
mode: ConditionMode;
|
|
2305
|
+
parameter: string;
|
|
2306
|
+
threshold: number;
|
|
2307
|
+
}
|
|
2308
|
+
export interface IBlendTree {
|
|
2309
|
+
hash: number;
|
|
2310
|
+
name: string;
|
|
2311
|
+
state: string;
|
|
2312
|
+
children: IBlendTreeChild[];
|
|
2313
|
+
layerIndex: number;
|
|
2314
|
+
apparentSpeed: number;
|
|
2315
|
+
averageAngularSpeed: number;
|
|
2316
|
+
averageDuration: number;
|
|
2317
|
+
averageSpeed: number[];
|
|
2318
|
+
blendParameterX: string;
|
|
2319
|
+
blendParameterY: string;
|
|
2320
|
+
blendType: BlendTreeType;
|
|
2321
|
+
isAnimatorMotion: boolean;
|
|
2322
|
+
isHumanMotion: boolean;
|
|
2323
|
+
isLooping: boolean;
|
|
2324
|
+
minThreshold: number;
|
|
2325
|
+
maxThreshold: number;
|
|
2326
|
+
useAutomaticThresholds: boolean;
|
|
2327
|
+
valueParameterX: number;
|
|
2328
|
+
valueParameterY: number;
|
|
2329
|
+
}
|
|
2330
|
+
export interface IBlendTreeChild {
|
|
2331
|
+
hash: number;
|
|
2332
|
+
layerIndex: number;
|
|
2333
|
+
cycleOffset: number;
|
|
2334
|
+
directBlendParameter: string;
|
|
2335
|
+
apparentSpeed: number;
|
|
2336
|
+
averageAngularSpeed: number;
|
|
2337
|
+
averageDuration: number;
|
|
2338
|
+
averageSpeed: number[];
|
|
2339
|
+
mirror: boolean;
|
|
2340
|
+
type: MotionType;
|
|
2341
|
+
motion: string;
|
|
2342
|
+
positionX: number;
|
|
2343
|
+
positionY: number;
|
|
2344
|
+
threshold: number;
|
|
2345
|
+
timescale: number;
|
|
2346
|
+
subtree: IBlendTree;
|
|
2347
|
+
weight: number;
|
|
2348
|
+
ratio: number;
|
|
2349
|
+
track: AnimationGroup;
|
|
2350
|
+
}
|
|
2351
|
+
export declare class AudioSource extends ScriptComponent implements IAssetPreloader {
|
|
2352
|
+
static MAX_VOLUME: number;
|
|
2353
|
+
static DEFAULT_LEVEL: number;
|
|
2354
|
+
static DEFAULT_ROLLOFF: number;
|
|
2355
|
+
private static AUDIO_ENGINE_V2;
|
|
2356
|
+
private static AUDIO_ENGINE_V2_OPTIONS;
|
|
2357
|
+
private _audio;
|
|
2358
|
+
private _name;
|
|
2359
|
+
private _loop;
|
|
2360
|
+
private _mute;
|
|
2361
|
+
private _pitch;
|
|
2362
|
+
private _volume;
|
|
2363
|
+
private _preload;
|
|
2364
|
+
private _playonawake;
|
|
2365
|
+
private _spatialblend;
|
|
2366
|
+
private _preloaderUrl;
|
|
2367
|
+
private _lastmutedvolume;
|
|
2368
|
+
private _priority;
|
|
2369
|
+
private _panstereo;
|
|
2370
|
+
private _mindistance;
|
|
2371
|
+
private _maxdistance;
|
|
2372
|
+
private _reverbzonemix;
|
|
2373
|
+
private _bypasseffects;
|
|
2374
|
+
private _bypassreverbzones;
|
|
2375
|
+
private _bypasslistenereffects;
|
|
2376
|
+
private _initializedReadyInstance;
|
|
2377
|
+
private _isAudioPlaying;
|
|
2378
|
+
private _isAudioPaused;
|
|
2379
|
+
private _isAudioSpatial;
|
|
2380
|
+
getSoundClip(): StaticSound | Sound;
|
|
2381
|
+
onReadyObservable: Observable<StaticSound | Sound>;
|
|
2382
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
2383
|
+
protected awake(): void;
|
|
2384
|
+
protected start(): void;
|
|
2385
|
+
protected after(): void;
|
|
2386
|
+
protected destroy(): void;
|
|
2387
|
+
protected awakeAudioSource(): Promise<void>;
|
|
2388
|
+
protected startAudioSource(): void;
|
|
2389
|
+
protected updateAudioSource(): Promise<void>;
|
|
2390
|
+
protected destroyAudioSource(): void;
|
|
2391
|
+
isLegacy(): boolean;
|
|
2392
|
+
isReady(): boolean;
|
|
2393
|
+
isPlaying(): boolean;
|
|
2394
|
+
isPaused(): boolean;
|
|
2395
|
+
play(time?: number, offset?: number, length?: number): Promise<boolean>;
|
|
2396
|
+
private internalPlay;
|
|
2397
|
+
pause(): boolean;
|
|
2398
|
+
stop(time?: number): boolean;
|
|
2399
|
+
mute(time?: number): boolean;
|
|
2400
|
+
unmute(time?: number): boolean;
|
|
2401
|
+
getPitch(): number;
|
|
2402
|
+
setPitch(value: number): void;
|
|
2403
|
+
getVolume(): number;
|
|
2404
|
+
setVolume(volume: number, time?: number): boolean;
|
|
2405
|
+
setPosition(location: Vector3): void;
|
|
2406
|
+
getPlaybackSpeed(): number;
|
|
2407
|
+
setPlaybackSpeed(rate: number): void;
|
|
2408
|
+
setRolloffMode(mode: string): void;
|
|
2409
|
+
setMinDistance(distance: number): void;
|
|
2410
|
+
setMaxDistance(distance: number): void;
|
|
2411
|
+
setSpatialBlend(blend: number): void;
|
|
2412
|
+
hasSpatialSound(): boolean;
|
|
2413
|
+
getSpatialSound(): AbstractSpatialAudio;
|
|
2414
|
+
attachToSpatialNode(transform: TransformNode): void;
|
|
2415
|
+
getCurrentTrackTime(): number;
|
|
2416
|
+
setAudioDataSource(source: string | ArrayBuffer): Promise<void>;
|
|
2417
|
+
setLegacyDataSource(source: string | ArrayBuffer | MediaStream): void;
|
|
2418
|
+
addPreloaderTasks(assetsManager: PreloadAssetsManager): void;
|
|
2419
|
+
static IsLegacyEngine(): boolean;
|
|
2420
|
+
static GetAudioOptions(): IWebAudioEngineOptions;
|
|
2421
|
+
static SetAudioOptions(options: IWebAudioEngineOptions): void;
|
|
2422
|
+
static GetAudioEngine(): Promise<AudioEngineV2>;
|
|
2423
|
+
static UnlockLegacyAudio(): void;
|
|
2424
|
+
static UnlockAudioEngine(): Promise<void>;
|
|
2425
|
+
static AttachSpatialCamera(node: BabylonNode): Promise<void>;
|
|
2426
|
+
static DetachSpatialCamera(): Promise<void>;
|
|
2427
|
+
static CreateSoundBuffer(source: ArrayBuffer | AudioBuffer | StaticSoundBuffer | string | string[], options?: Partial<IStaticSoundBufferOptions>): Promise<StaticSoundBuffer>;
|
|
2428
|
+
static CreateStaticSound(name: string, source: ArrayBuffer | AudioBuffer | StaticSoundBuffer | string | string[], options: Partial<IStaticSoundOptions>): Promise<StaticSound>;
|
|
2429
|
+
static CreateStreamingSound(name: string, source: HTMLMediaElement | string | string[], options?: Partial<IStreamingSoundOptions>): Promise<StreamingSound>;
|
|
2430
|
+
}
|
|
2431
|
+
export declare class CharacterController extends ScriptComponent {
|
|
2432
|
+
static TERMINAL_VELOCITY: number;
|
|
2433
|
+
static DEFAULT_CHARACTER_MASS: number;
|
|
2434
|
+
private _avatarRadius;
|
|
2435
|
+
private _avatarHeight;
|
|
2436
|
+
private _centerOffset;
|
|
2437
|
+
private _slopeLimit;
|
|
2438
|
+
private _skinWidth;
|
|
2439
|
+
private _stepHeight;
|
|
2440
|
+
private _minMoveDistance;
|
|
2441
|
+
private _verticalVelocity;
|
|
2442
|
+
private _currentSlopeAngle;
|
|
2443
|
+
private _collisionEvents;
|
|
2444
|
+
private _targetRotation;
|
|
2445
|
+
private _targetVelocity;
|
|
2446
|
+
private _currentVelocity;
|
|
2447
|
+
private _inputVelocity;
|
|
2448
|
+
private _stepUpVelocity;
|
|
2449
|
+
private _gravityFactor;
|
|
2450
|
+
private _minJumpTimer;
|
|
2451
|
+
private _isGrounded;
|
|
2452
|
+
private _groundContacts;
|
|
2453
|
+
private _groundContactInfo;
|
|
2454
|
+
private _groundedEnterTimer;
|
|
2455
|
+
private _groundedExitTimer;
|
|
2456
|
+
private _raycastResult;
|
|
2457
|
+
private _rayOrigin;
|
|
2458
|
+
private _rayTarget;
|
|
2459
|
+
private _previousGroundHeight;
|
|
2460
|
+
private _stepDetectionDistance;
|
|
2461
|
+
protected m_moveDeltaX: number;
|
|
2462
|
+
protected m_moveDeltaY: number;
|
|
2463
|
+
protected m_moveDeltaZ: number;
|
|
2464
|
+
protected m_havokplugin: any;
|
|
2465
|
+
getAvatarRadius(): number;
|
|
2466
|
+
getAvatarHeight(): number;
|
|
2467
|
+
getCenterOffset(): Vector3;
|
|
2468
|
+
getSkinWidth(): number;
|
|
2469
|
+
getStepHeight(): number;
|
|
2470
|
+
getGravityFactor(): number;
|
|
2471
|
+
setGravityFactor(factor: number): void;
|
|
2472
|
+
getInputVelocity(): Vector3;
|
|
2473
|
+
setInputVelocity(velocity: Vector3): void;
|
|
2474
|
+
getStepUpVelocity(): number;
|
|
2475
|
+
getCurrentSlopeAngle(): number;
|
|
2476
|
+
getVerticalVelocity(): number;
|
|
2477
|
+
getMinMoveDistance(): number;
|
|
2478
|
+
setMinMoveDistance(distance: number): void;
|
|
2479
|
+
getGroundContactInfo(): IGroundContactInfo | null;
|
|
2480
|
+
getMinJumpTimer(): number;
|
|
2481
|
+
getSlopeLimit(): number;
|
|
2482
|
+
setSlopeLimit(slopeRadians: number): void;
|
|
2483
|
+
isGrounded(): boolean;
|
|
2484
|
+
canJump(): boolean;
|
|
2485
|
+
onUpdatePositionObservable: Observable<TransformNode>;
|
|
2486
|
+
onUpdateVelocityObservable: Observable<TransformNode>;
|
|
2487
|
+
enableUpdate: boolean;
|
|
2488
|
+
enableGravity: boolean;
|
|
2489
|
+
enableStepOffset: boolean;
|
|
2490
|
+
useMultiRaycast: boolean;
|
|
2491
|
+
multiRaycastCount: number;
|
|
2492
|
+
groundCheckDistance: number;
|
|
2493
|
+
stepUpVelocityFactor: number;
|
|
2494
|
+
defaultJumpingTimer: number;
|
|
2495
|
+
onlyApplyGravityWhenNotGrounded: boolean;
|
|
2496
|
+
downwardVelocityClamp: number;
|
|
2497
|
+
contactHysteresisTime: number;
|
|
2498
|
+
groundedEnterTime: number;
|
|
2499
|
+
groundedExitTime: number;
|
|
2500
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
2501
|
+
protected awake(): void;
|
|
2502
|
+
protected update(): void;
|
|
2503
|
+
protected fixed(): void;
|
|
2504
|
+
set(px: number, py: number, pz: number, rx?: number, ry?: number, rz?: number, rw?: number): void;
|
|
2505
|
+
move(velocity: Vector3, aux?: boolean): void;
|
|
2506
|
+
jump(speed: number): void;
|
|
2507
|
+
turn(angle: number): void;
|
|
2508
|
+
rotate(x: number, y: number, z: number, w: number): void;
|
|
2509
|
+
setRigidBodyMass(mass: number): void;
|
|
2510
|
+
setCollisionState(collision: boolean): void;
|
|
2511
|
+
setCollisionFilters(membershipMask: number, collideMask: number): void;
|
|
2512
|
+
private registerGroundContact;
|
|
2513
|
+
private updateGroundContactAges;
|
|
2514
|
+
private isContactAtFeet;
|
|
2515
|
+
private isValidGroundNormal;
|
|
2516
|
+
private performSingleRayGroundCheck;
|
|
2517
|
+
private performMultiRayGroundCheck;
|
|
2518
|
+
private performGroundRaycast;
|
|
2519
|
+
private detectAndHandleStepOffset;
|
|
2520
|
+
private updateGroundedState;
|
|
2521
|
+
private createPhysicsBodyAndShape;
|
|
2522
|
+
private createPhysicsShapeCapsule;
|
|
2523
|
+
}
|
|
2524
|
+
export interface IGroundContactInfo {
|
|
2525
|
+
hasGround: boolean;
|
|
2526
|
+
groundNormal: Vector3;
|
|
2527
|
+
groundHeight: number;
|
|
2528
|
+
groundBody: PhysicsBody | null;
|
|
2529
|
+
}
|
|
2530
|
+
export declare class SimpleCharacterController extends ScriptComponent {
|
|
2531
|
+
private _eulerAngles;
|
|
2532
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
2533
|
+
protected start(): void;
|
|
2534
|
+
set(px: number, py: number, pz: number, rx?: number, ry?: number, rz?: number, rw?: number, aux?: boolean): void;
|
|
2535
|
+
move(velocity: Vector3, aux?: boolean): void;
|
|
2536
|
+
jump(speed: number): void;
|
|
2537
|
+
turn(angle: number): void;
|
|
2538
|
+
rotate(x: number, y: number, z: number, w: number): void;
|
|
2539
|
+
}
|
|
2540
|
+
export declare class RecastCharacterController extends ScriptComponent {
|
|
2541
|
+
private _eulerAngles;
|
|
2542
|
+
private _teleportVector;
|
|
2543
|
+
private _navigationAgent;
|
|
2544
|
+
getNavigationAgent(): NavigationAgent;
|
|
2545
|
+
setNavigationAgent(agent: NavigationAgent): void;
|
|
2546
|
+
setDestinationPoint(destination: Vector3, closetPoint?: boolean): void;
|
|
2547
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
2548
|
+
protected start(): void;
|
|
2549
|
+
set(px: number, py: number, pz: number, rx?: number, ry?: number, rz?: number, rw?: number, aux?: boolean): void;
|
|
2550
|
+
move(velocity: Vector3, aux?: boolean): void;
|
|
2551
|
+
jump(speed: number): void;
|
|
2552
|
+
turn(angle: number): void;
|
|
2553
|
+
rotate(x: number, y: number, z: number, w: number): void;
|
|
2554
|
+
}
|
|
2555
|
+
export declare class ColorFilterPlugin {
|
|
2556
|
+
static CreatePostProcess(scene: Scene, camera: Camera, options?: {
|
|
2557
|
+
color?: number[] | Color3 | Color4;
|
|
2558
|
+
}): PostProcess;
|
|
2559
|
+
}
|
|
2560
|
+
export declare class ColoredBloomPlugin {
|
|
2561
|
+
static CreateColoredBloom(scene: Scene, camera: Camera, options?: {
|
|
2562
|
+
threshold?: number;
|
|
2563
|
+
color?: number[] | Color3 | Color4;
|
|
2564
|
+
weight?: number;
|
|
2565
|
+
kernel?: number;
|
|
2566
|
+
ratio?: number;
|
|
2567
|
+
passes?: number;
|
|
2568
|
+
saturation?: number;
|
|
2569
|
+
downsampleRatio?: number;
|
|
2570
|
+
}): any;
|
|
2571
|
+
}
|
|
2572
|
+
export declare class btVehicleTuning {
|
|
2573
|
+
suspensionStiffness: number;
|
|
2574
|
+
suspensionCompression: number;
|
|
2575
|
+
suspensionDamping: number;
|
|
2576
|
+
maxSuspensionTravelCm: number;
|
|
2577
|
+
frictionSlip: number;
|
|
2578
|
+
maxSuspensionForce: number;
|
|
2579
|
+
}
|
|
2580
|
+
export declare class btVehicleRaycasterResult {
|
|
2581
|
+
hitPointInWorld: Vector3;
|
|
2582
|
+
hitNormalInWorld: Vector3;
|
|
2583
|
+
distFraction: number;
|
|
2584
|
+
hitBody: any;
|
|
2585
|
+
filterCollideMask: number;
|
|
2586
|
+
filterMembershipMask: number;
|
|
2587
|
+
}
|
|
2588
|
+
export interface IbtVehicleRaycaster {
|
|
2589
|
+
castRay(from: Vector3, to: Vector3, result: btVehicleRaycasterResult): any;
|
|
2590
|
+
}
|
|
2591
|
+
export declare class btDefaultVehicleRaycaster implements IbtVehicleRaycaster {
|
|
2592
|
+
private _raycastResult;
|
|
2593
|
+
private _query;
|
|
2594
|
+
constructor(query?: IRaycastQuery);
|
|
2595
|
+
castRay(from: Vector3, to: Vector3, result: btVehicleRaycasterResult): any;
|
|
2596
|
+
}
|
|
2597
|
+
export declare class btWheelRaycastInfo {
|
|
2598
|
+
contactNormalWS: Vector3;
|
|
2599
|
+
contactPointWS: Vector3;
|
|
2600
|
+
suspensionLength: number;
|
|
2601
|
+
hardPointWS: Vector3;
|
|
2602
|
+
wheelDirectionWS: Vector3;
|
|
2603
|
+
wheelAxleWS: Vector3;
|
|
2604
|
+
isInContact: boolean;
|
|
2605
|
+
groundObject: any;
|
|
2606
|
+
}
|
|
2607
|
+
export declare class btWheelInfo {
|
|
2608
|
+
raycastInfo: btWheelRaycastInfo;
|
|
2609
|
+
worldTransformPosition: Vector3;
|
|
2610
|
+
worldTransformRotation: Quaternion;
|
|
2611
|
+
chassisConnectionPointCS: Vector3;
|
|
2612
|
+
wheelDirectionCS: Vector3;
|
|
2613
|
+
wheelAxleCS: Vector3;
|
|
2614
|
+
suspensionRestLength: number;
|
|
2615
|
+
maxSuspensionTravelCm: number;
|
|
2616
|
+
wheelRadius: number;
|
|
2617
|
+
suspensionStiffness: number;
|
|
2618
|
+
dampingCompression: number;
|
|
2619
|
+
dampingRelaxation: number;
|
|
2620
|
+
frictionSlip: number;
|
|
2621
|
+
maxSuspensionForce: number;
|
|
2622
|
+
isFrontWheel: boolean;
|
|
2623
|
+
steering: number;
|
|
2624
|
+
rotation: number;
|
|
2625
|
+
deltaRotation: number;
|
|
2626
|
+
rollInfluence: number;
|
|
2627
|
+
engineForce: number;
|
|
2628
|
+
brake: number;
|
|
2629
|
+
clippedInvContactDotSuspension: number;
|
|
2630
|
+
suspensionRelativeVelocity: number;
|
|
2631
|
+
suspensionForce: number;
|
|
2632
|
+
skidInfo: number;
|
|
2633
|
+
clientInfo: any;
|
|
2634
|
+
steeringAngle: number;
|
|
2635
|
+
rotationBoost: number;
|
|
2636
|
+
defaultFriction: number;
|
|
2637
|
+
invertWheelDirection: boolean;
|
|
2638
|
+
maxVisualTravelRange: number;
|
|
2639
|
+
contactCollideMask: number;
|
|
2640
|
+
contactMembershipMask: number;
|
|
2641
|
+
_prevContactNormalWS: Vector3;
|
|
2642
|
+
_prevSuspensionLength: number;
|
|
2643
|
+
_prevSuspensionForce: number;
|
|
2644
|
+
_hasPrevSuspState: boolean;
|
|
2645
|
+
_rayHistoryLengths: number[];
|
|
2646
|
+
_rayHistoryNormalsX: number[];
|
|
2647
|
+
_rayHistoryNormalsY: number[];
|
|
2648
|
+
_rayHistoryNormalsZ: number[];
|
|
2649
|
+
_rayHistoryIndex: number;
|
|
2650
|
+
_rayHistoryCount: number;
|
|
2651
|
+
_smoothedSuspensionLength: number;
|
|
2652
|
+
_smoothedContactNormal: Vector3;
|
|
2653
|
+
_smoothedContactNormalValid: boolean;
|
|
2654
|
+
_contactLossFrames: number;
|
|
2655
|
+
transform: TransformNode;
|
|
2656
|
+
spinner: TransformNode;
|
|
2657
|
+
constructor(ci: {
|
|
2658
|
+
chassisConnectionCS: Vector3;
|
|
2659
|
+
wheelDirectionCS: Vector3;
|
|
2660
|
+
wheelAxleCS: Vector3;
|
|
2661
|
+
suspensionRestLength: number;
|
|
2662
|
+
maxSuspensionTravelCm: number;
|
|
2663
|
+
wheelRadius: number;
|
|
2664
|
+
suspensionStiffness: number;
|
|
2665
|
+
dampingCompression: number;
|
|
2666
|
+
dampingRelaxation: number;
|
|
2667
|
+
frictionSlip: number;
|
|
2668
|
+
maxSuspensionForce: number;
|
|
2669
|
+
isFrontWheel: boolean;
|
|
2670
|
+
});
|
|
2671
|
+
getSuspensionRestLength(): number;
|
|
2672
|
+
}
|
|
2673
|
+
export declare class btRaycastVehicle {
|
|
2674
|
+
static FILTER_GROUP_ALL_COLLIDERS: number;
|
|
2675
|
+
static FILTER_GROUP_VEHICLE_COLLIDERS: number;
|
|
2676
|
+
static FILTER_GROUP_BRIDGE_COLLIDERS: number;
|
|
2677
|
+
static FILTER_GROUP_ROAD_COLLIDERS: number;
|
|
2678
|
+
static FILTER_GROUP_GRASS_COLLIDERS: number;
|
|
2679
|
+
static FILTER_GROUP_CURB_COLLIDERS: number;
|
|
2680
|
+
static FILTER_GROUP_FENCE_COLLIDERS: number;
|
|
2681
|
+
static FILTER_GROUP_ALL_VEHICLE_COLLIDERS: number;
|
|
2682
|
+
static VEHICLE_MESH_TAG: string;
|
|
2683
|
+
static BRIDGE_MESH_TAG: string;
|
|
2684
|
+
static ROAD_MESH_TAG: string;
|
|
2685
|
+
static GRASS_MESH_TAG: string;
|
|
2686
|
+
static CURB_MESH_TAG: string;
|
|
2687
|
+
static FENCE_MESH_TAG: string;
|
|
2688
|
+
private _chassisBody;
|
|
2689
|
+
private _vehicleRaycaster;
|
|
2690
|
+
private _wheelInfo;
|
|
2691
|
+
private _indexRightAxis;
|
|
2692
|
+
private _indexUpAxis;
|
|
2693
|
+
private _indexForwardAxis;
|
|
2694
|
+
private _currentVehicleSpeedKmHour;
|
|
2695
|
+
enableMultiRaycast: boolean;
|
|
2696
|
+
minimumWheelContacts: number;
|
|
2697
|
+
trackConnectionAccel: number;
|
|
2698
|
+
smoothFlyingImpulse: number;
|
|
2699
|
+
arcadeSteeringAssist: number;
|
|
2700
|
+
smoothedGradientSpeed: number;
|
|
2701
|
+
maximumYawRateLow: number;
|
|
2702
|
+
maximumYawRateHigh: number;
|
|
2703
|
+
angularDamping: Vector3;
|
|
2704
|
+
wheelSkidFadeInSpeed: number;
|
|
2705
|
+
wheelSkidFadeOutSpeed: number;
|
|
2706
|
+
minContactDotSuspension: number;
|
|
2707
|
+
suspensionForceSmoothing: number;
|
|
2708
|
+
suspensionDampingOverdrive: number;
|
|
2709
|
+
raycastSmoothingEnabled: boolean;
|
|
2710
|
+
raycastHistoryBufferSize: number;
|
|
2711
|
+
raycastLengthCompressionAlpha: number;
|
|
2712
|
+
raycastLengthRelaxationAlpha: number;
|
|
2713
|
+
raycastNormalSmoothingAlpha: number;
|
|
2714
|
+
raycastOutlierRejectionEnabled: boolean;
|
|
2715
|
+
raycastOutlierThresholdMeters: number;
|
|
2716
|
+
raycastMaxLengthChangePerSecond: number;
|
|
2717
|
+
raycastContactLossGraceFrames: number;
|
|
2718
|
+
raycastDebugLogEnabled: boolean;
|
|
2719
|
+
raycastDebugLogIntervalFrames: number;
|
|
2720
|
+
raycastDebugLogSpikeThresholdMeters: number;
|
|
2721
|
+
raycastDebugLogWheelMask: number;
|
|
2722
|
+
private _raycastDebugFrameCounter;
|
|
2723
|
+
private _raycastMedianScratch;
|
|
2724
|
+
sideToSideStabilityEnabled: boolean;
|
|
2725
|
+
sideToSideStabilityStartKmh: number;
|
|
2726
|
+
sideToSideStabilityFullKmh: number;
|
|
2727
|
+
stabilizationDebug: boolean;
|
|
2728
|
+
stabilizationDebugInterval: number;
|
|
2729
|
+
downforceCoefficient: number;
|
|
2730
|
+
constantDownforce: number;
|
|
2731
|
+
stabilizationNormalSmoothing: number;
|
|
2732
|
+
airborneGroundNormalHoldTime: number;
|
|
2733
|
+
groundedAutoLevelEnabled: boolean;
|
|
2734
|
+
groundedAutoLevelStrength: number;
|
|
2735
|
+
groundedAutoLevelDeadzoneDeg: number;
|
|
2736
|
+
groundedAutoLevelSettleDeg: number;
|
|
2737
|
+
groundedAutoLevelSettleScale: number;
|
|
2738
|
+
groundedAutoLevelHysteresisDeg: number;
|
|
2739
|
+
groundedAutoLevelStartKmh: number;
|
|
2740
|
+
groundedAutoLevelFullKmh: number;
|
|
2741
|
+
groundedAutoLevelMaxRate: number;
|
|
2742
|
+
groundedAutoLevelPartialContactBoost: number;
|
|
2743
|
+
groundedAutoLevelSlideScale: number;
|
|
2744
|
+
groundedAutoLevelTrackNormalMinDot: number;
|
|
2745
|
+
airborneTrackConnectionStartKmh: number;
|
|
2746
|
+
airborneTrackConnectionFullKmh: number;
|
|
2747
|
+
airborneTrackConnectionMaxAccel: number;
|
|
2748
|
+
airborneRiseDamping: number;
|
|
2749
|
+
airborneMaxRiseSpeed: number;
|
|
2750
|
+
private _groundedAutoLevelWasActive;
|
|
2751
|
+
private _stabilizationGroundNormal;
|
|
2752
|
+
private _stabilizationHasGroundNormal;
|
|
2753
|
+
private _stabilizationAirborneTime;
|
|
2754
|
+
isArcadeBurnoutModeActive: boolean;
|
|
2755
|
+
isArcadeDonutModeActive: boolean;
|
|
2756
|
+
isArcadeFootBrakeActive: boolean;
|
|
2757
|
+
isArcadeHandBrakeActive: boolean;
|
|
2758
|
+
isArcadeWheelSkidActive: boolean;
|
|
2759
|
+
isArcadeYawAssistActive: boolean;
|
|
2760
|
+
arcadeYawAssistDebugLogEnabled: boolean;
|
|
2761
|
+
arcadeYawAssistDebugLogIntervalFrames: number;
|
|
2762
|
+
arcadeYawAssistDebugLogEdgeEvents: boolean;
|
|
2763
|
+
arcadeHandbrakeKickStrengthDegPerSec: number;
|
|
2764
|
+
arcadeHandbrakeKickFrames: number;
|
|
2765
|
+
arcadeHandbrakeYawAuthority: number;
|
|
2766
|
+
arcadeHandbrakeMaxYawRateDegPerSec: number;
|
|
2767
|
+
arcadeHandbrakeReferenceSpeedKmh: number;
|
|
2768
|
+
arcadeHandbrakeSpeedGateEnabled: boolean;
|
|
2769
|
+
arcadeHandbrakeLowSpeedShape: number;
|
|
2770
|
+
arcadeHandbrakeDirectYawEnabled: boolean;
|
|
2771
|
+
arcadeHandbrakeDirectYawDegPerSec: number;
|
|
2772
|
+
arcadeHandbrakeDirectYawDurationMs: number;
|
|
2773
|
+
arcadeHandbrakeDirectYawFadeMs: number;
|
|
2774
|
+
arcadeDonutDirectYawEnabled: boolean;
|
|
2775
|
+
arcadeDonutDirectYawDegPerSec: number;
|
|
2776
|
+
arcadeDonutDirectYawDurationMs: number;
|
|
2777
|
+
arcadeDonutDirectYawFadeMs: number;
|
|
2778
|
+
arcadeHandbrakeMaxSlideAngleDeg: number;
|
|
2779
|
+
arcadeHandbrakeCounterSteerClampEnabled: boolean;
|
|
2780
|
+
arcadeHandbrakeCounterSteerYawThresholdDegPerSec: number;
|
|
2781
|
+
arcadeHandbrakeClampReleaseFadeMs: number;
|
|
2782
|
+
arcadeHandbrakeSteerSlewLimitEnabled: boolean;
|
|
2783
|
+
arcadeHandbrakeSteerSlewLimitDegPerSec: number;
|
|
2784
|
+
private _wasArcadeHandBrakeActive;
|
|
2785
|
+
private _wasArcadeYawAssistApplyingForce;
|
|
2786
|
+
private _handbrakeKickJzRemaining;
|
|
2787
|
+
private _handbrakeKickFramesRemaining;
|
|
2788
|
+
private _arcadeHandbrakeLatchedDriveSign;
|
|
2789
|
+
private _arcadeHandbrakeHoldElapsedSec;
|
|
2790
|
+
private _arcadeHandbrakeSlewedSteerRad;
|
|
2791
|
+
private _arcadeHandbrakeClampReleaseFadeSec;
|
|
2792
|
+
private _arcadeDonutHoldElapsedSec;
|
|
2793
|
+
private _arcadeYawAssistDebugFrameCounter;
|
|
2794
|
+
private _arcadeYawAssistLastKickRad;
|
|
2795
|
+
private _arcadeYawAssistLastIaddPerWheel;
|
|
2796
|
+
private _arcadeYawAssistLastClampScalar;
|
|
2797
|
+
private _arcadeYawAssistLastLeverSum;
|
|
2798
|
+
burnoutFrictionFloor: number;
|
|
2799
|
+
frictionRestoreSpeed: number;
|
|
2800
|
+
arcadeBurnoutWheelSpinGain: number;
|
|
2801
|
+
arcadeDonutWheelSpinGain: number;
|
|
2802
|
+
arcadeBurnoutDirectionChangeSpeedKmh: number;
|
|
2803
|
+
arcadeBurnoutDirectionChangeGripScale: number;
|
|
2804
|
+
arcadeWheelSpinBuildSpeed: number;
|
|
2805
|
+
arcadeWheelSpinRecoverySpeed: number;
|
|
2806
|
+
arcadeWheelSpinAirDamping: number;
|
|
2807
|
+
arcadeWheelSpinMaxAngularVelocity: number;
|
|
2808
|
+
arcadeStationaryBurnoutWheelSpinGain: number;
|
|
2809
|
+
arcadeStationaryBurnoutMinAngularVelocity: number;
|
|
2810
|
+
arcadeSkidFadeInSpeed: number;
|
|
2811
|
+
arcadeSkidFadeOutSpeed: number;
|
|
2812
|
+
arcadeYawCapMultiplier: number;
|
|
2813
|
+
wheelAtRestSpeedThresholdKmh: number;
|
|
2814
|
+
wheelSpinDebugLogEnabled: boolean;
|
|
2815
|
+
wheelSpinDebugLogIntervalFrames: number;
|
|
2816
|
+
private _wheelSpinDebugLogCounter;
|
|
2817
|
+
private _postHandbrakeLogFrames;
|
|
2818
|
+
private _postHandbrakeLogCounter;
|
|
2819
|
+
private _wasAnyArcadeModeActive;
|
|
2820
|
+
private _forwardWS;
|
|
2821
|
+
private _axle;
|
|
2822
|
+
private _forwardImpulse;
|
|
2823
|
+
private _sideImpulse;
|
|
2824
|
+
private _arcadeSkidInfo;
|
|
2825
|
+
private _arcadePreviousWheelSpin;
|
|
2826
|
+
sideFrictionStiffness: number;
|
|
2827
|
+
private _chassisMass;
|
|
2828
|
+
private _chassisInvMass;
|
|
2829
|
+
private _chassisTransform;
|
|
2830
|
+
private _rayResults;
|
|
2831
|
+
private _sv1;
|
|
2832
|
+
private _sv2;
|
|
2833
|
+
private _sv3;
|
|
2834
|
+
private _sv4;
|
|
2835
|
+
private _sv5;
|
|
2836
|
+
private _sv6;
|
|
2837
|
+
private _sv7;
|
|
2838
|
+
private _sv8;
|
|
2839
|
+
private _sv9;
|
|
2840
|
+
private _sv10;
|
|
2841
|
+
private _sq1;
|
|
2842
|
+
private _sq2;
|
|
2843
|
+
private _sm1;
|
|
2844
|
+
private _sm2;
|
|
2845
|
+
private _sm3;
|
|
2846
|
+
private _sm4;
|
|
2847
|
+
private _vapLinVel;
|
|
2848
|
+
private _vapAngVel;
|
|
2849
|
+
private _vapRelPos;
|
|
2850
|
+
private _vapCenter;
|
|
2851
|
+
private _vapCross;
|
|
2852
|
+
private _rsbVel1;
|
|
2853
|
+
private _crfVel1;
|
|
2854
|
+
private _basisCols;
|
|
2855
|
+
private _stb1;
|
|
2856
|
+
private _stb2;
|
|
2857
|
+
private _stb3;
|
|
2858
|
+
private _stb4;
|
|
2859
|
+
private _stb5;
|
|
2860
|
+
constructor(tuning: btVehicleTuning, chassisBody: PhysicsBody, raycaster: IbtVehicleRaycaster);
|
|
2861
|
+
addWheel(connectionPointCS: Vector3, wheelDirectionCS: Vector3, wheelAxleCS: Vector3, suspensionRestLength: number, wheelRadius: number, tuning: btVehicleTuning, isFrontWheel: boolean): btWheelInfo;
|
|
2862
|
+
getNumWheels(): number;
|
|
2863
|
+
getWheelInfo(index: number): btWheelInfo;
|
|
2864
|
+
setSteeringValue(steering: number, wheelIndex: number): void;
|
|
2865
|
+
getSteeringValue(wheelIndex: number): number;
|
|
2866
|
+
applyEngineForce(force: number, wheelIndex: number): void;
|
|
2867
|
+
setBrake(brake: number, wheelIndex: number): void;
|
|
2868
|
+
getCurrentSpeedKmHour(): number;
|
|
2869
|
+
getRigidBody(): PhysicsBody;
|
|
2870
|
+
getRightAxis(): number;
|
|
2871
|
+
getUpAxis(): number;
|
|
2872
|
+
getForwardAxis(): number;
|
|
2873
|
+
setCoordinateSystem(rightIndex: number, upIndex: number, forwardIndex: number): void;
|
|
2874
|
+
getForwardVector(): Vector3;
|
|
2875
|
+
getForwardVectorToRef(result: Vector3): void;
|
|
2876
|
+
cacheMassProperties(): void;
|
|
2877
|
+
setIsArcadeBurnoutActive(active: boolean): void;
|
|
2878
|
+
getIsArcadeBurnoutActive(): boolean;
|
|
2879
|
+
setIsArcadeDonutActive(active: boolean): void;
|
|
2880
|
+
getIsArcadeDonutActive(): boolean;
|
|
2881
|
+
setIsArcadeFootBrakeActive(active: boolean): void;
|
|
2882
|
+
getIsArcadeFootBrakeActive(): boolean;
|
|
2883
|
+
setIsArcadeHandBrakeActive(active: boolean): void;
|
|
2884
|
+
getIsArcadeHandBrakeActive(): boolean;
|
|
2885
|
+
setIsArcadeWheelSkidActive(active: boolean): void;
|
|
2886
|
+
getIsArcadeWheelSkidActive(): boolean;
|
|
2887
|
+
private setWheelContactFilters;
|
|
2888
|
+
resetSuspension(): void;
|
|
2889
|
+
getChassisWorldTransform(): Matrix;
|
|
2890
|
+
private updateWheelTransformsWS;
|
|
2891
|
+
updateWheelTransform(wheelIndex: number, interpolatedTransform?: boolean): void;
|
|
2892
|
+
private rayCast;
|
|
2893
|
+
private smoothRaycastHit;
|
|
2894
|
+
private getGravityUpToRef;
|
|
2895
|
+
private computeStabilizationUpVector;
|
|
2896
|
+
private applyFlyingStabilization;
|
|
2897
|
+
private applyGroundedAutoLevel;
|
|
2898
|
+
private applyTrackConnectionAndDownforce;
|
|
2899
|
+
updateVehicle(step: number): void;
|
|
2900
|
+
private updateSuspension;
|
|
2901
|
+
private applyEasyDonutYawAssist;
|
|
2902
|
+
private applyHandbrakeYawAssist;
|
|
2903
|
+
private resolveWheelSpinDirection;
|
|
2904
|
+
private updateArcadeWheelRotationBoost;
|
|
2905
|
+
private getWheelAngularVelocity;
|
|
2906
|
+
private getArcadeBurnoutDirectionChangeFactor;
|
|
2907
|
+
private updateArcadeSkidInfo;
|
|
2908
|
+
private updateFriction;
|
|
2909
|
+
private velocityAtWorldPoint;
|
|
2910
|
+
private resolveSingleBilateral;
|
|
2911
|
+
private calcRollingFriction;
|
|
2912
|
+
private clampChassisYawRate;
|
|
2913
|
+
getNaturalWheelSlip(wheelIndex: number): boolean;
|
|
2914
|
+
getSignedFrontSteeringAngleRad(): number;
|
|
2915
|
+
getApproxWheelbaseMeters(): number;
|
|
2916
|
+
dispose(): void;
|
|
2917
|
+
}
|
|
2918
|
+
export declare class LensDistortionPlugin {
|
|
2919
|
+
private _distortionIntensity;
|
|
2920
|
+
private _distortionIntensityX;
|
|
2921
|
+
private _distortionIntensityY;
|
|
2922
|
+
private _distortionCenterX;
|
|
2923
|
+
private _distortionCenterY;
|
|
2924
|
+
private _distortionScale;
|
|
2925
|
+
private _isEnabled;
|
|
2926
|
+
get distortionIntensity(): number;
|
|
2927
|
+
set distortionIntensity(value: number);
|
|
2928
|
+
get distortionIntensityX(): number;
|
|
2929
|
+
set distortionIntensityX(value: number);
|
|
2930
|
+
get distortionIntensityY(): number;
|
|
2931
|
+
set distortionIntensityY(value: number);
|
|
2932
|
+
get distortionCenterX(): number;
|
|
2933
|
+
set distortionCenterX(value: number);
|
|
2934
|
+
get distortionCenterY(): number;
|
|
2935
|
+
set distortionCenterY(value: number);
|
|
2936
|
+
get distortionScale(): number;
|
|
2937
|
+
set distortionScale(value: number);
|
|
2938
|
+
get isEnabled(): boolean;
|
|
2939
|
+
private _updateEnabledState;
|
|
2940
|
+
constructor(options?: {
|
|
2941
|
+
distortionIntensity?: number;
|
|
2942
|
+
distortionIntensityX?: number;
|
|
2943
|
+
distortionIntensityY?: number;
|
|
2944
|
+
distortionCenterX?: number;
|
|
2945
|
+
distortionCenterY?: number;
|
|
2946
|
+
distortionScale?: number;
|
|
2947
|
+
});
|
|
2948
|
+
getUniforms(): {
|
|
2949
|
+
[key: string]: {
|
|
2950
|
+
type: string;
|
|
2951
|
+
value: any;
|
|
2952
|
+
};
|
|
2953
|
+
};
|
|
2954
|
+
getFragmentShaderCode(): string;
|
|
2955
|
+
getWGSLShaderCode(): string;
|
|
2956
|
+
static CreatePostProcess(scene: any, camera: any, options?: {
|
|
2957
|
+
distortionIntensity?: number;
|
|
2958
|
+
distortionIntensityX?: number;
|
|
2959
|
+
distortionIntensityY?: number;
|
|
2960
|
+
distortionCenterX?: number;
|
|
2961
|
+
distortionCenterY?: number;
|
|
2962
|
+
distortionScale?: number;
|
|
2963
|
+
}): any;
|
|
2964
|
+
}
|
|
2965
|
+
export declare class NavigationAgent extends ScriptComponent {
|
|
2966
|
+
static TARGET_ANGLE_FACTOR: number;
|
|
2967
|
+
static ANGULAR_SPEED_RATIO: number;
|
|
2968
|
+
static GLOBAL_CROWD_INSTANCE: boolean;
|
|
2969
|
+
private crowd;
|
|
2970
|
+
private type;
|
|
2971
|
+
private speed;
|
|
2972
|
+
private baseOffset;
|
|
2973
|
+
private avoidRadius;
|
|
2974
|
+
private avoidHeight;
|
|
2975
|
+
private acceleration;
|
|
2976
|
+
private areaMask;
|
|
2977
|
+
private autoRepath;
|
|
2978
|
+
private autoBraking;
|
|
2979
|
+
private autoTraverseOffMeshLink;
|
|
2980
|
+
private avoidancePriority;
|
|
2981
|
+
private obstacleAvoidanceType;
|
|
2982
|
+
private distanceToTarget;
|
|
2983
|
+
private teleporting;
|
|
2984
|
+
private moveDirection;
|
|
2985
|
+
private resetPosition;
|
|
2986
|
+
private lastPosition;
|
|
2987
|
+
private distancePosition;
|
|
2988
|
+
private currentPosition;
|
|
2989
|
+
private currentRotation;
|
|
2990
|
+
private currentVelocity;
|
|
2991
|
+
private currentWaypoint;
|
|
2992
|
+
heightOffset: number;
|
|
2993
|
+
angularSpeed: number;
|
|
2994
|
+
updatePosition: boolean;
|
|
2995
|
+
updateRotation: boolean;
|
|
2996
|
+
distanceEpsilon: number;
|
|
2997
|
+
velocityEpsilon: number;
|
|
2998
|
+
offMeshVelocity: number;
|
|
2999
|
+
stoppingDistance: number;
|
|
3000
|
+
isReady(): boolean;
|
|
3001
|
+
isNavigating(): boolean;
|
|
3002
|
+
isTeleporting(): boolean;
|
|
3003
|
+
isOnOffMeshLink(): boolean;
|
|
3004
|
+
getAgentType(): number;
|
|
3005
|
+
getAgentState(): number;
|
|
3006
|
+
getAgentIndex(): number;
|
|
3007
|
+
getAgentOffset(): number;
|
|
3008
|
+
getTargetDistance(): number;
|
|
3009
|
+
getCurrentPosition(): Vector3;
|
|
3010
|
+
getCurrentRotation(): Quaternion;
|
|
3011
|
+
getCurrentVelocity(): Vector3;
|
|
3012
|
+
getAgentParameters(): IAgentParameters;
|
|
3013
|
+
setAgentParameters(parameters: IAgentParameters): void;
|
|
3014
|
+
onReadyObservable: Observable<TransformNode>;
|
|
3015
|
+
onPreUpdateObservable: Observable<TransformNode>;
|
|
3016
|
+
onPostUpdateObservable: Observable<TransformNode>;
|
|
3017
|
+
onNavCompleteObservable: Observable<TransformNode>;
|
|
3018
|
+
protected m_agentState: number;
|
|
3019
|
+
protected m_agentIndex: number;
|
|
3020
|
+
protected m_agentReady: boolean;
|
|
3021
|
+
protected m_agentGhost: TransformNode;
|
|
3022
|
+
protected m_agentParams: IAgentParameters;
|
|
3023
|
+
protected m_agentMovement: Vector3;
|
|
3024
|
+
protected m_agentDirection: Vector3;
|
|
3025
|
+
protected m_agentQuaternion: Quaternion;
|
|
3026
|
+
protected m_agentDestination: Vector3;
|
|
3027
|
+
protected m_debugDestinationSphere: Mesh;
|
|
3028
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
3029
|
+
protected awake(): void;
|
|
3030
|
+
protected update(): void;
|
|
3031
|
+
protected destroy(): void;
|
|
3032
|
+
private awakeNavigationAgent;
|
|
3033
|
+
private updateNavigationAgent;
|
|
3034
|
+
private updateAgentParameters;
|
|
3035
|
+
private destroyNavigationAgent;
|
|
3036
|
+
move(offset: Vector3, closetPoint?: boolean): void;
|
|
3037
|
+
teleport(destination: Vector3, closetPoint?: boolean): void;
|
|
3038
|
+
setDestination(destination: Vector3, closetPoint?: boolean): void;
|
|
3039
|
+
setAcceleration(speed: number): void;
|
|
3040
|
+
setMovementSpeed(speed: number): void;
|
|
3041
|
+
setSeparationWeight(weight: number): void;
|
|
3042
|
+
setOptimizationRange(range: number): void;
|
|
3043
|
+
setCollisionQueryRange(range: number): void;
|
|
3044
|
+
setAgentRadius(radius: number): void;
|
|
3045
|
+
setAgentHeight(height: number): void;
|
|
3046
|
+
getAgentVelocity(): Vector3;
|
|
3047
|
+
getAgentVelocityToRef(result: Vector3): void;
|
|
3048
|
+
getAgentPosition(): Vector3;
|
|
3049
|
+
getAgentPositionToRef(result: Vector3): void;
|
|
3050
|
+
getAgentWaypoint(): Vector3;
|
|
3051
|
+
getAgentWaypointToRef(result: Vector3): void;
|
|
3052
|
+
cancelNavigation(): void;
|
|
3053
|
+
getDebugDestinationMesh(): Mesh;
|
|
3054
|
+
showDebugDestination(show: boolean): void;
|
|
3055
|
+
}
|
|
3056
|
+
export declare enum CrowdAgentState {
|
|
3057
|
+
DT_CROWDAGENT_STATE_INVALID = 0,
|
|
3058
|
+
DT_CROWDAGENT_STATE_WALKING = 1,
|
|
3059
|
+
DT_CROWDAGENT_STATE_OFFMESH = 2
|
|
3060
|
+
}
|
|
3061
|
+
export declare class PostProcessor extends ScriptComponent {
|
|
3062
|
+
private static GlobalInstance;
|
|
3063
|
+
static get Instance(): PostProcessor;
|
|
3064
|
+
private highDynamicRange;
|
|
3065
|
+
private neutralToneMapping;
|
|
3066
|
+
private toneMappingMode;
|
|
3067
|
+
private defaultContrast;
|
|
3068
|
+
private defaultExposure;
|
|
3069
|
+
private defaultLookupTable;
|
|
3070
|
+
private colorGradingSettings;
|
|
3071
|
+
private bloomSettings;
|
|
3072
|
+
private vignetteSettings;
|
|
3073
|
+
private sharpenSettings;
|
|
3074
|
+
private grainSettings;
|
|
3075
|
+
private chromaticAberrationSettings;
|
|
3076
|
+
private depthOfFieldSettings;
|
|
3077
|
+
private motionBlurSettings;
|
|
3078
|
+
private lensDistortionSettings;
|
|
3079
|
+
private autoExposureSettings;
|
|
3080
|
+
private colorFilterPP;
|
|
3081
|
+
private coloredBloomPP;
|
|
3082
|
+
private motionBlurPP;
|
|
3083
|
+
private roundedVignettePP;
|
|
3084
|
+
private lensDistortionPP;
|
|
3085
|
+
private defaultRenderPipeline;
|
|
3086
|
+
private screenSpaceAOPipeline;
|
|
3087
|
+
private screenSpaceRPipeline;
|
|
3088
|
+
GetDefaultRenderPipeline(): DefaultRenderingPipeline;
|
|
3089
|
+
GetSSAORRenderPipeline(): SSAORenderingPipeline;
|
|
3090
|
+
GetSSRRenderPipeline(): SSRRenderingPipeline;
|
|
3091
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
3092
|
+
protected ready(): void;
|
|
3093
|
+
protected parseColorGradingSettings(settings: any): any;
|
|
3094
|
+
protected applyColorGradingSettings(): void;
|
|
3095
|
+
protected mapToneMapper(tonemapperParam: any): {
|
|
3096
|
+
enabled: boolean;
|
|
3097
|
+
type: number | null;
|
|
3098
|
+
};
|
|
3099
|
+
protected parseBloomSettings(settings: any): any;
|
|
3100
|
+
protected applyBloomSettings(): void;
|
|
3101
|
+
protected parseSharpenSettings(settings: any): any;
|
|
3102
|
+
protected applySharpenSettings(): void;
|
|
3103
|
+
protected parseGrainSettings(settings: any): any;
|
|
3104
|
+
protected applyGrainSettings(): void;
|
|
3105
|
+
protected parseVignetteSettings(settings: any): any;
|
|
3106
|
+
protected applyVignetteSettings(): void;
|
|
3107
|
+
protected parseDepthOfFieldSettings(settings: any): any;
|
|
3108
|
+
protected applyDepthOfFieldSettings(): void;
|
|
3109
|
+
protected parseMotionBlurSettings(settings: any): any;
|
|
3110
|
+
protected applyMotionBlurSettings(): void;
|
|
3111
|
+
protected parseAutoExposure(settings: any): any;
|
|
3112
|
+
protected applyAutoExposureSettings(): void;
|
|
3113
|
+
protected parseLensDistortionSettings(settings: any): any;
|
|
3114
|
+
protected applyLensDistortionSettings(): void;
|
|
3115
|
+
protected parseChromaticAberrationSettings(settings: any): any;
|
|
3116
|
+
protected applyChromaticAberrationSettings(): void;
|
|
3117
|
+
protected parseAmbientOcclusionSettings(settings: any): any;
|
|
3118
|
+
protected parseScreenSpaceReflectionsSettings(settings: any): any;
|
|
3119
|
+
static unwrapParam(param: any): any;
|
|
3120
|
+
static extractParam(param: any): {
|
|
3121
|
+
value: any;
|
|
3122
|
+
overrideState: boolean | null;
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
export declare class RaycastVehicle {
|
|
3126
|
+
private static TempVector;
|
|
3127
|
+
private static AutoSuspensionForceReserve;
|
|
3128
|
+
private _centerMass;
|
|
3129
|
+
private _chassisMesh;
|
|
3130
|
+
private _tempVectorPos;
|
|
3131
|
+
lockedWheelIndexes: number[];
|
|
3132
|
+
getCenterMassOffset(): Vector3;
|
|
3133
|
+
getInternalVehicle(): btRaycastVehicle;
|
|
3134
|
+
getUpAxis(): number;
|
|
3135
|
+
getRightAxis(): number;
|
|
3136
|
+
getForwardAxis(): number;
|
|
3137
|
+
getForwardVector(): Vector3;
|
|
3138
|
+
getNumWheels(): number;
|
|
3139
|
+
getWheelInfo(wheel: number): btWheelInfo;
|
|
3140
|
+
resetSuspension(): void;
|
|
3141
|
+
setEngineForce(power: number, wheel: number): void;
|
|
3142
|
+
setBrakingForce(brake: number, wheel: number): void;
|
|
3143
|
+
updateWheelTransform(wheel: number, interpolate: boolean): void;
|
|
3144
|
+
getWheelTransformPosition(wheel: number): Vector3;
|
|
3145
|
+
getWheelTransformRotation(wheel: number): Quaternion;
|
|
3146
|
+
getRawCurrentSpeedKph(): number;
|
|
3147
|
+
getRawCurrentSpeedMph(): number;
|
|
3148
|
+
getAbsCurrentSpeedKph(): number;
|
|
3149
|
+
getAbsCurrentSpeedMph(): number;
|
|
3150
|
+
getVehicleTuningSystem(): btVehicleTuning;
|
|
3151
|
+
getChassisWorldTransform(): Matrix;
|
|
3152
|
+
protected m_scene: Scene;
|
|
3153
|
+
protected m_vehicle: btRaycastVehicle;
|
|
3154
|
+
protected m_vehicleTuning: btVehicleTuning;
|
|
3155
|
+
protected m_vehicleRaycaster: btDefaultVehicleRaycaster;
|
|
3156
|
+
protected m_vehicleColliders: any[];
|
|
3157
|
+
protected m_tempPosition: Vector3;
|
|
3158
|
+
protected m_wheelDirectionCS0: Vector3;
|
|
3159
|
+
protected m_wheelAxleCS: Vector3;
|
|
3160
|
+
constructor(scene: Scene, entity: AbstractMesh, center: Vector3);
|
|
3161
|
+
dispose(): void;
|
|
3162
|
+
static GetInstance(scene: Scene, rigidbody: RigidbodyPhysics): RaycastVehicle;
|
|
3163
|
+
tickVehicleController(step: number): void;
|
|
3164
|
+
getEnableMultiRaycast(): boolean;
|
|
3165
|
+
setEnableMultiRaycast(flag: boolean): void;
|
|
3166
|
+
getSmoothedGradientSpeed(): number;
|
|
3167
|
+
setSmoothedGradientSpeed(impulse: number): void;
|
|
3168
|
+
getMaximumYawRateLow(): number;
|
|
3169
|
+
setMaximumYawRateLow(impulse: number): void;
|
|
3170
|
+
getMaximumYawRateHigh(): number;
|
|
3171
|
+
setMaximumYawRateHigh(impulse: number): void;
|
|
3172
|
+
getAngularDampingControl(): Vector3;
|
|
3173
|
+
setAngularDampingControl(damping: Vector3): void;
|
|
3174
|
+
getSmoothFlyingImpulse(): number;
|
|
3175
|
+
setSmoothFlyingImpulse(impulse: number): void;
|
|
3176
|
+
setGroundedAutoLevelEnabled(flag: boolean): void;
|
|
3177
|
+
setGroundedAutoLevelStrength(strength: number): void;
|
|
3178
|
+
setGroundedAutoLevelDeadzone(degrees: number): void;
|
|
3179
|
+
setGroundedAutoLevelSettleDeg(degrees: number): void;
|
|
3180
|
+
setGroundedAutoLevelSettleScale(scale: number): void;
|
|
3181
|
+
setGroundedAutoLevelHysteresis(degrees: number): void;
|
|
3182
|
+
setGroundedAutoLevelSpeedRange(startKmh: number, fullKmh: number): void;
|
|
3183
|
+
setGroundedAutoLevelMaxRate(rate: number): void;
|
|
3184
|
+
getTrackConnectionAccel(): number;
|
|
3185
|
+
setTrackConnectionAccel(force: number): void;
|
|
3186
|
+
setAirborneTrackConnectionMaxAccel(accel: number): void;
|
|
3187
|
+
setAirborneTrackConnectionSpeedRange(startKmh: number, fullKmh: number): void;
|
|
3188
|
+
setAirborneRiseDamping(rate: number): void;
|
|
3189
|
+
setAirborneMaxRiseSpeed(speed: number): void;
|
|
3190
|
+
getMinimumWheelContacts(): number;
|
|
3191
|
+
setMinimumWheelContacts(contacts: number): void;
|
|
3192
|
+
getDownforceCoefficient(): number;
|
|
3193
|
+
setDownforceCoefficient(value: number): void;
|
|
3194
|
+
getConstantDownforce(): number;
|
|
3195
|
+
setConstantDownforce(value: number): void;
|
|
3196
|
+
getWheelIndexByID(id: string): number;
|
|
3197
|
+
getWheelIndexByName(name: string): number;
|
|
3198
|
+
getWheelColliderInfo(wheel: number): number;
|
|
3199
|
+
setWheelTransformMesh(wheel: number, transform: TransformNode): void;
|
|
3200
|
+
protected ensureNodeRotationQuaternion(node: TransformNode): Quaternion;
|
|
3201
|
+
protected normalizeWheelRotation(angle: number): number;
|
|
3202
|
+
protected syncWheelSpinnerRotation(wheelinfo: any): void;
|
|
3203
|
+
protected rebaseWheelSpinnerRotation(wheelinfo: any): void;
|
|
3204
|
+
getWheelSkidFadeInSpeed(): number;
|
|
3205
|
+
setWheelSkidFadeInSpeed(value: number): void;
|
|
3206
|
+
getWheelSkidFadeOutSpeed(): number;
|
|
3207
|
+
setWheelSkidFadeOutSpeed(value: number): void;
|
|
3208
|
+
isArcadeYawAssistActive(): boolean;
|
|
3209
|
+
getArcadeSteeringAssist(): number;
|
|
3210
|
+
setArcadeSteeringAssist(value: number): void;
|
|
3211
|
+
getArcadeDonutDirectYawDegPerSec(): number;
|
|
3212
|
+
setArcadeDonutDirectYawDegPerSec(value: number): void;
|
|
3213
|
+
getArcadeHandbrakeDirectYawDegPerSec(): number;
|
|
3214
|
+
setArcadeHandbrakeDirectYawDegPerSec(value: number): void;
|
|
3215
|
+
getArcadeHandbrakeMaxSlideAngleDeg(): number;
|
|
3216
|
+
setArcadeHandbrakeMaxSlideAngleDeg(value: number): void;
|
|
3217
|
+
getArcadeHandbrakeBicycleYawAuthority(): number;
|
|
3218
|
+
setArcadeHandbrakeBicycleYawAuthority(value: number): void;
|
|
3219
|
+
getArcadeHandbrakeMaxYawRateDegPerSec(): number;
|
|
3220
|
+
setArcadeHandbrakeMaxYawRateDegPerSec(value: number): void;
|
|
3221
|
+
getArcadeHandbrakeReferenceSpeedKmh(): number;
|
|
3222
|
+
setArcadeHandbrakeReferenceSpeedKmh(value: number): void;
|
|
3223
|
+
getArcadeHandbrakeKickStrengthDegPerSec(): number;
|
|
3224
|
+
setArcadeHandbrakeKickStrengthDegPerSec(value: number): void;
|
|
3225
|
+
getArcadeBurnoutActive(): boolean;
|
|
3226
|
+
setArcadeBurnoutActive(active: boolean): void;
|
|
3227
|
+
getArcadeDonutActive(): boolean;
|
|
3228
|
+
setArcadeDonutActive(active: boolean): void;
|
|
3229
|
+
getArcadeFootBrakeActive(): boolean;
|
|
3230
|
+
setArcadeFootBrakeActive(active: boolean): void;
|
|
3231
|
+
getArcadeHandBrakeActive(): boolean;
|
|
3232
|
+
setArcadeHandBrakeActive(active: boolean): void;
|
|
3233
|
+
setArcadeBurnoutDirectionChangeSpeed(mph: number): void;
|
|
3234
|
+
getApproxWheelbaseMeters(): number;
|
|
3235
|
+
getSignedFrontSteeringAngleRad(): number;
|
|
3236
|
+
getVisualSteeringAngle(wheel: number): number;
|
|
3237
|
+
setVisualSteeringAngle(angle: number, wheel: number): void;
|
|
3238
|
+
getPhysicsSteeringAngle(wheel: number): number;
|
|
3239
|
+
setPhysicsSteeringAngle(angle: number, wheel: number): void;
|
|
3240
|
+
protected setupWheelInformation(): void;
|
|
3241
|
+
private applyAutoSuspensionForce;
|
|
3242
|
+
private getWheelForwardPosition;
|
|
3243
|
+
getNaturalWheelSlip(wheelIndex: number): boolean;
|
|
3244
|
+
getWheelAtRestSpeedThresholdKmh(): number;
|
|
3245
|
+
setWheelAtRestSpeedThresholdKmh(value: number): void;
|
|
3246
|
+
setWheelSpinDebugLogEnabled(enabled: boolean): void;
|
|
3247
|
+
getWheelSpinDebugLogEnabled(): boolean;
|
|
3248
|
+
setWheelSpinDebugLogIntervalFrames(frames: number): void;
|
|
3249
|
+
updateWheelInformation(): void;
|
|
3250
|
+
protected lockedWheelInformation(wheel: number): boolean;
|
|
3251
|
+
protected deleteWheelInformation(): void;
|
|
3252
|
+
}
|
|
3253
|
+
export declare class RigidbodyPhysics extends ScriptComponent {
|
|
3254
|
+
static PHYSICS_STEP_TIME: number;
|
|
3255
|
+
private static RaycastResult;
|
|
3256
|
+
private static LocalShapeResult;
|
|
3257
|
+
private static WorldShapeResult;
|
|
3258
|
+
private static RaycastDestination;
|
|
3259
|
+
private _isKinematic;
|
|
3260
|
+
private _centerOfMass;
|
|
3261
|
+
protected m_raycastVehicle: RaycastVehicle;
|
|
3262
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
3263
|
+
protected awake(): void;
|
|
3264
|
+
protected update(): void;
|
|
3265
|
+
protected fixed(): void;
|
|
3266
|
+
protected destroy(): void;
|
|
3267
|
+
protected awakeRigidbodyState(): void;
|
|
3268
|
+
protected updateRigidbodyState(): void;
|
|
3269
|
+
protected fixedRigidbodyState(): void;
|
|
3270
|
+
protected destroyRigidbodyState(): void;
|
|
3271
|
+
isKinematic(): boolean;
|
|
3272
|
+
hasWheelColliders(): boolean;
|
|
3273
|
+
getRaycastVehicle(): any;
|
|
3274
|
+
static GetHavokInstance(): any;
|
|
3275
|
+
static Raycast(origin: Vector3, direction: Vector3, length: number, query?: IRaycastQuery): PhysicsRaycastResult;
|
|
3276
|
+
static Shapecast(query: IPhysicsShapeCastQuery): IPhysicsShapeCastResult;
|
|
3277
|
+
static RaycastToRef(from: Vector3, to: Vector3, result: PhysicsRaycastResult, query?: IRaycastQuery): void;
|
|
3278
|
+
static ShapecastToRef(query: IPhysicsShapeCastQuery, localShapeResult: ShapeCastResult, worldShapeResult: ShapeCastResult): void;
|
|
3279
|
+
static SetMaxVelocities(maxLinVel: number, maxAngVel: number): void;
|
|
3280
|
+
static PhysicsShapeCache: any;
|
|
3281
|
+
static NewPhysicsShapeCount: number;
|
|
3282
|
+
static CachedPhysicsShapeCount: number;
|
|
3283
|
+
static DebugPhysicsViewer: any;
|
|
3284
|
+
static OnSetupPhysicsPlugin: (scene: Scene) => void;
|
|
3285
|
+
static ConfigurePhysicsEngine(scene: Scene, fixedTimeStep?: boolean, subTimeStep?: number, maxWorldSweep?: number, ccdEnabled?: boolean, ccdPenetration?: number, gravityLevel?: Vector3): Promise<void>;
|
|
3286
|
+
static SetupPhysicsComponent(scene: Scene, entity: TransformNode): void;
|
|
3287
|
+
protected static GetPhysicsMaterialCombine(unity: number): number;
|
|
3288
|
+
protected static GetCachedPhysicsMeshShape(scene: Scene, entity: TransformNode, meshkey: string, staticfriction: number, dynamicfriction: number, restitution: number, fcombine: number, rcombine: number, layer: number, filter: number): PhysicsShapeMesh;
|
|
3289
|
+
protected static GetCachedPhysicsConvexHullShape(scene: Scene, entity: TransformNode, meshkey: string, staticfriction: number, dynamicfriction: number, restitution: number, fcombine: number, rcombine: number, layer: number, filter: number): PhysicsShapeConvexHull;
|
|
3290
|
+
protected static GetCachedPhysicsBoxShape(scene: Scene, trigger: boolean, staticfriction: number, dynamicfriction: number, restitution: number, fcombine: number, rcombine: number, layer: number, filter: number): PhysicsShapeBox;
|
|
3291
|
+
protected static GetCachedPhysicsSphereShape(scene: Scene, trigger: boolean, staticfriction: number, dynamicfriction: number, restitution: number, fcombine: number, rcombine: number, layer: number, filter: number): PhysicsShapeSphere;
|
|
3292
|
+
protected static GetCachedPhysicsCapsuleShape(scene: Scene, trigger: boolean, staticfriction: number, dynamicfriction: number, restitution: number, fcombine: number, rcombine: number, layer: number, filter: number): PhysicsShapeCapsule;
|
|
3293
|
+
protected static GetCachedPhysicsCylinderShape(scene: Scene, trigger: boolean, staticfriction: number, dynamicfriction: number, restitution: number, fcombine: number, rcombine: number, layer: number, filter: number): PhysicsShapeCylinder;
|
|
3294
|
+
protected static CreateStandardPhysicsShapeAndBody(scene: Scene, entity: TransformNode, metadata: any, impostortype: number, istrigger: boolean, istruestatic: boolean, motiontype: PhysicsMotionType, mass: number, staticfriction: number, dynamicfriction: number, restitution: number, fcombine: number, rcombine: number, terraindata: any, com: any, persist: boolean, layer: number, filter: number): void;
|
|
3295
|
+
protected static CreateCompoundPhysicsShapeAndBody(scene: Scene, root: TransformNode, entity: TransformNode, element: any, impostortype: number, staticfriction: number, dynamicfriction: number, restitution: number, fcombine: number, rcombine: number, sitems: PhyscisContainerData[], item: PhyscisContainerData, center: any, complex: boolean, trigger: boolean, persist: boolean, layer: number, filter: number): void;
|
|
3296
|
+
protected static CreateHeightFieldTerrainShapeFromMesh(terrainMesh: Mesh, scaleX: number, scaleZ: number): any;
|
|
3297
|
+
static GetPhysicsHeapSize(): number;
|
|
3298
|
+
static ConfigRigidbodyPhysics(scene: Scene, entity: TransformNode, child: boolean, trigger: boolean, physics: any, mass: number, com: Vector3): void;
|
|
3299
|
+
static CreatePhysicsMetadata(mass: number, drag?: number, angularDrag?: number, centerMass?: Vector3): any;
|
|
3300
|
+
static CreateCollisionMetadata(type: string, trigger?: boolean, convexmesh?: boolean, restitution?: number, dynamicfriction?: number, staticfriction?: number): any;
|
|
3301
|
+
static CreatePhysicsProperties(mass: number, drag?: number, angularDrag?: number, useGravity?: boolean, isKinematic?: boolean): any;
|
|
3302
|
+
protected static AddChildShapeFromParent(containerShape: PhysicsShape, parentTransform: TransformNode, newChild: PhysicsShape, childTransform: TransformNode): void;
|
|
3303
|
+
static NoImpostor: number;
|
|
3304
|
+
static SphereImpostor: number;
|
|
3305
|
+
static BoxImpostor: number;
|
|
3306
|
+
static PlaneImpostor: number;
|
|
3307
|
+
static MeshImpostor: number;
|
|
3308
|
+
static CapsuleImpostor: number;
|
|
3309
|
+
static CylinderImpostor: number;
|
|
3310
|
+
static ParticleImpostor: number;
|
|
3311
|
+
static HeightmapImpostor: number;
|
|
3312
|
+
static ConvexHullImpostor: number;
|
|
3313
|
+
static CustomImpostor: number;
|
|
3314
|
+
static RopeImpostor: number;
|
|
3315
|
+
static ClothImpostor: number;
|
|
3316
|
+
static SoftbodyImpostor: number;
|
|
3317
|
+
private static _factorAngVel;
|
|
3318
|
+
private static _factorLinVel;
|
|
3319
|
+
private static _factorLocalVel;
|
|
3320
|
+
private static _dampingAngVel;
|
|
3321
|
+
private static _dampingLinVel;
|
|
3322
|
+
private static _dampingLocalVel;
|
|
3323
|
+
private static _tempMatrix;
|
|
3324
|
+
static SetDamping: (body: PhysicsBody, linearDamping: number, angularDamping: number) => void;
|
|
3325
|
+
static GetDamping: (body: PhysicsBody) => {
|
|
3326
|
+
linearDamping: number;
|
|
3327
|
+
angularDamping: number;
|
|
3328
|
+
};
|
|
3329
|
+
static ApplyDamping: (body: PhysicsBody, linearDamping: number, angularDamping: number, timeStep: number) => void;
|
|
3330
|
+
static ApplyPerAxisAngularDamping: (body: PhysicsBody, angularDampingX: number, angularDampingY: number, angularDampingZ: number, timeStep: number) => void;
|
|
3331
|
+
static SetAngularFactor: (body: PhysicsBody, factorX: number, factorY: number, factorZ: number) => void;
|
|
3332
|
+
static SetLinearFactor: (body: PhysicsBody, factorX: number, factorY: number, factorZ: number) => void;
|
|
3333
|
+
static SetFactors: (body: PhysicsBody, linearFactor: Vector3, angularFactor: Vector3) => void;
|
|
3334
|
+
}
|
|
3335
|
+
export declare class PhyscisContainerData {
|
|
3336
|
+
shape: PhysicsShape;
|
|
3337
|
+
translation: Vector3;
|
|
3338
|
+
rotation: Quaternion;
|
|
3339
|
+
scale: Vector3;
|
|
3340
|
+
}
|
|
3341
|
+
export interface IPhysicsShapeCastResult {
|
|
3342
|
+
local: ShapeCastResult;
|
|
3343
|
+
world: ShapeCastResult;
|
|
3344
|
+
}
|
|
3345
|
+
export interface IPhysicsShapeCastQuery {
|
|
3346
|
+
shape: PhysicsShape;
|
|
3347
|
+
rotation: Quaternion;
|
|
3348
|
+
startPosition: Vector3;
|
|
3349
|
+
endPosition: Vector3;
|
|
3350
|
+
shouldHitTriggers: boolean;
|
|
3351
|
+
ignoreBody?: PhysicsBody;
|
|
3352
|
+
}
|
|
3353
|
+
export declare class RoundedVignettePlugin {
|
|
3354
|
+
static CreatePostProcess(scene: Scene, camera: Camera, options?: {
|
|
3355
|
+
color?: number[] | Color3 | Color4;
|
|
3356
|
+
center?: number[];
|
|
3357
|
+
intensity?: number;
|
|
3358
|
+
smoothness?: number;
|
|
3359
|
+
rounded?: boolean;
|
|
3360
|
+
blendMode?: string | number;
|
|
3361
|
+
}): PostProcess;
|
|
3362
|
+
}
|
|
3363
|
+
export declare class ShurikenParticles extends ScriptComponent {
|
|
3364
|
+
private static DefaultParticleTexture;
|
|
3365
|
+
private static readonly DEFAULT_PARTICLE_PROPERTIES;
|
|
3366
|
+
private m_particleSystem;
|
|
3367
|
+
private m_emitterMesh;
|
|
3368
|
+
private m_systemProperties;
|
|
3369
|
+
private m_isInitialized;
|
|
3370
|
+
private m_playOnAwake;
|
|
3371
|
+
private m_autoStart;
|
|
3372
|
+
private m_systemTime;
|
|
3373
|
+
private m_isLooping;
|
|
3374
|
+
private m_duration;
|
|
3375
|
+
private m_emissionTimer;
|
|
3376
|
+
private m_burstTimers;
|
|
3377
|
+
private m_prewarm;
|
|
3378
|
+
private m_startDelay;
|
|
3379
|
+
private m_simulationSpeed;
|
|
3380
|
+
private m_scalingMode;
|
|
3381
|
+
private m_emitterVelocityMode;
|
|
3382
|
+
private m_customSimulationSpace;
|
|
3383
|
+
private m_emitterVelocity;
|
|
3384
|
+
private m_gravitySource;
|
|
3385
|
+
private m_useUnscaledTime;
|
|
3386
|
+
private m_reportedDeltaTime;
|
|
3387
|
+
private m_isSystemRunning;
|
|
3388
|
+
private m_cullingMode;
|
|
3389
|
+
private m_isVisible;
|
|
3390
|
+
private m_pausedTime;
|
|
3391
|
+
private m_lastVisibilityCheck;
|
|
3392
|
+
private static readonly UNITY_TO_BABYLON_SIZE_RATIO;
|
|
3393
|
+
private static readonly UNITY_TO_BABYLON_GRAVITY_RATIO;
|
|
3394
|
+
private static readonly UNITY_TO_BABYLON_EMIT_RATE_RATIO;
|
|
3395
|
+
private static readonly UNITY_TO_BABYLON_EMIT_POWER_RATIO;
|
|
3396
|
+
private static readonly UNITY_TO_BABYLON_CONE_SCALE_RATIO;
|
|
3397
|
+
private static readonly UNITY_TO_BABYLON_LIFETIME_RATIO;
|
|
3398
|
+
private static readonly UNITY_TO_BABYLON_DEATH_FADE_ALPHA;
|
|
3399
|
+
static EMITTER_POSITION_OFFSET: Vector3;
|
|
3400
|
+
static EMITTER_ROTATION_OFFSET: Vector3;
|
|
3401
|
+
private m_animationCurves;
|
|
3402
|
+
private m_gradients;
|
|
3403
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
3404
|
+
getParticleSystem(): ParticleSystem | GPUParticleSystem;
|
|
3405
|
+
getEmitterMesh(): AbstractMesh;
|
|
3406
|
+
private internalPlay;
|
|
3407
|
+
play(): void;
|
|
3408
|
+
stop(): void;
|
|
3409
|
+
pause(): void;
|
|
3410
|
+
reset(): void;
|
|
3411
|
+
isPlaying(): boolean;
|
|
3412
|
+
getParticleCount(): number;
|
|
3413
|
+
getCustomSimulationSpace(): number;
|
|
3414
|
+
getEmitterVelocity(): Vector3;
|
|
3415
|
+
getGravitySource(): number;
|
|
3416
|
+
getUseUnscaledTime(): boolean;
|
|
3417
|
+
getCustomDeltaTime(): number;
|
|
3418
|
+
getReportedDeltaTime(): number;
|
|
3419
|
+
getEffectiveDeltaTime(): number;
|
|
3420
|
+
private calculateStartDelay;
|
|
3421
|
+
protected awake(): void;
|
|
3422
|
+
protected start(): void;
|
|
3423
|
+
protected ready(): void;
|
|
3424
|
+
protected update(): void;
|
|
3425
|
+
private shouldSimulateThisFrame;
|
|
3426
|
+
protected late(): void;
|
|
3427
|
+
protected step(): void;
|
|
3428
|
+
protected fixed(): void;
|
|
3429
|
+
protected after(): void;
|
|
3430
|
+
protected destroy(): void;
|
|
3431
|
+
private static mergeWithDefaults;
|
|
3432
|
+
private static deepMerge;
|
|
3433
|
+
private static getPropertyWithDefault;
|
|
3434
|
+
static getMinimalSerializationData(fullProperties: any): any;
|
|
3435
|
+
private static extractDifferences;
|
|
3436
|
+
private static arraysEqual;
|
|
3437
|
+
static getDefaultProperties(): IParticleSystemProperties;
|
|
3438
|
+
private initializeParticleSystem;
|
|
3439
|
+
private shouldUseGPUParticles;
|
|
3440
|
+
private createEmitterMesh;
|
|
3441
|
+
private createDefaultParticleTexture;
|
|
3442
|
+
private createCPUParticleSystem;
|
|
3443
|
+
private createGPUParticleSystem;
|
|
3444
|
+
private configureMainModule;
|
|
3445
|
+
private configureEmissionModule;
|
|
3446
|
+
private configureShapeModule;
|
|
3447
|
+
private configureRendererModule;
|
|
3448
|
+
private implementStretchRendering;
|
|
3449
|
+
private implementConstrainedBillboarding;
|
|
3450
|
+
private implementMeshRendering;
|
|
3451
|
+
private implementParticleSorting;
|
|
3452
|
+
private implementParticleAlignment;
|
|
3453
|
+
private implementParticleFlipping;
|
|
3454
|
+
private implementParticlePivot;
|
|
3455
|
+
private implementParticleRoll;
|
|
3456
|
+
private implementVelocityScaling;
|
|
3457
|
+
private implementNormalDirection;
|
|
3458
|
+
private implementFreeformStretching;
|
|
3459
|
+
private implementMaskInteraction;
|
|
3460
|
+
private implementStretchRotation;
|
|
3461
|
+
private implementShadowBias;
|
|
3462
|
+
private implementMultiMeshRendering;
|
|
3463
|
+
private implementCustomVertexStreams;
|
|
3464
|
+
private implementTrailMaterial;
|
|
3465
|
+
private implementMaterialConfiguration;
|
|
3466
|
+
private implementShadowConfiguration;
|
|
3467
|
+
private implementProbeConfiguration;
|
|
3468
|
+
private implementGPUInstancing;
|
|
3469
|
+
private implementSortingLayer;
|
|
3470
|
+
private configureVelocityOverLifetimeModule;
|
|
3471
|
+
private configureLimitVelocityOverLifetimeModule;
|
|
3472
|
+
private configureColorOverLifetimeModule;
|
|
3473
|
+
private configureSizeOverLifetimeModule;
|
|
3474
|
+
private configureRotationOverLifetimeModule;
|
|
3475
|
+
private configureTextureSheetAnimationModule;
|
|
3476
|
+
private ensureBasicConfiguration;
|
|
3477
|
+
private convertMinMaxCurve;
|
|
3478
|
+
private convertMinMaxGradient;
|
|
3479
|
+
private convertColor;
|
|
3480
|
+
private colorsEqual;
|
|
3481
|
+
private applyUnityGradientToBabylon;
|
|
3482
|
+
private convertVector3;
|
|
3483
|
+
private evaluateCurveAtTime;
|
|
3484
|
+
private setupBursts;
|
|
3485
|
+
private resetBurstTimers;
|
|
3486
|
+
private updateSystem;
|
|
3487
|
+
private updateEmission;
|
|
3488
|
+
private updateAnimationProperties;
|
|
3489
|
+
private updateBursts;
|
|
3490
|
+
private triggerBurst;
|
|
3491
|
+
private configureEmissionShape;
|
|
3492
|
+
private setupVelocityOverLifetime;
|
|
3493
|
+
private setupLimitVelocity;
|
|
3494
|
+
private createColorGradient;
|
|
3495
|
+
private setupSpriteAnimation;
|
|
3496
|
+
private createBoxShapeEmitter;
|
|
3497
|
+
private createSphereShapeEmitter;
|
|
3498
|
+
private createConeShapeEmitter;
|
|
3499
|
+
private configureNoiseModule;
|
|
3500
|
+
private configureCollisionModule;
|
|
3501
|
+
private configureTrailsModule;
|
|
3502
|
+
private configureSubEmittersModule;
|
|
3503
|
+
private updateEmitterVelocityInheritance;
|
|
3504
|
+
private updateCustomSimulationSpace;
|
|
3505
|
+
private updateRingBufferMode;
|
|
3506
|
+
private handleStopAction;
|
|
3507
|
+
private setupCullingVisibilityCheck;
|
|
3508
|
+
private isEmitterVisible;
|
|
3509
|
+
private handleVisibilityChange;
|
|
3510
|
+
private disposeParticleSystem;
|
|
3511
|
+
}
|
|
3512
|
+
export interface IParticleSystemMinMaxCurve {
|
|
3513
|
+
mode: number;
|
|
3514
|
+
constant: number;
|
|
3515
|
+
constantMin: number;
|
|
3516
|
+
constantMax: number;
|
|
3517
|
+
multiplier: number;
|
|
3518
|
+
curve?: IParticleSystemAnimationCurve;
|
|
3519
|
+
curveMin?: IParticleSystemAnimationCurve;
|
|
3520
|
+
curveMax?: IParticleSystemAnimationCurve;
|
|
3521
|
+
}
|
|
3522
|
+
export interface IParticleSystemMinMaxGradient {
|
|
3523
|
+
mode: number;
|
|
3524
|
+
color: IParticleSystemColor;
|
|
3525
|
+
colorMin: IParticleSystemColor;
|
|
3526
|
+
colorMax: IParticleSystemColor;
|
|
3527
|
+
gradient?: IParticleSystemGradient;
|
|
3528
|
+
gradientMin?: IParticleSystemGradient;
|
|
3529
|
+
gradientMax?: IParticleSystemGradient;
|
|
3530
|
+
}
|
|
3531
|
+
export interface IParticleSystemAnimationCurve {
|
|
3532
|
+
length: number;
|
|
3533
|
+
preWrapMode: number;
|
|
3534
|
+
postWrapMode: number;
|
|
3535
|
+
keys: IParticleSystemKeyframe[];
|
|
3536
|
+
}
|
|
3537
|
+
export interface IParticleSystemKeyframe {
|
|
3538
|
+
time: number;
|
|
3539
|
+
value: number;
|
|
3540
|
+
inTangent: number;
|
|
3541
|
+
outTangent: number;
|
|
3542
|
+
inWeight: number;
|
|
3543
|
+
outWeight: number;
|
|
3544
|
+
weightedMode: number;
|
|
3545
|
+
}
|
|
3546
|
+
export interface IParticleSystemGradient {
|
|
3547
|
+
mode: number;
|
|
3548
|
+
colorKeys: IParticleSystemColorKey[];
|
|
3549
|
+
alphaKeys: IParticleSystemAlphaKey[];
|
|
3550
|
+
}
|
|
3551
|
+
export interface IParticleSystemColorKey {
|
|
3552
|
+
color: IParticleSystemColor;
|
|
3553
|
+
time: number;
|
|
3554
|
+
}
|
|
3555
|
+
export interface IParticleSystemAlphaKey {
|
|
3556
|
+
alpha: number;
|
|
3557
|
+
time: number;
|
|
3558
|
+
}
|
|
3559
|
+
export interface IParticleSystemColor {
|
|
3560
|
+
r: number;
|
|
3561
|
+
g: number;
|
|
3562
|
+
b: number;
|
|
3563
|
+
a: number;
|
|
3564
|
+
}
|
|
3565
|
+
export interface IParticleSystemVector2 {
|
|
3566
|
+
x: number;
|
|
3567
|
+
y: number;
|
|
3568
|
+
}
|
|
3569
|
+
export interface IParticleSystemVector3 {
|
|
3570
|
+
x: number;
|
|
3571
|
+
y: number;
|
|
3572
|
+
z: number;
|
|
3573
|
+
}
|
|
3574
|
+
export interface IParticleSystemBurst {
|
|
3575
|
+
time: number;
|
|
3576
|
+
count: IParticleSystemMinMaxCurve;
|
|
3577
|
+
cycleCount: number;
|
|
3578
|
+
repeatInterval: number;
|
|
3579
|
+
probability: number;
|
|
3580
|
+
}
|
|
3581
|
+
export interface IParticleSystemMainModule {
|
|
3582
|
+
duration: number;
|
|
3583
|
+
loop: boolean;
|
|
3584
|
+
prewarm: boolean;
|
|
3585
|
+
startDelay: IParticleSystemMinMaxCurve;
|
|
3586
|
+
startDelayMultiplier: number;
|
|
3587
|
+
startLifetime: IParticleSystemMinMaxCurve;
|
|
3588
|
+
startLifetimeMultiplier: number;
|
|
3589
|
+
startSpeed: IParticleSystemMinMaxCurve;
|
|
3590
|
+
startSpeedMultiplier: number;
|
|
3591
|
+
startSize3D: boolean;
|
|
3592
|
+
startSize: IParticleSystemMinMaxCurve;
|
|
3593
|
+
startSizeMultiplier: number;
|
|
3594
|
+
startSizeX: IParticleSystemMinMaxCurve;
|
|
3595
|
+
startSizeXMultiplier: number;
|
|
3596
|
+
startSizeY: IParticleSystemMinMaxCurve;
|
|
3597
|
+
startSizeYMultiplier: number;
|
|
3598
|
+
startSizeZ: IParticleSystemMinMaxCurve;
|
|
3599
|
+
startSizeZMultiplier: number;
|
|
3600
|
+
startRotation3D: boolean;
|
|
3601
|
+
startRotation: IParticleSystemMinMaxCurve;
|
|
3602
|
+
startRotationMultiplier: number;
|
|
3603
|
+
startRotationX: IParticleSystemMinMaxCurve;
|
|
3604
|
+
startRotationXMultiplier: number;
|
|
3605
|
+
startRotationY: IParticleSystemMinMaxCurve;
|
|
3606
|
+
startRotationYMultiplier: number;
|
|
3607
|
+
startRotationZ: IParticleSystemMinMaxCurve;
|
|
3608
|
+
startRotationZMultiplier: number;
|
|
3609
|
+
flipRotation: number;
|
|
3610
|
+
startColor: IParticleSystemMinMaxGradient;
|
|
3611
|
+
gravityModifier: IParticleSystemMinMaxCurve;
|
|
3612
|
+
gravityModifierMultiplier: number;
|
|
3613
|
+
simulationSpace: number;
|
|
3614
|
+
simulationSpeed: number;
|
|
3615
|
+
deltaTime: number;
|
|
3616
|
+
scalingMode: number;
|
|
3617
|
+
playOnAwake: boolean;
|
|
3618
|
+
emitterVelocityMode: number;
|
|
3619
|
+
maxParticles: number;
|
|
3620
|
+
stopAction: number;
|
|
3621
|
+
cullingMode: number;
|
|
3622
|
+
ringBufferMode: number;
|
|
3623
|
+
ringBufferLoopRange: IParticleSystemVector2;
|
|
3624
|
+
customSimulationSpace?: number;
|
|
3625
|
+
emitterVelocity?: IParticleSystemVector3;
|
|
3626
|
+
gravitySource?: number;
|
|
3627
|
+
useUnscaledTime?: boolean;
|
|
3628
|
+
}
|
|
3629
|
+
export interface IParticleSystemEmissionModule {
|
|
3630
|
+
enabled: boolean;
|
|
3631
|
+
rateOverTime: IParticleSystemMinMaxCurve;
|
|
3632
|
+
rateOverTimeMultiplier: number;
|
|
3633
|
+
rateOverDistance: IParticleSystemMinMaxCurve;
|
|
3634
|
+
rateOverDistanceMultiplier: number;
|
|
3635
|
+
burstCount: number;
|
|
3636
|
+
bursts: IParticleSystemBurst[];
|
|
3637
|
+
}
|
|
3638
|
+
export interface IParticleSystemShapeModule {
|
|
3639
|
+
enabled: boolean;
|
|
3640
|
+
shapeType: number;
|
|
3641
|
+
angle: number;
|
|
3642
|
+
radius: number;
|
|
3643
|
+
radiusMode: number;
|
|
3644
|
+
radiusSpread: number;
|
|
3645
|
+
radiusSpeed: IParticleSystemMinMaxCurve;
|
|
3646
|
+
radiusSpeedMultiplier: number;
|
|
3647
|
+
donutRadius: number;
|
|
3648
|
+
position: IParticleSystemVector3;
|
|
3649
|
+
rotation: IParticleSystemVector3;
|
|
3650
|
+
scale: IParticleSystemVector3;
|
|
3651
|
+
alignToDirection: boolean;
|
|
3652
|
+
randomDirectionAmount: number;
|
|
3653
|
+
sphericalDirectionAmount: number;
|
|
3654
|
+
randomPositionAmount: number;
|
|
3655
|
+
biasOnTriangles: boolean;
|
|
3656
|
+
useMeshMaterialIndex: boolean;
|
|
3657
|
+
meshMaterialIndex: number;
|
|
3658
|
+
useMeshColors: boolean;
|
|
3659
|
+
normalOffset: number;
|
|
3660
|
+
meshSpawnMode: number;
|
|
3661
|
+
meshSpawnSpread: number;
|
|
3662
|
+
meshSpawnSpeed: IParticleSystemMinMaxCurve;
|
|
3663
|
+
meshSpawnSpeedMultiplier: number;
|
|
3664
|
+
arc: number;
|
|
3665
|
+
arcMode: number;
|
|
3666
|
+
arcSpread: number;
|
|
3667
|
+
arcSpeed: IParticleSystemMinMaxCurve;
|
|
3668
|
+
arcSpeedMultiplier: number;
|
|
3669
|
+
length: number;
|
|
3670
|
+
boxThickness: IParticleSystemVector3;
|
|
3671
|
+
}
|
|
3672
|
+
export interface IParticleSystemRendererModule {
|
|
3673
|
+
enabled: boolean;
|
|
3674
|
+
materials: any[];
|
|
3675
|
+
renderMode: number;
|
|
3676
|
+
cameraVelocityScale: number;
|
|
3677
|
+
velocityScale: number;
|
|
3678
|
+
lengthScale: number;
|
|
3679
|
+
normalDirection: number;
|
|
3680
|
+
sortMode: number;
|
|
3681
|
+
sortingFudge: number;
|
|
3682
|
+
minParticleSize: number;
|
|
3683
|
+
maxParticleSize: number;
|
|
3684
|
+
alignment: number;
|
|
3685
|
+
flip: IParticleSystemVector2;
|
|
3686
|
+
allowRoll: boolean;
|
|
3687
|
+
pivot: IParticleSystemVector3;
|
|
3688
|
+
shadowCastingMode: number;
|
|
3689
|
+
receiveShadows: boolean;
|
|
3690
|
+
motionVectorGenerationMode: number;
|
|
3691
|
+
lightProbeUsage: number;
|
|
3692
|
+
reflectionProbeUsage: number;
|
|
3693
|
+
enableGPUInstancing: boolean;
|
|
3694
|
+
mesh?: any;
|
|
3695
|
+
sortingLayerID: number;
|
|
3696
|
+
sortingOrder: number;
|
|
3697
|
+
freeformStretching?: boolean;
|
|
3698
|
+
maskInteraction?: number;
|
|
3699
|
+
meshCount?: number;
|
|
3700
|
+
meshDistribution?: number;
|
|
3701
|
+
rotateWithStretchDirection?: boolean;
|
|
3702
|
+
shadowBias?: number;
|
|
3703
|
+
supportsMeshInstancing?: boolean;
|
|
3704
|
+
activeVertexStreamsCount?: number;
|
|
3705
|
+
activeTrailVertexStreamsCount?: number;
|
|
3706
|
+
meshes?: any[];
|
|
3707
|
+
trailMaterial?: any;
|
|
3708
|
+
}
|
|
3709
|
+
export interface IParticleSystemVelocityOverLifetimeModule {
|
|
3710
|
+
enabled: boolean;
|
|
3711
|
+
space: number;
|
|
3712
|
+
x: IParticleSystemMinMaxCurve;
|
|
3713
|
+
y: IParticleSystemMinMaxCurve;
|
|
3714
|
+
z: IParticleSystemMinMaxCurve;
|
|
3715
|
+
xMultiplier: number;
|
|
3716
|
+
yMultiplier: number;
|
|
3717
|
+
zMultiplier: number;
|
|
3718
|
+
orbitalX: IParticleSystemMinMaxCurve;
|
|
3719
|
+
orbitalY: IParticleSystemMinMaxCurve;
|
|
3720
|
+
orbitalZ: IParticleSystemMinMaxCurve;
|
|
3721
|
+
orbitalXMultiplier: number;
|
|
3722
|
+
orbitalYMultiplier: number;
|
|
3723
|
+
orbitalZMultiplier: number;
|
|
3724
|
+
orbitalOffsetX: IParticleSystemMinMaxCurve;
|
|
3725
|
+
orbitalOffsetY: IParticleSystemMinMaxCurve;
|
|
3726
|
+
orbitalOffsetZ: IParticleSystemMinMaxCurve;
|
|
3727
|
+
orbitalOffsetXMultiplier: number;
|
|
3728
|
+
orbitalOffsetYMultiplier: number;
|
|
3729
|
+
orbitalOffsetZMultiplier: number;
|
|
3730
|
+
radial: IParticleSystemMinMaxCurve;
|
|
3731
|
+
radialMultiplier: number;
|
|
3732
|
+
speedModifier: IParticleSystemMinMaxCurve;
|
|
3733
|
+
speedModifierMultiplier: number;
|
|
3734
|
+
}
|
|
3735
|
+
export interface IParticleSystemLimitVelocityOverLifetimeModule {
|
|
3736
|
+
enabled: boolean;
|
|
3737
|
+
limitX: IParticleSystemMinMaxCurve;
|
|
3738
|
+
limitY: IParticleSystemMinMaxCurve;
|
|
3739
|
+
limitZ: IParticleSystemMinMaxCurve;
|
|
3740
|
+
limitXMultiplier: number;
|
|
3741
|
+
limitYMultiplier: number;
|
|
3742
|
+
limitZMultiplier: number;
|
|
3743
|
+
limit: IParticleSystemMinMaxCurve;
|
|
3744
|
+
limitMultiplier: number;
|
|
3745
|
+
dampen: number;
|
|
3746
|
+
separateAxes: boolean;
|
|
3747
|
+
space: number;
|
|
3748
|
+
drag: IParticleSystemMinMaxCurve;
|
|
3749
|
+
dragMultiplier: number;
|
|
3750
|
+
multiplyDragByParticleSize: boolean;
|
|
3751
|
+
multiplyDragByParticleVelocity: boolean;
|
|
3752
|
+
}
|
|
3753
|
+
export interface IParticleSystemColorOverLifetimeModule {
|
|
3754
|
+
enabled: boolean;
|
|
3755
|
+
color: IParticleSystemMinMaxGradient;
|
|
3756
|
+
}
|
|
3757
|
+
export interface IParticleSystemSizeOverLifetimeModule {
|
|
3758
|
+
enabled: boolean;
|
|
3759
|
+
size: IParticleSystemMinMaxCurve;
|
|
3760
|
+
sizeMultiplier: number;
|
|
3761
|
+
x: IParticleSystemMinMaxCurve;
|
|
3762
|
+
xMultiplier: number;
|
|
3763
|
+
y: IParticleSystemMinMaxCurve;
|
|
3764
|
+
yMultiplier: number;
|
|
3765
|
+
z: IParticleSystemMinMaxCurve;
|
|
3766
|
+
zMultiplier: number;
|
|
3767
|
+
separateAxes: boolean;
|
|
3768
|
+
}
|
|
3769
|
+
export interface IParticleSystemRotationOverLifetimeModule {
|
|
3770
|
+
enabled: boolean;
|
|
3771
|
+
x: IParticleSystemMinMaxCurve;
|
|
3772
|
+
xMultiplier: number;
|
|
3773
|
+
y: IParticleSystemMinMaxCurve;
|
|
3774
|
+
yMultiplier: number;
|
|
3775
|
+
z: IParticleSystemMinMaxCurve;
|
|
3776
|
+
zMultiplier: number;
|
|
3777
|
+
separateAxes: boolean;
|
|
3778
|
+
}
|
|
3779
|
+
export interface IParticleSystemTextureSheetAnimationModule {
|
|
3780
|
+
enabled: boolean;
|
|
3781
|
+
mode: number;
|
|
3782
|
+
timeMode: number;
|
|
3783
|
+
fps: number;
|
|
3784
|
+
numTilesX: number;
|
|
3785
|
+
numTilesY: number;
|
|
3786
|
+
animation: number;
|
|
3787
|
+
useRandomRow: boolean;
|
|
3788
|
+
frameOverTime: IParticleSystemMinMaxCurve;
|
|
3789
|
+
frameOverTimeMultiplier: number;
|
|
3790
|
+
startFrame: IParticleSystemMinMaxCurve;
|
|
3791
|
+
startFrameMultiplier: number;
|
|
3792
|
+
cycleCount: number;
|
|
3793
|
+
rowIndex: number;
|
|
3794
|
+
rowMode: number;
|
|
3795
|
+
uvChannelMask: number;
|
|
3796
|
+
flipU: number;
|
|
3797
|
+
flipV: number;
|
|
3798
|
+
speedRange: IParticleSystemVector2;
|
|
3799
|
+
}
|
|
3800
|
+
export interface IParticleSystemProperties {
|
|
3801
|
+
isPlaying: boolean;
|
|
3802
|
+
isPaused: boolean;
|
|
3803
|
+
isStopped: boolean;
|
|
3804
|
+
isEmitting: boolean;
|
|
3805
|
+
particleCount: number;
|
|
3806
|
+
time: number;
|
|
3807
|
+
randomSeed: number;
|
|
3808
|
+
useAutoRandomSeed: boolean;
|
|
3809
|
+
name: string;
|
|
3810
|
+
instanceId: number;
|
|
3811
|
+
enabled: boolean;
|
|
3812
|
+
transformPosition: IParticleSystemVector3;
|
|
3813
|
+
transformRotation: IParticleSystemVector3;
|
|
3814
|
+
transformScale: IParticleSystemVector3;
|
|
3815
|
+
materialName?: string;
|
|
3816
|
+
materialId?: number;
|
|
3817
|
+
mainTextureName?: string;
|
|
3818
|
+
mainTextureId?: number;
|
|
3819
|
+
main: IParticleSystemMainModule;
|
|
3820
|
+
emission: IParticleSystemEmissionModule;
|
|
3821
|
+
shape: IParticleSystemShapeModule;
|
|
3822
|
+
renderer: IParticleSystemRendererModule;
|
|
3823
|
+
velocityOverLifetime: IParticleSystemVelocityOverLifetimeModule;
|
|
3824
|
+
limitVelocityOverLifetime: IParticleSystemLimitVelocityOverLifetimeModule;
|
|
3825
|
+
colorOverLifetime: IParticleSystemColorOverLifetimeModule;
|
|
3826
|
+
sizeOverLifetime: IParticleSystemSizeOverLifetimeModule;
|
|
3827
|
+
rotationOverLifetime: IParticleSystemRotationOverLifetimeModule;
|
|
3828
|
+
textureSheetAnimation: IParticleSystemTextureSheetAnimationModule;
|
|
3829
|
+
inheritVelocity?: any;
|
|
3830
|
+
forceOverLifetime?: any;
|
|
3831
|
+
colorBySpeed?: any;
|
|
3832
|
+
sizeBySpeed?: any;
|
|
3833
|
+
rotationBySpeed?: any;
|
|
3834
|
+
externalForces?: any;
|
|
3835
|
+
noise?: any;
|
|
3836
|
+
collision?: any;
|
|
3837
|
+
triggers?: any;
|
|
3838
|
+
subEmitters?: any;
|
|
3839
|
+
lights?: any;
|
|
3840
|
+
trails?: any;
|
|
3841
|
+
customData?: any;
|
|
3842
|
+
}
|
|
3843
|
+
export declare class MeshNormalProxy {
|
|
3844
|
+
blendWithPhysicsNormal: number;
|
|
3845
|
+
maxLookupDistance: number;
|
|
3846
|
+
searchRadius: number;
|
|
3847
|
+
useProjectionTest: boolean;
|
|
3848
|
+
private _v0x;
|
|
3849
|
+
private _v0y;
|
|
3850
|
+
private _v0z;
|
|
3851
|
+
private _v1x;
|
|
3852
|
+
private _v1y;
|
|
3853
|
+
private _v1z;
|
|
3854
|
+
private _v2x;
|
|
3855
|
+
private _v2y;
|
|
3856
|
+
private _v2z;
|
|
3857
|
+
private _n0x;
|
|
3858
|
+
private _n0y;
|
|
3859
|
+
private _n0z;
|
|
3860
|
+
private _n1x;
|
|
3861
|
+
private _n1y;
|
|
3862
|
+
private _n1z;
|
|
3863
|
+
private _n2x;
|
|
3864
|
+
private _n2y;
|
|
3865
|
+
private _n2z;
|
|
3866
|
+
private _fnx;
|
|
3867
|
+
private _fny;
|
|
3868
|
+
private _fnz;
|
|
3869
|
+
private _cx;
|
|
3870
|
+
private _cy;
|
|
3871
|
+
private _cz;
|
|
3872
|
+
private _triangleCount;
|
|
3873
|
+
private _cellTriangles;
|
|
3874
|
+
private _htKeys;
|
|
3875
|
+
private _htStarts;
|
|
3876
|
+
private _htCounts;
|
|
3877
|
+
private _cellSize;
|
|
3878
|
+
private _hashOriginX;
|
|
3879
|
+
private _hashOriginZ;
|
|
3880
|
+
private _sourceMesh;
|
|
3881
|
+
private _worldMatrix;
|
|
3882
|
+
private _invWorldMatrix;
|
|
3883
|
+
private _matrixDirty;
|
|
3884
|
+
private _scratchV0;
|
|
3885
|
+
private _scratchLocal;
|
|
3886
|
+
private _candidatesBuf;
|
|
3887
|
+
private _uniqueBuf;
|
|
3888
|
+
private _seenSet;
|
|
3889
|
+
get triangleCount(): number;
|
|
3890
|
+
get cellSize(): number;
|
|
3891
|
+
get sourceMesh(): AbstractMesh;
|
|
3892
|
+
buildFromMesh(mesh: AbstractMesh, cellSize?: number): boolean;
|
|
3893
|
+
invalidateTransform(): void;
|
|
3894
|
+
getNormalAtPointToRef(worldHitPoint: Vector3, resultNormal: Vector3, rawHavokNormal?: Vector3): boolean;
|
|
3895
|
+
dispose(): void;
|
|
3896
|
+
private _makeHashKey;
|
|
3897
|
+
private _bsearchCell;
|
|
3898
|
+
private _barycentricScratch;
|
|
3899
|
+
private _computeBarycentricInline;
|
|
3900
|
+
}
|
|
3901
|
+
export declare class SmoothMeshNormalSystem {
|
|
3902
|
+
private static _instance;
|
|
3903
|
+
static get instance(): SmoothMeshNormalSystem;
|
|
3904
|
+
private _registry;
|
|
3905
|
+
register(body: PhysicsBody, proxy: MeshNormalProxy): void;
|
|
3906
|
+
unregister(body: PhysicsBody, disposeProxy?: boolean): void;
|
|
3907
|
+
lookup(body: PhysicsBody): MeshNormalProxy;
|
|
3908
|
+
has(body: PhysicsBody): boolean;
|
|
3909
|
+
get count(): number;
|
|
3910
|
+
disposeAll(): void;
|
|
3911
|
+
static buildAndRegister(mesh: AbstractMesh, body: PhysicsBody, cellSize?: number, blendWithPhysics?: number): MeshNormalProxy;
|
|
3912
|
+
}
|
|
3913
|
+
export interface IDetailLayerData {
|
|
3914
|
+
layerindex?: number;
|
|
3915
|
+
densitymap?: number[];
|
|
3916
|
+
densitywidth?: number;
|
|
3917
|
+
densityheight?: number;
|
|
3918
|
+
minwidth?: number;
|
|
3919
|
+
maxwidth?: number;
|
|
3920
|
+
minheight?: number;
|
|
3921
|
+
maxheight?: number;
|
|
3922
|
+
noisespread?: number;
|
|
3923
|
+
bendfactor?: number;
|
|
3924
|
+
healthycolor?: number[];
|
|
3925
|
+
drycolor?: number[];
|
|
3926
|
+
colorvariationmap?: number[];
|
|
3927
|
+
rendermode?: string;
|
|
3928
|
+
useprototypemesh?: boolean;
|
|
3929
|
+
useinstancing?: boolean;
|
|
3930
|
+
prototypemeshnodeid?: string;
|
|
3931
|
+
prototypemeshname?: string;
|
|
3932
|
+
prototypetexturefile?: string;
|
|
3933
|
+
prototypetexture?: any;
|
|
3934
|
+
isvalid?: boolean;
|
|
3935
|
+
maxdistance?: number;
|
|
3936
|
+
noiseseed?: number;
|
|
3937
|
+
positionjitter?: number;
|
|
3938
|
+
positionsjitter?: number;
|
|
3939
|
+
aligntoground?: number;
|
|
3940
|
+
holeedgepadding?: number;
|
|
3941
|
+
prototypelocalscale?: number[];
|
|
3942
|
+
detailinstancepatches?: Array<{
|
|
3943
|
+
patchX: number;
|
|
3944
|
+
patchY: number;
|
|
3945
|
+
bounds: number[];
|
|
3946
|
+
transforms: number[];
|
|
3947
|
+
}>;
|
|
3948
|
+
densityparam?: number;
|
|
3949
|
+
usedensityscaling?: boolean;
|
|
3950
|
+
density?: number;
|
|
3951
|
+
targetcoverage?: number;
|
|
3952
|
+
detailscattermode?: string;
|
|
3953
|
+
}
|
|
3954
|
+
export interface ITerrainProperties {
|
|
3955
|
+
name?: string;
|
|
3956
|
+
terrainsize?: number[];
|
|
3957
|
+
basemapdistance?: number;
|
|
3958
|
+
treebillboarddistance?: number;
|
|
3959
|
+
treecrossfadelength?: number;
|
|
3960
|
+
treedistance?: number;
|
|
3961
|
+
treeinstancecount?: number;
|
|
3962
|
+
detailwidth?: number;
|
|
3963
|
+
detailheight?: number;
|
|
3964
|
+
detailpatchcount?: number;
|
|
3965
|
+
detailresolution?: number;
|
|
3966
|
+
detailresolutionperpatch?: number;
|
|
3967
|
+
detailbillboardingmode?: number;
|
|
3968
|
+
detailgrassshadowlevel?: number;
|
|
3969
|
+
detailgrassreceiveshadows?: boolean;
|
|
3970
|
+
detailobjectdensity?: number;
|
|
3971
|
+
detailobjectdistance?: number;
|
|
3972
|
+
wavinggrassamount?: number;
|
|
3973
|
+
wavinggrassspeed?: number;
|
|
3974
|
+
wavinggrasssize?: number;
|
|
3975
|
+
wavinggrasstint?: number[];
|
|
3976
|
+
detaillayers?: IDetailLayerData[];
|
|
3977
|
+
detailscattermode?: string;
|
|
3978
|
+
}
|
|
3979
|
+
export interface IDetailInstance {
|
|
3980
|
+
position: Vector3;
|
|
3981
|
+
rotation: number;
|
|
3982
|
+
scale: Vector3;
|
|
3983
|
+
color: Color4;
|
|
3984
|
+
}
|
|
3985
|
+
export declare enum ColorCorrectionMode {
|
|
3986
|
+
None = 0,
|
|
3987
|
+
ToGamma = 1,
|
|
3988
|
+
ToLinear = 2
|
|
3989
|
+
}
|
|
3990
|
+
export declare class TerrainBuilder extends ScriptComponent {
|
|
3991
|
+
private detailLayerContainers;
|
|
3992
|
+
private detailMeshSources;
|
|
3993
|
+
static grassHeightScale: number;
|
|
3994
|
+
static grassRandomFlip: boolean;
|
|
3995
|
+
static grassCastShadows: boolean;
|
|
3996
|
+
static grassReceiveFog: boolean;
|
|
3997
|
+
static grassColorCorrectionMode: ColorCorrectionMode;
|
|
3998
|
+
static detailChunkMode: number;
|
|
3999
|
+
static detailChunkTargetInstances: number;
|
|
4000
|
+
static detailChunkWorldSize: number;
|
|
4001
|
+
static detailChunkMaxChunksPerAxis: number;
|
|
4002
|
+
static detailChunkMaxTotalChunks: number;
|
|
4003
|
+
static meshDetailChunkMode: number;
|
|
4004
|
+
static meshDetailChunkTargetInstances: number;
|
|
4005
|
+
static meshDetailChunkWorldSize: number;
|
|
4006
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
4007
|
+
protected awake(): void;
|
|
4008
|
+
protected destroy(): void;
|
|
4009
|
+
private disposeDetailLayers;
|
|
4010
|
+
static BuildDetailPrototypes(properties: ITerrainProperties, terrainTransform: TransformNode, scene: Scene, builderInstance?: TerrainBuilder): void;
|
|
4011
|
+
private static BuildMeshDetailLayer;
|
|
4012
|
+
private static BuildGrassDetailLayer;
|
|
4013
|
+
private static GenerateMeshInstancesFromUnityPatches;
|
|
4014
|
+
private static CreateGrassThinInstancesFromDensityMap;
|
|
4015
|
+
private static CreateDetailThinInstancesFromDensityMap;
|
|
4016
|
+
private static CreateGrassPrototype;
|
|
4017
|
+
private static CreateSingleQuadBillboard;
|
|
4018
|
+
private static CreateCrossQuadGrass;
|
|
4019
|
+
private static ApplyUpNormals;
|
|
4020
|
+
private static HashToUnitFloat;
|
|
4021
|
+
private static NormalizeRotation;
|
|
4022
|
+
private static DoColorCorrection;
|
|
4023
|
+
private static GammaToLinear;
|
|
4024
|
+
private static LinearToGamma;
|
|
4025
|
+
}
|
|
4026
|
+
export declare class UserInterface extends ScriptComponent {
|
|
4027
|
+
private static readonly PHYSICAL_SIZE_SLICE_FACTOR;
|
|
4028
|
+
private static readonly PHYSICAL_SIZE_POINT_FACTOR;
|
|
4029
|
+
private static readonly CHARACTER_WORD_SPACE_FACTOR;
|
|
4030
|
+
static OnParseNodeObject: Observable<any>;
|
|
4031
|
+
static OnInterfaceLoaded: Observable<string>;
|
|
4032
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
4033
|
+
protected start(): Promise<void>;
|
|
4034
|
+
protected parseNodeObject(rootNode: any, hostPrefix: string): void;
|
|
4035
|
+
private processNodeSources;
|
|
4036
|
+
private extractRequiredFonts;
|
|
4037
|
+
private loadRequiredFonts;
|
|
4038
|
+
private loadFontManifest;
|
|
4039
|
+
private loadSingleFont;
|
|
4040
|
+
private loadUnityFont;
|
|
4041
|
+
private loadGoogleFont;
|
|
4042
|
+
private isGoogleFont;
|
|
4043
|
+
private isSystemFontAvailable;
|
|
4044
|
+
private static CreateInternalUserInterface;
|
|
4045
|
+
private static LoadForegroundInterfaceData;
|
|
4046
|
+
private static LoadBackgroundInterfaceData;
|
|
4047
|
+
private static ParseUserInterfaceObject;
|
|
4048
|
+
private static FixUserInterfacePrototypes;
|
|
4049
|
+
private static ProcessControlEvents;
|
|
4050
|
+
private static processUnityUIEvents;
|
|
4051
|
+
private static processUIToolkitEvents;
|
|
4052
|
+
private static isUnityUIEvent;
|
|
4053
|
+
private static wireUnityUIButtonEvents;
|
|
4054
|
+
private static wireUnityUIToggleEvents;
|
|
4055
|
+
private static wireUnityUISliderEvents;
|
|
4056
|
+
private static wireUnityUIDropdownEvents;
|
|
4057
|
+
private static wireUnityUIScrollRectEvents;
|
|
4058
|
+
private static wireUnityUIInputFieldEvents;
|
|
4059
|
+
private static wireUIToolkitButtonEvents;
|
|
4060
|
+
private static wireUIToolkitToggleEvents;
|
|
4061
|
+
private static wireUIToolkitSliderEvents;
|
|
4062
|
+
private static wireUIToolkitDropdownEvents;
|
|
4063
|
+
private static executeUnityUIEvent;
|
|
4064
|
+
private static executeUIToolkitEvent;
|
|
4065
|
+
private static findTargetObject;
|
|
4066
|
+
private static extractParameters;
|
|
4067
|
+
private static resolveObjectReference;
|
|
4068
|
+
private static executeUIToolkitCallback;
|
|
4069
|
+
private static ProcessHdrColors;
|
|
4070
|
+
private static emulateUnityHDR;
|
|
4071
|
+
private static applyUnityHDRToneMapping;
|
|
4072
|
+
private static applyHdrEffects;
|
|
4073
|
+
private static applyGlowEffects;
|
|
4074
|
+
private static applyLightingEffects;
|
|
4075
|
+
private static applyAdvancedLightingEffects;
|
|
4076
|
+
private static parseRgbaColor;
|
|
4077
|
+
private static ApplyHdrVisualEnhancements;
|
|
4078
|
+
private static ProcessPreserveAspectRatio;
|
|
4079
|
+
private static applyPreserveAspectRatio;
|
|
4080
|
+
private static ProcessTextSpacingProperties;
|
|
4081
|
+
private static applyCharacterSpacing;
|
|
4082
|
+
private static applyWordSpacing;
|
|
4083
|
+
static IsForegroundReady(scene: Scene): boolean;
|
|
4084
|
+
static SetForegroundTexture(scene: Scene, adt: AdvancedDynamicTexture): void;
|
|
4085
|
+
static GetForegroundTexture(scene: Scene, createOptions?: any): AdvancedDynamicTexture;
|
|
4086
|
+
static IsBackgroundReady(scene: Scene): boolean;
|
|
4087
|
+
static SetBackgroundTexture(scene: Scene, adt: AdvancedDynamicTexture): void;
|
|
4088
|
+
static GetBackgroundTexture(scene: Scene, createOptions?: any): AdvancedDynamicTexture;
|
|
4089
|
+
static GetCanvasElement(name: string, scene?: Scene): Control;
|
|
4090
|
+
static ShowCanvasElement(element: Control, fadeDuration?: number, fadeSpeedRatio?: number): Promise<void>;
|
|
4091
|
+
static HideCanvasElement(element: Control, fadeDuration?: number, fadeSpeedRatio?: number): Promise<void>;
|
|
4092
|
+
static AttachClickHandler(element: Control, func: (eventData?: Vector2WithInfo, eventState?: EventState) => any): Observer<Vector2WithInfo> | null;
|
|
4093
|
+
}
|
|
4094
|
+
export declare class WebVideoPlayer extends ScriptComponent implements IAssetPreloader {
|
|
4095
|
+
private videoLoop;
|
|
4096
|
+
private videoMuted;
|
|
4097
|
+
private videoAlpha;
|
|
4098
|
+
private videoFaded;
|
|
4099
|
+
private videoPoster;
|
|
4100
|
+
private videoInvert;
|
|
4101
|
+
private videoSample;
|
|
4102
|
+
private videoVolume;
|
|
4103
|
+
private videoMipmaps;
|
|
4104
|
+
private videoPlayback;
|
|
4105
|
+
private videoPlayOnAwake;
|
|
4106
|
+
private videoPreloaderUrl;
|
|
4107
|
+
private videoBlobUrl;
|
|
4108
|
+
private videoPreload;
|
|
4109
|
+
private _initializedReadyInstance;
|
|
4110
|
+
getVideoMaterial(): StandardMaterial;
|
|
4111
|
+
getVideoTexture(): VideoTexture;
|
|
4112
|
+
getVideoElement(): HTMLVideoElement;
|
|
4113
|
+
getVideoScreen(): AbstractMesh;
|
|
4114
|
+
getVideoBlobUrl(): string;
|
|
4115
|
+
onReadyObservable: Observable<VideoTexture>;
|
|
4116
|
+
protected m_abstractMesh: AbstractMesh;
|
|
4117
|
+
protected m_videoTexture: VideoTexture;
|
|
4118
|
+
protected m_videoMaterial: StandardMaterial;
|
|
4119
|
+
protected m_diffuseIntensity: number;
|
|
4120
|
+
constructor(transform: TransformNode, scene: Scene, properties?: any, alias?: string);
|
|
4121
|
+
protected awake(): void;
|
|
4122
|
+
protected destroy(): void;
|
|
4123
|
+
protected awakeWebVideoPlayer(): void;
|
|
4124
|
+
protected destroyWebVideoPlayer(): void;
|
|
4125
|
+
isReady(): boolean;
|
|
4126
|
+
isPlaying(): boolean;
|
|
4127
|
+
isPaused(): boolean;
|
|
4128
|
+
play(): Promise<boolean>;
|
|
4129
|
+
private internalPlay;
|
|
4130
|
+
private checkedPlay;
|
|
4131
|
+
private checkedRePlay;
|
|
4132
|
+
pause(): boolean;
|
|
4133
|
+
mute(): boolean;
|
|
4134
|
+
unmute(): boolean;
|
|
4135
|
+
getVolume(): number;
|
|
4136
|
+
setVolume(volume: number): boolean;
|
|
4137
|
+
setDataSource(source: string | string[] | HTMLVideoElement): void;
|
|
4138
|
+
revokeVideoBlobUrl(): void;
|
|
4139
|
+
addPreloaderTasks(assetsManager: PreloadAssetsManager): void;
|
|
4140
|
+
}
|
|
4141
|
+
//# sourceMappingURL=scenemanager.d.ts.map
|