@zephyr3d/scene 0.9.0 → 0.9.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/dist/animation/animationset.js +135 -133
- package/dist/animation/animationset.js.map +1 -1
- package/dist/animation/cloth/gpu_cloth_system.js +9 -1
- package/dist/animation/cloth/gpu_cloth_system.js.map +1 -1
- package/dist/animation/fixed_geometry_cache_track.js +5 -1
- package/dist/animation/fixed_geometry_cache_track.js.map +1 -1
- package/dist/animation/geometry_cache_utils.js +20 -4
- package/dist/animation/geometry_cache_utils.js.map +1 -1
- package/dist/animation/ik/ik_angle_constraint.js +2 -6
- package/dist/animation/ik/ik_angle_constraint.js.map +1 -1
- package/dist/animation/ik/two_bone_ik_solver.js +2 -6
- package/dist/animation/ik/two_bone_ik_solver.js.map +1 -1
- package/dist/animation/joint_dynamics/collision.js +60 -12
- package/dist/animation/joint_dynamics/collision.js.map +1 -1
- package/dist/animation/joint_dynamics/constraints.js +20 -4
- package/dist/animation/joint_dynamics/constraints.js.map +1 -1
- package/dist/animation/joint_dynamics/controller.js +151 -103
- package/dist/animation/joint_dynamics/controller.js.map +1 -1
- package/dist/animation/joint_dynamics/solver.js +21 -11
- package/dist/animation/joint_dynamics/solver.js.map +1 -1
- package/dist/animation/joint_dynamics/types.js +15 -3
- package/dist/animation/joint_dynamics/types.js.map +1 -1
- package/dist/animation/pca_geometry_cache_track.js +5 -1
- package/dist/animation/pca_geometry_cache_track.js.map +1 -1
- package/dist/animation/skeleton.js +2 -2
- package/dist/animation/skeleton.js.map +1 -1
- package/dist/animation/skeleton_modifier.js +2 -6
- package/dist/animation/skeleton_modifier.js.map +1 -1
- package/dist/animation/spring/spring_system.js +87 -114
- package/dist/animation/spring/spring_system.js.map +1 -1
- package/dist/app/app.js.map +1 -1
- package/dist/app/engine.js +1 -1
- package/dist/app/engine.js.map +1 -1
- package/dist/app/screen.js +4 -4
- package/dist/app/screen.js.map +1 -1
- package/dist/app/scriptingsystem.js +24 -1
- package/dist/app/scriptingsystem.js.map +1 -1
- package/dist/app/scriptregistry.js +165 -144
- package/dist/app/scriptregistry.js.map +1 -1
- package/dist/asset/assetmanager.js +2 -2
- package/dist/asset/assetmanager.js.map +1 -1
- package/dist/asset/model.js +3 -3
- package/dist/asset/model.js.map +1 -1
- package/dist/camera/camera.js +185 -185
- package/dist/camera/camera.js.map +1 -1
- package/dist/camera/orbit.js.map +1 -1
- package/dist/index.d.ts +794 -261
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/material/material.js +290 -288
- package/dist/material/material.js.map +1 -1
- package/dist/material/mixins/lightmodel/pbrmetallicroughness.js +13 -26
- package/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
- package/dist/material/pbrmr.js +1 -11
- package/dist/material/pbrmr.js.map +1 -1
- package/dist/material/sprite.js +6 -6
- package/dist/material/sprite.js.map +1 -1
- package/dist/material/terrain-cm.js +2 -2
- package/dist/material/terrain-cm.js.map +1 -1
- package/dist/posteffect/taa.js +31 -39
- package/dist/posteffect/taa.js.map +1 -1
- package/dist/render/drawable.js +5 -1
- package/dist/render/drawable.js.map +1 -1
- package/dist/render/rendergraph/device_pool_allocator.js +29 -3
- package/dist/render/rendergraph/device_pool_allocator.js.map +1 -1
- package/dist/render/rendergraph/executor.js +283 -33
- package/dist/render/rendergraph/executor.js.map +1 -1
- package/dist/render/rendergraph/forward_plus_builder.js +338 -108
- package/dist/render/rendergraph/forward_plus_builder.js.map +1 -1
- package/dist/render/rendergraph/history_resource_manager.js +236 -156
- package/dist/render/rendergraph/history_resource_manager.js.map +1 -1
- package/dist/render/rendergraph/history_resources.js +10 -0
- package/dist/render/rendergraph/history_resources.js.map +1 -0
- package/dist/render/rendergraph/rendergraph.js +162 -35
- package/dist/render/rendergraph/rendergraph.js.map +1 -1
- package/dist/render/rendergraph/types.js +36 -16
- package/dist/render/rendergraph/types.js.map +1 -1
- package/dist/render/rendertarget.js +5 -1
- package/dist/render/rendertarget.js.map +1 -1
- package/dist/render/screenrendertarget.js +5 -1
- package/dist/render/screenrendertarget.js.map +1 -1
- package/dist/render/sky.js +4 -4
- package/dist/render/sky.js.map +1 -1
- package/dist/scene/basesprite.js +2 -2
- package/dist/scene/basesprite.js.map +1 -1
- package/dist/scene/graph_node.js +1 -1
- package/dist/scene/graph_node.js.map +1 -1
- package/dist/scene/mesh.js +4 -20
- package/dist/scene/mesh.js.map +1 -1
- package/dist/scene/particlesys.js +1 -1
- package/dist/scene/particlesys.js.map +1 -1
- package/dist/scene/scene_node.js +2 -2
- package/dist/scene/scene_node.js.map +1 -1
- package/dist/scene/script_attachment.js +15 -3
- package/dist/scene/script_attachment.js.map +1 -1
- package/dist/scene/terrain-cm/terrain-cm.js +3 -3
- package/dist/scene/terrain-cm/terrain-cm.js.map +1 -1
- package/dist/shadow/shadowmapper.js.map +1 -1
- package/dist/shapes/box.js +1 -1
- package/dist/shapes/box.js.map +1 -1
- package/dist/shapes/capsule.js +0 -3
- package/dist/shapes/capsule.js.map +1 -1
- package/dist/shapes/cylinder.js +0 -3
- package/dist/shapes/cylinder.js.map +1 -1
- package/dist/shapes/plane.js +0 -3
- package/dist/shapes/plane.js.map +1 -1
- package/dist/shapes/tetrahedron.js +3 -9
- package/dist/shapes/tetrahedron.js.map +1 -1
- package/dist/shapes/torus.js +4 -7
- package/dist/shapes/torus.js.map +1 -1
- package/dist/utility/blueprint/material/inputs.js +3 -3
- package/dist/utility/blueprint/material/inputs.js.map +1 -1
- package/dist/utility/blueprint/material/ir.js +493 -493
- package/dist/utility/blueprint/material/ir.js.map +1 -1
- package/dist/utility/serialization/manager.js +34 -3
- package/dist/utility/serialization/manager.js.map +1 -1
- package/dist/utility/serialization/scene/animation.js +45 -0
- package/dist/utility/serialization/scene/animation.js.map +1 -1
- package/dist/utility/serialization/scene/camera.js +53 -0
- package/dist/utility/serialization/scene/camera.js.map +1 -1
- package/dist/utility/serialization/scene/common.js +10 -0
- package/dist/utility/serialization/scene/common.js.map +1 -1
- package/dist/utility/serialization/scene/light.js +30 -0
- package/dist/utility/serialization/scene/light.js.map +1 -1
- package/dist/utility/serialization/scene/material.js +63 -0
- package/dist/utility/serialization/scene/material.js.map +1 -1
- package/dist/utility/serialization/scene/mesh.js +11 -0
- package/dist/utility/serialization/scene/mesh.js.map +1 -1
- package/dist/utility/serialization/scene/misc.js +2 -0
- package/dist/utility/serialization/scene/misc.js.map +1 -1
- package/dist/utility/serialization/scene/node.js +19 -0
- package/dist/utility/serialization/scene/node.js.map +1 -1
- package/dist/utility/serialization/scene/particle.js +22 -0
- package/dist/utility/serialization/scene/particle.js.map +1 -1
- package/dist/utility/serialization/scene/primitive.js +33 -0
- package/dist/utility/serialization/scene/primitive.js.map +1 -1
- package/dist/utility/serialization/scene/scene.js +39 -0
- package/dist/utility/serialization/scene/scene.js.map +1 -1
- package/dist/utility/serialization/scene/script.js +2 -0
- package/dist/utility/serialization/scene/script.js.map +1 -1
- package/dist/utility/serialization/scene/sprite.js +6 -0
- package/dist/utility/serialization/scene/sprite.js.map +1 -1
- package/dist/utility/serialization/scene/terrain.js +9 -0
- package/dist/utility/serialization/scene/terrain.js.map +1 -1
- package/dist/utility/serialization/scene/water.js +21 -0
- package/dist/utility/serialization/scene/water.js.map +1 -1
- package/dist/utility/serialization/types.js +5 -1
- package/dist/utility/serialization/types.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -243,6 +243,11 @@ declare function fetchSampler(type: SamplerType): TextureSampler<unknown> | null
|
|
|
243
243
|
* @public
|
|
244
244
|
*/
|
|
245
245
|
type PropertyType = string;
|
|
246
|
+
/**
|
|
247
|
+
* Maps a property type discriminator to the corresponding value lane key.
|
|
248
|
+
*
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
246
251
|
type PropertyToType<T extends string> = T extends 'float' | 'vec2' | 'vec3' | 'vec4' | 'int' | 'int2' | 'int3' | 'int4' | 'rgb' | 'rgba' ? 'num' : T extends 'bool' ? 'bool' : T extends 'string' ? 'str' : T extends 'object' | 'object_array' ? 'object' : 'num' | 'bool' | 'str' | 'object';
|
|
247
252
|
/**
|
|
248
253
|
* Container for a serializable property's value.
|
|
@@ -278,6 +283,11 @@ type PropertyValue = {
|
|
|
278
283
|
* @public
|
|
279
284
|
*/
|
|
280
285
|
type PropEdit = 'aabb' | 'quaternion' | 'proptrack';
|
|
286
|
+
/**
|
|
287
|
+
* Extra scene-node picker hints for a property.
|
|
288
|
+
*
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
281
291
|
type PropertySceneNodeOptions = {
|
|
282
292
|
kind?: 'node' | 'mesh';
|
|
283
293
|
};
|
|
@@ -321,6 +331,11 @@ type PropertyAccessorOptions = {
|
|
|
321
331
|
values: unknown[];
|
|
322
332
|
};
|
|
323
333
|
};
|
|
334
|
+
/**
|
|
335
|
+
* Returns the property accessor list unchanged while preserving typing.
|
|
336
|
+
*
|
|
337
|
+
* @public
|
|
338
|
+
*/
|
|
324
339
|
declare function defineProps(accessors: PropertyAccessor<any, 'DUMMY'>[]): PropertyAccessor[];
|
|
325
340
|
/**
|
|
326
341
|
* Descriptor for a serializable property of a class/type.
|
|
@@ -342,6 +357,8 @@ type PropertyAccessor<T = object, U extends string = ''> = {
|
|
|
342
357
|
type: PropertyType;
|
|
343
358
|
/** Unique property name (stable identifier for tooling/serialization). */
|
|
344
359
|
name: string;
|
|
360
|
+
/** Description of this property */
|
|
361
|
+
description?: string;
|
|
345
362
|
/**
|
|
346
363
|
* Optional evaluation phase/order hint (lower runs earlier).
|
|
347
364
|
* Useful for staged initialization or batched updates in editors.
|
|
@@ -513,6 +530,11 @@ type SerializableClass = {
|
|
|
513
530
|
* @public
|
|
514
531
|
*/
|
|
515
532
|
type ShadowMode = 'hard' | 'vsm' | 'esm' | 'pcf-pd' | 'pcf-opt';
|
|
533
|
+
/**
|
|
534
|
+
* Preset shadow quality profiles.
|
|
535
|
+
*
|
|
536
|
+
* @public
|
|
537
|
+
*/
|
|
516
538
|
type ShadowQualityPreset = 'character-small' | 'outdoor-large';
|
|
517
539
|
/**
|
|
518
540
|
* The shadow map generator
|
|
@@ -1718,6 +1740,13 @@ declare class Material extends Disposable implements Clonable<Material>, IDispos
|
|
|
1718
1740
|
* Base returns `null`. Subclasses that support instancing can return a lightweight instance.
|
|
1719
1741
|
*/
|
|
1720
1742
|
createInstance(): this;
|
|
1743
|
+
/**
|
|
1744
|
+
* Returns the core material that owns GPU state.
|
|
1745
|
+
*
|
|
1746
|
+
* Instances may delegate to a shared core to reuse compiled programs and caches.
|
|
1747
|
+
* @public
|
|
1748
|
+
*/
|
|
1749
|
+
get coreMaterial(): this;
|
|
1721
1750
|
/**
|
|
1722
1751
|
* Prepare the material for drawing across all passes for the given draw context.
|
|
1723
1752
|
*
|
|
@@ -2413,9 +2442,7 @@ declare class ClipmapTerrainMaterial extends ClipmapTerrainMaterial_base {
|
|
|
2413
2442
|
static get MAX_DETAIL_MAP_COUNT(): number;
|
|
2414
2443
|
get debugMode(): TerrainDebugMode;
|
|
2415
2444
|
set debugMode(mode: TerrainDebugMode);
|
|
2416
|
-
set region(val: Vector4);
|
|
2417
2445
|
setClipmapGridInfo(gridScale: number, gridOffsetX: number, gridOffsetY: number): void;
|
|
2418
|
-
set terrainScale(val: Vector3);
|
|
2419
2446
|
get numDetailMaps(): number;
|
|
2420
2447
|
set numDetailMaps(val: number);
|
|
2421
2448
|
getSplatMap(): Texture2D<unknown> | Texture2DArray<unknown> | null;
|
|
@@ -3461,6 +3488,11 @@ type IMixinLight = {
|
|
|
3461
3488
|
*/
|
|
3462
3489
|
declare function mixinLight<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinLight);
|
|
3463
3490
|
|
|
3491
|
+
/**
|
|
3492
|
+
* Reflection model used by the PBR metallic-roughness material.
|
|
3493
|
+
*
|
|
3494
|
+
* @public
|
|
3495
|
+
*/
|
|
3464
3496
|
type PBRReflectionMode = 'none' | 'ggx' | 'anisotropic' | 'glint';
|
|
3465
3497
|
/**
|
|
3466
3498
|
* Interface for PBRMetallicRoughness lighting model mixin
|
|
@@ -3659,9 +3691,9 @@ declare class PBRBluePrintMaterial extends PBRBluePrintMaterial_base implements
|
|
|
3659
3691
|
* using UV information and an anchor point to control how the sprite
|
|
3660
3692
|
* is positioned and textured.
|
|
3661
3693
|
*
|
|
3662
|
-
* Derived classes can override
|
|
3663
|
-
*
|
|
3664
|
-
*
|
|
3694
|
+
* Derived classes can override `internalSetupUniforms()`,
|
|
3695
|
+
* `internalApplyUniforms()`, and
|
|
3696
|
+
* `calcFragmentColor()` to provide custom
|
|
3665
3697
|
* uniforms and shading logic (e.g. sampling a texture).
|
|
3666
3698
|
*
|
|
3667
3699
|
* @public
|
|
@@ -3769,9 +3801,9 @@ declare class SpriteMaterial extends MeshMaterial implements Clonable<SpriteMate
|
|
|
3769
3801
|
* @remarks
|
|
3770
3802
|
* This method:
|
|
3771
3803
|
* - Calls the base implementation.
|
|
3772
|
-
* - Invokes
|
|
3804
|
+
* - Invokes `internalSetupUniforms()` for
|
|
3773
3805
|
* fragment-stage specific uniform declarations.
|
|
3774
|
-
* - Computes fragment color by calling
|
|
3806
|
+
* - Computes fragment color by calling `calcFragmentColor()`
|
|
3775
3807
|
* if fragment color is needed.
|
|
3776
3808
|
* - Outputs the final fragment color via {@link MeshMaterial.outputFragmentColor}.
|
|
3777
3809
|
*
|
|
@@ -3789,7 +3821,7 @@ declare class SpriteMaterial extends MeshMaterial implements Clonable<SpriteMate
|
|
|
3789
3821
|
* for non-instanced rendering. For instanced rendering, these values
|
|
3790
3822
|
* are expected to be provided as per-instance uniforms instead.
|
|
3791
3823
|
*
|
|
3792
|
-
* It also calls
|
|
3824
|
+
* It also calls `internalApplyUniforms()` to allow
|
|
3793
3825
|
* derived classes to bind additional resources (e.g. textures).
|
|
3794
3826
|
*
|
|
3795
3827
|
* @param bindGroup - The bind group to which uniforms and resources are bound.
|
|
@@ -4507,8 +4539,6 @@ declare class SkyRenderer extends Disposable {
|
|
|
4507
4539
|
/** Which type of the sky should be rendered */
|
|
4508
4540
|
get skyType(): SkyType;
|
|
4509
4541
|
set skyType(val: SkyType);
|
|
4510
|
-
set panoramaTextureAsset(id: string);
|
|
4511
|
-
set skyboxTextureSize(size: number);
|
|
4512
4542
|
/** Baked sky texture */
|
|
4513
4543
|
getBakedSkyTexture(ctx: DrawContext): TextureCube<unknown>;
|
|
4514
4544
|
/**
|
|
@@ -4619,11 +4649,9 @@ declare class SkyRenderer extends Disposable {
|
|
|
4619
4649
|
*/
|
|
4620
4650
|
get skyboxRotation(): Immutable<Vector3>;
|
|
4621
4651
|
set skyboxRotation(val: Immutable<Vector3>);
|
|
4622
|
-
set skyWorldMatrix(val: Immutable<Matrix4x4>);
|
|
4623
4652
|
/** Current fog type */
|
|
4624
4653
|
get fogType(): FogType;
|
|
4625
4654
|
set fogType(val: FogType);
|
|
4626
|
-
set aerialPerspectiveDebug(val: number);
|
|
4627
4655
|
/**
|
|
4628
4656
|
* Force the radiance map and irradiance map to be regenerated.
|
|
4629
4657
|
*/
|
|
@@ -6256,6 +6284,11 @@ declare class FBMWaveGenerator extends Disposable implements WaveGenerator {
|
|
|
6256
6284
|
getHash(): string;
|
|
6257
6285
|
}
|
|
6258
6286
|
|
|
6287
|
+
/**
|
|
6288
|
+
* Abstract render target used to derive viewports and projection matrices.
|
|
6289
|
+
*
|
|
6290
|
+
* @public
|
|
6291
|
+
*/
|
|
6259
6292
|
declare abstract class RenderTarget {
|
|
6260
6293
|
abstract getVersion(): number;
|
|
6261
6294
|
abstract calcViewport(outViewport?: Nullable<number[]>): number[];
|
|
@@ -6294,6 +6327,8 @@ type ScreenConfig = {
|
|
|
6294
6327
|
*
|
|
6295
6328
|
* outX = inX * scaleX + offsetX
|
|
6296
6329
|
* outY = inY * scaleY + offsetY
|
|
6330
|
+
*
|
|
6331
|
+
* @public
|
|
6297
6332
|
*/
|
|
6298
6333
|
type PointTransform = {
|
|
6299
6334
|
scaleX: number;
|
|
@@ -6304,6 +6339,8 @@ type PointTransform = {
|
|
|
6304
6339
|
/**
|
|
6305
6340
|
* Resolution transform information derived from a {@link ScreenConfig}
|
|
6306
6341
|
* and a concrete viewport rectangle.
|
|
6342
|
+
*
|
|
6343
|
+
* @public
|
|
6307
6344
|
*/
|
|
6308
6345
|
type ResolutionTransform = {
|
|
6309
6346
|
/**
|
|
@@ -6357,7 +6394,7 @@ declare class ScreenAdapter {
|
|
|
6357
6394
|
* Creates a new {@link ScreenAdapter}.
|
|
6358
6395
|
*
|
|
6359
6396
|
* @param config - Optional initial screen configuration. If omitted,
|
|
6360
|
-
* a default of 1280
|
|
6397
|
+
* a default of `1280 x 720` with `cover` mode is used.
|
|
6361
6398
|
*/
|
|
6362
6399
|
constructor(config?: Immutable<ScreenConfig>);
|
|
6363
6400
|
/**
|
|
@@ -6423,7 +6460,7 @@ declare class ScreenAdapter {
|
|
|
6423
6460
|
*
|
|
6424
6461
|
* @param canvasPos - Point in canvas coordinates (CSS pixels).
|
|
6425
6462
|
* @param viewportPosOut - Optional output vector. If provided, it will be
|
|
6426
|
-
* written into and returned; otherwise a new
|
|
6463
|
+
* written into and returned; otherwise a new `Vector2` is allocated.
|
|
6427
6464
|
* @returns The point in viewport-local coordinates.
|
|
6428
6465
|
*/
|
|
6429
6466
|
canvasPosToViewport(canvasPos: Vector2, viewportPosOut?: Vector2): Vector2;
|
|
@@ -6437,7 +6474,7 @@ declare class ScreenAdapter {
|
|
|
6437
6474
|
*
|
|
6438
6475
|
* @param canvasPos - Point in canvas coordinates (CSS pixels).
|
|
6439
6476
|
* @param logicPosOut - Optional output vector. If provided, it will be
|
|
6440
|
-
* written into and returned; otherwise a new
|
|
6477
|
+
* written into and returned; otherwise a new `Vector2` is allocated.
|
|
6441
6478
|
* @returns The point in logical (design resolution) coordinates.
|
|
6442
6479
|
*/
|
|
6443
6480
|
canvasPosToLogic(canvasPos: Vector2, logicPosOut?: Vector2): Vector2;
|
|
@@ -6452,7 +6489,7 @@ declare class ScreenAdapter {
|
|
|
6452
6489
|
* @param transform - Transform parameters (scale and offset).
|
|
6453
6490
|
* @param pointIn - Input point.
|
|
6454
6491
|
* @param pointOut - Optional output vector. If provided, it will be
|
|
6455
|
-
* written into and returned; otherwise a new
|
|
6492
|
+
* written into and returned; otherwise a new `Vector2` is allocated.
|
|
6456
6493
|
* @returns The transformed point.
|
|
6457
6494
|
*/
|
|
6458
6495
|
transformPoint(transform: PointTransform, pointIn: Vector2, pointOut?: Vector2): Vector2;
|
|
@@ -6463,6 +6500,11 @@ declare class ScreenAdapter {
|
|
|
6463
6500
|
private getDefaultConfig;
|
|
6464
6501
|
}
|
|
6465
6502
|
|
|
6503
|
+
/**
|
|
6504
|
+
* Render target backed by the engine screen adapter.
|
|
6505
|
+
*
|
|
6506
|
+
* @public
|
|
6507
|
+
*/
|
|
6466
6508
|
declare class ScreenRenderTarget extends RenderTarget {
|
|
6467
6509
|
private readonly screenAdapter;
|
|
6468
6510
|
constructor(screenAdapter?: ScreenAdapter);
|
|
@@ -6506,9 +6548,9 @@ interface RGTextureDesc {
|
|
|
6506
6548
|
/**
|
|
6507
6549
|
* Opaque handle referencing a resource within the render graph.
|
|
6508
6550
|
*
|
|
6509
|
-
* Handles are obtained from {@link RGPassBuilder.createTexture}, {@link
|
|
6510
|
-
* or {@link RGPassBuilder.write}. They are lightweight identifiers
|
|
6511
|
-
* dependencies between passes.
|
|
6551
|
+
* Handles are obtained from {@link RGPassBuilder.createTexture}, {@link RGPassBuilder.createFramebuffer},
|
|
6552
|
+
* {@link RenderGraph.importTexture}, or {@link RGPassBuilder.write}. They are lightweight identifiers
|
|
6553
|
+
* used to declare dependencies between passes.
|
|
6512
6554
|
*
|
|
6513
6555
|
* @public
|
|
6514
6556
|
*/
|
|
@@ -6517,7 +6559,7 @@ declare class RGHandle {
|
|
|
6517
6559
|
get name(): string;
|
|
6518
6560
|
}
|
|
6519
6561
|
/** @public */
|
|
6520
|
-
type RGResourceKind = 'transient' | 'imported';
|
|
6562
|
+
type RGResourceKind = 'transient' | 'imported' | 'token' | 'framebuffer';
|
|
6521
6563
|
/**
|
|
6522
6564
|
* Internal bookkeeping for a resource within the render graph.
|
|
6523
6565
|
* @public
|
|
@@ -6526,12 +6568,14 @@ declare class RGResource {
|
|
|
6526
6568
|
readonly id: number;
|
|
6527
6569
|
readonly name: string;
|
|
6528
6570
|
readonly kind: RGResourceKind;
|
|
6529
|
-
readonly desc: RGTextureDesc | null;
|
|
6571
|
+
readonly desc: RGTextureDesc | RGFramebufferDesc | null;
|
|
6572
|
+
/** Resource ID of the physical backing resource used by imported versions. */
|
|
6573
|
+
readonly physicalId: number;
|
|
6530
6574
|
/** The pass that creates / writes this resource (null for imported until written). */
|
|
6531
6575
|
producer: RGPass | null;
|
|
6532
6576
|
/** Passes that read this resource. */
|
|
6533
6577
|
readonly consumers: RGPass[];
|
|
6534
|
-
constructor(id: number, name: string, kind: RGResourceKind, desc: RGTextureDesc | null);
|
|
6578
|
+
constructor(id: number, name: string, kind: RGResourceKind, desc: RGTextureDesc | RGFramebufferDesc | null, physicalId?: number);
|
|
6535
6579
|
}
|
|
6536
6580
|
/**
|
|
6537
6581
|
* Context passed to pass execute callbacks during graph execution.
|
|
@@ -6546,12 +6590,48 @@ interface RGExecuteContext {
|
|
|
6546
6590
|
*
|
|
6547
6591
|
* For transient resources, this returns the texture allocated by the executor.
|
|
6548
6592
|
* For imported resources, this returns the texture registered via
|
|
6549
|
-
* {@link RenderGraphExecutor.setImportedTexture}.
|
|
6593
|
+
* {@link RenderGraphExecutor.setImportedTexture}. The handle must be declared
|
|
6594
|
+
* by the current pass with {@link RGPassBuilder.read} or {@link RGPassBuilder.write}.
|
|
6550
6595
|
*
|
|
6551
6596
|
* @param handle - Handle of the resource to resolve.
|
|
6552
6597
|
* @returns The resolved texture object (type depends on the allocator).
|
|
6553
6598
|
*/
|
|
6554
6599
|
getTexture<TTexture = unknown>(handle: RGHandle): TTexture;
|
|
6600
|
+
/**
|
|
6601
|
+
* Resolve a framebuffer handle to the actual backend framebuffer object.
|
|
6602
|
+
*
|
|
6603
|
+
* The handle must be declared by the current pass with {@link RGPassBuilder.read}
|
|
6604
|
+
* or created by the same pass with {@link RGPassBuilder.createFramebuffer}.
|
|
6605
|
+
*
|
|
6606
|
+
* @param handle - Handle returned from {@link RGPassBuilder.createFramebuffer}.
|
|
6607
|
+
* @returns The resolved framebuffer object (type depends on the allocator).
|
|
6608
|
+
*/
|
|
6609
|
+
getFramebuffer<TFramebuffer = unknown>(handle: RGHandle): TFramebuffer;
|
|
6610
|
+
/**
|
|
6611
|
+
* Create a temporary framebuffer managed by the graph executor.
|
|
6612
|
+
*
|
|
6613
|
+
* The framebuffer is released automatically when graph execution finishes or
|
|
6614
|
+
* aborts. Attachments may be actual backend resources or texture formats,
|
|
6615
|
+
* depending on the allocator implementation. If an attachment is an
|
|
6616
|
+
* {@link RGHandle}, the current pass must declare it with
|
|
6617
|
+
* {@link RGPassBuilder.read} or {@link RGPassBuilder.write}.
|
|
6618
|
+
*
|
|
6619
|
+
* @param desc - Framebuffer descriptor.
|
|
6620
|
+
* @returns The allocated framebuffer object (type depends on the allocator).
|
|
6621
|
+
*/
|
|
6622
|
+
createFramebuffer<TFramebuffer = unknown>(desc: RGFramebufferDesc): TFramebuffer;
|
|
6623
|
+
/**
|
|
6624
|
+
* Register a cleanup callback to run when graph execution finishes or aborts.
|
|
6625
|
+
*
|
|
6626
|
+
* Callbacks run in reverse registration order. Use this for temporary objects
|
|
6627
|
+
* created inside pass execution that are not graph resources, such as pooled
|
|
6628
|
+
* framebuffers wrapping graph-managed textures. If pass execution throws, the
|
|
6629
|
+
* executor still runs cleanup callbacks and preserves the original pass error
|
|
6630
|
+
* ahead of cleanup errors.
|
|
6631
|
+
*
|
|
6632
|
+
* @param callback - Cleanup function to invoke after execution.
|
|
6633
|
+
*/
|
|
6634
|
+
deferCleanup(callback: () => void): void;
|
|
6555
6635
|
}
|
|
6556
6636
|
/**
|
|
6557
6637
|
* Execute callback signature.
|
|
@@ -6562,6 +6642,20 @@ interface RGExecuteContext {
|
|
|
6562
6642
|
* @public
|
|
6563
6643
|
*/
|
|
6564
6644
|
type RGExecuteFn<T = void> = (ctx: RGExecuteContext, data: T) => void;
|
|
6645
|
+
/**
|
|
6646
|
+
* Ordered execution step inside a render graph pass.
|
|
6647
|
+
*
|
|
6648
|
+
* Subpasses share the parent pass's resource declarations, lifetime, culling,
|
|
6649
|
+
* and access validation. They are intended to make multi-step pass bodies
|
|
6650
|
+
* explicit without splitting graph-level resource dependencies.
|
|
6651
|
+
*
|
|
6652
|
+
* @public
|
|
6653
|
+
*/
|
|
6654
|
+
declare class RGSubpass<T = unknown> {
|
|
6655
|
+
readonly name: string;
|
|
6656
|
+
readonly executeFn: RGExecuteFn<T>;
|
|
6657
|
+
constructor(name: string, executeFn: RGExecuteFn<T>);
|
|
6658
|
+
}
|
|
6565
6659
|
/**
|
|
6566
6660
|
* Internal bookkeeping for a pass within the render graph.
|
|
6567
6661
|
* @public
|
|
@@ -6573,12 +6667,16 @@ declare class RGPass<T = unknown> {
|
|
|
6573
6667
|
readonly reads: RGResource[];
|
|
6574
6668
|
/** Resources this pass creates or writes. */
|
|
6575
6669
|
readonly writes: RGResource[];
|
|
6670
|
+
/** Passes that must complete before this pass due to non-resource hazards. */
|
|
6671
|
+
readonly dependencies: RGPass[];
|
|
6576
6672
|
/** Whether this pass has side effects and must not be culled. */
|
|
6577
6673
|
hasSideEffect: boolean;
|
|
6578
6674
|
/** User data returned from the setup function. */
|
|
6579
6675
|
data: T | null;
|
|
6580
6676
|
/** Execute callback. */
|
|
6581
6677
|
executeFn: RGExecuteFn<T> | null;
|
|
6678
|
+
/** Ordered subpasses for passes with multiple logical execution steps. */
|
|
6679
|
+
readonly subpasses: RGSubpass<T>[];
|
|
6582
6680
|
/** Set during compilation: true if this pass is needed. */
|
|
6583
6681
|
alive: boolean;
|
|
6584
6682
|
constructor(index: number, name: string);
|
|
@@ -6599,11 +6697,19 @@ interface RGPassBuilder {
|
|
|
6599
6697
|
*/
|
|
6600
6698
|
read(handle: RGHandle): void;
|
|
6601
6699
|
/**
|
|
6602
|
-
* Declare that this pass writes
|
|
6700
|
+
* Declare that this pass writes a new version of an existing resource.
|
|
6701
|
+
*
|
|
6702
|
+
* The returned handle represents the post-write version. Use it for subsequent
|
|
6703
|
+
* reads and as the graph output passed to {@link RenderGraph.compile}. Passing
|
|
6704
|
+
* an older version of the same resource to `compile()` is rejected because it
|
|
6705
|
+
* usually means the caller ignored the handle returned by `write()`. If the pass
|
|
6706
|
+
* needs the previous contents, call {@link RGPassBuilder.read} on the input handle explicitly
|
|
6707
|
+
* before writing.
|
|
6603
6708
|
*
|
|
6604
6709
|
* @param handle - Handle of the resource to write to.
|
|
6710
|
+
* @returns A handle referencing the newly written version.
|
|
6605
6711
|
*/
|
|
6606
|
-
write(handle: RGHandle):
|
|
6712
|
+
write(handle: RGHandle): RGHandle;
|
|
6607
6713
|
/**
|
|
6608
6714
|
* Create a new transient texture resource that this pass will produce.
|
|
6609
6715
|
*
|
|
@@ -6611,6 +6717,27 @@ interface RGPassBuilder {
|
|
|
6611
6717
|
* @returns A handle referencing the newly created resource.
|
|
6612
6718
|
*/
|
|
6613
6719
|
createTexture(desc: RGTextureDesc): RGHandle;
|
|
6720
|
+
/**
|
|
6721
|
+
* Create a logical dependency token produced by this pass.
|
|
6722
|
+
*
|
|
6723
|
+
* Tokens do not resolve to GPU resources and are not allocated by the executor.
|
|
6724
|
+
* They are useful for ordering passes whose dependencies are side effects rather
|
|
6725
|
+
* than texture reads/writes.
|
|
6726
|
+
*
|
|
6727
|
+
* @param name - Debug label for this token.
|
|
6728
|
+
* @returns A handle referencing the newly created token.
|
|
6729
|
+
*/
|
|
6730
|
+
createToken(name?: string): RGHandle;
|
|
6731
|
+
/**
|
|
6732
|
+
* Create a graph-managed framebuffer view.
|
|
6733
|
+
*
|
|
6734
|
+
* The graph compiler infers dependencies from any attachment handles in the
|
|
6735
|
+
* descriptor. The executor creates and releases the framebuffer automatically.
|
|
6736
|
+
*
|
|
6737
|
+
* @param desc - Framebuffer descriptor.
|
|
6738
|
+
* @returns A handle referencing the framebuffer view.
|
|
6739
|
+
*/
|
|
6740
|
+
createFramebuffer(desc: RGFramebufferDesc): RGHandle;
|
|
6614
6741
|
/**
|
|
6615
6742
|
* Mark this pass as having side effects.
|
|
6616
6743
|
*
|
|
@@ -6619,9 +6746,22 @@ interface RGPassBuilder {
|
|
|
6619
6746
|
* debug overlays, etc.
|
|
6620
6747
|
*/
|
|
6621
6748
|
sideEffect(): void;
|
|
6749
|
+
/**
|
|
6750
|
+
* Add an ordered logical subpass to this pass.
|
|
6751
|
+
*
|
|
6752
|
+
* Subpasses execute in registration order and share the parent pass's declared
|
|
6753
|
+
* reads, writes, framebuffer views, and user data. A pass may use either
|
|
6754
|
+
* subpasses or {@link RGPassBuilder.setExecute}, but not both.
|
|
6755
|
+
*
|
|
6756
|
+
* @param name - Debug label for the subpass.
|
|
6757
|
+
* @param fn - Callback invoked when this subpass executes.
|
|
6758
|
+
*/
|
|
6759
|
+
addSubpass<D>(name: string, fn: RGExecuteFn<D>): void;
|
|
6622
6760
|
/**
|
|
6623
6761
|
* Set the execution callback for this pass.
|
|
6624
6762
|
*
|
|
6763
|
+
* A pass may use either this method or {@link RGPassBuilder.addSubpass}, but not both.
|
|
6764
|
+
*
|
|
6625
6765
|
* @param fn - Callback invoked during graph execution.
|
|
6626
6766
|
*/
|
|
6627
6767
|
setExecute<D>(fn: RGExecuteFn<D>): void;
|
|
@@ -6661,17 +6801,50 @@ interface RGResolvedSize {
|
|
|
6661
6801
|
width: number;
|
|
6662
6802
|
height: number;
|
|
6663
6803
|
}
|
|
6804
|
+
/**
|
|
6805
|
+
* Descriptor for a framebuffer view managed by the graph or created temporarily during pass execution.
|
|
6806
|
+
*
|
|
6807
|
+
* This is intentionally backend-agnostic: graph-managed descriptors may use
|
|
6808
|
+
* {@link RGHandle} attachments, and executor-created descriptors use resolved
|
|
6809
|
+
* resources or texture formats understood by the allocator.
|
|
6810
|
+
*
|
|
6811
|
+
* @public
|
|
6812
|
+
*/
|
|
6813
|
+
interface RGFramebufferDesc {
|
|
6814
|
+
/** Debug label for this framebuffer. */
|
|
6815
|
+
label?: string;
|
|
6816
|
+
/** Framebuffer width. Required when attachments are formats. */
|
|
6817
|
+
width?: number;
|
|
6818
|
+
/** Framebuffer height. Required when attachments are formats. */
|
|
6819
|
+
height?: number;
|
|
6820
|
+
/** Color attachments or formats. */
|
|
6821
|
+
colorAttachments: unknown | unknown[] | null;
|
|
6822
|
+
/** Depth/stencil attachment or format. */
|
|
6823
|
+
depthAttachment?: unknown | null;
|
|
6824
|
+
/** Whether color attachments created from formats should support mipmapping. */
|
|
6825
|
+
mipmapping?: boolean;
|
|
6826
|
+
/** Framebuffer sample count. */
|
|
6827
|
+
sampleCount?: number;
|
|
6828
|
+
/** Whether to ignore depth/stencil during MSAA resolve. */
|
|
6829
|
+
ignoreDepthStencil?: boolean;
|
|
6830
|
+
/** Attachment mip level. */
|
|
6831
|
+
attachmentMipLevel?: number;
|
|
6832
|
+
/** Attachment cubemap face. */
|
|
6833
|
+
attachmentCubeface?: number;
|
|
6834
|
+
/** Attachment array layer. */
|
|
6835
|
+
attachmentLayer?: number;
|
|
6836
|
+
}
|
|
6664
6837
|
/**
|
|
6665
6838
|
* Interface for allocating and releasing transient textures.
|
|
6666
6839
|
*
|
|
6667
6840
|
* Implement this to bridge the render graph with your GPU device's resource pool.
|
|
6668
|
-
* The executor calls
|
|
6669
|
-
*
|
|
6841
|
+
* The executor calls `allocate()` before a resource's first use and
|
|
6842
|
+
* `release()` after its last use.
|
|
6670
6843
|
*
|
|
6671
6844
|
* @typeParam TTexture - The concrete texture type (e.g. `Texture2D`).
|
|
6672
6845
|
* @public
|
|
6673
6846
|
*/
|
|
6674
|
-
interface RGTextureAllocator<TTexture = unknown> {
|
|
6847
|
+
interface RGTextureAllocator<TTexture = unknown, TFramebuffer = unknown> {
|
|
6675
6848
|
/**
|
|
6676
6849
|
* Allocate a transient texture matching the given descriptor and resolved size.
|
|
6677
6850
|
*
|
|
@@ -6686,6 +6859,22 @@ interface RGTextureAllocator<TTexture = unknown> {
|
|
|
6686
6859
|
* @param texture - The texture to release.
|
|
6687
6860
|
*/
|
|
6688
6861
|
release(texture: TTexture): void;
|
|
6862
|
+
/**
|
|
6863
|
+
* Allocate a temporary framebuffer matching the given descriptor.
|
|
6864
|
+
*
|
|
6865
|
+
* Implementations should not auto-release this framebuffer; the graph executor
|
|
6866
|
+
* calls {@link RGTextureAllocator.releaseFramebuffer} when execution completes or aborts.
|
|
6867
|
+
*
|
|
6868
|
+
* @param desc - Framebuffer descriptor.
|
|
6869
|
+
* @returns The allocated framebuffer object.
|
|
6870
|
+
*/
|
|
6871
|
+
allocateFramebuffer?(desc: RGFramebufferDesc): TFramebuffer;
|
|
6872
|
+
/**
|
|
6873
|
+
* Release a previously allocated temporary framebuffer.
|
|
6874
|
+
*
|
|
6875
|
+
* @param framebuffer - The framebuffer to release.
|
|
6876
|
+
*/
|
|
6877
|
+
releaseFramebuffer?(framebuffer: TFramebuffer): void;
|
|
6689
6878
|
}
|
|
6690
6879
|
|
|
6691
6880
|
/**
|
|
@@ -6694,7 +6883,7 @@ interface RGTextureAllocator<TTexture = unknown> {
|
|
|
6694
6883
|
* Usage:
|
|
6695
6884
|
* ```ts
|
|
6696
6885
|
* const graph = new RenderGraph();
|
|
6697
|
-
*
|
|
6886
|
+
* let backbuffer = graph.importTexture('backbuffer');
|
|
6698
6887
|
*
|
|
6699
6888
|
* let linearDepth: RGHandle;
|
|
6700
6889
|
* graph.addPass('DepthPrepass', (builder) => {
|
|
@@ -6704,7 +6893,7 @@ interface RGTextureAllocator<TTexture = unknown> {
|
|
|
6704
6893
|
*
|
|
6705
6894
|
* graph.addPass('LightPass', (builder) => {
|
|
6706
6895
|
* builder.read(linearDepth);
|
|
6707
|
-
* builder.write(backbuffer);
|
|
6896
|
+
* backbuffer = builder.write(backbuffer);
|
|
6708
6897
|
* builder.setExecute(() => { ... });
|
|
6709
6898
|
* });
|
|
6710
6899
|
*
|
|
@@ -6743,6 +6932,8 @@ declare class RenderGraph {
|
|
|
6743
6932
|
* Performs dead-pass culling, topological sorting, and resource lifetime analysis.
|
|
6744
6933
|
*
|
|
6745
6934
|
* @param outputs - Handles of resources that must be produced (graph sinks).
|
|
6935
|
+
* If a resource was passed to {@link RGPassBuilder.write}, use the returned
|
|
6936
|
+
* post-write handle here, not the original handle.
|
|
6746
6937
|
* Passes that do not contribute to these outputs (directly or transitively)
|
|
6747
6938
|
* are culled, unless marked as side-effect passes.
|
|
6748
6939
|
* @returns The compiled graph ready for execution.
|
|
@@ -6753,7 +6944,7 @@ declare class RenderGraph {
|
|
|
6753
6944
|
*
|
|
6754
6945
|
* For automatic resource allocation/release, use {@link RenderGraphExecutor} instead.
|
|
6755
6946
|
*
|
|
6756
|
-
* @param compiled - The compiled graph from {@link compile}.
|
|
6947
|
+
* @param compiled - The compiled graph from {@link RenderGraph.compile}.
|
|
6757
6948
|
*/
|
|
6758
6949
|
execute(compiled: CompiledRenderGraph): void;
|
|
6759
6950
|
/**
|
|
@@ -6781,8 +6972,8 @@ declare class RenderGraph {
|
|
|
6781
6972
|
* @typeParam TTexture - The concrete texture type (e.g. `Texture2D`).
|
|
6782
6973
|
* @public
|
|
6783
6974
|
*/
|
|
6784
|
-
declare class RenderGraphExecutor<TTexture = unknown> {
|
|
6785
|
-
constructor(allocator: RGTextureAllocator<TTexture>, backbufferWidth: number, backbufferHeight: number);
|
|
6975
|
+
declare class RenderGraphExecutor<TTexture = unknown, TFramebuffer = unknown> {
|
|
6976
|
+
constructor(allocator: RGTextureAllocator<TTexture, TFramebuffer>, backbufferWidth: number, backbufferHeight: number);
|
|
6786
6977
|
/**
|
|
6787
6978
|
* Update the backbuffer dimensions used for 'backbuffer-relative' sizing.
|
|
6788
6979
|
*/
|
|
@@ -6816,8 +7007,8 @@ declare class RenderGraphExecutor<TTexture = unknown> {
|
|
|
6816
7007
|
* Bridges the render graph's {@link RGTextureAllocator} interface to the
|
|
6817
7008
|
* engine's device resource pool (`device.pool`).
|
|
6818
7009
|
*
|
|
6819
|
-
* Transient textures are fetched from the pool on
|
|
6820
|
-
* returned to the pool on
|
|
7010
|
+
* Transient textures are fetched from the pool on `allocate()` and
|
|
7011
|
+
* returned to the pool on `release()`, enabling automatic reuse
|
|
6821
7012
|
* across frames without manual lifecycle management.
|
|
6822
7013
|
*
|
|
6823
7014
|
* Usage:
|
|
@@ -6828,7 +7019,7 @@ declare class RenderGraphExecutor<TTexture = unknown> {
|
|
|
6828
7019
|
*
|
|
6829
7020
|
* @public
|
|
6830
7021
|
*/
|
|
6831
|
-
declare class DevicePoolAllocator implements RGTextureAllocator<Texture2D> {
|
|
7022
|
+
declare class DevicePoolAllocator implements RGTextureAllocator<Texture2D, FrameBuffer> {
|
|
6832
7023
|
/**
|
|
6833
7024
|
* Allocate a transient texture from the device pool.
|
|
6834
7025
|
*
|
|
@@ -6843,32 +7034,38 @@ declare class DevicePoolAllocator implements RGTextureAllocator<Texture2D> {
|
|
|
6843
7034
|
* @param texture - The texture to release.
|
|
6844
7035
|
*/
|
|
6845
7036
|
release(texture: Texture2D): void;
|
|
7037
|
+
/**
|
|
7038
|
+
* Allocate a temporary framebuffer from the device pool.
|
|
7039
|
+
*
|
|
7040
|
+
* @param desc - Framebuffer descriptor from the render graph pass.
|
|
7041
|
+
* @returns A pooled FrameBuffer instance.
|
|
7042
|
+
*/
|
|
7043
|
+
allocateFramebuffer(desc: RGFramebufferDesc): FrameBuffer;
|
|
7044
|
+
/**
|
|
7045
|
+
* Release a temporary framebuffer back to the device pool.
|
|
7046
|
+
*
|
|
7047
|
+
* @param framebuffer - The framebuffer to release.
|
|
7048
|
+
*/
|
|
7049
|
+
releaseFramebuffer(framebuffer: FrameBuffer): void;
|
|
6846
7050
|
}
|
|
6847
7051
|
|
|
6848
7052
|
/**
|
|
6849
|
-
* Manages cross-frame history resources
|
|
7053
|
+
* Manages cross-frame history resources that can be imported into a render graph.
|
|
6850
7054
|
*
|
|
6851
7055
|
* History resources are textures that persist across frames for temporal effects
|
|
6852
|
-
* like TAA, motion blur, or temporal upscaling.
|
|
6853
|
-
*
|
|
7056
|
+
* like TAA, motion blur, or temporal upscaling. Previous-frame textures can be
|
|
7057
|
+
* imported into a {@link RenderGraph}, and current-frame textures are committed
|
|
7058
|
+
* only after graph execution succeeds.
|
|
6854
7059
|
*
|
|
6855
7060
|
* Usage:
|
|
6856
7061
|
* ```ts
|
|
6857
7062
|
* const historyMgr = new HistoryResourceManager(allocator);
|
|
6858
|
-
*
|
|
6859
|
-
*
|
|
6860
|
-
*
|
|
6861
|
-
*
|
|
6862
|
-
*
|
|
6863
|
-
*
|
|
6864
|
-
* }, { width: 1920, height: 1080 });
|
|
6865
|
-
*
|
|
6866
|
-
* // In your render pass:
|
|
6867
|
-
* const prevFrame = historyMgr.getPrevious('taaHistory'); // Read from previous frame
|
|
6868
|
-
* const currentFrame = historyMgr.getCurrent('taaHistory'); // Write to current frame
|
|
6869
|
-
*
|
|
6870
|
-
* // At frame end:
|
|
6871
|
-
* historyMgr.swap(); // Swap current and previous
|
|
7063
|
+
* historyMgr.beginFrame();
|
|
7064
|
+
* const prev = historyMgr.importPrevious(graph, 'taaColor');
|
|
7065
|
+
* // declare builder.read(prev) if non-null
|
|
7066
|
+
* historyMgr.bindImportedTextures(executor);
|
|
7067
|
+
* // after successful execution:
|
|
7068
|
+
* historyMgr.commitFrame();
|
|
6872
7069
|
* ```
|
|
6873
7070
|
*
|
|
6874
7071
|
* @typeParam TTexture - The concrete texture type (e.g. `Texture2D`).
|
|
@@ -6877,7 +7074,9 @@ declare class DevicePoolAllocator implements RGTextureAllocator<Texture2D> {
|
|
|
6877
7074
|
declare class HistoryResourceManager<TTexture = Texture2D> {
|
|
6878
7075
|
private _resources;
|
|
6879
7076
|
private _allocator;
|
|
6880
|
-
private
|
|
7077
|
+
private _pendingImports;
|
|
7078
|
+
private _pendingCommits;
|
|
7079
|
+
private _readScopeStack;
|
|
6881
7080
|
/**
|
|
6882
7081
|
* Create a new history resource manager.
|
|
6883
7082
|
*
|
|
@@ -6885,91 +7084,111 @@ declare class HistoryResourceManager<TTexture = Texture2D> {
|
|
|
6885
7084
|
*/
|
|
6886
7085
|
constructor(allocator: RGTextureAllocator<TTexture>);
|
|
6887
7086
|
/**
|
|
6888
|
-
*
|
|
7087
|
+
* Get the previous-frame texture resolved by the current render graph pass.
|
|
6889
7088
|
*
|
|
6890
|
-
*
|
|
6891
|
-
*
|
|
7089
|
+
* The resource must have been imported with {@link HistoryResourceManager.importPrevious} or
|
|
7090
|
+
* {@link HistoryResourceManager.importPreviousIfCompatible}, declared as a pass read, and bound with
|
|
7091
|
+
* {@link HistoryResourceManager.beginReadScope} before this method is called.
|
|
6892
7092
|
*
|
|
6893
|
-
* @param name -
|
|
6894
|
-
* @
|
|
6895
|
-
* @
|
|
7093
|
+
* @param name - Name of the history resource.
|
|
7094
|
+
* @returns The graph-resolved previous-frame texture.
|
|
7095
|
+
* @throws If no read scope is active for the resource.
|
|
6896
7096
|
*/
|
|
6897
|
-
|
|
7097
|
+
getPrevious(name: string): TTexture;
|
|
6898
7098
|
/**
|
|
6899
|
-
*
|
|
7099
|
+
* Check whether a valid history resource exists and matches the descriptor.
|
|
6900
7100
|
*
|
|
6901
|
-
*
|
|
6902
|
-
*
|
|
6903
|
-
*
|
|
6904
|
-
* @
|
|
6905
|
-
* @param desc - Texture descriptor (format, size, etc.).
|
|
6906
|
-
* @param size - Resolved pixel dimensions.
|
|
6907
|
-
* @param initialTexture - The initial texture to use as current frame.
|
|
7101
|
+
* @param name - Name of the history resource.
|
|
7102
|
+
* @param desc - Expected texture descriptor.
|
|
7103
|
+
* @param size - Expected resolved size.
|
|
7104
|
+
* @returns True if the resource exists, is valid, and matches.
|
|
6908
7105
|
*/
|
|
6909
|
-
|
|
7106
|
+
isCompatible(name: string, desc: RGTextureDesc, size: RGResolvedSize): boolean;
|
|
6910
7107
|
/**
|
|
6911
|
-
*
|
|
6912
|
-
*
|
|
6913
|
-
* This is typically used as the write target in render passes.
|
|
6914
|
-
*
|
|
6915
|
-
* @param name - Name of the history resource.
|
|
6916
|
-
* @returns The current frame's texture.
|
|
6917
|
-
* @throws If the resource has not been registered.
|
|
7108
|
+
* Start collecting graph imports and deferred commits for a new frame.
|
|
6918
7109
|
*/
|
|
6919
|
-
|
|
7110
|
+
beginFrame(): void;
|
|
6920
7111
|
/**
|
|
6921
|
-
*
|
|
7112
|
+
* Import the latest committed texture for a history resource into the graph.
|
|
6922
7113
|
*
|
|
6923
|
-
*
|
|
7114
|
+
* Returns null when the resource has no valid previous frame.
|
|
6924
7115
|
*
|
|
6925
|
-
* @param
|
|
6926
|
-
* @
|
|
6927
|
-
* @
|
|
7116
|
+
* @param graph - Render graph to import into.
|
|
7117
|
+
* @param name - History resource name.
|
|
7118
|
+
* @returns Imported graph handle, or null when no valid previous texture exists.
|
|
6928
7119
|
*/
|
|
6929
|
-
|
|
7120
|
+
importPrevious(graph: RenderGraph, name: string): RGHandle | null;
|
|
6930
7121
|
/**
|
|
6931
|
-
*
|
|
7122
|
+
* Import the latest committed texture only when it matches the expected shape.
|
|
6932
7123
|
*
|
|
6933
|
-
*
|
|
6934
|
-
*
|
|
7124
|
+
* This is the preferred API for effects that can declare their history reads
|
|
7125
|
+
* while building the graph: incompatible history is treated as absent, so the
|
|
7126
|
+
* pass does not declare stale reads after resize or format changes.
|
|
7127
|
+
*
|
|
7128
|
+
* @param graph - Render graph to import into.
|
|
7129
|
+
* @param name - History resource name.
|
|
7130
|
+
* @param desc - Expected texture descriptor.
|
|
7131
|
+
* @param size - Expected resolved size.
|
|
7132
|
+
* @returns Imported graph handle, or null when no compatible history exists.
|
|
6935
7133
|
*/
|
|
6936
|
-
|
|
7134
|
+
importPreviousIfCompatible(graph: RenderGraph, name: string, desc: RGTextureDesc, size: RGResolvedSize): RGHandle | null;
|
|
6937
7135
|
/**
|
|
6938
|
-
*
|
|
7136
|
+
* Bind all history imports created for this frame to the executor.
|
|
6939
7137
|
*
|
|
6940
|
-
* @param
|
|
6941
|
-
* @returns True if the resource was found and removed.
|
|
7138
|
+
* @param executor - Render graph executor for the current frame.
|
|
6942
7139
|
*/
|
|
6943
|
-
|
|
7140
|
+
bindImportedTextures(executor: Pick<RenderGraphExecutor<TTexture>, 'setImportedTexture'>): void;
|
|
6944
7141
|
/**
|
|
6945
|
-
*
|
|
7142
|
+
* Make resolved history textures available to code executing inside a pass.
|
|
6946
7143
|
*
|
|
6947
|
-
*
|
|
6948
|
-
* After swapping, what was "current" becomes "previous" for the next frame.
|
|
7144
|
+
* @param bindings - History name to resolved texture bindings.
|
|
6949
7145
|
*/
|
|
6950
|
-
|
|
7146
|
+
beginReadScope(bindings: Array<{
|
|
7147
|
+
name: string;
|
|
7148
|
+
texture: TTexture;
|
|
7149
|
+
}>): void;
|
|
6951
7150
|
/**
|
|
6952
|
-
*
|
|
6953
|
-
*
|
|
6954
|
-
* Call this when disposing the render context or when history is no longer needed.
|
|
7151
|
+
* End the most recent history read scope.
|
|
6955
7152
|
*/
|
|
6956
|
-
|
|
7153
|
+
endReadScope(): void;
|
|
6957
7154
|
/**
|
|
6958
|
-
*
|
|
7155
|
+
* Queue a current-frame texture to become the next previous-frame history.
|
|
6959
7156
|
*
|
|
6960
|
-
*
|
|
6961
|
-
*
|
|
7157
|
+
* The texture is committed only when {@link HistoryResourceManager.commitFrame} is called. If the
|
|
7158
|
+
* frame fails, {@link HistoryResourceManager.discardFrame} releases owned pending textures instead.
|
|
6962
7159
|
*
|
|
6963
|
-
* @param name -
|
|
6964
|
-
* @param
|
|
7160
|
+
* @param name - History resource name.
|
|
7161
|
+
* @param desc - Texture descriptor.
|
|
7162
|
+
* @param size - Resolved texture size.
|
|
7163
|
+
* @param texture - Texture produced by the current frame.
|
|
7164
|
+
* @param ownsTexture - Whether this manager should release the texture later.
|
|
6965
7165
|
*/
|
|
6966
|
-
|
|
7166
|
+
queueCommit(name: string, desc: RGTextureDesc, size: RGResolvedSize, texture: TTexture, ownsTexture?: boolean): void;
|
|
6967
7167
|
/**
|
|
6968
|
-
*
|
|
7168
|
+
* Commit all current-frame history writes.
|
|
6969
7169
|
*/
|
|
6970
|
-
|
|
7170
|
+
commitFrame(): void;
|
|
7171
|
+
/**
|
|
7172
|
+
* Discard all uncommitted frame history writes.
|
|
7173
|
+
*/
|
|
7174
|
+
discardFrame(): void;
|
|
7175
|
+
/**
|
|
7176
|
+
* Release all history resources and clear the manager.
|
|
7177
|
+
*
|
|
7178
|
+
* Call this when disposing the render context or when history is no longer needed.
|
|
7179
|
+
*/
|
|
7180
|
+
dispose(): void;
|
|
6971
7181
|
}
|
|
6972
7182
|
|
|
7183
|
+
/**
|
|
7184
|
+
* Resource names for render graph history resources.
|
|
7185
|
+
* @public
|
|
7186
|
+
*/
|
|
7187
|
+
declare const RGHistoryResources: {
|
|
7188
|
+
readonly TAA_COLOR: "taaColor";
|
|
7189
|
+
readonly TAA_MOTION_VECTOR: "taaMotionVector";
|
|
7190
|
+
};
|
|
7191
|
+
|
|
6973
7192
|
/**
|
|
6974
7193
|
* Options controlling which features are enabled in the forward+ pipeline.
|
|
6975
7194
|
*
|
|
@@ -6998,7 +7217,7 @@ interface ForwardPlusOptions {
|
|
|
6998
7217
|
*
|
|
6999
7218
|
* Each step in the existing `SceneRenderer._renderScene` becomes a graph pass.
|
|
7000
7219
|
* Execute callbacks delegate to the existing rendering code, sharing a mutable
|
|
7001
|
-
*
|
|
7220
|
+
* `FrameState`.
|
|
7002
7221
|
*
|
|
7003
7222
|
* @param graph - The render graph to populate.
|
|
7004
7223
|
* @param ctx - The draw context for this frame.
|
|
@@ -7716,7 +7935,7 @@ declare class Camera extends SceneNode {
|
|
|
7716
7935
|
/** Whether to allow command buffer reuse optimization */
|
|
7717
7936
|
get commandBufferReuse(): boolean;
|
|
7718
7937
|
set commandBufferReuse(val: boolean);
|
|
7719
|
-
/** Whether this camera is adapted to screen
|
|
7938
|
+
/** Whether this camera is adapted to screen settings */
|
|
7720
7939
|
get adapted(): boolean;
|
|
7721
7940
|
set adapted(val: boolean);
|
|
7722
7941
|
/** OIT */
|
|
@@ -8203,6 +8422,11 @@ type PickTarget = {
|
|
|
8203
8422
|
node: SceneNode;
|
|
8204
8423
|
label?: string;
|
|
8205
8424
|
};
|
|
8425
|
+
/**
|
|
8426
|
+
* Minimal render context carrying target size and device information.
|
|
8427
|
+
*
|
|
8428
|
+
* @public
|
|
8429
|
+
*/
|
|
8206
8430
|
declare class RenderContext {
|
|
8207
8431
|
device: AbstractDevice;
|
|
8208
8432
|
renderWidth: number;
|
|
@@ -8420,7 +8644,6 @@ declare class GraphNode extends SceneNode {
|
|
|
8420
8644
|
* @param scene - The scene to which the node belongs
|
|
8421
8645
|
*/
|
|
8422
8646
|
constructor(scene: Scene);
|
|
8423
|
-
set octreeNode(node: Nullable<OctreeNode>);
|
|
8424
8647
|
/** Gets the name */
|
|
8425
8648
|
getName(): string;
|
|
8426
8649
|
/**
|
|
@@ -8475,17 +8698,11 @@ declare abstract class SkeletonModifier {
|
|
|
8475
8698
|
* Get the blend weight [0-1]
|
|
8476
8699
|
*/
|
|
8477
8700
|
get weight(): number;
|
|
8478
|
-
/**
|
|
8479
|
-
* Set the blend weight [0-1]
|
|
8480
|
-
*/
|
|
8481
8701
|
set weight(value: number);
|
|
8482
8702
|
/**
|
|
8483
8703
|
* Get whether this processor is enabled
|
|
8484
8704
|
*/
|
|
8485
8705
|
get enabled(): boolean;
|
|
8486
|
-
/**
|
|
8487
|
-
* Set whether this processor is enabled
|
|
8488
|
-
*/
|
|
8489
8706
|
set enabled(value: boolean);
|
|
8490
8707
|
/**
|
|
8491
8708
|
* Apply post-processing to skeleton joints.
|
|
@@ -8651,7 +8868,9 @@ declare class Skeleton extends Disposable {
|
|
|
8651
8868
|
get humanoidJointMapping(): Nullable<HumanoidJointMapping<SceneNode>>;
|
|
8652
8869
|
/** Root rotation of humanoid hips bone */
|
|
8653
8870
|
get humanoidRootRotation(): Quaternion;
|
|
8871
|
+
get playing(): boolean;
|
|
8654
8872
|
set playing(b: boolean);
|
|
8873
|
+
get persistentId(): string;
|
|
8655
8874
|
set persistentId(val: string);
|
|
8656
8875
|
/**
|
|
8657
8876
|
* Texture containing joint matrices for GPU skinning.
|
|
@@ -8981,6 +9200,8 @@ declare class AnimationSet extends Disposable implements IDisposable {
|
|
|
8981
9200
|
* @param excludeJoint - Optional predicate; joints whose name returns true are excluded from
|
|
8982
9201
|
* skeleton structure matching.
|
|
8983
9202
|
* @returns The newly created AnimationClip, or null on failure.
|
|
9203
|
+
*
|
|
9204
|
+
* @deprecated Use the new {@link AnimationSet.copyHumanoidAnimationFrom} method instead.
|
|
8984
9205
|
*/
|
|
8985
9206
|
copyAnimationFrom(sourceSet: AnimationSet, animationName: string, targetName?: string, excludeJoint?: (jointName: string) => boolean): AnimationClip | null;
|
|
8986
9207
|
/**
|
|
@@ -9483,29 +9704,71 @@ declare class MorphTargetTrack extends AnimationTrack<MorphState> {
|
|
|
9483
9704
|
reset(node: SceneNode): void;
|
|
9484
9705
|
}
|
|
9485
9706
|
|
|
9707
|
+
/**
|
|
9708
|
+
* Geometry cache frame data for a single sampled time.
|
|
9709
|
+
*
|
|
9710
|
+
* @public
|
|
9711
|
+
*/
|
|
9486
9712
|
type GeometryCacheFrame = {
|
|
9487
9713
|
positions: Float32Array;
|
|
9488
9714
|
normals?: Nullable<Float32Array>;
|
|
9489
9715
|
boundingBox: BoundingBox;
|
|
9490
9716
|
};
|
|
9717
|
+
/**
|
|
9718
|
+
* Mutable working state used while evaluating geometry cache tracks.
|
|
9719
|
+
*
|
|
9720
|
+
* @public
|
|
9721
|
+
*/
|
|
9491
9722
|
type GeometryCacheState = {
|
|
9492
9723
|
positions: Float32Array;
|
|
9493
9724
|
normals?: Nullable<Float32Array>;
|
|
9494
9725
|
boundingBox: BoundingBox;
|
|
9495
9726
|
};
|
|
9727
|
+
/**
|
|
9728
|
+
* GPU resources bound to a mesh while a geometry cache track is active.
|
|
9729
|
+
*
|
|
9730
|
+
* @public
|
|
9731
|
+
*/
|
|
9496
9732
|
type GeometryCacheMeshBinding = {
|
|
9497
9733
|
originalPrimitive: Primitive;
|
|
9498
9734
|
primitive: Primitive;
|
|
9499
9735
|
positionBuffer: StructuredBuffer;
|
|
9500
9736
|
normalBuffer: Nullable<StructuredBuffer>;
|
|
9501
9737
|
};
|
|
9738
|
+
/**
|
|
9739
|
+
* Creates a reusable geometry cache state buffer for a frame layout.
|
|
9740
|
+
*
|
|
9741
|
+
* @public
|
|
9742
|
+
*/
|
|
9502
9743
|
declare function createGeometryCacheState(frame: Pick<GeometryCacheFrame, 'positions' | 'normals'>): GeometryCacheState;
|
|
9744
|
+
/**
|
|
9745
|
+
* Linearly interpolates two geometry-cache bounding boxes.
|
|
9746
|
+
*
|
|
9747
|
+
* @public
|
|
9748
|
+
*/
|
|
9503
9749
|
declare function mixGeometryCacheBoundingBox(a: BoundingBox, b: BoundingBox, t: number): BoundingBox;
|
|
9750
|
+
/**
|
|
9751
|
+
* Ensures the target mesh has GPU buffers compatible with the geometry cache state.
|
|
9752
|
+
*
|
|
9753
|
+
* @public
|
|
9754
|
+
*/
|
|
9504
9755
|
declare function ensureGeometryCacheMeshBinding(meshBindings: WeakMap<Mesh, GeometryCacheMeshBinding>, mesh: Mesh, state: GeometryCacheState, errorPrefix: string): GeometryCacheMeshBinding;
|
|
9756
|
+
/**
|
|
9757
|
+
* Restores a mesh primitive after geometry cache playback.
|
|
9758
|
+
*
|
|
9759
|
+
* @public
|
|
9760
|
+
*/
|
|
9505
9761
|
declare function restoreGeometryCacheMeshBinding(mesh: Mesh): Promise<boolean>;
|
|
9506
9762
|
|
|
9763
|
+
/** @public */
|
|
9507
9764
|
type FixedGeometryCacheFrame = GeometryCacheFrame;
|
|
9765
|
+
/** @public */
|
|
9508
9766
|
type FixedGeometryCacheState = GeometryCacheState;
|
|
9767
|
+
/**
|
|
9768
|
+
* Geometry cache track backed by explicit per-frame vertex data.
|
|
9769
|
+
*
|
|
9770
|
+
* @public
|
|
9771
|
+
*/
|
|
9509
9772
|
declare class FixedGeometryCacheTrack extends AnimationTrack<FixedGeometryCacheState> {
|
|
9510
9773
|
private _times;
|
|
9511
9774
|
private _frames;
|
|
@@ -9531,6 +9794,11 @@ declare class FixedGeometryCacheTrack extends AnimationTrack<FixedGeometryCacheS
|
|
|
9531
9794
|
private ensureMeshBinding;
|
|
9532
9795
|
}
|
|
9533
9796
|
|
|
9797
|
+
/**
|
|
9798
|
+
* PCA-compressed geometry cache animation data.
|
|
9799
|
+
*
|
|
9800
|
+
* @public
|
|
9801
|
+
*/
|
|
9534
9802
|
type PCAGeometryCacheTrackData = {
|
|
9535
9803
|
times: Float32Array;
|
|
9536
9804
|
bounds: [number, number, number, number, number, number][];
|
|
@@ -9542,7 +9810,13 @@ type PCAGeometryCacheTrackData = {
|
|
|
9542
9810
|
normalBases?: Nullable<Float32Array[]>;
|
|
9543
9811
|
normalCoefficients?: Nullable<Float32Array[]>;
|
|
9544
9812
|
};
|
|
9813
|
+
/** @public */
|
|
9545
9814
|
type PCAGeometryCacheState = GeometryCacheState;
|
|
9815
|
+
/**
|
|
9816
|
+
* Geometry cache track reconstructed from PCA bases and coefficients.
|
|
9817
|
+
*
|
|
9818
|
+
* @public
|
|
9819
|
+
*/
|
|
9546
9820
|
declare class PCAGeometryCacheTrack extends AnimationTrack<PCAGeometryCacheState> {
|
|
9547
9821
|
private _times;
|
|
9548
9822
|
private _bounds;
|
|
@@ -10137,8 +10411,8 @@ interface SpringSystemOptions {
|
|
|
10137
10411
|
*/
|
|
10138
10412
|
poseFollowTip?: number;
|
|
10139
10413
|
/**
|
|
10140
|
-
* Exponent used when interpolating root
|
|
10141
|
-
* 1
|
|
10414
|
+
* Exponent used when interpolating root-to-tip follow.
|
|
10415
|
+
* `1` is linear; values `\> 1` keep the root stiffer and the tip looser.
|
|
10142
10416
|
*/
|
|
10143
10417
|
poseFollowExponent?: number;
|
|
10144
10418
|
/**
|
|
@@ -10225,14 +10499,6 @@ declare class SpringSystem {
|
|
|
10225
10499
|
* Solves a single spring constraint using XPBD (Extended Position-Based Dynamics).
|
|
10226
10500
|
*
|
|
10227
10501
|
* Reference: Müller et al., "Detailed Rigid Body Simulation with Extended Position Based Dynamics", 2020.
|
|
10228
|
-
*
|
|
10229
|
-
* The XPBD correction for a distance constraint C(x) = |x_b - x_a| - L is:
|
|
10230
|
-
* α̃ = compliance / dt² (scaled compliance)
|
|
10231
|
-
* Δλ = (-C - α̃·λ) / (w_a + w_b + α̃)
|
|
10232
|
-
* λ += Δλ
|
|
10233
|
-
* Δx_a = -w_a · Δλ · n̂
|
|
10234
|
-
* Δx_b = +w_b · Δλ · n̂
|
|
10235
|
-
* where w = 1/mass (0 for fixed particles), n̂ = unit vector from a to b.
|
|
10236
10502
|
*/
|
|
10237
10503
|
private solveConstraintXPBD;
|
|
10238
10504
|
/**
|
|
@@ -10285,74 +10551,46 @@ declare class SpringSystem {
|
|
|
10285
10551
|
* Gets the Coriolis force scale
|
|
10286
10552
|
*/
|
|
10287
10553
|
get coriolisScale(): number;
|
|
10288
|
-
/**
|
|
10289
|
-
* Sets the Coriolis force scale
|
|
10290
|
-
*/
|
|
10291
10554
|
set coriolisScale(scale: number);
|
|
10292
10555
|
/**
|
|
10293
10556
|
* Gets the constraint solver type
|
|
10294
10557
|
*/
|
|
10295
10558
|
get solver(): 'verlet' | 'xpbd';
|
|
10296
|
-
/**
|
|
10297
|
-
* Sets the constraint solver type.
|
|
10298
|
-
* Switching to 'xpbd' resets all Lagrange multipliers.
|
|
10299
|
-
*/
|
|
10300
10559
|
set solver(type: 'verlet' | 'xpbd');
|
|
10301
10560
|
/**
|
|
10302
10561
|
* Gets pose preservation strength [0-1]
|
|
10303
10562
|
*/
|
|
10304
10563
|
get poseFollow(): number;
|
|
10305
|
-
/**
|
|
10306
|
-
* Sets pose preservation strength [0-1]
|
|
10307
|
-
*/
|
|
10308
10564
|
set poseFollow(value: number);
|
|
10309
10565
|
/**
|
|
10310
10566
|
* Gets max allowed deviation from animated pose
|
|
10311
10567
|
*/
|
|
10312
10568
|
get maxPoseOffset(): number;
|
|
10313
|
-
/**
|
|
10314
|
-
* Sets max allowed deviation from animated pose. 0 disables clamping.
|
|
10315
|
-
*/
|
|
10316
10569
|
set maxPoseOffset(value: number);
|
|
10317
10570
|
/**
|
|
10318
10571
|
* Gets root pose follow strength [0-1]
|
|
10319
10572
|
*/
|
|
10320
10573
|
get poseFollowRoot(): number;
|
|
10321
|
-
/**
|
|
10322
|
-
* Sets root pose follow strength [0-1]
|
|
10323
|
-
*/
|
|
10324
10574
|
set poseFollowRoot(value: number);
|
|
10325
10575
|
/**
|
|
10326
10576
|
* Gets tip pose follow strength [0-1]
|
|
10327
10577
|
*/
|
|
10328
10578
|
get poseFollowTip(): number;
|
|
10329
|
-
/**
|
|
10330
|
-
* Sets tip pose follow strength [0-1]
|
|
10331
|
-
*/
|
|
10332
10579
|
set poseFollowTip(value: number);
|
|
10333
10580
|
/**
|
|
10334
|
-
* Gets exponent for root
|
|
10581
|
+
* Gets exponent for root-to-tip interpolation
|
|
10335
10582
|
*/
|
|
10336
10583
|
get poseFollowExponent(): number;
|
|
10337
|
-
/**
|
|
10338
|
-
* Sets exponent for root->tip interpolation
|
|
10339
|
-
*/
|
|
10340
10584
|
set poseFollowExponent(value: number);
|
|
10341
10585
|
/**
|
|
10342
10586
|
* Gets root max allowed deviation from animated pose
|
|
10343
10587
|
*/
|
|
10344
10588
|
get maxPoseOffsetRoot(): number;
|
|
10345
|
-
/**
|
|
10346
|
-
* Sets root max allowed deviation from animated pose
|
|
10347
|
-
*/
|
|
10348
10589
|
set maxPoseOffsetRoot(value: number);
|
|
10349
10590
|
/**
|
|
10350
10591
|
* Gets tip max allowed deviation from animated pose
|
|
10351
10592
|
*/
|
|
10352
10593
|
get maxPoseOffsetTip(): number;
|
|
10353
|
-
/**
|
|
10354
|
-
* Sets tip max allowed deviation from animated pose
|
|
10355
|
-
*/
|
|
10356
10594
|
set maxPoseOffsetTip(value: number);
|
|
10357
10595
|
/**
|
|
10358
10596
|
* Adds a collider to the system
|
|
@@ -10626,17 +10864,11 @@ declare class TwoBoneIKSolver extends IKSolver {
|
|
|
10626
10864
|
* Get the pole vector position.
|
|
10627
10865
|
*/
|
|
10628
10866
|
get poleVector(): Vector3 | null;
|
|
10629
|
-
/**
|
|
10630
|
-
* Set the pole vector position.
|
|
10631
|
-
*/
|
|
10632
10867
|
set poleVector(value: Vector3 | null);
|
|
10633
10868
|
/**
|
|
10634
10869
|
* Get the pole vector weight.
|
|
10635
10870
|
*/
|
|
10636
10871
|
get poleWeight(): number;
|
|
10637
|
-
/**
|
|
10638
|
-
* Set the pole vector weight (0-1).
|
|
10639
|
-
*/
|
|
10640
10872
|
set poleWeight(value: number);
|
|
10641
10873
|
/**
|
|
10642
10874
|
* Solve the IK chain to reach the target position using Two Bone IK algorithm.
|
|
@@ -10845,17 +11077,11 @@ declare class IKAngleConstraint extends IKConstraint {
|
|
|
10845
11077
|
* Get the minimum angle in degrees.
|
|
10846
11078
|
*/
|
|
10847
11079
|
get minAngle(): number;
|
|
10848
|
-
/**
|
|
10849
|
-
* Set the minimum angle in degrees.
|
|
10850
|
-
*/
|
|
10851
11080
|
set minAngle(value: number);
|
|
10852
11081
|
/**
|
|
10853
11082
|
* Get the maximum angle in degrees.
|
|
10854
11083
|
*/
|
|
10855
11084
|
get maxAngle(): number;
|
|
10856
|
-
/**
|
|
10857
|
-
* Set the maximum angle in degrees.
|
|
10858
|
-
*/
|
|
10859
11085
|
set maxAngle(value: number);
|
|
10860
11086
|
/**
|
|
10861
11087
|
* Apply the angle constraint to limit joint bending.
|
|
@@ -11039,6 +11265,11 @@ declare class MultiChainSpringSystem {
|
|
|
11039
11265
|
set solver(type: 'verlet' | 'xpbd');
|
|
11040
11266
|
}
|
|
11041
11267
|
|
|
11268
|
+
/**
|
|
11269
|
+
* Options used to construct a GPU cloth simulation system.
|
|
11270
|
+
*
|
|
11271
|
+
* @public
|
|
11272
|
+
*/
|
|
11042
11273
|
type GPUClothSystemOptions = {
|
|
11043
11274
|
enabled?: boolean;
|
|
11044
11275
|
device?: Nullable<AbstractDevice>;
|
|
@@ -11066,6 +11297,11 @@ type GPUClothSystemOptions = {
|
|
|
11066
11297
|
scene?: Nullable<Scene>;
|
|
11067
11298
|
autoUpdate?: boolean;
|
|
11068
11299
|
};
|
|
11300
|
+
/**
|
|
11301
|
+
* Serialized wrap-binding cache data for GPU cloth attachments.
|
|
11302
|
+
*
|
|
11303
|
+
* @public
|
|
11304
|
+
*/
|
|
11069
11305
|
type GPUClothWrapBindingData = {
|
|
11070
11306
|
version: 4;
|
|
11071
11307
|
vertexCount: number;
|
|
@@ -11076,6 +11312,11 @@ type GPUClothWrapBindingData = {
|
|
|
11076
11312
|
sourceBarycentrics: string;
|
|
11077
11313
|
targetLocalOffsets: string;
|
|
11078
11314
|
};
|
|
11315
|
+
/**
|
|
11316
|
+
* Target object paired with GPU cloth wrap-binding data.
|
|
11317
|
+
*
|
|
11318
|
+
* @public
|
|
11319
|
+
*/
|
|
11079
11320
|
type GPUClothWrapBindingTarget = {
|
|
11080
11321
|
target: any;
|
|
11081
11322
|
data: GPUClothWrapBindingData;
|
|
@@ -11084,13 +11325,22 @@ type GPUClothWrapBindingTarget = {
|
|
|
11084
11325
|
* Returns whether GPU cloth is supported on the given device.
|
|
11085
11326
|
*
|
|
11086
11327
|
* GPU cloth in this engine is WebGPU-only. WebGL backends are explicitly unsupported.
|
|
11328
|
+
*
|
|
11329
|
+
* @public
|
|
11087
11330
|
*/
|
|
11088
11331
|
declare function isGPUClothSupported(device?: Nullable<AbstractDevice>): boolean;
|
|
11332
|
+
/**
|
|
11333
|
+
* Creates wrap-binding cache data between a source cloth mesh and a target mesh.
|
|
11334
|
+
*
|
|
11335
|
+
* @public
|
|
11336
|
+
*/
|
|
11089
11337
|
declare function createGPUClothWrapBindingData(source: any, target: any): Promise<GPUClothWrapBindingData>;
|
|
11090
11338
|
/**
|
|
11091
11339
|
* WebGPU-only cloth simulation entry.
|
|
11092
11340
|
*
|
|
11093
11341
|
* On non-WebGPU backends (including WebGL), the system is always disabled.
|
|
11342
|
+
*
|
|
11343
|
+
* @public
|
|
11094
11344
|
*/
|
|
11095
11345
|
declare class GPUClothSystem {
|
|
11096
11346
|
private _enabled;
|
|
@@ -11226,8 +11476,18 @@ declare class GPUClothSystem {
|
|
|
11226
11476
|
private restoreTargetSkinning;
|
|
11227
11477
|
}
|
|
11228
11478
|
|
|
11479
|
+
/**
|
|
11480
|
+
* Numerical tolerance used by the joint dynamics solver.
|
|
11481
|
+
*
|
|
11482
|
+
* @public
|
|
11483
|
+
*/
|
|
11229
11484
|
declare const EPSILON = 0.001;
|
|
11230
11485
|
/** Constraint topology type */
|
|
11486
|
+
/**
|
|
11487
|
+
* Constraint topology type.
|
|
11488
|
+
*
|
|
11489
|
+
* @public
|
|
11490
|
+
*/
|
|
11231
11491
|
declare const enum ConstraintType {
|
|
11232
11492
|
/** Parent-child bone pairs along vertical chains */
|
|
11233
11493
|
Structural_Vertical = 0,
|
|
@@ -11241,6 +11501,11 @@ declare const enum ConstraintType {
|
|
|
11241
11501
|
Bending_Horizontal = 4
|
|
11242
11502
|
}
|
|
11243
11503
|
/** Collider surface force direction (used for surface/triangle collision) */
|
|
11504
|
+
/**
|
|
11505
|
+
* Collider surface force direction used for surface and triangle collision.
|
|
11506
|
+
*
|
|
11507
|
+
* @public
|
|
11508
|
+
*/
|
|
11244
11509
|
declare const enum ColliderForce {
|
|
11245
11510
|
/** No surface force */
|
|
11246
11511
|
Off = 0,
|
|
@@ -11254,6 +11519,11 @@ declare const enum ColliderForce {
|
|
|
11254
11519
|
* Set once at initialization, immutable during simulation.
|
|
11255
11520
|
* Constraint scale values are pre-multiplied by 0.5 (summed between two points in solver).
|
|
11256
11521
|
*/
|
|
11522
|
+
/**
|
|
11523
|
+
* Read-only per-point physics parameters.
|
|
11524
|
+
*
|
|
11525
|
+
* @public
|
|
11526
|
+
*/
|
|
11257
11527
|
interface PointR {
|
|
11258
11528
|
/** Index of parent point in the hierarchy (-1 = root, no parent) */
|
|
11259
11529
|
parent: number;
|
|
@@ -11326,6 +11596,11 @@ interface PointR {
|
|
|
11326
11596
|
* Mutable per-point simulation state.
|
|
11327
11597
|
* Updated every substep during simulation.
|
|
11328
11598
|
*/
|
|
11599
|
+
/**
|
|
11600
|
+
* Mutable per-point simulation state.
|
|
11601
|
+
*
|
|
11602
|
+
* @public
|
|
11603
|
+
*/
|
|
11329
11604
|
interface PointRW {
|
|
11330
11605
|
/** Final output position to write back to the transform */
|
|
11331
11606
|
positionToTransform: Vector3;
|
|
@@ -11349,6 +11624,11 @@ interface PointRW {
|
|
|
11349
11624
|
friction: number;
|
|
11350
11625
|
}
|
|
11351
11626
|
/** Distance constraint between two points */
|
|
11627
|
+
/**
|
|
11628
|
+
* Distance constraint between two points.
|
|
11629
|
+
*
|
|
11630
|
+
* @public
|
|
11631
|
+
*/
|
|
11352
11632
|
interface Constraint {
|
|
11353
11633
|
/** Whether collision detection runs for this constraint's bone pair (0 or 1) */
|
|
11354
11634
|
isCollision: number;
|
|
@@ -11362,12 +11642,17 @@ interface Constraint {
|
|
|
11362
11642
|
length: number;
|
|
11363
11643
|
}
|
|
11364
11644
|
/** Read-only collider shape parameters (set at init) */
|
|
11645
|
+
/**
|
|
11646
|
+
* Read-only collider shape parameters.
|
|
11647
|
+
*
|
|
11648
|
+
* @public
|
|
11649
|
+
*/
|
|
11365
11650
|
interface ColliderR {
|
|
11366
11651
|
/** Base radius of the collider sphere (or capsule head) */
|
|
11367
11652
|
radius: number;
|
|
11368
11653
|
/** Scale factor for capsule tail radius relative to head (1.0 = uniform) */
|
|
11369
11654
|
radiusTailScale: number;
|
|
11370
|
-
/** Capsule height. 0
|
|
11655
|
+
/** Capsule height. `0` means a sphere collider; `\> 0` means a capsule collider. */
|
|
11371
11656
|
height: number;
|
|
11372
11657
|
/** Friction coefficient applied on collision contact */
|
|
11373
11658
|
friction: number;
|
|
@@ -11377,6 +11662,11 @@ interface ColliderR {
|
|
|
11377
11662
|
forceType: ColliderForce;
|
|
11378
11663
|
}
|
|
11379
11664
|
/** Mutable collider runtime state (updated each frame) */
|
|
11665
|
+
/**
|
|
11666
|
+
* Mutable collider runtime state.
|
|
11667
|
+
*
|
|
11668
|
+
* @public
|
|
11669
|
+
*/
|
|
11380
11670
|
interface ColliderRW {
|
|
11381
11671
|
/** Current interpolated head position (for this substep) */
|
|
11382
11672
|
positionCurrent: Vector3;
|
|
@@ -11408,6 +11698,11 @@ interface ColliderRW {
|
|
|
11408
11698
|
enabled: number;
|
|
11409
11699
|
}
|
|
11410
11700
|
/** Read-only grabber parameters (set at init) */
|
|
11701
|
+
/**
|
|
11702
|
+
* Read-only grabber parameters.
|
|
11703
|
+
*
|
|
11704
|
+
* @public
|
|
11705
|
+
*/
|
|
11411
11706
|
interface GrabberR {
|
|
11412
11707
|
/** Grab activation radius — points within this distance can be grabbed */
|
|
11413
11708
|
radius: number;
|
|
@@ -11415,6 +11710,11 @@ interface GrabberR {
|
|
|
11415
11710
|
force: number;
|
|
11416
11711
|
}
|
|
11417
11712
|
/** Mutable grabber runtime state (updated each frame) */
|
|
11713
|
+
/**
|
|
11714
|
+
* Mutable grabber runtime state.
|
|
11715
|
+
*
|
|
11716
|
+
* @public
|
|
11717
|
+
*/
|
|
11418
11718
|
interface GrabberRW {
|
|
11419
11719
|
/** Whether this grabber is active (0 = disabled, 1 = enabled) */
|
|
11420
11720
|
enabled: number;
|
|
@@ -11422,6 +11722,11 @@ interface GrabberRW {
|
|
|
11422
11722
|
position: Vector3;
|
|
11423
11723
|
}
|
|
11424
11724
|
/** Angle limiting configuration for post-simulation bone angle clamping */
|
|
11725
|
+
/**
|
|
11726
|
+
* Angle limiting configuration for post-simulation bone angle clamping.
|
|
11727
|
+
*
|
|
11728
|
+
* @public
|
|
11729
|
+
*/
|
|
11425
11730
|
interface AngleLimitConfig {
|
|
11426
11731
|
/** Max angle in degrees between parent and child bone. Negative = disabled */
|
|
11427
11732
|
angleLimit: number;
|
|
@@ -11429,6 +11734,11 @@ interface AngleLimitConfig {
|
|
|
11429
11734
|
limitFromRoot: boolean;
|
|
11430
11735
|
}
|
|
11431
11736
|
/** Flat plane limiter — infinite plane that points cannot pass through */
|
|
11737
|
+
/**
|
|
11738
|
+
* Infinite plane limiter that points cannot pass through.
|
|
11739
|
+
*
|
|
11740
|
+
* @public
|
|
11741
|
+
*/
|
|
11432
11742
|
interface FlatPlane {
|
|
11433
11743
|
/** Plane normal (points toward the "allowed" side) */
|
|
11434
11744
|
normal: Vector3;
|
|
@@ -11439,6 +11749,11 @@ interface FlatPlane {
|
|
|
11439
11749
|
* Input point data for low-level initialization (mirrors C# Point struct).
|
|
11440
11750
|
* Used when bypassing the Controller and calling the solver directly.
|
|
11441
11751
|
*/
|
|
11752
|
+
/**
|
|
11753
|
+
* Input point data for low-level initialization.
|
|
11754
|
+
*
|
|
11755
|
+
* @public
|
|
11756
|
+
*/
|
|
11442
11757
|
interface PointInit {
|
|
11443
11758
|
/** Parent point index (-1 = no parent) */
|
|
11444
11759
|
parent: number;
|
|
@@ -11505,6 +11820,11 @@ interface PointInit {
|
|
|
11505
11820
|
* Engine-agnostic transform read/write interface.
|
|
11506
11821
|
* Implement this to bridge the solver with any rendering engine (Three.js, Babylon, custom).
|
|
11507
11822
|
*/
|
|
11823
|
+
/**
|
|
11824
|
+
* Transform adapter used by the solver to read and write bone state.
|
|
11825
|
+
*
|
|
11826
|
+
* @public
|
|
11827
|
+
*/
|
|
11508
11828
|
interface TransformAccess {
|
|
11509
11829
|
/** Read world-space position */
|
|
11510
11830
|
getWorldPosition(): Vector3;
|
|
@@ -11533,6 +11853,11 @@ interface TransformAccess {
|
|
|
11533
11853
|
* Bone hierarchy node for constraint building.
|
|
11534
11854
|
* Represents a single bone in the tree structure passed to buildConstraints().
|
|
11535
11855
|
*/
|
|
11856
|
+
/**
|
|
11857
|
+
* Bone hierarchy node used to build constraints and simulation points.
|
|
11858
|
+
*
|
|
11859
|
+
* @public
|
|
11860
|
+
*/
|
|
11536
11861
|
interface BoneNode {
|
|
11537
11862
|
/** Unique index of this bone (must match the position in the pointTransforms array) */
|
|
11538
11863
|
index: number;
|
|
@@ -11550,16 +11875,19 @@ interface BoneNode {
|
|
|
11550
11875
|
boneAxis?: Vector3;
|
|
11551
11876
|
}
|
|
11552
11877
|
|
|
11878
|
+
/** @public */
|
|
11553
11879
|
interface CollisionResult {
|
|
11554
11880
|
hit: boolean;
|
|
11555
11881
|
point: Vector3;
|
|
11556
11882
|
}
|
|
11883
|
+
/** @public */
|
|
11557
11884
|
interface LineCollisionResult {
|
|
11558
11885
|
hit: boolean;
|
|
11559
11886
|
pointOnLine: Vector3;
|
|
11560
11887
|
pointOnCollider: Vector3;
|
|
11561
11888
|
radius: number;
|
|
11562
11889
|
}
|
|
11890
|
+
/** @public */
|
|
11563
11891
|
interface SurfaceCheckResult {
|
|
11564
11892
|
hit: boolean;
|
|
11565
11893
|
intersectionPoint: Vector3;
|
|
@@ -11567,6 +11895,7 @@ interface SurfaceCheckResult {
|
|
|
11567
11895
|
pointOnCollider: Vector3;
|
|
11568
11896
|
radius: number;
|
|
11569
11897
|
}
|
|
11898
|
+
/** @public */
|
|
11570
11899
|
interface NearestPointsResult {
|
|
11571
11900
|
tP: number;
|
|
11572
11901
|
tQ: number;
|
|
@@ -11574,16 +11903,71 @@ interface NearestPointsResult {
|
|
|
11574
11903
|
pointOnQ: Vector3;
|
|
11575
11904
|
sqrDistance: number;
|
|
11576
11905
|
}
|
|
11906
|
+
/**
|
|
11907
|
+
* Pushes a point out of a sphere collider.
|
|
11908
|
+
*
|
|
11909
|
+
* @public
|
|
11910
|
+
*/
|
|
11577
11911
|
declare function pushoutFromSphere(center: Vector3, radius: number, pointRadius: number, point: Vector3, out?: CollisionResult): CollisionResult;
|
|
11912
|
+
/**
|
|
11913
|
+
* Pushes a point out of a collider.
|
|
11914
|
+
*
|
|
11915
|
+
* @public
|
|
11916
|
+
*/
|
|
11578
11917
|
declare function pushoutFromCollider(colR: ColliderR, colRW: ColliderRW, point: Vector3, ptR: PointR, out?: CollisionResult): CollisionResult;
|
|
11918
|
+
/**
|
|
11919
|
+
* Pushes a point out of a capsule collider.
|
|
11920
|
+
*
|
|
11921
|
+
* @public
|
|
11922
|
+
*/
|
|
11579
11923
|
declare function pushoutFromCapsule(colR: ColliderR, colRW: ColliderRW, point: Vector3, ptR: PointR, out?: CollisionResult): CollisionResult;
|
|
11924
|
+
/**
|
|
11925
|
+
* Pulls a point inside a sphere collider.
|
|
11926
|
+
*
|
|
11927
|
+
* @public
|
|
11928
|
+
*/
|
|
11580
11929
|
declare function pushInFromSphere(center: Vector3, radius: number, point: Vector3, out?: CollisionResult): CollisionResult;
|
|
11930
|
+
/**
|
|
11931
|
+
* Pulls a point inside a collider.
|
|
11932
|
+
*
|
|
11933
|
+
* @public
|
|
11934
|
+
*/
|
|
11581
11935
|
declare function pushInFromCollider(colR: ColliderR, colRW: ColliderRW, point: Vector3, out?: CollisionResult): CollisionResult;
|
|
11936
|
+
/**
|
|
11937
|
+
* Pulls a point inside a capsule collider.
|
|
11938
|
+
*
|
|
11939
|
+
* @public
|
|
11940
|
+
*/
|
|
11582
11941
|
declare function pushInFromCapsule(colR: ColliderR, colRW: ColliderRW, point: Vector3, out?: CollisionResult): CollisionResult;
|
|
11942
|
+
/**
|
|
11943
|
+
* Performs sphere collision detection.
|
|
11944
|
+
*
|
|
11945
|
+
* @public
|
|
11946
|
+
*/
|
|
11583
11947
|
declare function collisionDetectionSphere(center: Vector3, radius: number, point1: Vector3, point2: Vector3, out?: LineCollisionResult): LineCollisionResult;
|
|
11948
|
+
/**
|
|
11949
|
+
* Performs capsule collision detection.
|
|
11950
|
+
*
|
|
11951
|
+
* @public
|
|
11952
|
+
*/
|
|
11584
11953
|
declare function collisionDetectionCapsule(colR: ColliderR, colRW: ColliderRW, point1: Vector3, point2: Vector3, out?: LineCollisionResult): LineCollisionResult;
|
|
11954
|
+
/**
|
|
11955
|
+
* Performs collision detection against the specified collider.
|
|
11956
|
+
*
|
|
11957
|
+
* @public
|
|
11958
|
+
*/
|
|
11585
11959
|
declare function collisionDetection(colR: ColliderR, colRW: ColliderRW, point1: Vector3, point2: Vector3, out?: LineCollisionResult): LineCollisionResult;
|
|
11960
|
+
/**
|
|
11961
|
+
* Performs inward collision detection.
|
|
11962
|
+
*
|
|
11963
|
+
* @public
|
|
11964
|
+
*/
|
|
11586
11965
|
declare function pushInCollisionDetection(colR: ColliderR, colRW: ColliderRW, point1: Vector3, point2: Vector3, out?: LineCollisionResult): LineCollisionResult;
|
|
11966
|
+
/**
|
|
11967
|
+
* Computes the nearest points between two segments.
|
|
11968
|
+
*
|
|
11969
|
+
* @public
|
|
11970
|
+
*/
|
|
11587
11971
|
declare function computeNearestPoints(posP: Vector3, dirP: Vector3, posQ: Vector3, dirQ: Vector3, out?: NearestPointsResult): {
|
|
11588
11972
|
tP: number;
|
|
11589
11973
|
tQ: number;
|
|
@@ -11591,9 +11975,18 @@ declare function computeNearestPoints(posP: Vector3, dirP: Vector3, posQ: Vector
|
|
|
11591
11975
|
pointOnQ: Vector3;
|
|
11592
11976
|
sqrDistance: number;
|
|
11593
11977
|
};
|
|
11978
|
+
/**
|
|
11979
|
+
* Checks triangle-surface collision against a collider.
|
|
11980
|
+
*
|
|
11981
|
+
* @public
|
|
11982
|
+
*/
|
|
11594
11983
|
declare function checkSurfaceCollision(ptA: Vector3, ptB: Vector3, ptC: Vector3, colliderPos: Vector3, colR: ColliderR, colRW: ColliderRW, out?: SurfaceCheckResult): SurfaceCheckResult;
|
|
11595
11984
|
|
|
11596
|
-
/**
|
|
11985
|
+
/**
|
|
11986
|
+
* Parameters for a single simulation step.
|
|
11987
|
+
*
|
|
11988
|
+
* @public
|
|
11989
|
+
*/
|
|
11597
11990
|
interface SimulationParams {
|
|
11598
11991
|
/** If true, skip force integration (only apply root motion and output positions) */
|
|
11599
11992
|
isPaused: boolean;
|
|
@@ -11617,7 +12010,7 @@ interface SimulationParams {
|
|
|
11617
12010
|
windForce: Vector3;
|
|
11618
12011
|
/** Enable triangle-based surface collision */
|
|
11619
12012
|
enableSurfaceCollision: boolean;
|
|
11620
|
-
/** Triangle indices for surface collision (6 per quad: 2 triangles
|
|
12013
|
+
/** Triangle indices for surface collision (6 per quad: 2 triangles, 3 indices each) */
|
|
11621
12014
|
surfaceConstraints: number[];
|
|
11622
12015
|
/** Number of constraint relaxation iterations per substep */
|
|
11623
12016
|
relaxation: number;
|
|
@@ -11639,22 +12032,43 @@ interface SimulationParams {
|
|
|
11639
12032
|
enableBroadPhase: boolean;
|
|
11640
12033
|
}
|
|
11641
12034
|
/**
|
|
11642
|
-
* Run the full simulation step. Mutates pointsRW and collidersRW in place.
|
|
11643
|
-
* Returns { positionsToTransform, fakeWaveCounter }
|
|
12035
|
+
* Run the full simulation step. Mutates `pointsRW` and `collidersRW` in place.
|
|
12036
|
+
* Returns `{ positionsToTransform, fakeWaveCounter }`.
|
|
12037
|
+
*
|
|
12038
|
+
* @public
|
|
11644
12039
|
*/
|
|
11645
12040
|
declare function simulate(params: SimulationParams, pointsR: readonly PointR[], pointsRW: PointRW[], constraints: readonly Constraint[], collidersR: readonly ColliderR[], collidersRW: ColliderRW[], grabbersR: readonly GrabberR[], grabbersRW: readonly GrabberRW[], movableLimitTargets: readonly Vector3[], flatPlanes: readonly FlatPlane[]): {
|
|
11646
12041
|
positionsToTransform: Vector3[];
|
|
11647
12042
|
fakeWaveCounter: number;
|
|
11648
12043
|
};
|
|
12044
|
+
/**
|
|
12045
|
+
* Output of applying the simulated result back to transforms.
|
|
12046
|
+
*
|
|
12047
|
+
* @public
|
|
12048
|
+
*/
|
|
11649
12049
|
interface ApplyResultOutput {
|
|
11650
12050
|
position: Vector3;
|
|
11651
12051
|
rotation: Quaternion;
|
|
11652
12052
|
localRotation: Quaternion;
|
|
11653
12053
|
}
|
|
12054
|
+
/**
|
|
12055
|
+
* Computes transform outputs from the simulated point positions.
|
|
12056
|
+
*
|
|
12057
|
+
* @public
|
|
12058
|
+
*/
|
|
11654
12059
|
declare function applyResult(pointsR: readonly PointR[], pointsRW: PointRW[], positionsToTransform: readonly Vector3[], blendRatio: number, transformRotations: readonly Quaternion[], transformLocalRotations: readonly Quaternion[], preserveTwist: boolean): ApplyResultOutput[];
|
|
12060
|
+
/**
|
|
12061
|
+
* Applies post-simulation angle limits to the point state.
|
|
12062
|
+
*
|
|
12063
|
+
* @public
|
|
12064
|
+
*/
|
|
11655
12065
|
declare function applyAngleLimits(pointsR: readonly PointR[], pointsRW: PointRW[], config: AngleLimitConfig): void;
|
|
11656
12066
|
|
|
11657
|
-
/**
|
|
12067
|
+
/**
|
|
12068
|
+
* Options for constraint generation from a bone hierarchy.
|
|
12069
|
+
*
|
|
12070
|
+
* @public
|
|
12071
|
+
*/
|
|
11658
12072
|
interface ConstraintBuildOptions {
|
|
11659
12073
|
/** Generate parent→child vertical constraints */
|
|
11660
12074
|
structuralVertical: boolean;
|
|
@@ -11677,15 +12091,37 @@ interface ConstraintBuildOptions {
|
|
|
11677
12091
|
/** Enable surface/triangle collision (overrides per-type collision flags) */
|
|
11678
12092
|
enableSurfaceCollision: boolean;
|
|
11679
12093
|
}
|
|
12094
|
+
/**
|
|
12095
|
+
* Builds solver constraints from the supplied root chains.
|
|
12096
|
+
*
|
|
12097
|
+
* @public
|
|
12098
|
+
*/
|
|
11680
12099
|
declare function buildConstraints(rootPoints: BoneNode[], options: ConstraintBuildOptions): Constraint[];
|
|
12100
|
+
/**
|
|
12101
|
+
* Builds triangle indices used for surface collision.
|
|
12102
|
+
*
|
|
12103
|
+
* @public
|
|
12104
|
+
*/
|
|
11681
12105
|
declare function buildSurfaceFaces(rootPoints: BoneNode[], isLoop: boolean): number[];
|
|
12106
|
+
/**
|
|
12107
|
+
* Computes the maximum chain depth among all root points.
|
|
12108
|
+
*
|
|
12109
|
+
* @public
|
|
12110
|
+
*/
|
|
11682
12111
|
declare function computeMaxDepth(rootPoints: BoneNode[]): number;
|
|
12112
|
+
/**
|
|
12113
|
+
* Sorts root points by proximity to the supplied reference position.
|
|
12114
|
+
*
|
|
12115
|
+
* @public
|
|
12116
|
+
*/
|
|
11683
12117
|
declare function sortRootPointsByProximity(roots: BoneNode[], ignoreY: boolean, fixedBeginEnd: boolean): BoneNode[];
|
|
11684
12118
|
|
|
11685
12119
|
/**
|
|
11686
12120
|
* Depth-based physics parameter curves.
|
|
11687
12121
|
* Each curve is evaluated with t = pointDepth / maxDepth (0 at root, 1 at tip).
|
|
11688
12122
|
* This allows parameters to vary smoothly along the bone chain.
|
|
12123
|
+
*
|
|
12124
|
+
* @public
|
|
11689
12125
|
*/
|
|
11690
12126
|
interface PhysicsCurves {
|
|
11691
12127
|
/** Scales point mass by depth */
|
|
@@ -11733,9 +12169,12 @@ interface PhysicsCurves {
|
|
|
11733
12169
|
/** Fake wave frequency offset by depth */
|
|
11734
12170
|
fakeWaveFreq: InterpolatorScalar;
|
|
11735
12171
|
}
|
|
11736
|
-
/**
|
|
12172
|
+
/**
|
|
12173
|
+
* Top-level configuration for the physics controller
|
|
12174
|
+
* @public
|
|
12175
|
+
**/
|
|
11737
12176
|
interface ControllerConfig {
|
|
11738
|
-
/** Global gravity vector
|
|
12177
|
+
/** Global gravity vector */
|
|
11739
12178
|
gravity: Vector3;
|
|
11740
12179
|
/** Global wind force vector applied to all dynamic points */
|
|
11741
12180
|
windForce: Vector3;
|
|
@@ -11772,21 +12211,41 @@ interface ControllerConfig {
|
|
|
11772
12211
|
/** Which constraint types to generate and their collision flags */
|
|
11773
12212
|
constraintOptions: ConstraintBuildOptions;
|
|
11774
12213
|
}
|
|
11775
|
-
/**
|
|
12214
|
+
/**
|
|
12215
|
+
* Stable runtime handle for a JointDynamics collider.
|
|
12216
|
+
* @public
|
|
12217
|
+
*/
|
|
11776
12218
|
interface JointDynamicsColliderHandle {
|
|
11777
12219
|
readonly type: 'collider';
|
|
11778
12220
|
readonly id: number;
|
|
11779
12221
|
}
|
|
11780
|
-
/**
|
|
12222
|
+
/**
|
|
12223
|
+
* Stable runtime handle for a JointDynamics flat plane.
|
|
12224
|
+
* @public
|
|
12225
|
+
*/
|
|
11781
12226
|
interface JointDynamicsFlatPlaneHandle {
|
|
11782
12227
|
readonly type: 'flatPlane';
|
|
11783
12228
|
readonly id: number;
|
|
11784
12229
|
}
|
|
11785
|
-
/**
|
|
12230
|
+
/**
|
|
12231
|
+
* Stable runtime handle for a JointDynamics grabber.
|
|
12232
|
+
* @public
|
|
12233
|
+
*/
|
|
11786
12234
|
interface JointDynamicsGrabberHandle {
|
|
11787
12235
|
readonly type: 'grabber';
|
|
11788
12236
|
readonly id: number;
|
|
11789
12237
|
}
|
|
12238
|
+
/**
|
|
12239
|
+
* High-level controller for joint dynamics simulation.
|
|
12240
|
+
*
|
|
12241
|
+
* This class manages the physics simulation for a hierarchy of bones, including constraints,
|
|
12242
|
+
* colliders, and grabbers. It provides an API for initializing the system with bone data and
|
|
12243
|
+
* transforms, stepping the simulation each frame, and modifying colliders and grabbers at runtime.
|
|
12244
|
+
* The controller handles the internal state and logic for blending between animation and physics,
|
|
12245
|
+
* applying forces, and enforcing constraints.
|
|
12246
|
+
*
|
|
12247
|
+
* @public
|
|
12248
|
+
*/
|
|
11790
12249
|
declare class JointDynamicsSystemController {
|
|
11791
12250
|
private _config;
|
|
11792
12251
|
private _pointsR;
|
|
@@ -11825,13 +12284,13 @@ declare class JointDynamicsSystemController {
|
|
|
11825
12284
|
private _fadeDuration;
|
|
11826
12285
|
constructor(config: ControllerConfig);
|
|
11827
12286
|
/**
|
|
11828
|
-
*
|
|
11829
|
-
* @param rootTransform
|
|
11830
|
-
* @param rootPoints
|
|
11831
|
-
* @param pointTransforms
|
|
11832
|
-
* @param colliders
|
|
11833
|
-
* @param grabbers
|
|
11834
|
-
* @param flatPlanes
|
|
12287
|
+
* Initializes the physics system.
|
|
12288
|
+
* @param rootTransform - Root bone transform used to detect root motion.
|
|
12289
|
+
* @param rootPoints - Root nodes of the bone hierarchy. Multiple roots are allowed.
|
|
12290
|
+
* @param pointTransforms - Transform array for all physics points. Order must match `BoneNode.index`.
|
|
12291
|
+
* @param colliders - Collider array (spheres/capsules).
|
|
12292
|
+
* @param grabbers - Grabber array used for interactions such as mouse dragging.
|
|
12293
|
+
* @param flatPlanes - Plane limiters such as the floor to prevent penetration.
|
|
11835
12294
|
*/
|
|
11836
12295
|
initialize(rootTransform: TransformAccess, rootPoints: BoneNode[], pointTransforms: TransformAccess[], colliders: Array<{
|
|
11837
12296
|
r: ColliderR;
|
|
@@ -11845,155 +12304,193 @@ declare class JointDynamicsSystemController {
|
|
|
11845
12304
|
position: Vector3;
|
|
11846
12305
|
}>): void;
|
|
11847
12306
|
/**
|
|
11848
|
-
*
|
|
11849
|
-
*
|
|
11850
|
-
*
|
|
12307
|
+
* Advances the simulation by one frame.
|
|
12308
|
+
* Internal flow: read current transforms, run Verlet integration and constraint solving,
|
|
12309
|
+
* then write the result back to the transforms.
|
|
12310
|
+
* @param deltaTime - Frame delta time in seconds. Internally subdivided by `subSteps`.
|
|
11851
12311
|
*/
|
|
11852
12312
|
step(deltaTime: number): void;
|
|
11853
12313
|
/**
|
|
11854
|
-
*
|
|
11855
|
-
*
|
|
11856
|
-
*
|
|
12314
|
+
* Returns the simulated results for all points as world-space positions and rotations.
|
|
12315
|
+
* Usually this does not need to be called manually because `step()` already writes the
|
|
12316
|
+
* output back to the transforms.
|
|
11857
12317
|
*/
|
|
11858
12318
|
getResults(): Array<{
|
|
11859
12319
|
position: Vector3;
|
|
11860
12320
|
rotation: Quaternion;
|
|
11861
12321
|
}>;
|
|
11862
12322
|
/**
|
|
11863
|
-
*
|
|
11864
|
-
*
|
|
11865
|
-
*
|
|
12323
|
+
* Compensates for teleportation by resetting the previous root transform to the current one.
|
|
12324
|
+
* Call this after a character warp or teleport to avoid a large root-motion impulse on the
|
|
12325
|
+
* next simulation step.
|
|
11866
12326
|
*/
|
|
11867
12327
|
warp(): void;
|
|
11868
12328
|
/**
|
|
11869
|
-
*
|
|
11870
|
-
*
|
|
11871
|
-
*
|
|
12329
|
+
* Resets all physics state.
|
|
12330
|
+
* Each simulated point is snapped back to the current transform position and grab state
|
|
12331
|
+
* is cleared.
|
|
11872
12332
|
*/
|
|
11873
12333
|
reset(): void;
|
|
11874
12334
|
/**
|
|
11875
|
-
*
|
|
11876
|
-
*
|
|
11877
|
-
* @param index
|
|
12335
|
+
* Releases a fixed point so it becomes dynamic, for example when cloth is detached.
|
|
12336
|
+
* The point state is reset to avoid a sudden impulse.
|
|
12337
|
+
* @param index - Point index.
|
|
11878
12338
|
*/
|
|
11879
12339
|
releasePoint(index: number): void;
|
|
11880
12340
|
/**
|
|
11881
|
-
*
|
|
11882
|
-
*
|
|
11883
|
-
* @param index
|
|
12341
|
+
* Fixes a dynamic point back to the animation pose, for example when an item is reattached.
|
|
12342
|
+
* The point grab state is cleared.
|
|
12343
|
+
* @param index - Point index.
|
|
11884
12344
|
*/
|
|
11885
12345
|
fixPoint(index: number): void;
|
|
11886
12346
|
/**
|
|
11887
|
-
*
|
|
11888
|
-
* @param index
|
|
12347
|
+
* Returns whether a point is fixed to animation (`weight = 0`).
|
|
12348
|
+
* @param index - Point index.
|
|
11889
12349
|
*/
|
|
11890
12350
|
isPointFixed(index: number): boolean;
|
|
11891
|
-
/**
|
|
12351
|
+
/** Gets the total number of physics points. */
|
|
11892
12352
|
get pointCount(): number;
|
|
11893
12353
|
/**
|
|
11894
|
-
*
|
|
11895
|
-
* blendRatio
|
|
11896
|
-
* @param seconds
|
|
12354
|
+
* Fades physics in by blending from animation pose to simulation.
|
|
12355
|
+
* `blendRatio` moves from `1` (animation only) to `0` (physics only).
|
|
12356
|
+
* @param seconds - Transition duration in seconds.
|
|
11897
12357
|
*/
|
|
11898
12358
|
fadeIn(seconds: number): void;
|
|
11899
12359
|
/**
|
|
11900
|
-
*
|
|
11901
|
-
* blendRatio
|
|
11902
|
-
* @param seconds
|
|
12360
|
+
* Fades physics out by blending from simulation back to animation pose.
|
|
12361
|
+
* `blendRatio` moves from `0` (physics only) to `1` (animation only).
|
|
12362
|
+
* @param seconds - Transition duration in seconds.
|
|
11903
12363
|
*/
|
|
11904
12364
|
fadeOut(seconds: number): void;
|
|
11905
12365
|
/**
|
|
11906
|
-
*
|
|
11907
|
-
*
|
|
11908
|
-
* @param wind
|
|
12366
|
+
* Sets the global wind force vector.
|
|
12367
|
+
* The final wind contribution is still scaled per point by `windForceScale` and mass.
|
|
12368
|
+
* @param wind - Wind vector in world space.
|
|
11909
12369
|
*/
|
|
11910
12370
|
setWindForce(wind: Vector3): void;
|
|
11911
|
-
/**
|
|
12371
|
+
/**
|
|
12372
|
+
* Enable/disable broad-phase pruning for runtime performance comparison
|
|
12373
|
+
* @param enabled - `true` to enable broad-phase, `false` to disable.
|
|
12374
|
+
*/
|
|
11912
12375
|
setBroadPhaseEnabled(enabled: boolean): void;
|
|
11913
12376
|
/** The blend ratio for the physics simulation */
|
|
11914
12377
|
get blendRatio(): number;
|
|
11915
12378
|
set blendRatio(value: number);
|
|
11916
12379
|
/**
|
|
11917
|
-
*
|
|
11918
|
-
*
|
|
11919
|
-
*
|
|
12380
|
+
* Pauses or resumes the physics simulation.
|
|
12381
|
+
* While paused, the system still follows root motion but skips force integration and
|
|
12382
|
+
* constraint solving.
|
|
12383
|
+
* @param paused - `true` to pause, `false` to resume.
|
|
11920
12384
|
*/
|
|
11921
12385
|
setPaused(paused: boolean): void;
|
|
11922
12386
|
/**
|
|
11923
12387
|
* Enable or disable a collider by current array index.
|
|
11924
12388
|
* Transform state is still read from the collider's TransformAccess each frame.
|
|
11925
12389
|
* Prefer setColliderEnabled(handle, enabled) for runtime-owned colliders.
|
|
12390
|
+
*
|
|
12391
|
+
* @param index - Collider index in the current array. Note that this may change when colliders are added or removed.
|
|
12392
|
+
* @param enabled - `true` to enable the collider, `false` to disable it.
|
|
12393
|
+
*
|
|
12394
|
+
* @returns `true` if the index is valid and the collider was updated, `false` if the index is out of range.
|
|
11926
12395
|
*/
|
|
11927
12396
|
setColliderEnabledAt(index: number, enabled: boolean): boolean;
|
|
11928
12397
|
/**
|
|
11929
12398
|
* Enable or disable a runtime collider by stable handle.
|
|
12399
|
+
*
|
|
12400
|
+
* @param handle - Stable handle for the collider to enable or disable.
|
|
12401
|
+
* @param enabled - `true` to enable the collider, `false` to disable it.
|
|
11930
12402
|
* @returns true if the handle is still valid.
|
|
11931
12403
|
*/
|
|
11932
12404
|
setColliderEnabled(handle: JointDynamicsColliderHandle, enabled: boolean): boolean;
|
|
11933
12405
|
/**
|
|
11934
12406
|
* Add a collider at runtime.
|
|
12407
|
+
* @param r - Read-only collider data such as shape and size.
|
|
12408
|
+
* @param transform - TransformAccess that provides the collider's position and rotation each frame.
|
|
11935
12409
|
* @returns A stable handle that remains valid until this collider is removed.
|
|
11936
12410
|
*/
|
|
11937
12411
|
addCollider(r: ColliderR, transform: TransformAccess): JointDynamicsColliderHandle;
|
|
11938
12412
|
/**
|
|
11939
12413
|
* Remove a collider by stable handle.
|
|
12414
|
+
* @param handle - Stable handle for the collider to remove.
|
|
11940
12415
|
* @returns true if the collider existed and was removed.
|
|
11941
12416
|
*/
|
|
11942
12417
|
removeCollider(handle: JointDynamicsColliderHandle): boolean;
|
|
11943
12418
|
/**
|
|
11944
12419
|
* Remove a collider by current array index.
|
|
12420
|
+
* @param index - Collider index in the current array. Note that this may change when colliders are added or removed.
|
|
11945
12421
|
* Prefer removeCollider(handle) for runtime-owned colliders.
|
|
11946
12422
|
*/
|
|
11947
12423
|
removeColliderAt(index: number): boolean;
|
|
11948
12424
|
/**
|
|
11949
12425
|
* Enable or disable a flat plane by current array index.
|
|
11950
|
-
*
|
|
12426
|
+
* @param index - Flat plane index in the current array. Note that this may change when flat planes are added or removed.
|
|
12427
|
+
* @param enabled - `true` to enable the flat plane, `false` to disable it.
|
|
12428
|
+
* @returns `true` if the index is valid and the flat plane was updated, `false` if the index is out of range.
|
|
11951
12429
|
*/
|
|
11952
12430
|
setFlatPlaneEnabledAt(index: number, enabled: boolean): boolean;
|
|
11953
12431
|
/**
|
|
11954
12432
|
* Enable or disable a runtime flat plane by stable handle.
|
|
12433
|
+
* @param handle - Stable handle for the flat plane to enable or disable.
|
|
12434
|
+
* @param enabled - `true` to enable the flat plane, `false` to disable it.
|
|
11955
12435
|
* @returns true if the handle is still valid.
|
|
11956
12436
|
*/
|
|
11957
12437
|
setFlatPlaneEnabled(handle: JointDynamicsFlatPlaneHandle, enabled: boolean): boolean;
|
|
11958
12438
|
/**
|
|
11959
12439
|
* Add a flat plane at runtime.
|
|
12440
|
+
* @param up - Up direction of the plane. The normal is computed as `Vector3.normalize(up)`.
|
|
12441
|
+
* @param position - A point on the plane. The distance is computed as `-Vector3.dot(normal, position)`.
|
|
11960
12442
|
* @returns A stable handle that remains valid until this flat plane is removed.
|
|
11961
12443
|
*/
|
|
11962
12444
|
addFlatPlane(up: Vector3, position: Vector3): JointDynamicsFlatPlaneHandle;
|
|
11963
12445
|
/**
|
|
11964
12446
|
* Remove a flat plane by stable handle.
|
|
12447
|
+
* @param handle - Stable handle for the flat plane to remove.
|
|
11965
12448
|
* @returns true if the flat plane existed and was removed.
|
|
11966
12449
|
*/
|
|
11967
12450
|
removeFlatPlane(handle: JointDynamicsFlatPlaneHandle): boolean;
|
|
11968
12451
|
/**
|
|
11969
12452
|
* Remove a flat plane by current array index.
|
|
11970
|
-
*
|
|
12453
|
+
* @param index - Flat plane index in the current array. Note that this may change when flat planes are added or removed.
|
|
12454
|
+
* @returns true if the index was valid and the flat plane was removed, false if the index was out of range.
|
|
11971
12455
|
*/
|
|
11972
12456
|
removeFlatPlaneAt(index: number): boolean;
|
|
11973
12457
|
/**
|
|
11974
12458
|
* Enable or disable a grabber by current array index.
|
|
11975
12459
|
* Transform state is still read from the grabber's TransformAccess each frame.
|
|
11976
12460
|
* Prefer setGrabberEnabled(handle, enabled) for runtime-owned grabbers.
|
|
12461
|
+
*
|
|
12462
|
+
* @param index - Grabber index in the current array. Note that this may change when grabbers are added or removed.
|
|
12463
|
+
* @param enabled - `true` to enable the grabber, `false` to disable it.
|
|
12464
|
+
* @returns `true` if the index is valid and the grabber was updated, `false` if the index is out of range.
|
|
11977
12465
|
*/
|
|
11978
12466
|
setGrabberEnabledAt(index: number, enabled: boolean): boolean;
|
|
11979
12467
|
/**
|
|
11980
12468
|
* Enable or disable a runtime grabber by stable handle.
|
|
12469
|
+
* @param handle - Stable handle for the grabber to enable or disable.
|
|
12470
|
+
* @param enabled - `true` to enable the grabber, `false` to disable it.
|
|
11981
12471
|
* @returns true if the handle is still valid.
|
|
11982
12472
|
*/
|
|
11983
12473
|
setGrabberEnabled(handle: JointDynamicsGrabberHandle, enabled: boolean): boolean;
|
|
11984
12474
|
/**
|
|
11985
12475
|
* Add a grabber at runtime.
|
|
12476
|
+
* @param r - Read-only grabber data such as interaction radius.
|
|
12477
|
+
* @param transform - TransformAccess that provides the grabber's position each frame.
|
|
12478
|
+
* @param enabled - Whether the grabber starts enabled. The grabber can still be moved by its transform while disabled, but it won't affect any points until enabled.
|
|
11986
12479
|
* @returns A stable handle that remains valid until this grabber is removed.
|
|
11987
12480
|
*/
|
|
11988
12481
|
addGrabber(r: GrabberR, transform: TransformAccess, enabled?: boolean): JointDynamicsGrabberHandle;
|
|
11989
12482
|
/**
|
|
11990
12483
|
* Remove a grabber by stable handle.
|
|
12484
|
+
* @param handle - Stable handle for the grabber to remove.
|
|
11991
12485
|
* @returns true if the grabber existed and was removed.
|
|
11992
12486
|
*/
|
|
11993
12487
|
removeGrabber(handle: JointDynamicsGrabberHandle): boolean;
|
|
11994
12488
|
/**
|
|
11995
12489
|
* Remove a grabber by current array index.
|
|
11996
12490
|
* Prefer removeGrabber(handle) for runtime-owned grabbers.
|
|
12491
|
+
*
|
|
12492
|
+
* @param index - Grabber index in the current array. Note that this may change when grabbers are added or removed.
|
|
12493
|
+
* @returns true if the index was valid and the grabber was removed, false if the index was out of range.
|
|
11997
12494
|
*/
|
|
11998
12495
|
removeGrabberAt(index: number): boolean;
|
|
11999
12496
|
/** Gets the number of runtime colliders. */
|
|
@@ -12272,6 +12769,11 @@ declare class JointDynamicsModifier extends SkeletonModifier {
|
|
|
12272
12769
|
protected _setWeight(value: number): void;
|
|
12273
12770
|
}
|
|
12274
12771
|
|
|
12772
|
+
/**
|
|
12773
|
+
* Callback invoked after a mesh finishes its per-frame update.
|
|
12774
|
+
*
|
|
12775
|
+
* @public
|
|
12776
|
+
*/
|
|
12275
12777
|
type MeshUpdateCallback = (frameId: number, elapsedInSeconds: number, deltaInSeconds: number) => void;
|
|
12276
12778
|
declare const Mesh_base: typeof GraphNode & _zephyr3d_base.GenericConstructor<{
|
|
12277
12779
|
getNode(): SceneNode;
|
|
@@ -12291,11 +12793,11 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
12291
12793
|
*/
|
|
12292
12794
|
getName(): string;
|
|
12293
12795
|
/**
|
|
12294
|
-
*
|
|
12796
|
+
* Returns the batch instance ID for the current render pass.
|
|
12295
12797
|
*/
|
|
12296
12798
|
getInstanceId(_renderPass: RenderPass): string;
|
|
12297
12799
|
/**
|
|
12298
|
-
*
|
|
12800
|
+
* Returns the packed instance-uniform buffer used for batching.
|
|
12299
12801
|
*/
|
|
12300
12802
|
getInstanceUniforms(): Float32Array<ArrayBuffer>;
|
|
12301
12803
|
/**
|
|
@@ -12305,9 +12807,6 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
12305
12807
|
setPickTarget(node: SceneNode, label?: string): void;
|
|
12306
12808
|
get skeletonName(): string;
|
|
12307
12809
|
set skeletonName(name: string);
|
|
12308
|
-
set skinAnimation(val: boolean);
|
|
12309
|
-
set suspendSkinning(val: boolean);
|
|
12310
|
-
set morphAnimation(val: boolean);
|
|
12311
12810
|
/** Wether the mesh node casts shadows */
|
|
12312
12811
|
get castShadow(): boolean;
|
|
12313
12812
|
set castShadow(b: boolean);
|
|
@@ -12388,7 +12887,7 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
12388
12887
|
/**
|
|
12389
12888
|
* Update morph target weight
|
|
12390
12889
|
*
|
|
12391
|
-
* @param weight - The
|
|
12890
|
+
* @param weight - The morph target weights. The length must not exceed the mesh's morph target count.
|
|
12392
12891
|
*/
|
|
12393
12892
|
updateMorphWeights(weight: number[]): void;
|
|
12394
12893
|
/** {@inheritDoc SceneNode.update} */
|
|
@@ -12619,7 +13118,6 @@ declare class ParticleSystem extends ParticleSystem_base implements Drawable {
|
|
|
12619
13118
|
/** Whether particles are in world space */
|
|
12620
13119
|
get worldSpace(): boolean;
|
|
12621
13120
|
set worldSpace(value: boolean);
|
|
12622
|
-
set flags(value: number);
|
|
12623
13121
|
private getParticleInitialPosition;
|
|
12624
13122
|
resizeVertexBuffers(): void;
|
|
12625
13123
|
update(_frameId: number, elapsedInSeconds: number, deltaInSeconds: number): void;
|
|
@@ -12848,6 +13346,11 @@ interface AssetAnimationTrack {
|
|
|
12848
13346
|
interpolator: Interpolator;
|
|
12849
13347
|
defaultMorphWeights?: number[];
|
|
12850
13348
|
}
|
|
13349
|
+
/**
|
|
13350
|
+
* Fixed-frame geometry cache animation track data.
|
|
13351
|
+
*
|
|
13352
|
+
* @public
|
|
13353
|
+
*/
|
|
12851
13354
|
interface AssetFixedGeometryCacheAnimationTrack {
|
|
12852
13355
|
node: AssetHierarchyNode;
|
|
12853
13356
|
type: 'geometry-cache';
|
|
@@ -12856,6 +13359,11 @@ interface AssetFixedGeometryCacheAnimationTrack {
|
|
|
12856
13359
|
times: Float32Array;
|
|
12857
13360
|
frames: FixedGeometryCacheFrame[];
|
|
12858
13361
|
}
|
|
13362
|
+
/**
|
|
13363
|
+
* PCA-compressed geometry cache animation track data.
|
|
13364
|
+
*
|
|
13365
|
+
* @public
|
|
13366
|
+
*/
|
|
12859
13367
|
interface AssetPCAGeometryCacheAnimationTrack {
|
|
12860
13368
|
node: AssetHierarchyNode;
|
|
12861
13369
|
type: 'geometry-cache';
|
|
@@ -12871,6 +13379,11 @@ interface AssetPCAGeometryCacheAnimationTrack {
|
|
|
12871
13379
|
normalBases?: Nullable<Float32Array[]>;
|
|
12872
13380
|
normalCoefficients?: Nullable<Float32Array[]>;
|
|
12873
13381
|
}
|
|
13382
|
+
/**
|
|
13383
|
+
* Geometry cache animation track data.
|
|
13384
|
+
*
|
|
13385
|
+
* @public
|
|
13386
|
+
*/
|
|
12874
13387
|
type AssetGeometryCacheAnimationTrack = AssetFixedGeometryCacheAnimationTrack | AssetPCAGeometryCacheAnimationTrack;
|
|
12875
13388
|
/**
|
|
12876
13389
|
* Animation data interface for model loading
|
|
@@ -14092,9 +14605,6 @@ declare class ClipmapTerrain extends ClipmapTerrain_base implements Drawable {
|
|
|
14092
14605
|
* @returns Maximum number of detail maps
|
|
14093
14606
|
*/
|
|
14094
14607
|
get MAX_DETAIL_MAP_COUNT(): number;
|
|
14095
|
-
set heightMapAssetId(val: string);
|
|
14096
|
-
set splatMapAssetId(val: string);
|
|
14097
|
-
set grassAssetId(val: string);
|
|
14098
14608
|
/**
|
|
14099
14609
|
* The current number of active detail maps.
|
|
14100
14610
|
* Detail maps define different surface materials (grass, rock, etc.).
|
|
@@ -14246,11 +14756,11 @@ declare class BaseSprite<M extends SpriteMaterial> extends BaseSprite_base imple
|
|
|
14246
14756
|
*/
|
|
14247
14757
|
getName(): string;
|
|
14248
14758
|
/**
|
|
14249
|
-
*
|
|
14759
|
+
* Returns the batch instance ID for the current render pass.
|
|
14250
14760
|
*/
|
|
14251
14761
|
getInstanceId(_renderPass: RenderPass): string;
|
|
14252
14762
|
/**
|
|
14253
|
-
*
|
|
14763
|
+
* Returns the packed instance-uniform buffer used for batching.
|
|
14254
14764
|
*/
|
|
14255
14765
|
getInstanceUniforms(): Float32Array<ArrayBuffer>;
|
|
14256
14766
|
/**
|
|
@@ -14342,13 +14852,33 @@ declare class Sprite extends BaseSprite<SpriteMaterial> {
|
|
|
14342
14852
|
isSprite(): this is Sprite;
|
|
14343
14853
|
}
|
|
14344
14854
|
|
|
14855
|
+
/**
|
|
14856
|
+
* Serializable script attachment configuration payload.
|
|
14857
|
+
*
|
|
14858
|
+
* @public
|
|
14859
|
+
*/
|
|
14345
14860
|
type ScriptAttachmentConfig = Nullable<Record<string, unknown> | unknown[]>;
|
|
14861
|
+
/**
|
|
14862
|
+
* Normalizes a script attachment config into a clone-safe serializable shape.
|
|
14863
|
+
*
|
|
14864
|
+
* @public
|
|
14865
|
+
*/
|
|
14346
14866
|
declare function normalizeScriptAttachmentConfig(value: unknown): ScriptAttachmentConfig;
|
|
14867
|
+
/**
|
|
14868
|
+
* Describes a script attached to a scene node.
|
|
14869
|
+
*
|
|
14870
|
+
* @public
|
|
14871
|
+
*/
|
|
14347
14872
|
declare class ScriptAttachment {
|
|
14348
14873
|
script: string;
|
|
14349
14874
|
config: ScriptAttachmentConfig;
|
|
14350
14875
|
constructor(script?: string, config?: ScriptAttachmentConfig);
|
|
14351
14876
|
}
|
|
14877
|
+
/**
|
|
14878
|
+
* Normalizes an arbitrary value into an array of script attachments.
|
|
14879
|
+
*
|
|
14880
|
+
* @public
|
|
14881
|
+
*/
|
|
14352
14882
|
declare function normalizeScriptAttachments(value: unknown): ScriptAttachment[];
|
|
14353
14883
|
|
|
14354
14884
|
/**
|
|
@@ -15171,7 +15701,7 @@ declare class SceneNode extends SceneNode_base implements IDisposable {
|
|
|
15171
15701
|
* Warning: Do not remove children during this iteration. To allow removal, use `iterateBottomToTop`.
|
|
15172
15702
|
*
|
|
15173
15703
|
* @param callback - Called for each node; if returns true, iteration stops.
|
|
15174
|
-
* @returns true
|
|
15704
|
+
* @returns If returns true, the iteration will immediately stop.
|
|
15175
15705
|
*/
|
|
15176
15706
|
iterate(callback: NodeIterateFunc): boolean;
|
|
15177
15707
|
/**
|
|
@@ -15180,7 +15710,7 @@ declare class SceneNode extends SceneNode_base implements IDisposable {
|
|
|
15180
15710
|
* Child nodes can be safely removed during this iteration.
|
|
15181
15711
|
*
|
|
15182
15712
|
* @param callback - Called for each node; if returns true, iteration stops.
|
|
15183
|
-
* @returns true
|
|
15713
|
+
* @returns If returns true, the iteration will immediately stop.
|
|
15184
15714
|
*/
|
|
15185
15715
|
iterateBottomToTop(callback: NodeIterateFunc): boolean;
|
|
15186
15716
|
/** Type guard: true if this node is a graph node. */
|
|
@@ -15570,6 +16100,15 @@ declare class ScriptRegistry {
|
|
|
15570
16100
|
*/
|
|
15571
16101
|
get scriptsRoot(): string;
|
|
15572
16102
|
set scriptsRoot(path: string);
|
|
16103
|
+
/**
|
|
16104
|
+
* Invalidates cached built module output for one logical module id, or clears the full cache.
|
|
16105
|
+
*
|
|
16106
|
+
* Pass the same logical id shape that callers use with {@link ScriptRegistry.resolveRuntimeUrl},
|
|
16107
|
+
* for example `/assets/scripts/foo.ts`, `/assets/scripts/foo.js`, or `/assets/scripts/foo`.
|
|
16108
|
+
*
|
|
16109
|
+
* @param moduleId - Optional logical module id to invalidate. Omit to clear the entire build cache.
|
|
16110
|
+
*/
|
|
16111
|
+
invalidate(moduleId?: string): void;
|
|
15573
16112
|
/**
|
|
15574
16113
|
* Fetches raw source for a logical module id by probing known extensions.
|
|
15575
16114
|
*
|
|
@@ -16142,7 +16681,7 @@ declare class Engine {
|
|
|
16142
16681
|
*/
|
|
16143
16682
|
get resourceManager(): ResourceManager;
|
|
16144
16683
|
/**
|
|
16145
|
-
* Exposes the
|
|
16684
|
+
* Exposes the active {@link ScreenAdapter}.
|
|
16146
16685
|
*/
|
|
16147
16686
|
get screen(): ScreenAdapter;
|
|
16148
16687
|
/**
|
|
@@ -16249,7 +16788,11 @@ type appEventMap = {
|
|
|
16249
16788
|
dragend: [evt: DragEvent];
|
|
16250
16789
|
drop: [evt: DragEvent];
|
|
16251
16790
|
};
|
|
16252
|
-
/**
|
|
16791
|
+
/**
|
|
16792
|
+
* Application editor/runtime mode.
|
|
16793
|
+
*
|
|
16794
|
+
* @public
|
|
16795
|
+
*/
|
|
16253
16796
|
type EditorMode = 'editor' | 'editor-preview' | 'none';
|
|
16254
16797
|
/**
|
|
16255
16798
|
* Options for Application.
|
|
@@ -16271,7 +16814,7 @@ interface AppOptions {
|
|
|
16271
16814
|
*/
|
|
16272
16815
|
enableMSAA?: boolean;
|
|
16273
16816
|
/**
|
|
16274
|
-
* Device pixel ratio used when creating the device. Defaults to `window.devicePixelRatio` or 1
|
|
16817
|
+
* Device pixel ratio used when creating the device. Defaults to `window.devicePixelRatio` or `1`.
|
|
16275
16818
|
*/
|
|
16276
16819
|
pixelRatio?: number;
|
|
16277
16820
|
}
|
|
@@ -17116,6 +17659,14 @@ declare class ResourceManager {
|
|
|
17116
17659
|
* @returns An array of `PropertyAccessor` entries, or `null` if none.
|
|
17117
17660
|
*/
|
|
17118
17661
|
getPropertiesByClass(cls: SerializableClass): PropertyAccessor[] | null;
|
|
17662
|
+
/**
|
|
17663
|
+
* Get all properties declared on a given class and its ancestors.
|
|
17664
|
+
*
|
|
17665
|
+
* @param cls - Serializable class metadata.
|
|
17666
|
+
*
|
|
17667
|
+
* @returns An array of `PropertyAccessor` entries, or `null` if none.
|
|
17668
|
+
*/
|
|
17669
|
+
getAllPropertiesByClass(cls: Nullable<SerializableClass>): PropertyAccessor[];
|
|
17119
17670
|
/**
|
|
17120
17671
|
* Get a property accessor by class and property name.
|
|
17121
17672
|
*
|
|
@@ -20831,7 +21382,7 @@ declare class PixelWorldPositionNode extends BaseGraphNode {
|
|
|
20831
21382
|
* Gets the output type for a specific output slot
|
|
20832
21383
|
*
|
|
20833
21384
|
* @param id - The output slot ID
|
|
20834
|
-
* @returns 'float' for individual component outputs (id
|
|
21385
|
+
* @returns 'float' for individual component outputs (id \> 1), 'vec3' for full position
|
|
20835
21386
|
*/
|
|
20836
21387
|
protected getType(id: number): "float" | "vec3";
|
|
20837
21388
|
}
|
|
@@ -20961,7 +21512,7 @@ declare class PixelNormalNode extends BaseGraphNode {
|
|
|
20961
21512
|
* Gets the output type for a specific output slot
|
|
20962
21513
|
*
|
|
20963
21514
|
* @param id - The output slot ID
|
|
20964
|
-
* @returns 'float' for individual component outputs (id
|
|
21515
|
+
* @returns 'float' for individual component outputs (id \> 1), 'vec3' for full normal
|
|
20965
21516
|
*/
|
|
20966
21517
|
protected getType(id: number): "float" | "vec3";
|
|
20967
21518
|
}
|
|
@@ -21732,7 +22283,7 @@ declare class CameraVectorNode extends BaseGraphNode {
|
|
|
21732
22283
|
* Gets the output type for a specific output slot
|
|
21733
22284
|
*
|
|
21734
22285
|
* @param id - The output slot ID
|
|
21735
|
-
* @returns 'float' for individual component outputs (id
|
|
22286
|
+
* @returns 'float' for individual component outputs (id \> 1), 'vec3' for full vector
|
|
21736
22287
|
*/
|
|
21737
22288
|
protected getType(id: number): "float" | "vec3";
|
|
21738
22289
|
}
|
|
@@ -22479,9 +23030,6 @@ declare class CapsuleShape extends Shape<CapsuleCreationOptions> implements Clon
|
|
|
22479
23030
|
/** Capsule total height */
|
|
22480
23031
|
get totalHeight(): number;
|
|
22481
23032
|
/**
|
|
22482
|
-
* {@inheritDoc Primitive.raycast}
|
|
22483
|
-
* @override
|
|
22484
|
-
*
|
|
22485
23033
|
* Analytically intersects a ray with a capsule aligned along the Y axis.
|
|
22486
23034
|
*
|
|
22487
23035
|
* The capsule consists of:
|
|
@@ -22553,9 +23101,6 @@ declare class CylinderShape extends Shape<CylinderCreationOptions> implements Cl
|
|
|
22553
23101
|
/** type of the shape */
|
|
22554
23102
|
get type(): "Cylinder";
|
|
22555
23103
|
/**
|
|
22556
|
-
* {@inheritDoc Primitive.raycast}
|
|
22557
|
-
* @override
|
|
22558
|
-
*
|
|
22559
23104
|
* Analytically intersects a ray with a cone frustum (or cylinder when
|
|
22560
23105
|
* topRadius === bottomRadius) including the optional top and bottom caps.
|
|
22561
23106
|
*
|
|
@@ -22625,9 +23170,6 @@ declare class PlaneShape extends Shape<PlaneCreationOptions> implements Clonable
|
|
|
22625
23170
|
/** type of the shape */
|
|
22626
23171
|
get type(): "Plane";
|
|
22627
23172
|
/**
|
|
22628
|
-
* {@inheritDoc Primitive.raycast}
|
|
22629
|
-
* @override
|
|
22630
|
-
*
|
|
22631
23173
|
* Intersects the ray with the finite XZ plane (y = 0) whose bounds are
|
|
22632
23174
|
* determined by size/anchor options.
|
|
22633
23175
|
*/
|
|
@@ -22736,9 +23278,6 @@ declare class TorusShape extends Shape<TorusCreationOptions> implements Clonable
|
|
|
22736
23278
|
/** type of the shape */
|
|
22737
23279
|
get type(): "Torus";
|
|
22738
23280
|
/**
|
|
22739
|
-
* {@inheritDoc Primitive.raycast}
|
|
22740
|
-
* @override
|
|
22741
|
-
*
|
|
22742
23281
|
* Analytically intersects a ray with a torus lying in the XZ plane.
|
|
22743
23282
|
* The torus has major radius R (outerRadius) and minor radius r (innerRadius).
|
|
22744
23283
|
*
|
|
@@ -22784,9 +23323,6 @@ declare class TetrahedronShape extends Shape<TetrahedronCreationOptions> impleme
|
|
|
22784
23323
|
clone(): this;
|
|
22785
23324
|
get type(): string;
|
|
22786
23325
|
/**
|
|
22787
|
-
* {@inheritDoc Primitive.raycast}
|
|
22788
|
-
* @override
|
|
22789
|
-
*
|
|
22790
23326
|
* Tests each triangular face of the tetrahedron with the Möller–Trumbore
|
|
22791
23327
|
* algorithm and returns the smallest non-negative t.
|
|
22792
23328
|
*/
|
|
@@ -22813,9 +23349,6 @@ declare class TetrahedronFrameShape extends Shape<TetrahedronCreationOptions> im
|
|
|
22813
23349
|
clone(): this;
|
|
22814
23350
|
get type(): "TetrahedronFrame";
|
|
22815
23351
|
/**
|
|
22816
|
-
* {@inheritDoc Primitive.raycast}
|
|
22817
|
-
* @override
|
|
22818
|
-
*
|
|
22819
23352
|
* Tests each triangular face of the tetrahedron with the Möller–Trumbore
|
|
22820
23353
|
* algorithm and returns the smallest non-negative t.
|
|
22821
23354
|
* The wireframe has the same overall geometry as the solid version.
|
|
@@ -23552,4 +24085,4 @@ declare const ATMOSPHERIC_FOG_BIT: number;
|
|
|
23552
24085
|
*/
|
|
23553
24086
|
declare const HEIGHT_FOG_BIT: number;
|
|
23554
24087
|
|
|
23555
|
-
export { AABBTree, ABufferOIT, ATMOSPHERIC_FOG_BIT, AbsNode, AbstractPostEffect, AllConditionNode, type AngleLimitConfig, AnimationClip, AnimationSet, AnimationTrack, AnyConditionNode, type AppCreationOptions, type AppOptions, Application, type ApplyResultOutput, ArcCosNode, ArcSinNode, ArcTan2Node, ArcTanNode, ArccosineHNode, ArcsineHNode, ArctangentHNode, type AssetAnimationData, type AssetAnimationTrack, type AssetFixedGeometryCacheAnimationTrack, type AssetGeometryCacheAnimationTrack, AssetHierarchyNode, AssetManager, type AssetMaterial, type AssetMaterialClearcoat, type AssetMaterialCommon, type AssetMaterialIridescence, type AssetMaterialSheen, type AssetMaterialTransmission, type AssetMeshData, type AssetPBRMaterialCommon, type AssetPBRMaterialMR, type AssetPBRMaterialSG, type AssetPCAGeometryCacheAnimationTrack, type AssetRotationTrack, type AssetScaleTrack, AssetScene, type AssetSkeletalAnimationTrack, AssetSkeleton, type AssetSubMeshData, type AssetTranslationTrack, type AssetUnlitMaterial, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, BaseGraphNode, BaseLight, BaseSprite, BaseTextureNode, type BatchDrawable, BatchGroup, BillboardMatrixNode, type BlendMode, BlinnMaterial, type BlitType, Blitter, Bloom, type BluePrintEditorState, type BluePrintUniformTexture, type BluePrintUniformValue, type BlueprintDAG, type BoneNode, BoundingBox, type BoundingVolume, type BoxCreationOptions, BoxFilterBlitter, BoxFrameShape, BoxShape, CCDSolver, type CachedBindGroup, Camera, CameraNearFarNode, type CameraOITMode, CameraPositionNode, CameraVectorNode, type CapsuleCollider, type CapsuleCreationOptions, CapsuleShape, CeilNode, ClampNode, ClipmapTerrain, ClipmapTerrainMaterial, ColliderForce, type ColliderR, type ColliderRW, type CollisionResult, ColorAdjust, CompAddNode, CompComparisonNode, CompDivNode, CompMulNode, CompSubNode, type ComparisonMode, type CompiledRenderGraph, Compositor, type CompositorContext, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantTexture2DArrayNode, ConstantTexture2DNode, ConstantTextureCubeNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, type Constraint, type ConstraintBuildOptions, ConstraintType, type ControllerConfig, CopyBlitter, CosHNode, CosNode, CrossProductNode, CubemapSHProjector, CullVisitor, type CylinderCreationOptions, CylinderShape, DDXNode, DDYNode, Degrees2RadiansNode, DepthPass, DevicePoolAllocator, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, EPSILON, type EditorMode, ElapsedTimeNode, type EmitterBehavior, type EmitterShape, Engine, EnvConstantAmbient, EnvHemisphericAmbient, type EnvLightType, EnvLightWrapper, EnvShIBL, Environment, EnvironmentLighting, EqualNode, Exp2Node, ExpNode, type ExtractMixinReturnType, type ExtractMixinType, FABRIKSolver, FBMWaveGenerator, FFTWaveGenerator, FPSCameraController, type FPSCameraControllerOptions, FWidthNode, FXAA, FaceForwardNode, type FixedGeometryCacheFrame, type FixedGeometryCacheState, FixedGeometryCacheTrack, type FlatPlane, FloorNode, FmaNode, type FogType, type ForwardPlusOptions, FractNode, FunctionCallNode, FunctionInputNode, FunctionOutputNode, GPUClothSystem, type GPUClothSystemOptions, type GPUClothWrapBindingData, type GPUClothWrapBindingTarget, GaussianBlurBlitter, GenericMathNode, type GeometryCacheFrame, type GeometryCacheMeshBinding, type GeometryCacheState, GerstnerWaveGenerator, type GrabberR, type GrabberRW, GraphNode, type GraphNodeInput, type GraphNodeOutput, type GraphStructure, type GrassInstanceInfo, GrassLayer, GrassMaterial, GrassRenderer, Grayscale, HEIGHT_FOG_BIT, Hash1Node, Hash2Node, Hash3Node, HistoryResourceManager, type Host, HumanoidBodyRig, HumanoidHandRig, type HumanoidJointMapping, type IAttachedScript, type IBaseEvent, type IControllerKeyboardEvent, type IControllerKeydownEvent, type IControllerKeypressEvent, type IControllerKeyupEvent, type IControllerMouseEvent, type IControllerPointerCancelEvent, type IControllerPointerDownEvent, type IControllerPointerMoveEvent, type IControllerPointerUpEvent, type IControllerWheelEvent, type IGraphNode, IKAngleConstraint, IKChain, IKConstraint, type IKJoint, IKModifier, IKSolver, type IMixinAlbedoColor, type IMixinBlinnPhong, type IMixinFoliage, type IMixinLambert, type IMixinLight, type IMixinPBRBluePrint, type IMixinPBRCommon, type IMixinPBRMetallicRoughness, type IMixinPBRSpecularGlossiness, type IMixinVertexColor, type IModKey, type IRUniformTexture, type IRUniformValue, type IRenderHook, type IRenderable, type InputEventHandler, InputManager, InstanceBindGroupAllocator, type InstanceData, type InstanceUniformType, type InterChainConstraint, InvProjMatrixNode, InvSqrtNode, InvViewProjMatrixNode, type JointChainConfig, type JointDynamicSystemConfig, type JointDynamicsColliderHandle, type JointDynamicsFlatPlaneHandle, type JointDynamicsGrabberHandle, JointDynamicsModifier, JointDynamicsSystem, JointDynamicsSystemController, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, LambertMaterial, LengthNode, type LineCollisionResult, Log2Node, type LogMode, LogNode, LogicallyAndNode, LogicallyOrNode, MAX_CLUSTERED_LIGHTS, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_TERRAIN_MIPMAP_LEVELS, MORPH_ATTRIBUTE_VECTOR_COUNT, MORPH_TARGET_COLOR, MORPH_TARGET_NORMAL, MORPH_TARGET_POSITION, MORPH_TARGET_TANGENT, MORPH_TARGET_TEX0, MORPH_TARGET_TEX1, MORPH_TARGET_TEX2, MORPH_TARGET_TEX3, MORPH_WEIGHTS_VECTOR_COUNT, MakeVectorNode, Material, MaterialBlueprintIR, type MaterialBlueprintIRBehaviors, type MaterialTextureInfo, MaterialVaryingFlags, MaxNode, Mesh, MeshMaterial, type MeshUpdateCallback, type Metadata, MinNode, MixNode, ModNode, type ModelFetchOptions, type ModelInfo, type MorphData, type MorphInfo, type MorphState, MorphTargetTrack, MultiChainSpringSystem, type MultiChainSpringSystemOptions, NamedObject, type NearestPointsResult, type NodeConnection, NodeEulerRotationTrack, type NodeIterateFunc, NodeRotationTrack, NodeScaleTrack, NodeTranslationTrack, NormalizeNode, NotEqualNode, type OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, type OrbitCameraControllerOptions, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, PannerNode, ParticleMaterial, ParticleSystem, PerlinNoise2DNode, PerspectiveCamera, type PhysicsCurves, type PickResult, type PickTarget, PixelNormalNode, PixelWorldPositionNode, type PlaneCollider, type PlaneCreationOptions, PlaneShape, type PlayAnimationOptions, type PointInit, PointLight, type PointR, type PointRW, type PointTransform, PostEffectLayer, PowNode, Primitive, ProjectionMatrixNode, type PropEdit, type PropertyAccessor, type PropertyAccessorOptions, type PropertySceneNodeOptions, type PropertyToType, PropertyTrack, type PropertyType, type PropertyValue, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, type RGExecuteContext, type RGExecuteFn, RGHandle, type RGPassBuilder, type RGResolvedSize, type RGResourceLifetime, type RGSizeMode, type RGTextureAllocator, type RGTextureDesc, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, RenderContext, RenderGraph, RenderGraphExecutor, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, RenderPass, RenderQueue, type RenderQueueItem, type RenderQueueRef, RenderTarget, type ResolutionTransform, ResolveVertexNormalNode, ResolveVertexPositionNode, ResolveVertexTangentNode, ResourceManager, RotateAboutAxisNode, RuntimeScript, type RuntimeScriptArrayDeclaration, type RuntimeScriptArrayElementDeclaration, type RuntimeScriptConfig, type RuntimeScriptObjectDeclaration, type RuntimeScriptObjectFieldDeclaration, type RuntimeScriptPropertyDeclaration, type RuntimeScriptPropertyInfo, type RuntimeScriptPropertyOptions, type RuntimeScriptPropertyType, type RuntimeScriptValueDeclaration, type RuntimeScriptValueType, SAO, type SamplerType, SaturateNode, Scene, SceneNode, type SceneNodeVisible, ScreenAdapter, type ScreenConfig, ScreenRenderTarget, type ScreenScaleMode, ScriptAttachment, type ScriptAttachmentConfig, ScriptRegistry, ScriptingSystem, type ScriptingSystemOptions, SelectionNode, type SerializableClass, ShaderHelper, ShadowMapPass, ShadowMapper, type ShadowMode, type ShadowQualityPreset, Shape, type ShapeCreationOptions, type ShapeOptionType, type ShapeType, SharedModel, SignNode, SimplexNoise2DNode, type SimulationParams, SinHNode, SinNode, Skeleton, SkeletonModifier, type SkinnedBoundingBox, SkyEnvTextureNode, SkyRenderer, type SkyType, SmoothStepNode, type SphereCollider, type SphereCreationOptions, SphereShape, SpotLight, SpringChain, type SpringCollider, type SpringConstraint, SpringModifier, type SpringParticle, SpringSystem, type SpringSystemOptions, Sprite, SpriteBlockNode, SpriteBlueprintMaterial, SpriteMaterial, SqrtNode, StandardSpriteMaterial, StepNode, type StopAnimationOptions, type SurfaceCheckResult, SwizzleNode, TanHNode, TanNode, type TerrainDebugMode, type TetrahedronCreationOptions, TetrahedronFrameShape, TetrahedronShape, type TextureFetchOptions, type TextureMixinInstanceTypes, type TextureMixinTypes, type TextureProp, type TexturePropUniforms, TextureSampleGrad, TextureSampleNode, type ToMixedTextureType, Tonemap, type TorusCreationOptions, TorusShape, type TransformAccess, TransformNode, type TwistConstraint, TwoBoneIKSolver, UnlitMaterial, VertexBinormalNode, VertexBlockNode, VertexColorNode, VertexNormalNode, VertexPositionNode, VertexTangentNode, VertexUVNode, ViewMatrixNode, ViewProjMatrixNode, type Visitor, Water, type WaveGenerator, WeightedBlendedOIT, applyAngleLimits, applyMaterialMixins, applyResult, applyRuntimeScriptConfig, buildConstraints, buildForwardPlusGraph, buildSurfaceFaces, checkSurfaceCollision, collisionDetection, collisionDetectionCapsule, collisionDetectionSphere, computeMaxDepth, computeNearestPoints, createCapsuleCollider, createGPUClothWrapBindingData, createGeometryCacheState, createPlaneCollider, createSphereCollider, createSpringConstraint, createSpringParticle, createTransformAccess, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, defineProps, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, ensureGeometryCacheMeshBinding, executeForwardPlusGraph, fetchSampler, gammaToLinear, getApp, getDevice, getEngine, getInput, getRuntimeScriptProperties, gradient, hash11, hash12, hash13, hash21, hash22, hash23, hash31, hash32, hash33, interleavedGradientNoise, isGPUClothSupported, linearToGamma, mixGeometryCacheBoundingBox, mixinAlbedoColor, mixinBlinnPhong, mixinFoliage, mixinLambert, mixinLight, mixinPBRBluePrint, mixinPBRCommon, mixinPBRMetallicRoughness, mixinPBRSpecularGlossness, mixinTextureProps, mixinVertexColor, noise3D, normalizeRuntimeScriptConfig, normalizeScriptAttachmentConfig, normalizeScriptAttachments, panoramaToCubemap, perlinNoise2D, perlinNoise3D, prefilterCubemap, pushInCollisionDetection, pushInFromCapsule, pushInFromCollider, pushInFromSphere, pushoutFromCapsule, pushoutFromCollider, pushoutFromSphere, resolveCapsuleCollision, resolvePlaneCollision, resolveSphereCollision, restoreGeometryCacheMeshBinding, scriptProp, simulate, smoothNoise3D, sortRootPointsByProximity, temporalResolve, tryGetApp, updateColliderFromNode, valueNoise, whiteNoise, worleyFBM, worleyNoise };
|
|
24088
|
+
export { AABBTree, ABufferOIT, ATMOSPHERIC_FOG_BIT, AbsNode, AbstractPostEffect, AllConditionNode, type AngleLimitConfig, AnimationClip, AnimationSet, AnimationTrack, AnyConditionNode, type AppCreationOptions, type AppOptions, Application, type ApplyResultOutput, ArcCosNode, ArcSinNode, ArcTan2Node, ArcTanNode, ArccosineHNode, ArcsineHNode, ArctangentHNode, type AssetAnimationData, type AssetAnimationTrack, type AssetFixedGeometryCacheAnimationTrack, type AssetGeometryCacheAnimationTrack, AssetHierarchyNode, AssetManager, type AssetMaterial, type AssetMaterialClearcoat, type AssetMaterialCommon, type AssetMaterialIridescence, type AssetMaterialSheen, type AssetMaterialTransmission, type AssetMeshData, type AssetPBRMaterialCommon, type AssetPBRMaterialMR, type AssetPBRMaterialSG, type AssetPCAGeometryCacheAnimationTrack, type AssetRotationTrack, type AssetScaleTrack, AssetScene, type AssetSkeletalAnimationTrack, AssetSkeleton, type AssetSubMeshData, type AssetTranslationTrack, type AssetUnlitMaterial, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, BaseGraphNode, BaseLight, BaseSprite, BaseTextureNode, type BatchDrawable, BatchGroup, BillboardMatrixNode, type BlendMode, BlinnMaterial, type BlitType, Blitter, Bloom, type BluePrintEditorState, type BluePrintUniformTexture, type BluePrintUniformValue, type BlueprintDAG, type BoneNode, BoundingBox, type BoundingVolume, type BoxCreationOptions, BoxFilterBlitter, BoxFrameShape, BoxShape, CCDSolver, type CachedBindGroup, Camera, CameraNearFarNode, type CameraOITMode, CameraPositionNode, CameraVectorNode, type CapsuleCollider, type CapsuleCreationOptions, CapsuleShape, CeilNode, ClampNode, ClipmapTerrain, ClipmapTerrainMaterial, ColliderForce, type ColliderR, type ColliderRW, type CollisionResult, ColorAdjust, CompAddNode, CompComparisonNode, CompDivNode, CompMulNode, CompSubNode, type ComparisonMode, type CompiledRenderGraph, Compositor, type CompositorContext, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantTexture2DArrayNode, ConstantTexture2DNode, ConstantTextureCubeNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, type Constraint, type ConstraintBuildOptions, ConstraintType, type ControllerConfig, CopyBlitter, CosHNode, CosNode, CrossProductNode, CubemapSHProjector, CullVisitor, type CylinderCreationOptions, CylinderShape, DDXNode, DDYNode, Degrees2RadiansNode, DepthPass, DevicePoolAllocator, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, EPSILON, type EditorMode, ElapsedTimeNode, type EmitterBehavior, type EmitterShape, Engine, EnvConstantAmbient, EnvHemisphericAmbient, type EnvLightType, EnvLightWrapper, EnvShIBL, Environment, EnvironmentLighting, EqualNode, Exp2Node, ExpNode, type ExtractMixinReturnType, type ExtractMixinType, FABRIKSolver, FBMWaveGenerator, FFTWaveGenerator, FPSCameraController, type FPSCameraControllerOptions, FWidthNode, FXAA, FaceForwardNode, type FixedGeometryCacheFrame, type FixedGeometryCacheState, FixedGeometryCacheTrack, type FlatPlane, FloorNode, FmaNode, type FogType, type ForwardPlusOptions, FractNode, FunctionCallNode, FunctionInputNode, FunctionOutputNode, GPUClothSystem, type GPUClothSystemOptions, type GPUClothWrapBindingData, type GPUClothWrapBindingTarget, GaussianBlurBlitter, GenericMathNode, type GeometryCacheFrame, type GeometryCacheMeshBinding, type GeometryCacheState, GerstnerWaveGenerator, type GrabberR, type GrabberRW, GraphNode, type GraphNodeInput, type GraphNodeOutput, type GraphStructure, type GrassInstanceInfo, GrassLayer, GrassMaterial, GrassRenderer, Grayscale, HEIGHT_FOG_BIT, Hash1Node, Hash2Node, Hash3Node, HistoryResourceManager, type Host, HumanoidBodyRig, HumanoidHandRig, type HumanoidJointMapping, type IAttachedScript, type IBaseEvent, type IControllerKeyboardEvent, type IControllerKeydownEvent, type IControllerKeypressEvent, type IControllerKeyupEvent, type IControllerMouseEvent, type IControllerPointerCancelEvent, type IControllerPointerDownEvent, type IControllerPointerMoveEvent, type IControllerPointerUpEvent, type IControllerWheelEvent, type IGraphNode, IKAngleConstraint, IKChain, IKConstraint, type IKJoint, IKModifier, IKSolver, type IMixinAlbedoColor, type IMixinBlinnPhong, type IMixinFoliage, type IMixinLambert, type IMixinLight, type IMixinPBRBluePrint, type IMixinPBRCommon, type IMixinPBRMetallicRoughness, type IMixinPBRSpecularGlossiness, type IMixinVertexColor, type IModKey, type IRUniformTexture, type IRUniformValue, type IRenderHook, type IRenderable, type InputEventHandler, InputManager, InstanceBindGroupAllocator, type InstanceData, type InstanceUniformType, type InterChainConstraint, InvProjMatrixNode, InvSqrtNode, InvViewProjMatrixNode, type JointChainConfig, type JointDynamicSystemConfig, type JointDynamicsColliderHandle, type JointDynamicsFlatPlaneHandle, type JointDynamicsGrabberHandle, JointDynamicsModifier, JointDynamicsSystem, JointDynamicsSystemController, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, LambertMaterial, LengthNode, type LineCollisionResult, Log2Node, type LogMode, LogNode, LogicallyAndNode, LogicallyOrNode, MAX_CLUSTERED_LIGHTS, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_TERRAIN_MIPMAP_LEVELS, MORPH_ATTRIBUTE_VECTOR_COUNT, MORPH_TARGET_COLOR, MORPH_TARGET_NORMAL, MORPH_TARGET_POSITION, MORPH_TARGET_TANGENT, MORPH_TARGET_TEX0, MORPH_TARGET_TEX1, MORPH_TARGET_TEX2, MORPH_TARGET_TEX3, MORPH_WEIGHTS_VECTOR_COUNT, MakeVectorNode, Material, MaterialBlueprintIR, type MaterialBlueprintIRBehaviors, type MaterialTextureInfo, MaterialVaryingFlags, MaxNode, Mesh, MeshMaterial, type MeshUpdateCallback, type Metadata, MinNode, MixNode, ModNode, type ModelFetchOptions, type ModelInfo, type MorphData, type MorphInfo, type MorphState, MorphTargetTrack, MultiChainSpringSystem, type MultiChainSpringSystemOptions, NamedObject, type NearestPointsResult, type NodeConnection, NodeEulerRotationTrack, type NodeIterateFunc, NodeRotationTrack, NodeScaleTrack, NodeTranslationTrack, NormalizeNode, NotEqualNode, type OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, type OrbitCameraControllerOptions, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, PannerNode, ParticleMaterial, ParticleSystem, PerlinNoise2DNode, PerspectiveCamera, type PhysicsCurves, type PickResult, type PickTarget, PixelNormalNode, PixelWorldPositionNode, type PlaneCollider, type PlaneCreationOptions, PlaneShape, type PlayAnimationOptions, type PointInit, PointLight, type PointR, type PointRW, type PointTransform, PostEffectLayer, PowNode, Primitive, ProjectionMatrixNode, type PropEdit, type PropertyAccessor, type PropertyAccessorOptions, type PropertySceneNodeOptions, type PropertyToType, PropertyTrack, type PropertyType, type PropertyValue, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, type RGExecuteContext, type RGExecuteFn, type RGFramebufferDesc, RGHandle, RGHistoryResources, type RGPassBuilder, type RGResolvedSize, type RGResourceLifetime, type RGSizeMode, RGSubpass, type RGTextureAllocator, type RGTextureDesc, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, RenderContext, RenderGraph, RenderGraphExecutor, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, RenderPass, RenderQueue, type RenderQueueItem, type RenderQueueRef, RenderTarget, type ResolutionTransform, ResolveVertexNormalNode, ResolveVertexPositionNode, ResolveVertexTangentNode, ResourceManager, RotateAboutAxisNode, RuntimeScript, type RuntimeScriptArrayDeclaration, type RuntimeScriptArrayElementDeclaration, type RuntimeScriptConfig, type RuntimeScriptObjectDeclaration, type RuntimeScriptObjectFieldDeclaration, type RuntimeScriptPropertyDeclaration, type RuntimeScriptPropertyInfo, type RuntimeScriptPropertyOptions, type RuntimeScriptPropertyType, type RuntimeScriptValueDeclaration, type RuntimeScriptValueType, SAO, type SamplerType, SaturateNode, Scene, SceneNode, type SceneNodeVisible, ScreenAdapter, type ScreenConfig, ScreenRenderTarget, type ScreenScaleMode, ScriptAttachment, type ScriptAttachmentConfig, ScriptRegistry, ScriptingSystem, type ScriptingSystemOptions, SelectionNode, type SerializableClass, ShaderHelper, ShadowMapPass, ShadowMapper, type ShadowMode, type ShadowQualityPreset, Shape, type ShapeCreationOptions, type ShapeOptionType, type ShapeType, SharedModel, SignNode, SimplexNoise2DNode, type SimulationParams, SinHNode, SinNode, Skeleton, SkeletonModifier, type SkinnedBoundingBox, SkyEnvTextureNode, SkyRenderer, type SkyType, SmoothStepNode, type SphereCollider, type SphereCreationOptions, SphereShape, SpotLight, SpringChain, type SpringCollider, type SpringConstraint, SpringModifier, type SpringParticle, SpringSystem, type SpringSystemOptions, Sprite, SpriteBlockNode, SpriteBlueprintMaterial, SpriteMaterial, SqrtNode, StandardSpriteMaterial, StepNode, type StopAnimationOptions, type SurfaceCheckResult, SwizzleNode, TanHNode, TanNode, type TerrainDebugMode, type TetrahedronCreationOptions, TetrahedronFrameShape, TetrahedronShape, type TextureFetchOptions, type TextureMixinInstanceTypes, type TextureMixinTypes, type TextureProp, type TexturePropUniforms, TextureSampleGrad, TextureSampleNode, type ToMixedTextureType, Tonemap, type TorusCreationOptions, TorusShape, type TransformAccess, TransformNode, type TwistConstraint, TwoBoneIKSolver, UnlitMaterial, VertexBinormalNode, VertexBlockNode, VertexColorNode, VertexNormalNode, VertexPositionNode, VertexTangentNode, VertexUVNode, ViewMatrixNode, ViewProjMatrixNode, type Visitor, Water, type WaveGenerator, WeightedBlendedOIT, applyAngleLimits, applyMaterialMixins, applyResult, applyRuntimeScriptConfig, buildConstraints, buildForwardPlusGraph, buildSurfaceFaces, checkSurfaceCollision, collisionDetection, collisionDetectionCapsule, collisionDetectionSphere, computeMaxDepth, computeNearestPoints, createCapsuleCollider, createGPUClothWrapBindingData, createGeometryCacheState, createPlaneCollider, createSphereCollider, createSpringConstraint, createSpringParticle, createTransformAccess, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, defineProps, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, ensureGeometryCacheMeshBinding, executeForwardPlusGraph, fetchSampler, gammaToLinear, getApp, getDevice, getEngine, getInput, getRuntimeScriptProperties, gradient, hash11, hash12, hash13, hash21, hash22, hash23, hash31, hash32, hash33, interleavedGradientNoise, isGPUClothSupported, linearToGamma, mixGeometryCacheBoundingBox, mixinAlbedoColor, mixinBlinnPhong, mixinFoliage, mixinLambert, mixinLight, mixinPBRBluePrint, mixinPBRCommon, mixinPBRMetallicRoughness, mixinPBRSpecularGlossness, mixinTextureProps, mixinVertexColor, noise3D, normalizeRuntimeScriptConfig, normalizeScriptAttachmentConfig, normalizeScriptAttachments, panoramaToCubemap, perlinNoise2D, perlinNoise3D, prefilterCubemap, pushInCollisionDetection, pushInFromCapsule, pushInFromCollider, pushInFromSphere, pushoutFromCapsule, pushoutFromCollider, pushoutFromSphere, resolveCapsuleCollision, resolvePlaneCollision, resolveSphereCollision, restoreGeometryCacheMeshBinding, scriptProp, simulate, smoothNoise3D, sortRootPointsByProximity, temporalResolve, tryGetApp, updateColliderFromNode, valueNoise, whiteNoise, worleyFBM, worleyNoise };
|