@babylonjs/core 5.29.0 → 5.30.0
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/Collisions/pickingInfo.d.ts +1 -0
- package/Collisions/pickingInfo.js +7 -2
- package/Collisions/pickingInfo.js.map +1 -1
- package/Culling/ray.d.ts +1 -1
- package/Culling/ray.js +0 -6
- package/Culling/ray.js.map +1 -1
- package/Debug/debugLayer.d.ts +5 -0
- package/Debug/debugLayer.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.js +5 -1
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.js +4 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js +2 -0
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessor.js +3 -7
- package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +2 -0
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTintWASM.d.ts +1 -0
- package/Engines/WebGPU/webgpuTintWASM.js +7 -1
- package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
- package/Engines/constants.d.ts +4 -0
- package/Engines/constants.js +4 -0
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.d.ts +45 -12
- package/Engines/thinEngine.js +6 -3
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +0 -2
- package/Engines/webgpuEngine.js +15 -14
- package/Engines/webgpuEngine.js.map +1 -1
- package/IAccessibilityTag.d.ts +29 -0
- package/IAccessibilityTag.js +2 -0
- package/IAccessibilityTag.js.map +1 -0
- package/Inputs/scene.inputManager.d.ts +1 -1
- package/Inputs/scene.inputManager.js +9 -2
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.d.ts +24 -3
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +92 -21
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
- package/Maths/math.vector.d.ts +72 -20
- package/Maths/math.vector.js +72 -31
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/mesh.d.ts +1 -1
- package/Meshes/mesh.js +2 -1
- package/Meshes/mesh.js.map +1 -1
- package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.d.ts +17 -4
- package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js +49 -9
- package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js.map +1 -1
- package/Misc/iInspectable.d.ts +5 -1
- package/Misc/iInspectable.js +4 -0
- package/Misc/iInspectable.js.map +1 -1
- package/Misc/index.d.ts +1 -1
- package/Misc/index.js +1 -1
- package/Misc/index.js.map +1 -1
- package/Misc/khronosTextureContainer2.js +41 -46
- package/Misc/khronosTextureContainer2.js.map +1 -1
- package/Misc/observable.js +4 -4
- package/Misc/observable.js.map +1 -1
- package/Misc/pressureObserverWrapper.d.ts +36 -0
- package/Misc/pressureObserverWrapper.js +68 -0
- package/Misc/pressureObserverWrapper.js.map +1 -0
- package/Misc/screenshotTools.js +0 -1
- package/Misc/screenshotTools.js.map +1 -1
- package/Particles/particleSystem.d.ts +4 -0
- package/Particles/particleSystem.js +12 -4
- package/Particles/particleSystem.js.map +1 -1
- package/PostProcesses/postProcess.js +4 -4
- package/PostProcesses/postProcess.js.map +1 -1
- package/Rendering/depthPeelingRenderer.js +4 -0
- package/Rendering/depthPeelingRenderer.js.map +1 -1
- package/Rendering/renderingManager.d.ts +3 -0
- package/Rendering/renderingManager.js +3 -0
- package/Rendering/renderingManager.js.map +1 -1
- package/Shaders/ShadersInclude/shadowsFragmentFunctions.js +18 -13
- package/Shaders/ShadersInclude/shadowsFragmentFunctions.js.map +1 -1
- package/Shaders/fxaa.fragment.js +10 -5
- package/Shaders/fxaa.fragment.js.map +1 -1
- package/Shaders/particles.vertex.js +4 -1
- package/Shaders/particles.vertex.js.map +1 -1
- package/Shaders/spriteMap.fragment.js +7 -2
- package/Shaders/spriteMap.fragment.js.map +1 -1
- package/XR/features/WebXRControllerPointerSelection.js +1 -0
- package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
- package/XR/features/WebXRNearInteraction.js.map +1 -1
- package/node.d.ts +8 -0
- package/node.js +13 -1
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +1 -8
- package/scene.js +1 -24
- package/scene.js.map +1 -1
- package/Misc/computePressure.d.ts +0 -57
- package/Misc/computePressure.js +0 -48
- package/Misc/computePressure.js.map +0 -1
package/Maths/math.vector.d.ts
CHANGED
|
@@ -703,11 +703,16 @@ export declare class Vector3 {
|
|
|
703
703
|
scaleToRef<T extends Vector3>(scale: number, result: T): T;
|
|
704
704
|
/**
|
|
705
705
|
* Creates a vector normal (perpendicular) to the current Vector3 and stores the result in the given vector
|
|
706
|
+
* Out of the infinite possibilities the normal chosen is the one formed by rotating the current vector
|
|
707
|
+
* 90 degrees about an axis which lies perpendicular to the current vector
|
|
708
|
+
* and its projection on the xz plane. In the case of a current vector in the xz plane
|
|
709
|
+
* the normal is calculated to be along the y axis.
|
|
710
|
+
* Example Playground https://playground.babylonjs.com/#R1F8YU#230
|
|
711
|
+
* Example Playground https://playground.babylonjs.com/#R1F8YU#231
|
|
706
712
|
* @param result defines the Vector3 object where to store the resultant normal
|
|
707
713
|
* returns the result
|
|
708
|
-
* @hidden
|
|
709
714
|
*/
|
|
710
|
-
|
|
715
|
+
getNormalToRef(result: DeepImmutable<Vector3>): Vector3;
|
|
711
716
|
/**
|
|
712
717
|
* Rotates the vector using the given unit quaternion and stores the new vector in result
|
|
713
718
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#9
|
|
@@ -2034,6 +2039,7 @@ export declare class Vector4 {
|
|
|
2034
2039
|
}
|
|
2035
2040
|
/**
|
|
2036
2041
|
* Class used to store quaternion data
|
|
2042
|
+
* Example Playground - Overview - https://playground.babylonjs.com/#L49EJ7#100
|
|
2037
2043
|
* @see https://en.wikipedia.org/wiki/Quaternion
|
|
2038
2044
|
* @see https://doc.babylonjs.com/features/position,_rotation,_scaling
|
|
2039
2045
|
*/
|
|
@@ -2085,11 +2091,13 @@ export declare class Quaternion {
|
|
|
2085
2091
|
getHashCode(): number;
|
|
2086
2092
|
/**
|
|
2087
2093
|
* Copy the quaternion to an array
|
|
2094
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#13
|
|
2088
2095
|
* @returns a new array populated with 4 elements from the quaternion coordinates
|
|
2089
2096
|
*/
|
|
2090
2097
|
asArray(): number[];
|
|
2091
2098
|
/**
|
|
2092
2099
|
* Stores from the starting index in the given array the Quaternion successive values
|
|
2100
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#59
|
|
2093
2101
|
* @param array defines the array where to store the x,y,z,w components
|
|
2094
2102
|
* @param index defines an optional index in the target array to define where to start storing values
|
|
2095
2103
|
* @returns the current Quaternion object
|
|
@@ -2097,12 +2105,14 @@ export declare class Quaternion {
|
|
|
2097
2105
|
toArray(array: FloatArray, index?: number): Quaternion;
|
|
2098
2106
|
/**
|
|
2099
2107
|
* Check if two quaternions are equals
|
|
2108
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#38
|
|
2100
2109
|
* @param otherQuaternion defines the second operand
|
|
2101
2110
|
* @returns true if the current quaternion and the given one coordinates are strictly equals
|
|
2102
2111
|
*/
|
|
2103
2112
|
equals(otherQuaternion: DeepImmutable<Quaternion>): boolean;
|
|
2104
2113
|
/**
|
|
2105
2114
|
* Gets a boolean if two quaternions are equals (using an epsilon value)
|
|
2115
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#37
|
|
2106
2116
|
* @param otherQuaternion defines the other quaternion
|
|
2107
2117
|
* @param epsilon defines the minimal distance to consider equality
|
|
2108
2118
|
* @returns true if the given quaternion coordinates are close to the current ones by a distance of epsilon.
|
|
@@ -2110,17 +2120,20 @@ export declare class Quaternion {
|
|
|
2110
2120
|
equalsWithEpsilon(otherQuaternion: DeepImmutable<Quaternion>, epsilon?: number): boolean;
|
|
2111
2121
|
/**
|
|
2112
2122
|
* Clone the current quaternion
|
|
2123
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#12
|
|
2113
2124
|
* @returns a new quaternion copied from the current one
|
|
2114
2125
|
*/
|
|
2115
2126
|
clone(): this;
|
|
2116
2127
|
/**
|
|
2117
2128
|
* Copy a quaternion to the current one
|
|
2129
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#86
|
|
2118
2130
|
* @param other defines the other quaternion
|
|
2119
2131
|
* @returns the updated current quaternion
|
|
2120
2132
|
*/
|
|
2121
2133
|
copyFrom(other: DeepImmutable<Quaternion>): this;
|
|
2122
2134
|
/**
|
|
2123
2135
|
* Updates the current quaternion with the given float coordinates
|
|
2136
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#87
|
|
2124
2137
|
* @param x defines the x coordinate
|
|
2125
2138
|
* @param y defines the y coordinate
|
|
2126
2139
|
* @param z defines the z coordinate
|
|
@@ -2130,6 +2143,7 @@ export declare class Quaternion {
|
|
|
2130
2143
|
copyFromFloats(x: number, y: number, z: number, w: number): this;
|
|
2131
2144
|
/**
|
|
2132
2145
|
* Updates the current quaternion from the given float coordinates
|
|
2146
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#56
|
|
2133
2147
|
* @param x defines the x coordinate
|
|
2134
2148
|
* @param y defines the y coordinate
|
|
2135
2149
|
* @param z defines the z coordinate
|
|
@@ -2139,36 +2153,42 @@ export declare class Quaternion {
|
|
|
2139
2153
|
set(x: number, y: number, z: number, w: number): this;
|
|
2140
2154
|
/**
|
|
2141
2155
|
* Adds two quaternions
|
|
2156
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#10
|
|
2142
2157
|
* @param other defines the second operand
|
|
2143
2158
|
* @returns a new quaternion as the addition result of the given one and the current quaternion
|
|
2144
2159
|
*/
|
|
2145
2160
|
add(other: DeepImmutable<Quaternion>): this;
|
|
2146
2161
|
/**
|
|
2147
2162
|
* Add a quaternion to the current one
|
|
2163
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#11
|
|
2148
2164
|
* @param other defines the quaternion to add
|
|
2149
2165
|
* @returns the current quaternion
|
|
2150
2166
|
*/
|
|
2151
2167
|
addInPlace(other: DeepImmutable<Quaternion>): this;
|
|
2152
2168
|
/**
|
|
2153
2169
|
* Subtract two quaternions
|
|
2170
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#57
|
|
2154
2171
|
* @param other defines the second operand
|
|
2155
2172
|
* @returns a new quaternion as the subtraction result of the given one from the current one
|
|
2156
2173
|
*/
|
|
2157
2174
|
subtract(other: Quaternion): this;
|
|
2158
2175
|
/**
|
|
2159
2176
|
* Subtract a quaternion to the current one
|
|
2177
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#58
|
|
2160
2178
|
* @param other defines the quaternion to subtract
|
|
2161
2179
|
* @returns the current quaternion
|
|
2162
2180
|
*/
|
|
2163
2181
|
subtractInPlace(other: DeepImmutable<Quaternion>): this;
|
|
2164
2182
|
/**
|
|
2165
2183
|
* Multiplies the current quaternion by a scale factor
|
|
2184
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#88
|
|
2166
2185
|
* @param value defines the scale factor
|
|
2167
2186
|
* @returns a new quaternion set by multiplying the current quaternion coordinates by the float "scale"
|
|
2168
2187
|
*/
|
|
2169
2188
|
scale(value: number): this;
|
|
2170
2189
|
/**
|
|
2171
2190
|
* Scale the current quaternion values by a factor and stores the result to a given quaternion
|
|
2191
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#89
|
|
2172
2192
|
* @param scale defines the scale factor
|
|
2173
2193
|
* @param result defines the Quaternion object where to store the result
|
|
2174
2194
|
* @returns result input
|
|
@@ -2176,12 +2196,14 @@ export declare class Quaternion {
|
|
|
2176
2196
|
scaleToRef<T extends Quaternion>(scale: number, result: T): T;
|
|
2177
2197
|
/**
|
|
2178
2198
|
* Multiplies in place the current quaternion by a scale factor
|
|
2199
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#90
|
|
2179
2200
|
* @param value defines the scale factor
|
|
2180
2201
|
* @returns the current modified quaternion
|
|
2181
2202
|
*/
|
|
2182
2203
|
scaleInPlace(value: number): this;
|
|
2183
2204
|
/**
|
|
2184
2205
|
* Scale the current quaternion values by a factor and add the result to a given quaternion
|
|
2206
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#91
|
|
2185
2207
|
* @param scale defines the scale factor
|
|
2186
2208
|
* @param result defines the Quaternion object where to store the result
|
|
2187
2209
|
* @returns result input
|
|
@@ -2189,12 +2211,14 @@ export declare class Quaternion {
|
|
|
2189
2211
|
scaleAndAddToRef<T extends Quaternion>(scale: number, result: T): T;
|
|
2190
2212
|
/**
|
|
2191
2213
|
* Multiplies two quaternions
|
|
2214
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#43
|
|
2192
2215
|
* @param q1 defines the second operand
|
|
2193
2216
|
* @returns a new quaternion set as the multiplication result of the current one with the given one "q1"
|
|
2194
2217
|
*/
|
|
2195
2218
|
multiply(q1: DeepImmutable<Quaternion>): this;
|
|
2196
2219
|
/**
|
|
2197
2220
|
* Sets the given "result" as the the multiplication result of the current one with the given one "q1"
|
|
2221
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#45
|
|
2198
2222
|
* @param q1 defines the second operand
|
|
2199
2223
|
* @param result defines the target quaternion
|
|
2200
2224
|
* @returns the current quaternion
|
|
@@ -2202,64 +2226,76 @@ export declare class Quaternion {
|
|
|
2202
2226
|
multiplyToRef<T extends Quaternion>(q1: DeepImmutable<Quaternion>, result: T): T;
|
|
2203
2227
|
/**
|
|
2204
2228
|
* Updates the current quaternion with the multiplication of itself with the given one "q1"
|
|
2229
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#46
|
|
2205
2230
|
* @param q1 defines the second operand
|
|
2206
2231
|
* @returns the currentupdated quaternion
|
|
2207
2232
|
*/
|
|
2208
2233
|
multiplyInPlace(q1: DeepImmutable<Quaternion>): this;
|
|
2209
2234
|
/**
|
|
2210
2235
|
* Conjugates the current quaternion and stores the result in the given quaternion
|
|
2236
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#81
|
|
2211
2237
|
* @param ref defines the target quaternion
|
|
2212
2238
|
* @returns result input
|
|
2213
2239
|
*/
|
|
2214
2240
|
conjugateToRef<T extends Quaternion>(ref: T): T;
|
|
2215
2241
|
/**
|
|
2216
2242
|
* Conjugates in place the current quaternion
|
|
2243
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#82
|
|
2217
2244
|
* @returns the current updated quaternion
|
|
2218
2245
|
*/
|
|
2219
2246
|
conjugateInPlace(): this;
|
|
2220
2247
|
/**
|
|
2221
2248
|
* Conjugates (1-q) the current quaternion
|
|
2249
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#83
|
|
2222
2250
|
* @returns a new quaternion
|
|
2223
2251
|
*/
|
|
2224
2252
|
conjugate(): this;
|
|
2225
2253
|
/**
|
|
2226
2254
|
* Returns the inverse of the current quaternion
|
|
2255
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#84
|
|
2227
2256
|
* @returns a new quaternion
|
|
2228
2257
|
*/
|
|
2229
2258
|
invert(): this;
|
|
2230
2259
|
/**
|
|
2231
2260
|
* Invert in place the current quaternion
|
|
2261
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#85
|
|
2232
2262
|
* @returns this quaternion
|
|
2233
2263
|
*/
|
|
2234
2264
|
invertInPlace(): this;
|
|
2235
2265
|
/**
|
|
2236
2266
|
* Gets squared length of current quaternion
|
|
2267
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#29
|
|
2237
2268
|
* @returns the quaternion length (float)
|
|
2238
2269
|
*/
|
|
2239
2270
|
lengthSquared(): number;
|
|
2240
2271
|
/**
|
|
2241
2272
|
* Gets length of current quaternion
|
|
2273
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#28
|
|
2242
2274
|
* @returns the quaternion length (float)
|
|
2243
2275
|
*/
|
|
2244
2276
|
length(): number;
|
|
2245
2277
|
/**
|
|
2246
2278
|
* Normalize in place the current quaternion
|
|
2279
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#54
|
|
2247
2280
|
* @returns the current updated quaternion
|
|
2248
2281
|
*/
|
|
2249
2282
|
normalize(): this;
|
|
2250
2283
|
/**
|
|
2251
2284
|
* Normalize a copy of the current quaternion
|
|
2285
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#55
|
|
2252
2286
|
* @returns the normalized quaternion
|
|
2253
2287
|
*/
|
|
2254
2288
|
normalizeToNew(): this;
|
|
2255
2289
|
/**
|
|
2256
2290
|
* Returns a new Vector3 set with the Euler angles translated from the current quaternion
|
|
2291
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#32
|
|
2257
2292
|
* @returns a new Vector3 containing the Euler angles
|
|
2258
2293
|
* @see https://doc.babylonjs.com/divingDeeper/mesh/transforms/center_origin/rotation_conventions
|
|
2259
2294
|
*/
|
|
2260
2295
|
toEulerAngles(): Vector3;
|
|
2261
2296
|
/**
|
|
2262
2297
|
* Sets the given vector3 "result" with the Euler angles translated from the current quaternion
|
|
2298
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#31
|
|
2263
2299
|
* @param result defines the vector which will be filled with the Euler angles
|
|
2264
2300
|
* @returns result input
|
|
2265
2301
|
* @see https://doc.babylonjs.com/divingDeeper/mesh/transforms/center_origin/rotation_conventions
|
|
@@ -2267,48 +2303,36 @@ export declare class Quaternion {
|
|
|
2267
2303
|
toEulerAnglesToRef<T extends Vector3>(result: T): T;
|
|
2268
2304
|
/**
|
|
2269
2305
|
* Updates the given rotation matrix with the current quaternion values
|
|
2306
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#67
|
|
2270
2307
|
* @param result defines the target matrix
|
|
2271
2308
|
* @returns the current unchanged quaternion
|
|
2272
2309
|
*/
|
|
2273
2310
|
toRotationMatrix<T extends Matrix>(result: T): T;
|
|
2274
2311
|
/**
|
|
2275
2312
|
* Updates the current quaternion from the given rotation matrix values
|
|
2313
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#41
|
|
2276
2314
|
* @param matrix defines the source matrix
|
|
2277
2315
|
* @returns the current updated quaternion
|
|
2278
2316
|
*/
|
|
2279
2317
|
fromRotationMatrix(matrix: DeepImmutable<Matrix>): this;
|
|
2280
2318
|
/**
|
|
2281
2319
|
* Creates a new quaternion from a rotation matrix
|
|
2320
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#101
|
|
2282
2321
|
* @param matrix defines the source matrix
|
|
2283
2322
|
* @returns a new quaternion created from the given rotation matrix values
|
|
2284
2323
|
*/
|
|
2285
2324
|
static FromRotationMatrix(matrix: DeepImmutable<Matrix>): Quaternion;
|
|
2286
2325
|
/**
|
|
2287
2326
|
* Updates the given quaternion with the given rotation matrix values
|
|
2327
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#102
|
|
2288
2328
|
* @param matrix defines the source matrix
|
|
2289
2329
|
* @param result defines the target quaternion
|
|
2290
2330
|
* @returns result input
|
|
2291
2331
|
*/
|
|
2292
2332
|
static FromRotationMatrixToRef<T extends Quaternion>(matrix: DeepImmutable<Matrix>, result: T): T;
|
|
2293
|
-
/**
|
|
2294
|
-
* Creates the rotation quaternion needed to rotate from one Vector3 onto another Vector3
|
|
2295
|
-
* Example PG https://playground.babylonjs.com/#L49EJ7#2
|
|
2296
|
-
* @param fromVector the starting vector
|
|
2297
|
-
* @param toVector the ending vector
|
|
2298
|
-
* @returns the rotation quaternion needed
|
|
2299
|
-
*/
|
|
2300
|
-
static RotationQuaternionFromOnto(fromVector: DeepImmutable<Vector3>, toVector: DeepImmutable<Vector3>): import("../types").DeepImmutableObject<Quaternion>;
|
|
2301
|
-
/**
|
|
2302
|
-
* Creates the rotation quaternion needed to rotate from one Vector3 onto another Vector3 and stores in a result Quaternion
|
|
2303
|
-
* Example PG https://playground.babylonjs.com/#L49EJ7#3
|
|
2304
|
-
* @param fromVector the starting vector
|
|
2305
|
-
* @param toVector the ending vector
|
|
2306
|
-
* @param result the rotation quaternion needed
|
|
2307
|
-
* @returns the result
|
|
2308
|
-
*/
|
|
2309
|
-
static RotationQuaternionFromOntoToRef(fromVector: DeepImmutable<Vector3>, toVector: DeepImmutable<Vector3>, result: DeepImmutable<Quaternion>): import("../types").DeepImmutableObject<Quaternion>;
|
|
2310
2333
|
/**
|
|
2311
2334
|
* Returns the dot product (float) between the quaternions "left" and "right"
|
|
2335
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#61
|
|
2312
2336
|
* @param left defines the left operand
|
|
2313
2337
|
* @param right defines the right operand
|
|
2314
2338
|
* @returns the dot product
|
|
@@ -2316,6 +2340,7 @@ export declare class Quaternion {
|
|
|
2316
2340
|
static Dot(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>): number;
|
|
2317
2341
|
/**
|
|
2318
2342
|
* Checks if the orientations of two rotation quaternions are close to each other
|
|
2343
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#60
|
|
2319
2344
|
* @param quat0 defines the first quaternion to check
|
|
2320
2345
|
* @param quat1 defines the second quaternion to check
|
|
2321
2346
|
* @param epsilon defines closeness, 0 same orientation, 1 PI apart, default 0.1
|
|
@@ -2324,7 +2349,7 @@ export declare class Quaternion {
|
|
|
2324
2349
|
static AreClose(quat0: DeepImmutable<Quaternion>, quat1: DeepImmutable<Quaternion>, epsilon?: number): boolean;
|
|
2325
2350
|
/**
|
|
2326
2351
|
* Smooth interpolation between two quaternions using Slerp
|
|
2327
|
-
*
|
|
2352
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#93
|
|
2328
2353
|
* @param source source quaternion
|
|
2329
2354
|
* @param goal goal quaternion
|
|
2330
2355
|
* @param deltaTime current interpolation frame
|
|
@@ -2339,12 +2364,14 @@ export declare class Quaternion {
|
|
|
2339
2364
|
static Zero(): Quaternion;
|
|
2340
2365
|
/**
|
|
2341
2366
|
* Inverse a given quaternion
|
|
2367
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#103
|
|
2342
2368
|
* @param q defines the source quaternion
|
|
2343
2369
|
* @returns a new quaternion as the inverted current quaternion
|
|
2344
2370
|
*/
|
|
2345
2371
|
static Inverse<T extends Quaternion>(q: DeepImmutable<T>): T;
|
|
2346
2372
|
/**
|
|
2347
2373
|
* Inverse a given quaternion
|
|
2374
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#104
|
|
2348
2375
|
* @param q defines the source quaternion
|
|
2349
2376
|
* @param result the quaternion the result will be stored in
|
|
2350
2377
|
* @returns the result quaternion
|
|
@@ -2363,6 +2390,7 @@ export declare class Quaternion {
|
|
|
2363
2390
|
static IsIdentity(quaternion: DeepImmutable<Quaternion>): boolean;
|
|
2364
2391
|
/**
|
|
2365
2392
|
* Creates a quaternion from a rotation around an axis
|
|
2393
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#72
|
|
2366
2394
|
* @param axis defines the axis to use
|
|
2367
2395
|
* @param angle defines the angle to use
|
|
2368
2396
|
* @returns a new quaternion created from the given axis (Vector3) and angle in radians (float)
|
|
@@ -2370,6 +2398,7 @@ export declare class Quaternion {
|
|
|
2370
2398
|
static RotationAxis(axis: DeepImmutable<Vector3>, angle: number): Quaternion;
|
|
2371
2399
|
/**
|
|
2372
2400
|
* Creates a rotation around an axis and stores it into the given quaternion
|
|
2401
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#73
|
|
2373
2402
|
* @param axis defines the axis to use
|
|
2374
2403
|
* @param angle defines the angle to use
|
|
2375
2404
|
* @param result defines the target quaternion
|
|
@@ -2378,6 +2407,7 @@ export declare class Quaternion {
|
|
|
2378
2407
|
static RotationAxisToRef<T extends Quaternion>(axis: DeepImmutable<Vector3>, angle: number, result: T): T;
|
|
2379
2408
|
/**
|
|
2380
2409
|
* Creates a new quaternion from data stored into an array
|
|
2410
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#63
|
|
2381
2411
|
* @param array defines the data source
|
|
2382
2412
|
* @param offset defines the offset in the source array where the data starts
|
|
2383
2413
|
* @returns a new quaternion
|
|
@@ -2385,6 +2415,7 @@ export declare class Quaternion {
|
|
|
2385
2415
|
static FromArray(array: DeepImmutable<ArrayLike<number>>, offset?: number): Quaternion;
|
|
2386
2416
|
/**
|
|
2387
2417
|
* Updates the given quaternion "result" from the starting index of the given array.
|
|
2418
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#64
|
|
2388
2419
|
* @param array the array to pull values from
|
|
2389
2420
|
* @param offset the offset into the array to start at
|
|
2390
2421
|
* @param result the quaternion to store the result in
|
|
@@ -2393,6 +2424,7 @@ export declare class Quaternion {
|
|
|
2393
2424
|
static FromArrayToRef<T extends Quaternion>(array: DeepImmutable<ArrayLike<number>>, offset: number, result: T): T;
|
|
2394
2425
|
/**
|
|
2395
2426
|
* Create a quaternion from Euler rotation angles
|
|
2427
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#33
|
|
2396
2428
|
* @param x Pitch
|
|
2397
2429
|
* @param y Yaw
|
|
2398
2430
|
* @param z Roll
|
|
@@ -2401,6 +2433,7 @@ export declare class Quaternion {
|
|
|
2401
2433
|
static FromEulerAngles(x: number, y: number, z: number): Quaternion;
|
|
2402
2434
|
/**
|
|
2403
2435
|
* Updates a quaternion from Euler rotation angles
|
|
2436
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#34
|
|
2404
2437
|
* @param x Pitch
|
|
2405
2438
|
* @param y Yaw
|
|
2406
2439
|
* @param z Roll
|
|
@@ -2410,12 +2443,14 @@ export declare class Quaternion {
|
|
|
2410
2443
|
static FromEulerAnglesToRef<T extends Quaternion>(x: number, y: number, z: number, result: T): T;
|
|
2411
2444
|
/**
|
|
2412
2445
|
* Create a quaternion from Euler rotation vector
|
|
2446
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#35
|
|
2413
2447
|
* @param vec the Euler vector (x Pitch, y Yaw, z Roll)
|
|
2414
2448
|
* @returns the new Quaternion
|
|
2415
2449
|
*/
|
|
2416
2450
|
static FromEulerVector(vec: DeepImmutable<Vector3>): Quaternion;
|
|
2417
2451
|
/**
|
|
2418
2452
|
* Updates a quaternion from Euler rotation vector
|
|
2453
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#36
|
|
2419
2454
|
* @param vec the Euler vector (x Pitch, y Yaw, z Roll)
|
|
2420
2455
|
* @param result the quaternion to store the result
|
|
2421
2456
|
* @returns the updated quaternion
|
|
@@ -2423,6 +2458,7 @@ export declare class Quaternion {
|
|
|
2423
2458
|
static FromEulerVectorToRef<T extends Quaternion>(vec: DeepImmutable<Vector3>, result: T): T;
|
|
2424
2459
|
/**
|
|
2425
2460
|
* Updates a quaternion so that it rotates vector vecFrom to vector vecTo
|
|
2461
|
+
* Example Playground - https://playground.babylonjs.com/#L49EJ7#70
|
|
2426
2462
|
* @param vecFrom defines the direction vector from which to rotate
|
|
2427
2463
|
* @param vecTo defines the direction vector to which to rotate
|
|
2428
2464
|
* @param result the quaternion to store the result
|
|
@@ -2431,6 +2467,7 @@ export declare class Quaternion {
|
|
|
2431
2467
|
static FromUnitVectorsToRef<T extends Quaternion>(vecFrom: DeepImmutable<Vector3>, vecTo: DeepImmutable<Vector3>, result: T): T;
|
|
2432
2468
|
/**
|
|
2433
2469
|
* Creates a new quaternion from the given Euler float angles (y, x, z)
|
|
2470
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#77
|
|
2434
2471
|
* @param yaw defines the rotation around Y axis
|
|
2435
2472
|
* @param pitch defines the rotation around X axis
|
|
2436
2473
|
* @param roll defines the rotation around Z axis
|
|
@@ -2439,6 +2476,7 @@ export declare class Quaternion {
|
|
|
2439
2476
|
static RotationYawPitchRoll(yaw: number, pitch: number, roll: number): Quaternion;
|
|
2440
2477
|
/**
|
|
2441
2478
|
* Creates a new rotation from the given Euler float angles (y, x, z) and stores it in the target quaternion
|
|
2479
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#78
|
|
2442
2480
|
* @param yaw defines the rotation around Y axis
|
|
2443
2481
|
* @param pitch defines the rotation around X axis
|
|
2444
2482
|
* @param roll defines the rotation around Z axis
|
|
@@ -2448,6 +2486,7 @@ export declare class Quaternion {
|
|
|
2448
2486
|
static RotationYawPitchRollToRef<T extends Quaternion>(yaw: number, pitch: number, roll: number, result: T): T;
|
|
2449
2487
|
/**
|
|
2450
2488
|
* Creates a new quaternion from the given Euler float angles expressed in z-x-z orientation
|
|
2489
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#68
|
|
2451
2490
|
* @param alpha defines the rotation around first axis
|
|
2452
2491
|
* @param beta defines the rotation around second axis
|
|
2453
2492
|
* @param gamma defines the rotation around third axis
|
|
@@ -2456,6 +2495,7 @@ export declare class Quaternion {
|
|
|
2456
2495
|
static RotationAlphaBetaGamma(alpha: number, beta: number, gamma: number): Quaternion;
|
|
2457
2496
|
/**
|
|
2458
2497
|
* Creates a new quaternion from the given Euler float angles expressed in z-x-z orientation and stores it in the target quaternion
|
|
2498
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#69
|
|
2459
2499
|
* @param alpha defines the rotation around first axis
|
|
2460
2500
|
* @param beta defines the rotation around second axis
|
|
2461
2501
|
* @param gamma defines the rotation around third axis
|
|
@@ -2465,6 +2505,7 @@ export declare class Quaternion {
|
|
|
2465
2505
|
static RotationAlphaBetaGammaToRef<T extends Quaternion>(alpha: number, beta: number, gamma: number, result: T): T;
|
|
2466
2506
|
/**
|
|
2467
2507
|
* Creates a new quaternion containing the rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation)
|
|
2508
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#75
|
|
2468
2509
|
* @param axis1 defines the first axis
|
|
2469
2510
|
* @param axis2 defines the second axis
|
|
2470
2511
|
* @param axis3 defines the third axis
|
|
@@ -2473,6 +2514,7 @@ export declare class Quaternion {
|
|
|
2473
2514
|
static RotationQuaternionFromAxis(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>): Quaternion;
|
|
2474
2515
|
/**
|
|
2475
2516
|
* Creates a rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation) and stores it in the target quaternion
|
|
2517
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#76
|
|
2476
2518
|
* @param axis1 defines the first axis
|
|
2477
2519
|
* @param axis2 defines the second axis
|
|
2478
2520
|
* @param axis3 defines the third axis
|
|
@@ -2483,6 +2525,7 @@ export declare class Quaternion {
|
|
|
2483
2525
|
/**
|
|
2484
2526
|
* Creates a new rotation value to orient an object to look towards the given forward direction, the up direction being oriented like "up".
|
|
2485
2527
|
* This function works in left handed mode
|
|
2528
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#96
|
|
2486
2529
|
* @param forward defines the forward direction - Must be normalized and orthogonal to up.
|
|
2487
2530
|
* @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.
|
|
2488
2531
|
* @returns A new quaternion oriented toward the specified forward and up.
|
|
@@ -2491,6 +2534,7 @@ export declare class Quaternion {
|
|
|
2491
2534
|
/**
|
|
2492
2535
|
* Creates a new rotation value to orient an object to look towards the given forward direction with the up direction being oriented like "up", and stores it in the target quaternion.
|
|
2493
2536
|
* This function works in left handed mode
|
|
2537
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#97
|
|
2494
2538
|
* @param forward defines the forward direction - Must be normalized and orthogonal to up.
|
|
2495
2539
|
* @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.
|
|
2496
2540
|
* @param ref defines the target quaternion.
|
|
@@ -2500,6 +2544,7 @@ export declare class Quaternion {
|
|
|
2500
2544
|
/**
|
|
2501
2545
|
* Creates a new rotation value to orient an object to look towards the given forward direction, the up direction being oriented like "up".
|
|
2502
2546
|
* This function works in right handed mode
|
|
2547
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#98
|
|
2503
2548
|
* @param forward defines the forward direction - Must be normalized and orthogonal to up.
|
|
2504
2549
|
* @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.
|
|
2505
2550
|
* @returns A new quaternion oriented toward the specified forward and up.
|
|
@@ -2508,6 +2553,7 @@ export declare class Quaternion {
|
|
|
2508
2553
|
/**
|
|
2509
2554
|
* Creates a new rotation value to orient an object to look towards the given forward direction with the up direction being oriented like "up", and stores it in the target quaternion.
|
|
2510
2555
|
* This function works in right handed mode
|
|
2556
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#105
|
|
2511
2557
|
* @param forward defines the forward direction - Must be normalized and orthogonal to up.
|
|
2512
2558
|
* @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.
|
|
2513
2559
|
* @param ref defines the target quaternion.
|
|
@@ -2516,6 +2562,7 @@ export declare class Quaternion {
|
|
|
2516
2562
|
static FromLookDirectionRHToRef<T extends Quaternion>(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, ref: T): T;
|
|
2517
2563
|
/**
|
|
2518
2564
|
* Interpolates between two quaternions
|
|
2565
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#79
|
|
2519
2566
|
* @param left defines first quaternion
|
|
2520
2567
|
* @param right defines second quaternion
|
|
2521
2568
|
* @param amount defines the gradient to use
|
|
@@ -2524,6 +2571,7 @@ export declare class Quaternion {
|
|
|
2524
2571
|
static Slerp(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>, amount: number): Quaternion;
|
|
2525
2572
|
/**
|
|
2526
2573
|
* Interpolates between two quaternions and stores it into a target quaternion
|
|
2574
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#92
|
|
2527
2575
|
* @param left defines first quaternion
|
|
2528
2576
|
* @param right defines second quaternion
|
|
2529
2577
|
* @param amount defines the gradient to use
|
|
@@ -2533,6 +2581,8 @@ export declare class Quaternion {
|
|
|
2533
2581
|
static SlerpToRef<T extends Quaternion>(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>, amount: number, result: T): T;
|
|
2534
2582
|
/**
|
|
2535
2583
|
* Interpolate between two quaternions using Hermite interpolation
|
|
2584
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#47
|
|
2585
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#hermite-quaternion-spline
|
|
2536
2586
|
* @param value1 defines first quaternion
|
|
2537
2587
|
* @param tangent1 defines the incoming tangent
|
|
2538
2588
|
* @param value2 defines second quaternion
|
|
@@ -2543,6 +2593,7 @@ export declare class Quaternion {
|
|
|
2543
2593
|
static Hermite<T extends Quaternion>(value1: DeepImmutable<T>, tangent1: DeepImmutable<Quaternion>, value2: DeepImmutable<Quaternion>, tangent2: DeepImmutable<Quaternion>, amount: number): T;
|
|
2544
2594
|
/**
|
|
2545
2595
|
* Returns a new Quaternion which is the 1st derivative of the Hermite spline defined by the quaternions "value1", "value2", "tangent1", "tangent2".
|
|
2596
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#48
|
|
2546
2597
|
* @param value1 defines the first control point
|
|
2547
2598
|
* @param tangent1 defines the first tangent
|
|
2548
2599
|
* @param value2 defines the second control point
|
|
@@ -2553,6 +2604,7 @@ export declare class Quaternion {
|
|
|
2553
2604
|
static Hermite1stDerivative<T extends Quaternion>(value1: DeepImmutable<T>, tangent1: DeepImmutable<Quaternion>, value2: DeepImmutable<Quaternion>, tangent2: DeepImmutable<Quaternion>, time: number): T;
|
|
2554
2605
|
/**
|
|
2555
2606
|
* Update a Quaternion with the 1st derivative of the Hermite spline defined by the quaternions "value1", "value2", "tangent1", "tangent2".
|
|
2607
|
+
* Example Playground https://playground.babylonjs.com/#L49EJ7#49
|
|
2556
2608
|
* @param value1 defines the first control point
|
|
2557
2609
|
* @param tangent1 defines the first tangent
|
|
2558
2610
|
* @param value2 defines the second control point
|