@zephyr3d/scene 0.9.23 → 0.9.25

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/index.d.ts CHANGED
@@ -18464,37 +18464,38 @@ declare class Water extends Water_base implements Drawable {
18464
18464
  getSurfacePoint(points: Vector3[], outPos?: Vector3[], outNorm?: Vector3[]): Promise<void>;
18465
18465
  }
18466
18466
 
18467
- /**
18468
- * Grass blade instance information
18469
- * @public
18470
- */
18471
- type GrassInstanceInfo = {
18472
- /** x position of the blade */
18473
- x: number;
18474
- /** y position of the blade */
18475
- y: number;
18476
- /** Rotation angle of the blade */
18477
- angle: number;
18478
- };
18479
18467
  /**
18480
18468
  * Grass layer class
18469
+ *
18481
18470
  * @public
18482
18471
  */
18483
18472
  declare class GrassLayer extends Disposable {
18484
18473
  private static readonly _indexBuffer;
18474
+ private static readonly _cullAABB;
18475
+ private static readonly _visibleTiles;
18476
+ private static readonly _instanceData;
18485
18477
  private readonly _material;
18486
- private readonly _quadtree;
18478
+ private readonly _seed;
18487
18479
  private _bladeWidth;
18488
18480
  private _bladeHeight;
18489
18481
  private readonly _baseVertexBuffer;
18482
+ private _densityWidth;
18483
+ private _densityHeight;
18484
+ private _cellsPerTexel;
18485
+ private _densityMap;
18486
+ private readonly _tiles;
18487
+ private _tilesX;
18488
+ private _tilesZ;
18489
+ private _numBlades;
18490
18490
  /**
18491
18491
  * Creates an instance of GrassLayer
18492
18492
  * @param terrain - Clipmap terrain object
18493
+ * @param seed - Seed for deterministic blade placement, usually the layer index
18493
18494
  * @param bladeWidth - Grass blade width
18494
18495
  * @param bladeHeight - Grass blade height
18495
18496
  * @param albedoMap - Albedo texture for the blade
18496
18497
  */
18497
- constructor(terrain: ClipmapTerrain, bladeWidth: number, bladeHeight: number, albedoMap?: Texture2D);
18498
+ constructor(terrain: ClipmapTerrain, seed: number, bladeWidth: number, bladeHeight: number, albedoMap?: Texture2D);
18498
18499
  /**
18499
18500
  * Sets the albedo texture of grass blades in this layer
18500
18501
  * @param albedoMap - Albedo texture to set
@@ -18504,21 +18505,46 @@ declare class GrassLayer extends Disposable {
18504
18505
  * Gets the albedo texture of grass blades in this layer
18505
18506
  * @returns - Albedo texture of grass blades in this layer
18506
18507
  */
18507
- getAlbedoMap(): Nullable<Texture2D<unknown>>;
18508
+ getAlbedoMap(): _zephyr3d_base.Nullable<Texture2D<unknown>>;
18509
+ /** How many grass blades are currently generated in this layer */
18510
+ get numBlades(): number;
18511
+ /**
18512
+ * Density map of this layer, one byte per texel (0 = no grass, 255 = full density).
18513
+ * Texel (x, z) covers the normalized terrain region [x/w..(x+1)/w, z/h..(z+1)/h].
18514
+ * After modifying the data, call {@link GrassLayer.updateDensityRegion} to
18515
+ * regenerate the affected blade instances.
18516
+ */
18517
+ get densityMap(): Uint8Array<ArrayBufferLike>;
18518
+ /** Width of the density map in texels */
18519
+ get densityMapWidth(): number;
18520
+ /** Height of the density map in texels */
18521
+ get densityMapHeight(): number;
18522
+ /**
18523
+ * Number of placement cells per density map texel along each axis.
18524
+ * The maximum blade count per texel is the square of this value.
18525
+ */
18526
+ get cellsPerTexel(): number;
18527
+ set cellsPerTexel(val: number);
18508
18528
  /**
18509
- * Add grass blades to this layer in a region
18510
- * @param instances - Grass blade instances to add
18529
+ * Replaces the density map and regenerates all blade instances
18530
+ * @param width - Density map width in texels
18531
+ * @param height - Density map height in texels
18532
+ * @param cellsPerTexel - Placement cells per texel along each axis
18533
+ * @param data - Density data, one byte per texel
18511
18534
  */
18512
- addInstances(instances: GrassInstanceInfo[]): number;
18535
+ setDensityData(width: number, height: number, cellsPerTexel: number, data: Uint8Array): void;
18513
18536
  /**
18514
- * Remove grass blades to this layer in a region
18515
- * @param minX - Minimum x position of the region
18516
- * @param minZ - Minimum z position of the region
18517
- * @param maxX - Maximum x position of the region
18518
- * @param maxZ - Maximum z position of the region
18519
- * @param numInstances - How many grass blades to add
18537
+ * Regenerates blade instances for all tiles overlapping a density map region
18538
+ * @param minTexelX - Minimum x texel of the region (inclusive)
18539
+ * @param minTexelZ - Minimum z texel of the region (inclusive)
18540
+ * @param maxTexelX - Maximum x texel of the region (exclusive)
18541
+ * @param maxTexelZ - Maximum z texel of the region (exclusive)
18520
18542
  */
18521
- removeInstances(minX: number, minZ: number, maxX: number, maxZ: number, numInstances: number): void;
18543
+ updateDensityRegion(minTexelX: number, minTexelZ: number, maxTexelX: number, maxTexelZ: number): void;
18544
+ /**
18545
+ * Regenerates blade instances for the entire layer
18546
+ */
18547
+ rebuild(): void;
18522
18548
  /** Grass blade width in this layer */
18523
18549
  get bladeWidth(): number;
18524
18550
  set bladeWidth(val: number);
@@ -18538,7 +18564,6 @@ declare class GrassLayer extends Disposable {
18538
18564
  */
18539
18565
  declare class GrassRenderer extends Disposable {
18540
18566
  private readonly _terrain;
18541
- private _numGrassBlades;
18542
18567
  private _layers;
18543
18568
  /**
18544
18569
  * Creates an instance of GrassRenderer
@@ -18594,22 +18619,6 @@ declare class GrassRenderer extends Disposable {
18594
18619
  * @param height - Height to set
18595
18620
  */
18596
18621
  setBladeSize(layer: number, width: number, height: number): void;
18597
- /**
18598
- * Add grass instances to the grass layer at given index
18599
- * @param layer - Index of the grass layer
18600
- * @param instances - Grass blade instances to add
18601
- */
18602
- addInstances(layer: number, instances: GrassInstanceInfo[]): void;
18603
- /**
18604
- * Remove grass instances from the grass layer at given index within a region
18605
- * @param layer - Index of the grass layer
18606
- * @param minX - Minimum x of the region
18607
- * @param minZ - Minimum z of the region
18608
- * @param maxX - Maximum x of the region
18609
- * @param maxZ - Maximum z of the region
18610
- * @param num - How many grass blades to remove
18611
- */
18612
- removeInstances(layer: number, minX: number, minZ: number, maxX: number, maxZ: number, num: number): void;
18613
18622
  protected onDispose(): void;
18614
18623
  }
18615
18624
 
@@ -28814,18 +28823,12 @@ declare const LIGHT_TYPE_SPOT = 3;
28814
28823
  * @public
28815
28824
  */
28816
28825
  declare const LIGHT_TYPE_RECT = 4;
28817
- /**
28818
- * Max light size for clustered lighting
28819
- * @public
28820
- */
28821
- declare const MAX_CLUSTERED_LIGHTS = 255;
28822
28826
  /**
28823
28827
  * Max number of shadow-casting lights backed by the screen-space shadow mask.
28824
28828
  *
28825
28829
  * Each mask layer packs 4 lights (one per RGBA8 channel), so this maps to
28826
28830
  * `MAX_SHADOW_MASK_LIGHTS / 4` texture array layers. Shadow-casting lights are
28827
- * placed at the head of the clustered light buffer (indices `1..N`), so this
28828
- * value must not exceed {@link MAX_CLUSTERED_LIGHTS}. Shadow lights beyond this
28831
+ * placed at the head of the clustered light buffer. Shadow lights beyond this
28829
28832
  * cap fall back to being lit without a mask-backed shadow.
28830
28833
  * @public
28831
28834
  */
@@ -28895,4 +28898,4 @@ declare const ATMOSPHERIC_FOG_BIT: number;
28895
28898
  */
28896
28899
  declare const HEIGHT_FOG_BIT: number;
28897
28900
 
28898
- export { AABBTree, ABufferOIT, ATMOSPHERIC_FOG_BIT, AbsNode, AbstractPostEffect, AllConditionNode, type AngleLimitConfig, AnimationClip, AnimationController, type AnimationControllerEventMap, type AnimationControllerSetStateOptions, type AnimationControllerStateDefinition, type AnimationFrameEvent, type AnimationMarker, type AnimationMarkerEvent, AnimationPlayback, type AnimationPlaybackEvent, type AnimationPlaybackEventMap, type AnimationPlaybackState, type AnimationPlaybackStopEvent, type AnimationPlaybackSyncMode, type AnimationPlaybackSyncOptions, AnimationSet, type AnimationSetEventMap, type AnimationStopReason, type AnimationTimeRef, AnimationTimeline, type AnimationTimelineActiveDisposition, type AnimationTimelineDefinition, type AnimationTimelineEventPolicy, type AnimationTimelineEventResponse, type AnimationTimelineEventResult, type AnimationTimelineEventTarget, AnimationTimelineRunner, type AnimationTimelineRunnerEventMap, type AnimationTimelineRunnerState, type AnimationTimelineStateReturnTarget, type AnimationTimelineStep, AnimationTrack, AnyConditionNode, type AppCreationOptions, type AppOptions, Application, type ApplyResultOutput, ArcCosNode, ArcSinNode, ArcTan2Node, ArcTanNode, ArccosineHNode, ArcsineHNode, ArctangentHNode, type AssetAnimationData, type AssetAnimationTrack, type AssetFixedGeometryCacheAnimationTrack, type AssetGeometryCacheAnimationTrack, type AssetGeometryCacheFrame, AssetHierarchyNode, type AssetImageInfo, type AssetJointDynamicsChain, type AssetJointDynamicsCollider, type AssetJointDynamicsFlatPlane, type AssetJointDynamicsSpringBone, type AssetMToonMaterial, AssetManager, type AssetMaterial, type AssetMaterialClearcoat, type AssetMaterialCommon, type AssetMaterialIridescence, type AssetMaterialSheen, type AssetMaterialTransmission, type AssetMeshData, type AssetMorphTargetBinding, type AssetMorphTargetGroup, type AssetPBRMaterialCommon, type AssetPBRMaterialMR, type AssetPBRMaterialSG, type AssetPCAGeometryCacheAnimationTrack, type AssetPrimitiveInfo, type AssetRotationTrack, type AssetSamplerInfo, type AssetScaleTrack, AssetScene, type AssetSkeletalAnimationTrack, AssetSkeleton, type AssetSpringBone, type AssetSpringBoneCollider, type AssetSpringBoneColliderGroup, type AssetSpringBoneColliderShape, type AssetSpringBoneJoint, type AssetSubMeshData, type AssetTextureInfo, type AssetTranslationTrack, type AssetUnlitMaterial, type AssetVertexBufferInfo, type AvatarBindMode, type AvatarBodyRegionTarget, type AvatarBodyRegions, type AvatarEquipOptions, type AvatarFitMode, type AvatarJointMap, AvatarOutfitInstance, type AvatarOutfitSource, type AvatarOutfitValidation, type AvatarSlotId, type AvatarSlotOptions, AvatarWardrobe, type AvatarWardrobeOptions, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, type BaseFetchOptions, 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, type CameraHistoryData, CameraNearFarNode, type CameraOITMode, CameraPositionNode, type CameraProjectionMode, type CameraSensorFit, CameraVectorNode, type CapsuleCollider, type CapsuleCreationOptions, CapsuleShape, CeilNode, ClampNode, ClipmapTerrain, ClipmapTerrainMaterial, ColliderForce, type ColliderR, type ColliderRW, type CollisionResult, ColorAdjust, type ColoredEdge, type ColoredLineEdge, type ColoredQuadraticEdge, CompAddNode, CompComparisonNode, CompDivNode, CompMulNode, CompSubNode, type ComparisonMode, type CompiledRenderGraph, Compositor, type CompositorBuildLayerOptions, type CompositorBuildLayerResult, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantTexture2DArrayNode, ConstantTexture2DNode, ConstantTextureCubeNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, type Constraint, type ConstraintBuildOptions, ConstraintType, type ControllerConfig, type ControllerConfigUpdate, CopyBlitter, type CopyHumanoidAnimationOptions, CosHNode, CosNode, CrossProductNode, CubemapSHProjector, CullVisitor, type CylinderCreationOptions, CylinderShape, DDXNode, DDYNode, Degrees2RadiansNode, DepthPass, DevicePoolAllocator, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, DualDepthPeelingOIT, EPSILON, type EdgeColor, 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, FontAsset, type FontAssetFetchOptions, type FontAssetMSDFAtlasSettings, type FontMetrics, type ForwardPlusModuleContext, ForwardPlusModules, type ForwardPlusOptions, FractNode, type FrameGraphContext, type FrameResourceKey, type FrameResourceRequirements, FrameResources, FunctionCallNode, FunctionInputNode, FunctionOutputNode, GPUClothSystem, type GPUClothSystemOptions, type GPUClothWrapBindingData, type GPUClothWrapBindingTarget, GaussianBlurBlitter, GenericMathNode, type GeometryCacheFrame, type GeometryCacheMeshBinding, type GeometryCacheState, GerstnerWaveGenerator, type GlyphContour, type GlyphData, type GlyphPoint, 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 HumanoidRetargetAxisLocks, type HumanoidRootMotionMode, type HumanoidRootMotionScaleMode, type HumanoidSkeletalAnimationMaskOptions, type HumanoidSkeletalAnimationMaskPreset, 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, InstanceIndexNode, type InstanceUniformType, type InterChainConstraint, InvProjMatrixNode, InvSqrtNode, InvViewProjMatrixNode, type JointChainConfig, type JointDynamicSystemConfig, type JointDynamicsColliderHandle, type JointDynamicsColliderSnapshot, type JointDynamicsFlatPlaneHandle, type JointDynamicsFlatPlaneSnapshot, type JointDynamicsGrabberHandle, type JointDynamicsGrabberSnapshot, JointDynamicsModifier, JointDynamicsSystem, JointDynamicsSystemController, type JointNameMatcher, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, LambertMaterial, LengthNode, type LightingMode, type LineCollisionResult, Log2Node, type LogMode, LogNode, LogicallyAndNode, LogicallyOrNode, MAX_CLUSTERED_LIGHTS, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_SHADOW_MASK_LIGHTS, 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, type MSDFBitmap, type MSDFOptions, type MSDFShape, MSDFText, MSDFTextAtlasManager, MSDFTextSprite, MToonMaterial, type MToonOutlineWidthMode, MakeVectorNode, Material, MaterialBlueprintIR, type MaterialBlueprintIRBehaviors, type MaterialTextureInfo, MaterialVaryingFlags, MaxNode, Mesh$1 as Mesh, MeshDrawable, MeshDrawableBase, MeshMaterial, type MeshUpdateCallback, type Metadata$1 as Metadata, MinNode, MixNode, ModNode, type ModelFetchOptions, type ModelInfo, type ModelLoader, type MorphBoundingInfo, type MorphData, type MorphInfo, type MorphState, MorphTargetGroupTrack, MorphTargetTrack, MultiChainSpringSystem, type MultiChainSpringSystemOptions, type NamedJointsSkeletalAnimationMaskOptions, NamedObject, type NearestPointsResult, type NodeConnection, NodeEulerRotationTrack, type NodeIterateFunc, NodeRotationTrack, NodeScaleTrack, NodeTranslationTrack, NormalizeNode, NotEqualNode, type OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, type OrbitCameraControllerOptions, OrderingScope, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, type PBRBlueprintOutputName, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, PHYSICAL_BAKE_EXPOSURE, type PairAdjustment, PannerNode, ParticleMaterial, ParticleSystem, PerlinNoise2DNode, type PersistentSceneQueue, 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, type PostEffectHistoryRead, PostEffectLayer, type PostEffectOutput, type PostEffectSetupContext, PowNode, Primitive, ProjectionMatrixNode, type PropEdit, type PropertyAccessor, type PropertyAccessorOptions, type PropertySceneNodeOptions, type PropertyToType, PropertyTrack, type PropertyType, type PropertyValue, ProxyDrawable, ProxyDrawableBase, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, RGBlackboard, type RGExecuteContext, type RGExecuteFn, type RGFramebufferDesc, type RGFramebufferHandle, RGHandle, type RGHandleKind, RGHistoryResources, type RGPassBuilder, type RGProfileResult, type RGProfileScopeResult, type RGProfileScopeType, type RGProfilingOptions, type RGResolvedSize, type RGResourceLifetime, type RGSizeMode, RGSubpass, RGTextureAffinityCache, type RGTextureAllocator, type RGTextureAttachment, type RGTextureDesc, type RGTextureHandle, type RGTokenHandle, type RGWriteOptions, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, type RenderContext, type RenderFunc, RenderGraph, type RenderGraphExecutionBindings, RenderGraphExecutor, type RenderGraphExecutorOptions, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, type RenderModule, type RenderModuleContext, type RenderModulePreparation, type RenderModuleRead, type RenderModuleReadDescriptor, RenderPass, type RenderPath, RenderPipeline, 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, SSGI, type SSGIQualityPreset, type SSGIResolvedSettings, type SSSDebugView, type SSSQualityPreset, type SSSResolvedSettings, type SamplerType, SaturateNode, type SaveOptions, Scene, type SceneMorphTargetBinding, type SceneMorphTargetGroup, SceneNode, type SceneNodeVisible, type SceneRenderContext, type SceneRenderOptions, type SceneRenderQueueBuilder, ScreenAdapter, type ScreenConfig, ScreenRenderTarget, type ScreenScaleMode, ScriptAttachment, type ScriptAttachmentConfig, ScriptRegistry, ScriptingSystem, type ScriptingSystemOptions, SelectionNode, type SerializableClass, type SerializedMorphTargetBinding, type SerializedMorphTargetGroup, ShaderHelper, ShadowMapPass, ShadowMapper, type ShadowMode, type ShadowQualityPreset, ShadowRegion, Shape, type ShapeCreationOptions, type ShapeOptionType, type ShapeType, SharedModel, SignNode, SimplexNoise2DNode, type SimulationParams, SinHNode, SinNode, type SkeletalAnimationMaskCommonOptions, type SkeletalAnimationMaskOptions, type SkeletalAnimationMaskRootMotionMode, type SkeletalAnimationMaskUnsupportedTrackMode, Skeleton, type SkeletonBindPose, SkeletonModifier, SkeletonRig, type SkeletonRigOptions, SkinBinding, SkinMaterial, SkinSSS, 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, SubsurfaceProfile, type SubsurfaceProfilePreset, type SurfaceCheckResult, SwizzleNode, TanHNode, TanNode, type TerrainDebugMode, type TetrahedronCreationOptions, TetrahedronFrameShape, TetrahedronShape, TextSprite, 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, VertexIndexNode, VertexNormalNode, VertexOutputNode, VertexPositionNode, VertexTangentNode, VertexUVNode, ViewMatrixNode, ViewProjMatrixNode, type Visitor, Water, type WaveGenerator, WeightedBlendedOIT, applyAngleLimits, applyMaterialMixins, applyResult, applyRuntimeScriptConfig, buildConstraints, buildForwardPlusGraph, buildMSDFShape, buildSurfaceFaces, calculateEV100, calculatePhysicalExposure, calculateVerticalFov, checkSurfaceCollision, collisionDetection, collisionDetectionCapsule, collisionDetectionSphere, computeMaxDepth, computeNearestPoints, createCapsuleCollider, createForwardPlusPipeline, createGPUClothWrapBindingData, createGeometryCacheState, createPlaneCollider, createSceneRenderer, createSphereCollider, createSpringConstraint, createSpringParticle, createTransformAccess, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, defineProps, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, ensureGeometryCacheMeshBinding, executeForwardPlusGraph, fetchSampler, gammaToLinear, generateMSDF, getApp, getDefaultForwardPlusPipeline, getDevice, getEngine, getInput, getRuntimeScriptProperties, getSamplerOptions, gradient, hash11, hash12, hash13, hash21, hash22, hash23, hash31, hash32, hash33, interleavedGradientNoise, isGPUClothSupported, linearToGamma, mergeFrameResourceRequirements, 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, resolveModuleOrder, resolvePlaneCollision, resolveSphereCollision, restoreGeometryCacheMeshBinding, scriptProp, simulate, smoothNoise3D, sortRootPointsByProximity, temporalResolve, tryGetApp, updateColliderFromNode, valueNoise, whiteNoise, worleyFBM, worleyNoise };
28901
+ export { AABBTree, ABufferOIT, ATMOSPHERIC_FOG_BIT, AbsNode, AbstractPostEffect, AllConditionNode, type AngleLimitConfig, AnimationClip, AnimationController, type AnimationControllerEventMap, type AnimationControllerSetStateOptions, type AnimationControllerStateDefinition, type AnimationFrameEvent, type AnimationMarker, type AnimationMarkerEvent, AnimationPlayback, type AnimationPlaybackEvent, type AnimationPlaybackEventMap, type AnimationPlaybackState, type AnimationPlaybackStopEvent, type AnimationPlaybackSyncMode, type AnimationPlaybackSyncOptions, AnimationSet, type AnimationSetEventMap, type AnimationStopReason, type AnimationTimeRef, AnimationTimeline, type AnimationTimelineActiveDisposition, type AnimationTimelineDefinition, type AnimationTimelineEventPolicy, type AnimationTimelineEventResponse, type AnimationTimelineEventResult, type AnimationTimelineEventTarget, AnimationTimelineRunner, type AnimationTimelineRunnerEventMap, type AnimationTimelineRunnerState, type AnimationTimelineStateReturnTarget, type AnimationTimelineStep, AnimationTrack, AnyConditionNode, type AppCreationOptions, type AppOptions, Application, type ApplyResultOutput, ArcCosNode, ArcSinNode, ArcTan2Node, ArcTanNode, ArccosineHNode, ArcsineHNode, ArctangentHNode, type AssetAnimationData, type AssetAnimationTrack, type AssetFixedGeometryCacheAnimationTrack, type AssetGeometryCacheAnimationTrack, type AssetGeometryCacheFrame, AssetHierarchyNode, type AssetImageInfo, type AssetJointDynamicsChain, type AssetJointDynamicsCollider, type AssetJointDynamicsFlatPlane, type AssetJointDynamicsSpringBone, type AssetMToonMaterial, AssetManager, type AssetMaterial, type AssetMaterialClearcoat, type AssetMaterialCommon, type AssetMaterialIridescence, type AssetMaterialSheen, type AssetMaterialTransmission, type AssetMeshData, type AssetMorphTargetBinding, type AssetMorphTargetGroup, type AssetPBRMaterialCommon, type AssetPBRMaterialMR, type AssetPBRMaterialSG, type AssetPCAGeometryCacheAnimationTrack, type AssetPrimitiveInfo, type AssetRotationTrack, type AssetSamplerInfo, type AssetScaleTrack, AssetScene, type AssetSkeletalAnimationTrack, AssetSkeleton, type AssetSpringBone, type AssetSpringBoneCollider, type AssetSpringBoneColliderGroup, type AssetSpringBoneColliderShape, type AssetSpringBoneJoint, type AssetSubMeshData, type AssetTextureInfo, type AssetTranslationTrack, type AssetUnlitMaterial, type AssetVertexBufferInfo, type AvatarBindMode, type AvatarBodyRegionTarget, type AvatarBodyRegions, type AvatarEquipOptions, type AvatarFitMode, type AvatarJointMap, AvatarOutfitInstance, type AvatarOutfitSource, type AvatarOutfitValidation, type AvatarSlotId, type AvatarSlotOptions, AvatarWardrobe, type AvatarWardrobeOptions, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, type BaseFetchOptions, 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, type CameraHistoryData, CameraNearFarNode, type CameraOITMode, CameraPositionNode, type CameraProjectionMode, type CameraSensorFit, CameraVectorNode, type CapsuleCollider, type CapsuleCreationOptions, CapsuleShape, CeilNode, ClampNode, ClipmapTerrain, ClipmapTerrainMaterial, ColliderForce, type ColliderR, type ColliderRW, type CollisionResult, ColorAdjust, type ColoredEdge, type ColoredLineEdge, type ColoredQuadraticEdge, CompAddNode, CompComparisonNode, CompDivNode, CompMulNode, CompSubNode, type ComparisonMode, type CompiledRenderGraph, Compositor, type CompositorBuildLayerOptions, type CompositorBuildLayerResult, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantTexture2DArrayNode, ConstantTexture2DNode, ConstantTextureCubeNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, type Constraint, type ConstraintBuildOptions, ConstraintType, type ControllerConfig, type ControllerConfigUpdate, CopyBlitter, type CopyHumanoidAnimationOptions, CosHNode, CosNode, CrossProductNode, CubemapSHProjector, CullVisitor, type CylinderCreationOptions, CylinderShape, DDXNode, DDYNode, Degrees2RadiansNode, DepthPass, DevicePoolAllocator, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, DualDepthPeelingOIT, EPSILON, type EdgeColor, 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, FontAsset, type FontAssetFetchOptions, type FontAssetMSDFAtlasSettings, type FontMetrics, type ForwardPlusModuleContext, ForwardPlusModules, type ForwardPlusOptions, FractNode, type FrameGraphContext, type FrameResourceKey, type FrameResourceRequirements, FrameResources, FunctionCallNode, FunctionInputNode, FunctionOutputNode, GPUClothSystem, type GPUClothSystemOptions, type GPUClothWrapBindingData, type GPUClothWrapBindingTarget, GaussianBlurBlitter, GenericMathNode, type GeometryCacheFrame, type GeometryCacheMeshBinding, type GeometryCacheState, GerstnerWaveGenerator, type GlyphContour, type GlyphData, type GlyphPoint, type GrabberR, type GrabberRW, GraphNode, type GraphNodeInput, type GraphNodeOutput, type GraphStructure, GrassLayer, GrassMaterial, GrassRenderer, Grayscale, HEIGHT_FOG_BIT, Hash1Node, Hash2Node, Hash3Node, HistoryResourceManager, type Host, HumanoidBodyRig, HumanoidHandRig, type HumanoidJointMapping, type HumanoidRetargetAxisLocks, type HumanoidRootMotionMode, type HumanoidRootMotionScaleMode, type HumanoidSkeletalAnimationMaskOptions, type HumanoidSkeletalAnimationMaskPreset, 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, InstanceIndexNode, type InstanceUniformType, type InterChainConstraint, InvProjMatrixNode, InvSqrtNode, InvViewProjMatrixNode, type JointChainConfig, type JointDynamicSystemConfig, type JointDynamicsColliderHandle, type JointDynamicsColliderSnapshot, type JointDynamicsFlatPlaneHandle, type JointDynamicsFlatPlaneSnapshot, type JointDynamicsGrabberHandle, type JointDynamicsGrabberSnapshot, JointDynamicsModifier, JointDynamicsSystem, JointDynamicsSystemController, type JointNameMatcher, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, LambertMaterial, LengthNode, type LightingMode, type LineCollisionResult, Log2Node, type LogMode, LogNode, LogicallyAndNode, LogicallyOrNode, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_SHADOW_MASK_LIGHTS, 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, type MSDFBitmap, type MSDFOptions, type MSDFShape, MSDFText, MSDFTextAtlasManager, MSDFTextSprite, MToonMaterial, type MToonOutlineWidthMode, MakeVectorNode, Material, MaterialBlueprintIR, type MaterialBlueprintIRBehaviors, type MaterialTextureInfo, MaterialVaryingFlags, MaxNode, Mesh$1 as Mesh, MeshDrawable, MeshDrawableBase, MeshMaterial, type MeshUpdateCallback, type Metadata$1 as Metadata, MinNode, MixNode, ModNode, type ModelFetchOptions, type ModelInfo, type ModelLoader, type MorphBoundingInfo, type MorphData, type MorphInfo, type MorphState, MorphTargetGroupTrack, MorphTargetTrack, MultiChainSpringSystem, type MultiChainSpringSystemOptions, type NamedJointsSkeletalAnimationMaskOptions, NamedObject, type NearestPointsResult, type NodeConnection, NodeEulerRotationTrack, type NodeIterateFunc, NodeRotationTrack, NodeScaleTrack, NodeTranslationTrack, NormalizeNode, NotEqualNode, type OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, type OrbitCameraControllerOptions, OrderingScope, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, type PBRBlueprintOutputName, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, PHYSICAL_BAKE_EXPOSURE, type PairAdjustment, PannerNode, ParticleMaterial, ParticleSystem, PerlinNoise2DNode, type PersistentSceneQueue, 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, type PostEffectHistoryRead, PostEffectLayer, type PostEffectOutput, type PostEffectSetupContext, PowNode, Primitive, ProjectionMatrixNode, type PropEdit, type PropertyAccessor, type PropertyAccessorOptions, type PropertySceneNodeOptions, type PropertyToType, PropertyTrack, type PropertyType, type PropertyValue, ProxyDrawable, ProxyDrawableBase, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, RGBlackboard, type RGExecuteContext, type RGExecuteFn, type RGFramebufferDesc, type RGFramebufferHandle, RGHandle, type RGHandleKind, RGHistoryResources, type RGPassBuilder, type RGProfileResult, type RGProfileScopeResult, type RGProfileScopeType, type RGProfilingOptions, type RGResolvedSize, type RGResourceLifetime, type RGSizeMode, RGSubpass, RGTextureAffinityCache, type RGTextureAllocator, type RGTextureAttachment, type RGTextureDesc, type RGTextureHandle, type RGTokenHandle, type RGWriteOptions, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, type RenderContext, type RenderFunc, RenderGraph, type RenderGraphExecutionBindings, RenderGraphExecutor, type RenderGraphExecutorOptions, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, type RenderModule, type RenderModuleContext, type RenderModulePreparation, type RenderModuleRead, type RenderModuleReadDescriptor, RenderPass, type RenderPath, RenderPipeline, 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, SSGI, type SSGIQualityPreset, type SSGIResolvedSettings, type SSSDebugView, type SSSQualityPreset, type SSSResolvedSettings, type SamplerType, SaturateNode, type SaveOptions, Scene, type SceneMorphTargetBinding, type SceneMorphTargetGroup, SceneNode, type SceneNodeVisible, type SceneRenderContext, type SceneRenderOptions, type SceneRenderQueueBuilder, ScreenAdapter, type ScreenConfig, ScreenRenderTarget, type ScreenScaleMode, ScriptAttachment, type ScriptAttachmentConfig, ScriptRegistry, ScriptingSystem, type ScriptingSystemOptions, SelectionNode, type SerializableClass, type SerializedMorphTargetBinding, type SerializedMorphTargetGroup, ShaderHelper, ShadowMapPass, ShadowMapper, type ShadowMode, type ShadowQualityPreset, ShadowRegion, Shape, type ShapeCreationOptions, type ShapeOptionType, type ShapeType, SharedModel, SignNode, SimplexNoise2DNode, type SimulationParams, SinHNode, SinNode, type SkeletalAnimationMaskCommonOptions, type SkeletalAnimationMaskOptions, type SkeletalAnimationMaskRootMotionMode, type SkeletalAnimationMaskUnsupportedTrackMode, Skeleton, type SkeletonBindPose, SkeletonModifier, SkeletonRig, type SkeletonRigOptions, SkinBinding, SkinMaterial, SkinSSS, 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, SubsurfaceProfile, type SubsurfaceProfilePreset, type SurfaceCheckResult, SwizzleNode, TanHNode, TanNode, type TerrainDebugMode, type TetrahedronCreationOptions, TetrahedronFrameShape, TetrahedronShape, TextSprite, 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, VertexIndexNode, VertexNormalNode, VertexOutputNode, VertexPositionNode, VertexTangentNode, VertexUVNode, ViewMatrixNode, ViewProjMatrixNode, type Visitor, Water, type WaveGenerator, WeightedBlendedOIT, applyAngleLimits, applyMaterialMixins, applyResult, applyRuntimeScriptConfig, buildConstraints, buildForwardPlusGraph, buildMSDFShape, buildSurfaceFaces, calculateEV100, calculatePhysicalExposure, calculateVerticalFov, checkSurfaceCollision, collisionDetection, collisionDetectionCapsule, collisionDetectionSphere, computeMaxDepth, computeNearestPoints, createCapsuleCollider, createForwardPlusPipeline, createGPUClothWrapBindingData, createGeometryCacheState, createPlaneCollider, createSceneRenderer, createSphereCollider, createSpringConstraint, createSpringParticle, createTransformAccess, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, defineProps, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, ensureGeometryCacheMeshBinding, executeForwardPlusGraph, fetchSampler, gammaToLinear, generateMSDF, getApp, getDefaultForwardPlusPipeline, getDevice, getEngine, getInput, getRuntimeScriptProperties, getSamplerOptions, gradient, hash11, hash12, hash13, hash21, hash22, hash23, hash31, hash32, hash33, interleavedGradientNoise, isGPUClothSupported, linearToGamma, mergeFrameResourceRequirements, 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, resolveModuleOrder, resolvePlaneCollision, resolveSphereCollision, restoreGeometryCacheMeshBinding, scriptProp, simulate, smoothNoise3D, sortRootPointsByProximity, temporalResolve, tryGetApp, updateColliderFromNode, valueNoise, whiteNoise, worleyFBM, worleyNoise };
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ export { SceneNode, setSceneMeshAssetBinding } from './scene/scene_node.js';
114
114
  export { ParticleSystem } from './scene/particlesys.js';
115
115
  export { BatchGroup } from './scene/batchgroup.js';
116
116
  export { ClipmapTerrain } from './scene/terrain-cm/terrain-cm.js';
117
- export { GrassInstances, GrassLayer, GrassQuadtreeNode, GrassRenderer } from './scene/terrain-cm/grass.js';
117
+ export { GrassInstances, GrassLayer, GrassRenderer } from './scene/terrain-cm/grass.js';
118
118
  export { RaycastVisitor } from './scene/raycast_visitor.js';
119
119
  export { ScriptAttachment, normalizeScriptAttachmentConfig, normalizeScriptAttachments } from './scene/script_attachment.js';
120
120
  export { AnimationClip } from './animation/animation.js';
@@ -182,7 +182,7 @@ export { Blitter } from './blitter/blitter.js';
182
182
  export { GaussianBlurBlitter } from './blitter/gaussianblur.js';
183
183
  export { BoxFilterBlitter } from './blitter/box.js';
184
184
  export { CopyBlitter } from './blitter/copy.js';
185
- export { ATMOSPHERIC_FOG_BIT, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, Fog, HEIGHT_FOG_BIT, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, MAX_CLUSTERED_LIGHTS, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_SHADOW_MASK_LIGHTS, 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, MaterialVaryingFlags, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, uniformSphereSamples } from './values.js';
185
+ export { ATMOSPHERIC_FOG_BIT, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, Fog, HEIGHT_FOG_BIT, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_SHADOW_MASK_LIGHTS, 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, MaterialVaryingFlags, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, uniformSphereSamples } from './values.js';
186
186
  export { AbstractPostEffect, PostEffectLayer } from './posteffect/posteffect.js';
187
187
  export { Grayscale } from './posteffect/grayscale.js';
188
188
  export { ColorAdjust } from './posteffect/coloradjust.js';
@@ -1,5 +1,5 @@
1
1
  import { Vector3, Vector4, Vector2, REVERSE_Z, DEPTH_FARTHEST, DEPTH_REDUCE_CLOSER, DEPTH_REDUCE_FARTHER } from '@zephyr3d/base';
2
- import { RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_SHADOWMAP, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_LIGHT, MaterialVaryingFlags, MAX_CLUSTERED_LIGHTS, MORPH_WEIGHTS_VECTOR_COUNT, MORPH_TARGET_POSITION, MORPH_TARGET_NORMAL, MORPH_TARGET_TANGENT, MORPH_ATTRIBUTE_VECTOR_COUNT } from '../../values.js';
2
+ import { RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_SHADOWMAP, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_LIGHT, MaterialVaryingFlags, MORPH_WEIGHTS_VECTOR_COUNT, MORPH_TARGET_POSITION, MORPH_TARGET_NORMAL, MORPH_TARGET_TANGENT, MORPH_ATTRIBUTE_VECTOR_COUNT } from '../../values.js';
3
3
  import { ProgramBuilder } from '@zephyr3d/device';
4
4
  import { decodeNormalizedFloatFromRGBA, linearToGamma } from '../../shaders/misc.js';
5
5
  import { getSamplerOptions, fetchSampler } from '../../utility/misc.js';
@@ -239,7 +239,7 @@ const UNIFORM_NAME_MORPH_INFO = 'Z_UniformMorphInfo';
239
239
  scope.camera = cameraStruct().uniform(0);
240
240
  scope.light = lightStruct().uniform(0);
241
241
  if (useClusteredLighting) {
242
- scope[UNIFORM_NAME_LIGHT_BUFFER] = pb.vec4[(MAX_CLUSTERED_LIGHTS + 1) * 4]().uniformBuffer(0);
242
+ scope[UNIFORM_NAME_LIGHT_BUFFER] = pb.vec4[(this.getMaxClusterLights() + 1) * 4]().uniformBuffer(0);
243
243
  // Non-WebGL1 devices fetch the light index texture with textureLoad
244
244
  scope[UNIFORM_NAME_LIGHT_INDEX_TEXTURE] = (pb.getDevice().type === 'webgl' ? pb.tex2D() : pb.utex2D().noSampler()).uniform(0);
245
245
  // Screen-space shadow mask array (rgba8unorm, 4 shadow lights per layer).
@@ -1550,6 +1550,9 @@ const UNIFORM_NAME_MORPH_INFO = 'Z_UniformMorphInfo';
1550
1550
  });
1551
1551
  return pb.getGlobalScope()[funcName](outputColor);
1552
1552
  }
1553
+ /** @internal */ static getMaxClusterLights() {
1554
+ return getDevice().type === 'webgl' ? 64 : 255;
1555
+ }
1553
1556
  }
1554
1557
 
1555
1558
  export { ShaderHelper };