@babylonjs/core 7.21.0 → 7.21.2
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/Animations/easing.d.ts +20 -20
- package/Animations/easing.js +10 -10
- package/Animations/easing.js.map +1 -1
- package/Buffers/buffer.nonFloatVertexBuffers.js +2 -1
- package/Buffers/buffer.nonFloatVertexBuffers.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.d.ts +2 -2
- package/Cameras/VR/vrExperienceHelper.js +1 -1
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +9 -4
- package/Collisions/gpuPicker.js +64 -44
- package/Collisions/gpuPicker.js.map +1 -1
- package/Collisions/index.d.ts +4 -0
- package/Collisions/index.js +4 -0
- package/Collisions/index.js.map +1 -1
- package/Culling/Helper/computeShaderBoundingHelper.js +0 -3
- package/Culling/Helper/computeShaderBoundingHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.d.ts +0 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +0 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
- package/Engines/abstractEngine.d.ts +2 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/nativeEngine.js +0 -3
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +2 -1
- package/Engines/thinEngine.js +3 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +3 -1
- package/Engines/webgpuEngine.js +6 -3
- package/Engines/webgpuEngine.js.map +1 -1
- package/Gizmos/gizmo.d.ts +2 -2
- package/Gizmos/gizmo.js +1 -1
- package/Gizmos/gizmo.js.map +1 -1
- package/Layers/effectLayer.d.ts +1 -1
- package/Layers/effectLayer.js +18 -16
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.d.ts +1 -1
- package/Layers/glowLayer.js +3 -5
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.d.ts +1 -1
- package/Layers/highlightLayer.js +7 -9
- package/Layers/highlightLayer.js.map +1 -1
- package/Layers/layer.d.ts +0 -1
- package/Layers/layer.js +15 -17
- package/Layers/layer.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.d.ts +0 -3
- package/Lights/Shadows/cascadedShadowGenerator.js +0 -3
- package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
- package/Materials/Background/backgroundMaterial.d.ts +0 -1
- package/Materials/Background/backgroundMaterial.js +20 -20
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +0 -1
- package/Materials/PBR/pbrBaseMaterial.js +34 -39
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/effect.d.ts +7 -2
- package/Materials/effect.js +7 -3
- package/Materials/effect.js.map +1 -1
- package/Materials/shaderMaterial.d.ts +4 -0
- package/Materials/shaderMaterial.js +1 -0
- package/Materials/shaderMaterial.js.map +1 -1
- package/Materials/standardMaterial.d.ts +0 -1
- package/Materials/standardMaterial.js +20 -20
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.isovector.js +6 -6
- package/Maths/math.isovector.js.map +1 -1
- package/Meshes/Builders/geodesicBuilder.js +2 -2
- package/Meshes/Builders/geodesicBuilder.js.map +1 -1
- package/Meshes/Builders/goldbergBuilder.js +2 -2
- package/Meshes/Builders/goldbergBuilder.js.map +1 -1
- package/Meshes/linesMesh.d.ts +0 -2
- package/Meshes/linesMesh.js +16 -20
- package/Meshes/linesMesh.js.map +1 -1
- package/Misc/assetsManager.d.ts +16 -16
- package/Misc/assetsManager.js +8 -8
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/copyTextureToTexture.d.ts +9 -1
- package/Misc/copyTextureToTexture.js +23 -2
- package/Misc/copyTextureToTexture.js.map +1 -1
- package/Misc/environmentTextureTools.d.ts +0 -2
- package/Misc/environmentTextureTools.js +0 -2
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Misc/index.d.ts +2 -0
- package/Misc/index.js +3 -0
- package/Misc/index.js.map +1 -1
- package/Misc/sceneOptimizer.d.ts +16 -16
- package/Misc/sceneOptimizer.js +8 -8
- package/Misc/sceneOptimizer.js.map +1 -1
- package/Particles/EmitterTypes/coneParticleEmitter.d.ts +4 -4
- package/Particles/EmitterTypes/coneParticleEmitter.js +2 -2
- package/Particles/EmitterTypes/coneParticleEmitter.js.map +1 -1
- package/Particles/EmitterTypes/cylinderParticleEmitter.d.ts +4 -4
- package/Particles/EmitterTypes/cylinderParticleEmitter.js +2 -2
- package/Particles/EmitterTypes/cylinderParticleEmitter.js.map +1 -1
- package/Particles/EmitterTypes/sphereParticleEmitter.d.ts +4 -4
- package/Particles/EmitterTypes/sphereParticleEmitter.js +2 -2
- package/Particles/EmitterTypes/sphereParticleEmitter.js.map +1 -1
- package/Particles/particleSystemComponent.d.ts +0 -1
- package/Particles/particleSystemComponent.js +8 -2
- package/Particles/particleSystemComponent.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +0 -2
- package/Particles/thinParticleSystem.js +0 -2
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Physics/v1/physicsJoint.js +0 -3
- package/Physics/v1/physicsJoint.js.map +1 -1
- package/Physics/v2/physicsConstraint.d.ts +14 -20
- package/Physics/v2/physicsConstraint.js +14 -20
- package/Physics/v2/physicsConstraint.js.map +1 -1
- package/PostProcesses/anaglyphPostProcess.d.ts +1 -2
- package/PostProcesses/anaglyphPostProcess.js +4 -5
- package/PostProcesses/anaglyphPostProcess.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.d.ts +1 -1
- package/PostProcesses/blackAndWhitePostProcess.js +4 -4
- package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.d.ts +1 -1
- package/PostProcesses/bloomMergePostProcess.js +4 -4
- package/PostProcesses/bloomMergePostProcess.js.map +1 -1
- package/PostProcesses/blurPostProcess.d.ts +1 -3
- package/PostProcesses/blurPostProcess.js +4 -6
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.d.ts +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.js +4 -4
- package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.d.ts +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.js +4 -4
- package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.d.ts +1 -1
- package/PostProcesses/colorCorrectionPostProcess.js +4 -4
- package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.d.ts +1 -1
- package/PostProcesses/convolutionPostProcess.js +4 -4
- package/PostProcesses/convolutionPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldMergePostProcess.d.ts +1 -1
- package/PostProcesses/depthOfFieldMergePostProcess.js +4 -4
- package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
- package/PostProcesses/displayPassPostProcess.d.ts +1 -1
- package/PostProcesses/displayPassPostProcess.js +10 -1
- package/PostProcesses/displayPassPostProcess.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.d.ts +1 -1
- package/PostProcesses/extractHighlightsPostProcess.js +4 -4
- package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
- package/PostProcesses/filterPostProcess.d.ts +1 -1
- package/PostProcesses/filterPostProcess.js +10 -1
- package/PostProcesses/filterPostProcess.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.d.ts +1 -1
- package/PostProcesses/fxaaPostProcess.js +4 -4
- package/PostProcesses/fxaaPostProcess.js.map +1 -1
- package/PostProcesses/grainPostProcess.d.ts +1 -2
- package/PostProcesses/grainPostProcess.js +4 -5
- package/PostProcesses/grainPostProcess.js.map +1 -1
- package/PostProcesses/highlightsPostProcess.d.ts +1 -1
- package/PostProcesses/highlightsPostProcess.js +10 -1
- package/PostProcesses/highlightsPostProcess.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.d.ts +1 -1
- package/PostProcesses/imageProcessingPostProcess.js +4 -4
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/index.d.ts +8 -0
- package/PostProcesses/index.js +12 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.d.ts +1 -1
- package/PostProcesses/motionBlurPostProcess.js +4 -4
- package/PostProcesses/motionBlurPostProcess.js.map +1 -1
- package/PostProcesses/passPostProcess.d.ts +2 -2
- package/PostProcesses/passPostProcess.js +8 -8
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +5 -4
- package/PostProcesses/postProcess.js +14 -27
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.d.ts +1 -1
- package/PostProcesses/sharpenPostProcess.js +4 -4
- package/PostProcesses/sharpenPostProcess.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.d.ts +1 -1
- package/PostProcesses/tonemapPostProcess.js +10 -1
- package/PostProcesses/tonemapPostProcess.js.map +1 -1
- package/PostProcesses/vrDistortionCorrectionPostProcess.d.ts +1 -1
- package/PostProcesses/vrDistortionCorrectionPostProcess.js +4 -4
- package/PostProcesses/vrDistortionCorrectionPostProcess.js.map +1 -1
- package/ShadersWGSL/copyTextureToTexture.fragment.d.ts +6 -0
- package/ShadersWGSL/copyTextureToTexture.fragment.js +21 -0
- package/ShadersWGSL/copyTextureToTexture.fragment.js.map +1 -0
- package/ShadersWGSL/displayPass.fragment.d.ts +5 -0
- package/ShadersWGSL/displayPass.fragment.js +12 -0
- package/ShadersWGSL/displayPass.fragment.js.map +1 -0
- package/ShadersWGSL/filter.fragment.d.ts +5 -0
- package/ShadersWGSL/filter.fragment.js +12 -0
- package/ShadersWGSL/filter.fragment.js.map +1 -0
- package/ShadersWGSL/highlights.fragment.d.ts +5 -0
- package/ShadersWGSL/highlights.fragment.js +12 -0
- package/ShadersWGSL/highlights.fragment.js.map +1 -0
- package/ShadersWGSL/picking.fragment.d.ts +5 -0
- package/ShadersWGSL/picking.fragment.js +21 -0
- package/ShadersWGSL/picking.fragment.js.map +1 -0
- package/ShadersWGSL/picking.vertex.d.ts +15 -0
- package/ShadersWGSL/picking.vertex.js +43 -0
- package/ShadersWGSL/picking.vertex.js.map +1 -0
- package/ShadersWGSL/tonemap.fragment.d.ts +5 -0
- package/ShadersWGSL/tonemap.fragment.js +29 -0
- package/ShadersWGSL/tonemap.fragment.js.map +1 -0
- package/XR/features/WebXRControllerPointerSelection.js +1 -1
- package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
- package/package.json +1 -1
package/Animations/easing.d.ts
CHANGED
|
@@ -92,9 +92,9 @@ export declare class BackEase extends EasingFunction implements IEasingFunction
|
|
|
92
92
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
|
|
93
93
|
*/
|
|
94
94
|
export declare class BounceEase extends EasingFunction implements IEasingFunction {
|
|
95
|
-
/** Defines the number of bounces */
|
|
95
|
+
/** [3] Defines the number of bounces */
|
|
96
96
|
bounces: number;
|
|
97
|
-
/** Defines the amplitude of the bounce */
|
|
97
|
+
/** [2] Defines the amplitude of the bounce */
|
|
98
98
|
bounciness: number;
|
|
99
99
|
/**
|
|
100
100
|
* Instantiates a bounce easing
|
|
@@ -103,9 +103,9 @@ export declare class BounceEase extends EasingFunction implements IEasingFunctio
|
|
|
103
103
|
* @param bounciness Defines the amplitude of the bounce
|
|
104
104
|
*/
|
|
105
105
|
constructor(
|
|
106
|
-
/** Defines the number of bounces */
|
|
106
|
+
/** [3] Defines the number of bounces */
|
|
107
107
|
bounces?: number,
|
|
108
|
-
/** Defines the amplitude of the bounce */
|
|
108
|
+
/** [2] Defines the amplitude of the bounce */
|
|
109
109
|
bounciness?: number);
|
|
110
110
|
/**
|
|
111
111
|
* @internal
|
|
@@ -129,9 +129,9 @@ export declare class CubicEase extends EasingFunction implements IEasingFunction
|
|
|
129
129
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
|
|
130
130
|
*/
|
|
131
131
|
export declare class ElasticEase extends EasingFunction implements IEasingFunction {
|
|
132
|
-
/** Defines the number of oscillations*/
|
|
132
|
+
/** [3] Defines the number of oscillations*/
|
|
133
133
|
oscillations: number;
|
|
134
|
-
/** Defines the amplitude of the oscillations*/
|
|
134
|
+
/** [3] Defines the amplitude of the oscillations*/
|
|
135
135
|
springiness: number;
|
|
136
136
|
/**
|
|
137
137
|
* Instantiates an elastic easing function
|
|
@@ -140,9 +140,9 @@ export declare class ElasticEase extends EasingFunction implements IEasingFuncti
|
|
|
140
140
|
* @param springiness Defines the amplitude of the oscillations
|
|
141
141
|
*/
|
|
142
142
|
constructor(
|
|
143
|
-
/** Defines the number of oscillations*/
|
|
143
|
+
/** [3] Defines the number of oscillations*/
|
|
144
144
|
oscillations?: number,
|
|
145
|
-
/** Defines the amplitude of the oscillations*/
|
|
145
|
+
/** [3] Defines the amplitude of the oscillations*/
|
|
146
146
|
springiness?: number);
|
|
147
147
|
/**
|
|
148
148
|
* @internal
|
|
@@ -155,7 +155,7 @@ export declare class ElasticEase extends EasingFunction implements IEasingFuncti
|
|
|
155
155
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
|
|
156
156
|
*/
|
|
157
157
|
export declare class ExponentialEase extends EasingFunction implements IEasingFunction {
|
|
158
|
-
/** Defines the exponent of the function */
|
|
158
|
+
/** [3] Defines the exponent of the function */
|
|
159
159
|
exponent: number;
|
|
160
160
|
/**
|
|
161
161
|
* Instantiates an exponential easing function
|
|
@@ -163,7 +163,7 @@ export declare class ExponentialEase extends EasingFunction implements IEasingFu
|
|
|
163
163
|
* @param exponent Defines the exponent of the function
|
|
164
164
|
*/
|
|
165
165
|
constructor(
|
|
166
|
-
/** Defines the exponent of the function */
|
|
166
|
+
/** [3] Defines the exponent of the function */
|
|
167
167
|
exponent?: number);
|
|
168
168
|
/**
|
|
169
169
|
* @internal
|
|
@@ -176,7 +176,7 @@ export declare class ExponentialEase extends EasingFunction implements IEasingFu
|
|
|
176
176
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
|
|
177
177
|
*/
|
|
178
178
|
export declare class PowerEase extends EasingFunction implements IEasingFunction {
|
|
179
|
-
/** Defines the power of the function */
|
|
179
|
+
/** [2] Defines the power of the function */
|
|
180
180
|
power: number;
|
|
181
181
|
/**
|
|
182
182
|
* Instantiates an power base easing function
|
|
@@ -184,7 +184,7 @@ export declare class PowerEase extends EasingFunction implements IEasingFunction
|
|
|
184
184
|
* @param power Defines the power of the function
|
|
185
185
|
*/
|
|
186
186
|
constructor(
|
|
187
|
-
/** Defines the power of the function */
|
|
187
|
+
/** [2] Defines the power of the function */
|
|
188
188
|
power?: number);
|
|
189
189
|
/**
|
|
190
190
|
* @internal
|
|
@@ -241,13 +241,13 @@ export declare class SineEase extends EasingFunction implements IEasingFunction
|
|
|
241
241
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
|
|
242
242
|
*/
|
|
243
243
|
export declare class BezierCurveEase extends EasingFunction implements IEasingFunction {
|
|
244
|
-
/** Defines the x component of the start tangent in the bezier curve */
|
|
244
|
+
/** [0] Defines the x component of the start tangent in the bezier curve */
|
|
245
245
|
x1: number;
|
|
246
|
-
/** Defines the y component of the start tangent in the bezier curve */
|
|
246
|
+
/** [0] Defines the y component of the start tangent in the bezier curve */
|
|
247
247
|
y1: number;
|
|
248
|
-
/** Defines the x component of the end tangent in the bezier curve */
|
|
248
|
+
/** [1] Defines the x component of the end tangent in the bezier curve */
|
|
249
249
|
x2: number;
|
|
250
|
-
/** Defines the y component of the end tangent in the bezier curve */
|
|
250
|
+
/** [1] Defines the y component of the end tangent in the bezier curve */
|
|
251
251
|
y2: number;
|
|
252
252
|
/**
|
|
253
253
|
* Instantiates a bezier function
|
|
@@ -258,13 +258,13 @@ export declare class BezierCurveEase extends EasingFunction implements IEasingFu
|
|
|
258
258
|
* @param y2 Defines the y component of the end tangent in the bezier curve
|
|
259
259
|
*/
|
|
260
260
|
constructor(
|
|
261
|
-
/** Defines the x component of the start tangent in the bezier curve */
|
|
261
|
+
/** [0] Defines the x component of the start tangent in the bezier curve */
|
|
262
262
|
x1?: number,
|
|
263
|
-
/** Defines the y component of the start tangent in the bezier curve */
|
|
263
|
+
/** [0] Defines the y component of the start tangent in the bezier curve */
|
|
264
264
|
y1?: number,
|
|
265
|
-
/** Defines the x component of the end tangent in the bezier curve */
|
|
265
|
+
/** [1] Defines the x component of the end tangent in the bezier curve */
|
|
266
266
|
x2?: number,
|
|
267
|
-
/** Defines the y component of the end tangent in the bezier curve */
|
|
267
|
+
/** [1] Defines the y component of the end tangent in the bezier curve */
|
|
268
268
|
y2?: number);
|
|
269
269
|
/**
|
|
270
270
|
* @internal
|
package/Animations/easing.js
CHANGED
|
@@ -112,9 +112,9 @@ export class BounceEase extends EasingFunction {
|
|
|
112
112
|
* @param bounciness Defines the amplitude of the bounce
|
|
113
113
|
*/
|
|
114
114
|
constructor(
|
|
115
|
-
/** Defines the number of bounces */
|
|
115
|
+
/** [3] Defines the number of bounces */
|
|
116
116
|
bounces = 3,
|
|
117
|
-
/** Defines the amplitude of the bounce */
|
|
117
|
+
/** [2] Defines the amplitude of the bounce */
|
|
118
118
|
bounciness = 2) {
|
|
119
119
|
super();
|
|
120
120
|
this.bounces = bounces;
|
|
@@ -170,9 +170,9 @@ export class ElasticEase extends EasingFunction {
|
|
|
170
170
|
* @param springiness Defines the amplitude of the oscillations
|
|
171
171
|
*/
|
|
172
172
|
constructor(
|
|
173
|
-
/** Defines the number of oscillations*/
|
|
173
|
+
/** [3] Defines the number of oscillations*/
|
|
174
174
|
oscillations = 3,
|
|
175
|
-
/** Defines the amplitude of the oscillations*/
|
|
175
|
+
/** [3] Defines the amplitude of the oscillations*/
|
|
176
176
|
springiness = 3) {
|
|
177
177
|
super();
|
|
178
178
|
this.oscillations = oscillations;
|
|
@@ -206,7 +206,7 @@ export class ExponentialEase extends EasingFunction {
|
|
|
206
206
|
* @param exponent Defines the exponent of the function
|
|
207
207
|
*/
|
|
208
208
|
constructor(
|
|
209
|
-
/** Defines the exponent of the function */
|
|
209
|
+
/** [3] Defines the exponent of the function */
|
|
210
210
|
exponent = 2) {
|
|
211
211
|
super();
|
|
212
212
|
this.exponent = exponent;
|
|
@@ -233,7 +233,7 @@ export class PowerEase extends EasingFunction {
|
|
|
233
233
|
* @param power Defines the power of the function
|
|
234
234
|
*/
|
|
235
235
|
constructor(
|
|
236
|
-
/** Defines the power of the function */
|
|
236
|
+
/** [2] Defines the power of the function */
|
|
237
237
|
power = 2) {
|
|
238
238
|
super();
|
|
239
239
|
this.power = power;
|
|
@@ -313,13 +313,13 @@ export class BezierCurveEase extends EasingFunction {
|
|
|
313
313
|
* @param y2 Defines the y component of the end tangent in the bezier curve
|
|
314
314
|
*/
|
|
315
315
|
constructor(
|
|
316
|
-
/** Defines the x component of the start tangent in the bezier curve */
|
|
316
|
+
/** [0] Defines the x component of the start tangent in the bezier curve */
|
|
317
317
|
x1 = 0,
|
|
318
|
-
/** Defines the y component of the start tangent in the bezier curve */
|
|
318
|
+
/** [0] Defines the y component of the start tangent in the bezier curve */
|
|
319
319
|
y1 = 0,
|
|
320
|
-
/** Defines the x component of the end tangent in the bezier curve */
|
|
320
|
+
/** [1] Defines the x component of the end tangent in the bezier curve */
|
|
321
321
|
x2 = 1,
|
|
322
|
-
/** Defines the y component of the end tangent in the bezier curve */
|
|
322
|
+
/** [1] Defines the y component of the end tangent in the bezier curve */
|
|
323
323
|
y2 = 1) {
|
|
324
324
|
super();
|
|
325
325
|
this.x1 = x1;
|
package/Animations/easing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"easing.js","sourceRoot":"","sources":["../../../../dev/core/src/Animations/easing.ts"],"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AAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAChE,CAAC;CACJ;AAED;;;;GAIG;AACH,MAAM,OAAO,QAAS,SAAQ,cAAc;IACxC;;OAEG;IACa,UAAU,CAAC,QAAgB;QACvC,OAAO,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,kBAAkB,GAAG,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC;IACjE,CAAC;CACJ;AAED;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IAC/C;;;;;;;OAOG;IACH;IACI,uEAAuE;IAChE,KAAa,CAAC;IACrB,uEAAuE;IAChE,KAAa,CAAC;IACrB,qEAAqE;IAC9D,KAAa,CAAC;IACrB,qEAAqE;IAC9D,KAAa,CAAC;QAErB,KAAK,EAAE,CAAC;QARD,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;IAGzB,CAAC;IAED;;OAEG;IACa,UAAU,CAAC,QAAgB;QACvC,OAAO,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;CACJ","sourcesContent":["import { BezierCurve } from \"../Maths/math.path\";\r\n\r\n/**\r\n * This represents the main contract an easing function should follow.\r\n * Easing functions are used throughout the animation system.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport interface IEasingFunction {\r\n /**\r\n * Given an input gradient between 0 and 1, this returns the corresponding value\r\n * of the easing function.\r\n * The link below provides some of the most common examples of easing functions.\r\n * @see https://easings.net/\r\n * @param gradient Defines the value between 0 and 1 we want the easing value for\r\n * @returns the corresponding value on the curve defined by the easing function\r\n */\r\n ease(gradient: number): number;\r\n}\r\n\r\n/**\r\n * Base class used for every default easing function.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class EasingFunction implements IEasingFunction {\r\n /**\r\n * Interpolation follows the mathematical formula associated with the easing function.\r\n */\r\n public static readonly EASINGMODE_EASEIN = 0;\r\n\r\n /**\r\n * Interpolation follows 100% interpolation minus the output of the formula associated with the easing function.\r\n */\r\n public static readonly EASINGMODE_EASEOUT = 1;\r\n\r\n /**\r\n * Interpolation uses EaseIn for the first half of the animation and EaseOut for the second half.\r\n */\r\n public static readonly EASINGMODE_EASEINOUT = 2;\r\n\r\n private _easingMode = EasingFunction.EASINGMODE_EASEIN;\r\n\r\n /**\r\n * Sets the easing mode of the current function.\r\n * @param easingMode Defines the willing mode (EASINGMODE_EASEIN, EASINGMODE_EASEOUT or EASINGMODE_EASEINOUT)\r\n */\r\n public setEasingMode(easingMode: number) {\r\n const n = Math.min(Math.max(easingMode, 0), 2);\r\n this._easingMode = n;\r\n }\r\n /**\r\n * Gets the current easing mode.\r\n * @returns the easing mode\r\n */\r\n public getEasingMode(): number {\r\n return this._easingMode;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public easeInCore(gradient: number): number {\r\n throw new Error(\"You must implement this method\");\r\n }\r\n\r\n /**\r\n * Given an input gradient between 0 and 1, this returns the corresponding value\r\n * of the easing function.\r\n * @param gradient Defines the value between 0 and 1 we want the easing value for\r\n * @returns the corresponding value on the curve defined by the easing function\r\n */\r\n public ease(gradient: number): number {\r\n switch (this._easingMode) {\r\n case EasingFunction.EASINGMODE_EASEIN:\r\n return this.easeInCore(gradient);\r\n case EasingFunction.EASINGMODE_EASEOUT:\r\n return 1 - this.easeInCore(1 - gradient);\r\n }\r\n\r\n if (gradient >= 0.5) {\r\n return (1 - this.easeInCore((1 - gradient) * 2)) * 0.5 + 0.5;\r\n }\r\n\r\n return this.easeInCore(gradient * 2) * 0.5;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a circle shape (see link below).\r\n * @see https://easings.net/#easeInCirc\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class CircleEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n gradient = Math.max(0, Math.min(1, gradient));\r\n return 1.0 - Math.sqrt(1.0 - gradient * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a ease back shape (see link below).\r\n * @see https://easings.net/#easeInBack\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BackEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a back ease easing\r\n * @see https://easings.net/#easeInBack\r\n * @param amplitude Defines the amplitude of the function\r\n */\r\n constructor(\r\n /** [1] Defines the amplitude of the function */\r\n public amplitude: number = 1\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n const num = Math.max(0, this.amplitude);\r\n return Math.pow(gradient, 3.0) - gradient * num * Math.sin(3.1415926535897931 * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a bouncing shape (see link below).\r\n * @see https://easings.net/#easeInBounce\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BounceEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a bounce easing\r\n * @see https://easings.net/#easeInBounce\r\n * @param bounces Defines the number of bounces\r\n * @param bounciness Defines the amplitude of the bounce\r\n */\r\n constructor(\r\n /** Defines the number of bounces */\r\n public bounces: number = 3,\r\n /** Defines the amplitude of the bounce */\r\n public bounciness: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n const y = Math.max(0.0, this.bounces);\r\n let bounciness = this.bounciness;\r\n if (bounciness <= 1.0) {\r\n bounciness = 1.001;\r\n }\r\n const num9 = Math.pow(bounciness, y);\r\n const num5 = 1.0 - bounciness;\r\n const num4 = (1.0 - num9) / num5 + num9 * 0.5;\r\n const num15 = gradient * num4;\r\n const num65 = Math.log(-num15 * (1.0 - bounciness) + 1.0) / Math.log(bounciness);\r\n const num3 = Math.floor(num65);\r\n const num13 = num3 + 1.0;\r\n const num8 = (1.0 - Math.pow(bounciness, num3)) / (num5 * num4);\r\n const num12 = (1.0 - Math.pow(bounciness, num13)) / (num5 * num4);\r\n const num7 = (num8 + num12) * 0.5;\r\n const num6 = gradient - num7;\r\n const num2 = num7 - num8;\r\n return (-Math.pow(1.0 / bounciness, y - num3) / (num2 * num2)) * (num6 - num2) * (num6 + num2);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 3 shape (see link below).\r\n * @see https://easings.net/#easeInCubic\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class CubicEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with an elastic shape (see link below).\r\n * @see https://easings.net/#easeInElastic\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class ElasticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an elastic easing function\r\n * @see https://easings.net/#easeInElastic\r\n * @param oscillations Defines the number of oscillations\r\n * @param springiness Defines the amplitude of the oscillations\r\n */\r\n constructor(\r\n /** Defines the number of oscillations*/\r\n public oscillations: number = 3,\r\n /** Defines the amplitude of the oscillations*/\r\n public springiness: number = 3\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n let num2;\r\n const num3 = Math.max(0.0, this.oscillations);\r\n const num = Math.max(0.0, this.springiness);\r\n\r\n if (num == 0) {\r\n num2 = gradient;\r\n } else {\r\n num2 = (Math.exp(num * gradient) - 1.0) / (Math.exp(num) - 1.0);\r\n }\r\n return num2 * Math.sin((6.2831853071795862 * num3 + 1.5707963267948966) * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with an exponential shape (see link below).\r\n * @see https://easings.net/#easeInExpo\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class ExponentialEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an exponential easing function\r\n * @see https://easings.net/#easeInExpo\r\n * @param exponent Defines the exponent of the function\r\n */\r\n constructor(\r\n /** Defines the exponent of the function */\r\n public exponent: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n if (this.exponent <= 0) {\r\n return gradient;\r\n }\r\n\r\n return (Math.exp(this.exponent * gradient) - 1.0) / (Math.exp(this.exponent) - 1.0);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power shape (see link below).\r\n * @see https://easings.net/#easeInQuad\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class PowerEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an power base easing function\r\n * @see https://easings.net/#easeInQuad\r\n * @param power Defines the power of the function\r\n */\r\n constructor(\r\n /** Defines the power of the function */\r\n public power: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n const y = Math.max(0.0, this.power);\r\n return Math.pow(gradient, y);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 2 shape (see link below).\r\n * @see https://easings.net/#easeInQuad\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuadraticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 4 shape (see link below).\r\n * @see https://easings.net/#easeInQuart\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuarticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 5 shape (see link below).\r\n * @see https://easings.net/#easeInQuint\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuinticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a sin shape (see link below).\r\n * @see https://easings.net/#easeInSine\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class SineEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return 1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient));\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a bezier shape (see link below).\r\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BezierCurveEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a bezier function\r\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\r\n * @param x1 Defines the x component of the start tangent in the bezier curve\r\n * @param y1 Defines the y component of the start tangent in the bezier curve\r\n * @param x2 Defines the x component of the end tangent in the bezier curve\r\n * @param y2 Defines the y component of the end tangent in the bezier curve\r\n */\r\n constructor(\r\n /** Defines the x component of the start tangent in the bezier curve */\r\n public x1: number = 0,\r\n /** Defines the y component of the start tangent in the bezier curve */\r\n public y1: number = 0,\r\n /** Defines the x component of the end tangent in the bezier curve */\r\n public x2: number = 1,\r\n /** Defines the y component of the end tangent in the bezier curve */\r\n public y2: number = 1\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return BezierCurve.Interpolate(gradient, this.x1, this.y1, this.x2, this.y2);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"easing.js","sourceRoot":"","sources":["../../../../dev/core/src/Animations/easing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmBjD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAA3B;QAgBY,gBAAW,GAAG,cAAc,CAAC,iBAAiB,CAAC;IA8C3D,CAAC;IA5CG;;;OAGG;IACI,aAAa,CAAC,UAAkB;QACnC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACzB,CAAC;IACD;;;OAGG;IACI,aAAa;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,6DAA6D;IACtD,UAAU,CAAC,QAAgB;QAC9B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACtD,CAAC;IAED;;;;;OAKG;IACI,IAAI,CAAC,QAAgB;QACxB,QAAQ,IAAI,CAAC,WAAW,EAAE;YACtB,KAAK,cAAc,CAAC,iBAAiB;gBACjC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACrC,KAAK,cAAc,CAAC,kBAAkB;gBAClC,OAAO,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC;SACh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from \"../Maths/math.path\";\r\n\r\n/**\r\n * This represents the main contract an easing function should follow.\r\n * Easing functions are used throughout the animation system.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport interface IEasingFunction {\r\n /**\r\n * Given an input gradient between 0 and 1, this returns the corresponding value\r\n * of the easing function.\r\n * The link below provides some of the most common examples of easing functions.\r\n * @see https://easings.net/\r\n * @param gradient Defines the value between 0 and 1 we want the easing value for\r\n * @returns the corresponding value on the curve defined by the easing function\r\n */\r\n ease(gradient: number): number;\r\n}\r\n\r\n/**\r\n * Base class used for every default easing function.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class EasingFunction implements IEasingFunction {\r\n /**\r\n * Interpolation follows the mathematical formula associated with the easing function.\r\n */\r\n public static readonly EASINGMODE_EASEIN = 0;\r\n\r\n /**\r\n * Interpolation follows 100% interpolation minus the output of the formula associated with the easing function.\r\n */\r\n public static readonly EASINGMODE_EASEOUT = 1;\r\n\r\n /**\r\n * Interpolation uses EaseIn for the first half of the animation and EaseOut for the second half.\r\n */\r\n public static readonly EASINGMODE_EASEINOUT = 2;\r\n\r\n private _easingMode = EasingFunction.EASINGMODE_EASEIN;\r\n\r\n /**\r\n * Sets the easing mode of the current function.\r\n * @param easingMode Defines the willing mode (EASINGMODE_EASEIN, EASINGMODE_EASEOUT or EASINGMODE_EASEINOUT)\r\n */\r\n public setEasingMode(easingMode: number) {\r\n const n = Math.min(Math.max(easingMode, 0), 2);\r\n this._easingMode = n;\r\n }\r\n /**\r\n * Gets the current easing mode.\r\n * @returns the easing mode\r\n */\r\n public getEasingMode(): number {\r\n return this._easingMode;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public easeInCore(gradient: number): number {\r\n throw new Error(\"You must implement this method\");\r\n }\r\n\r\n /**\r\n * Given an input gradient between 0 and 1, this returns the corresponding value\r\n * of the easing function.\r\n * @param gradient Defines the value between 0 and 1 we want the easing value for\r\n * @returns the corresponding value on the curve defined by the easing function\r\n */\r\n public ease(gradient: number): number {\r\n switch (this._easingMode) {\r\n case EasingFunction.EASINGMODE_EASEIN:\r\n return this.easeInCore(gradient);\r\n case EasingFunction.EASINGMODE_EASEOUT:\r\n return 1 - this.easeInCore(1 - gradient);\r\n }\r\n\r\n if (gradient >= 0.5) {\r\n return (1 - this.easeInCore((1 - gradient) * 2)) * 0.5 + 0.5;\r\n }\r\n\r\n return this.easeInCore(gradient * 2) * 0.5;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a circle shape (see link below).\r\n * @see https://easings.net/#easeInCirc\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class CircleEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n gradient = Math.max(0, Math.min(1, gradient));\r\n return 1.0 - Math.sqrt(1.0 - gradient * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a ease back shape (see link below).\r\n * @see https://easings.net/#easeInBack\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BackEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a back ease easing\r\n * @see https://easings.net/#easeInBack\r\n * @param amplitude Defines the amplitude of the function\r\n */\r\n constructor(\r\n /** [1] Defines the amplitude of the function */\r\n public amplitude: number = 1\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n const num = Math.max(0, this.amplitude);\r\n return Math.pow(gradient, 3.0) - gradient * num * Math.sin(3.1415926535897931 * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a bouncing shape (see link below).\r\n * @see https://easings.net/#easeInBounce\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BounceEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a bounce easing\r\n * @see https://easings.net/#easeInBounce\r\n * @param bounces Defines the number of bounces\r\n * @param bounciness Defines the amplitude of the bounce\r\n */\r\n constructor(\r\n /** [3] Defines the number of bounces */\r\n public bounces: number = 3,\r\n /** [2] Defines the amplitude of the bounce */\r\n public bounciness: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n const y = Math.max(0.0, this.bounces);\r\n let bounciness = this.bounciness;\r\n if (bounciness <= 1.0) {\r\n bounciness = 1.001;\r\n }\r\n const num9 = Math.pow(bounciness, y);\r\n const num5 = 1.0 - bounciness;\r\n const num4 = (1.0 - num9) / num5 + num9 * 0.5;\r\n const num15 = gradient * num4;\r\n const num65 = Math.log(-num15 * (1.0 - bounciness) + 1.0) / Math.log(bounciness);\r\n const num3 = Math.floor(num65);\r\n const num13 = num3 + 1.0;\r\n const num8 = (1.0 - Math.pow(bounciness, num3)) / (num5 * num4);\r\n const num12 = (1.0 - Math.pow(bounciness, num13)) / (num5 * num4);\r\n const num7 = (num8 + num12) * 0.5;\r\n const num6 = gradient - num7;\r\n const num2 = num7 - num8;\r\n return (-Math.pow(1.0 / bounciness, y - num3) / (num2 * num2)) * (num6 - num2) * (num6 + num2);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 3 shape (see link below).\r\n * @see https://easings.net/#easeInCubic\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class CubicEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with an elastic shape (see link below).\r\n * @see https://easings.net/#easeInElastic\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class ElasticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an elastic easing function\r\n * @see https://easings.net/#easeInElastic\r\n * @param oscillations Defines the number of oscillations\r\n * @param springiness Defines the amplitude of the oscillations\r\n */\r\n constructor(\r\n /** [3] Defines the number of oscillations*/\r\n public oscillations: number = 3,\r\n /** [3] Defines the amplitude of the oscillations*/\r\n public springiness: number = 3\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n let num2;\r\n const num3 = Math.max(0.0, this.oscillations);\r\n const num = Math.max(0.0, this.springiness);\r\n\r\n if (num == 0) {\r\n num2 = gradient;\r\n } else {\r\n num2 = (Math.exp(num * gradient) - 1.0) / (Math.exp(num) - 1.0);\r\n }\r\n return num2 * Math.sin((6.2831853071795862 * num3 + 1.5707963267948966) * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with an exponential shape (see link below).\r\n * @see https://easings.net/#easeInExpo\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class ExponentialEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an exponential easing function\r\n * @see https://easings.net/#easeInExpo\r\n * @param exponent Defines the exponent of the function\r\n */\r\n constructor(\r\n /** [3] Defines the exponent of the function */\r\n public exponent: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n if (this.exponent <= 0) {\r\n return gradient;\r\n }\r\n\r\n return (Math.exp(this.exponent * gradient) - 1.0) / (Math.exp(this.exponent) - 1.0);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power shape (see link below).\r\n * @see https://easings.net/#easeInQuad\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class PowerEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an power base easing function\r\n * @see https://easings.net/#easeInQuad\r\n * @param power Defines the power of the function\r\n */\r\n constructor(\r\n /** [2] Defines the power of the function */\r\n public power: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n const y = Math.max(0.0, this.power);\r\n return Math.pow(gradient, y);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 2 shape (see link below).\r\n * @see https://easings.net/#easeInQuad\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuadraticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 4 shape (see link below).\r\n * @see https://easings.net/#easeInQuart\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuarticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 5 shape (see link below).\r\n * @see https://easings.net/#easeInQuint\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuinticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a sin shape (see link below).\r\n * @see https://easings.net/#easeInSine\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class SineEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return 1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient));\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a bezier shape (see link below).\r\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BezierCurveEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a bezier function\r\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\r\n * @param x1 Defines the x component of the start tangent in the bezier curve\r\n * @param y1 Defines the y component of the start tangent in the bezier curve\r\n * @param x2 Defines the x component of the end tangent in the bezier curve\r\n * @param y2 Defines the y component of the end tangent in the bezier curve\r\n */\r\n constructor(\r\n /** [0] Defines the x component of the start tangent in the bezier curve */\r\n public x1: number = 0,\r\n /** [0] Defines the y component of the start tangent in the bezier curve */\r\n public y1: number = 0,\r\n /** [1] Defines the x component of the end tangent in the bezier curve */\r\n public x2: number = 1,\r\n /** [1] Defines the y component of the end tangent in the bezier curve */\r\n public y2: number = 1\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override easeInCore(gradient: number): number {\r\n return BezierCurve.Interpolate(gradient, this.x1, this.y1, this.x2, this.y2);\r\n }\r\n}\r\n"]}
|
|
@@ -72,9 +72,10 @@ export function checkNonFloatVertexBuffers(vertexBuffers, effect) {
|
|
|
72
72
|
}
|
|
73
73
|
if (shaderProcessingContext) {
|
|
74
74
|
// We temporarily disable parallel compilation of shaders because we want new shaders to be compiled after the _processShaderCode call, so that they are in effect for the rest of the frame.
|
|
75
|
+
// There is no additional call to async so the _processShaderCodeAsync will execute synchronously.
|
|
75
76
|
const parallelShaderCompile = engine._caps.parallelShaderCompile;
|
|
76
77
|
engine._caps.parallelShaderCompile = undefined;
|
|
77
|
-
effect.
|
|
78
|
+
effect._processShaderCodeAsync(null, engine._features._checkNonFloatVertexBuffersDontRecreatePipelineContext, shaderProcessingContext);
|
|
78
79
|
engine._caps.parallelShaderCompile = parallelShaderCompile;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1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,IAAI,CAAC,CAAC;QAEtE,IACI,CAAC,uBAAuB,KAAK,YAAY,CAAC,KAAK,IAAI,gBAAgB,KAAK,SAAS,CAAC;YAClF,CAAC,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,KAAK,uBAAuB,CAAC,EAClF;YACE,IAAI,CAAC,uBAAuB,EAAE;gBAC1B,uBAAuB,GAAG,MAAM,CAAC,2BAA2B,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAE,CAAC;aAC/F;YACD,eAAe,CAAC,sBAAsB,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAAC;YACvE,IAAI,uBAAuB,KAAK,YAAY,CAAC,KAAK,EAAE;gBAChD,uBAAuB,CAAC,oCAAqC,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;gBACtG,IAAI,YAAY,CAAC,uBAAuB,CAAC,EAAE;oBACvC,uBAAuB,CAAC,oCAAqC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;iBAC7E;aACJ;SACJ;KACJ;IAED,IAAI,uBAAuB,EAAE;QACzB,6LAA6L;QAC7L,kGAAkG;QAClG,MAAM,qBAAqB,GAAG,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC;QACjE,MAAM,CAAC,KAAK,CAAC,qBAAqB,GAAG,SAAS,CAAC;QAE/C,MAAM,CAAC,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,sDAAsD,EAAE,uBAAuB,CAAC,CAAC;QAEvI,MAAM,CAAC,KAAK,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;KAC9D;AACL,CAAC","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport type { ShaderProcessingContext } from \"../Engines/Processors/shaderProcessingOptions\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport { VertexBuffer } from \"../Meshes/buffer\";\r\n\r\nconst vertexBufferKindForNonFloatProcessing: { [kind: string]: boolean } = {\r\n [VertexBuffer.PositionKind]: true,\r\n [VertexBuffer.NormalKind]: true,\r\n [VertexBuffer.TangentKind]: true,\r\n [VertexBuffer.UVKind]: true,\r\n [VertexBuffer.UV2Kind]: true,\r\n [VertexBuffer.UV3Kind]: true,\r\n [VertexBuffer.UV4Kind]: true,\r\n [VertexBuffer.UV5Kind]: true,\r\n [VertexBuffer.UV6Kind]: true,\r\n [VertexBuffer.ColorKind]: true,\r\n [VertexBuffer.ColorInstanceKind]: true,\r\n [VertexBuffer.MatricesIndicesKind]: true,\r\n [VertexBuffer.MatricesWeightsKind]: true,\r\n [VertexBuffer.MatricesIndicesExtraKind]: true,\r\n [VertexBuffer.MatricesWeightsExtraKind]: true,\r\n};\r\n\r\n/**\r\n * Indicates if the type is a signed or unsigned type\r\n * @param type Type to check\r\n * @returns True if it is a signed type\r\n */\r\nfunction isSignedType(type: number): boolean {\r\n switch (type) {\r\n case VertexBuffer.BYTE:\r\n case VertexBuffer.SHORT:\r\n case VertexBuffer.INT:\r\n case VertexBuffer.FLOAT:\r\n return true;\r\n case VertexBuffer.UNSIGNED_BYTE:\r\n case VertexBuffer.UNSIGNED_SHORT:\r\n case VertexBuffer.UNSIGNED_INT:\r\n return false;\r\n default:\r\n throw new Error(`Invalid type '${type}'`);\r\n }\r\n}\r\n\r\n/**\r\n * Checks whether some vertex buffers that should be of type float are of a different type (int, byte...).\r\n * If so, trigger a shader recompilation to give the shader processor the opportunity to update the code accordingly.\r\n * @param vertexBuffers List of vertex buffers to check\r\n * @param effect The effect (shaders) that should be recompiled if needed\r\n */\r\nexport function checkNonFloatVertexBuffers(vertexBuffers: { [key: string]: Nullable<VertexBuffer> }, effect: Effect): void {\r\n const engine = effect.getEngine();\r\n const pipelineContext = effect._pipelineContext;\r\n\r\n if (!pipelineContext?.vertexBufferKindToType) {\r\n return;\r\n }\r\n\r\n let shaderProcessingContext: Nullable<ShaderProcessingContext> = null;\r\n\r\n for (const kind in vertexBuffers) {\r\n const currentVertexBuffer = vertexBuffers[kind];\r\n\r\n if (!currentVertexBuffer || !vertexBufferKindForNonFloatProcessing[kind]) {\r\n continue;\r\n }\r\n\r\n const currentVertexBufferType = currentVertexBuffer.normalized ? VertexBuffer.FLOAT : currentVertexBuffer.type;\r\n const vertexBufferType = pipelineContext.vertexBufferKindToType[kind];\r\n\r\n if (\r\n (currentVertexBufferType !== VertexBuffer.FLOAT && vertexBufferType === undefined) ||\r\n (vertexBufferType !== undefined && vertexBufferType !== currentVertexBufferType)\r\n ) {\r\n if (!shaderProcessingContext) {\r\n shaderProcessingContext = engine._getShaderProcessingContext(effect.shaderLanguage, false)!;\r\n }\r\n pipelineContext.vertexBufferKindToType[kind] = currentVertexBufferType;\r\n if (currentVertexBufferType !== VertexBuffer.FLOAT) {\r\n shaderProcessingContext.vertexBufferKindToNumberOfComponents![kind] = VertexBuffer.DeduceStride(kind);\r\n if (isSignedType(currentVertexBufferType)) {\r\n shaderProcessingContext.vertexBufferKindToNumberOfComponents![kind] *= -1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (shaderProcessingContext) {\r\n // We temporarily disable parallel compilation of shaders because we want new shaders to be compiled after the _processShaderCode call, so that they are in effect for the rest of the frame.\r\n // There is no additional call to async so the _processShaderCodeAsync will execute synchronously.\r\n const parallelShaderCompile = engine._caps.parallelShaderCompile;\r\n engine._caps.parallelShaderCompile = undefined;\r\n\r\n effect._processShaderCodeAsync(null, engine._features._checkNonFloatVertexBuffersDontRecreatePipelineContext, shaderProcessingContext);\r\n\r\n engine._caps.parallelShaderCompile = parallelShaderCompile;\r\n }\r\n}\r\n"]}
|
|
@@ -87,7 +87,7 @@ export declare class OnAfterEnteringVRObservableEvent {
|
|
|
87
87
|
* @deprecated Use WebXR instead!
|
|
88
88
|
*/
|
|
89
89
|
export declare class VRExperienceHelper {
|
|
90
|
-
/** Options to modify the vr experience helper's behavior. */
|
|
90
|
+
/** [Empty object] Options to modify the vr experience helper's behavior. */
|
|
91
91
|
webVROptions: VRExperienceHelperOptions;
|
|
92
92
|
private _scene;
|
|
93
93
|
private _position;
|
|
@@ -271,7 +271,7 @@ export declare class VRExperienceHelper {
|
|
|
271
271
|
* @param webVROptions Options to modify the vr experience helper's behavior.
|
|
272
272
|
*/
|
|
273
273
|
constructor(scene: Scene,
|
|
274
|
-
/** Options to modify the vr experience helper's behavior. */
|
|
274
|
+
/** [Empty object] Options to modify the vr experience helper's behavior. */
|
|
275
275
|
webVROptions?: VRExperienceHelperOptions);
|
|
276
276
|
private _completeVRInit;
|
|
277
277
|
private _onResize;
|
|
@@ -239,7 +239,7 @@ export class VRExperienceHelper {
|
|
|
239
239
|
* @param webVROptions Options to modify the vr experience helper's behavior.
|
|
240
240
|
*/
|
|
241
241
|
constructor(scene,
|
|
242
|
-
/** Options to modify the vr experience helper's behavior. */
|
|
242
|
+
/** [Empty object] Options to modify the vr experience helper's behavior. */
|
|
243
243
|
webVROptions = {}) {
|
|
244
244
|
this.webVROptions = webVROptions;
|
|
245
245
|
// Are we presenting in the fullscreen fallback?
|