@zephyr3d/scene 0.9.12 → 0.9.14

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
@@ -11777,6 +11777,41 @@ declare class MorphTargetTrack extends AnimationTrack<MorphState> {
11777
11777
  reset(node: SceneNode): void;
11778
11778
  }
11779
11779
 
11780
+ /**
11781
+ * Animates a model-level morph target group by name.
11782
+ * @public
11783
+ */
11784
+ declare class MorphTargetGroupTrack extends AnimationTrack<number> {
11785
+ private _groupName;
11786
+ private _interpolator;
11787
+ private readonly _state;
11788
+ /**
11789
+ * Create a morph target group animation track.
11790
+ * @param groupName - Morph target group name
11791
+ * @param interpolator - Scalar interpolator for the group weight
11792
+ * @param embedded - Whether this track is embedded
11793
+ */
11794
+ constructor(groupName?: string, interpolator?: Interpolator, embedded?: boolean);
11795
+ /** Morph target group name controlled by this track. */
11796
+ get groupName(): string;
11797
+ set groupName(value: string);
11798
+ /** Scalar interpolator for this track. */
11799
+ get interpolator(): Interpolator;
11800
+ set interpolator(value: Interpolator);
11801
+ /** {@inheritDoc AnimationTrack.clone} */
11802
+ clone(): this;
11803
+ /** {@inheritDoc AnimationTrack.calculateState} */
11804
+ calculateState(target: object, currentTime: number): number;
11805
+ /** {@inheritDoc AnimationTrack.applyState} */
11806
+ applyState(node: SceneNode, weight: number): void;
11807
+ /** {@inheritDoc AnimationTrack.mixState} */
11808
+ mixState(a: number, b: number, t: number): number;
11809
+ /** {@inheritDoc AnimationTrack.getBlendId} */
11810
+ getBlendId(): string;
11811
+ /** {@inheritDoc AnimationTrack.getDuration} */
11812
+ getDuration(): number;
11813
+ }
11814
+
11780
11815
  /**
11781
11816
  * Geometry cache frame data for a single sampled time.
11782
11817
  *
@@ -15833,9 +15868,10 @@ interface AssetMorphTargetGroup {
15833
15868
  */
15834
15869
  interface AssetAnimationTrack {
15835
15870
  node: AssetHierarchyNode;
15836
- type: 'translation' | 'scale' | 'rotation' | 'weights';
15871
+ type: 'translation' | 'scale' | 'rotation' | 'weights' | 'morph-target-group';
15837
15872
  interpolator: Interpolator;
15838
15873
  defaultMorphWeights?: number[];
15874
+ morphTargetGroupName?: string;
15839
15875
  }
15840
15876
  /**
15841
15877
  * A single geometry cache frame.
@@ -27648,4 +27684,4 @@ declare const ATMOSPHERIC_FOG_BIT: number;
27648
27684
  */
27649
27685
  declare const HEIGHT_FOG_BIT: number;
27650
27686
 
27651
- 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, 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, Compositor, type CompositorContext, 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, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, 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, FractNode, 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 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, 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, 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, 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, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, type PBRBlueprintOutputName, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, type PairAdjustment, 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, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, type RenderFunc, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, RenderPass, type RenderPath, 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 SSSDebugView, type SSSQualityPreset, type SSSResolvedSettings, type SamplerType, SaturateNode, type SaveOptions, Scene, type SceneMorphTargetBinding, type SceneMorphTargetGroup, SceneNode, type SceneNodeVisible, 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, 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, buildMSDFShape, 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, fetchSampler, gammaToLinear, generateMSDF, 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 };
27687
+ 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, 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, Compositor, type CompositorContext, 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, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, 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, FractNode, 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 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, 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, 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, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, type PBRBlueprintOutputName, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, type PairAdjustment, 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, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, type RenderFunc, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, RenderPass, type RenderPath, 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 SSSDebugView, type SSSQualityPreset, type SSSResolvedSettings, type SamplerType, SaturateNode, type SaveOptions, Scene, type SceneMorphTargetBinding, type SceneMorphTargetGroup, SceneNode, type SceneNodeVisible, 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, 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, buildMSDFShape, 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, fetchSampler, gammaToLinear, generateMSDF, 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 };
package/dist/index.js CHANGED
@@ -112,6 +112,7 @@ export { NodeEulerRotationTrack } from './animation/eulerrotationtrack.js';
112
112
  export { NodeScaleTrack } from './animation/scaletrack.js';
113
113
  export { PropertyTrack } from './animation/proptrack.js';
114
114
  export { MorphTargetTrack } from './animation/morphtrack.js';
115
+ export { MorphTargetGroupTrack } from './animation/morphtargetgrouptrack.js';
115
116
  export { FixedGeometryCacheTrack } from './animation/fixed_geometry_cache_track.js';
116
117
  export { createGeometryCacheState, ensureGeometryCacheMeshBinding, mixGeometryCacheBoundingBox, restoreGeometryCacheMeshBinding } from './animation/geometry_cache_utils.js';
117
118
  export { PCAGeometryCacheTrack } from './animation/pca_geometry_cache_track.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,11 +4,11 @@ import { mixinTextureProps } from './texture.js';
4
4
  import { mixinAlbedoColor } from './albedocolor.js';
5
5
  import { ShaderHelper } from '../shader/helper.js';
6
6
 
7
- /**
8
- * Light mixin
9
- * @param BaseCls - class to mix in
10
- * @returns Mixed class
11
- * @public
7
+ /**
8
+ * Light mixin
9
+ * @param BaseCls - class to mix in
10
+ * @returns Mixed class
11
+ * @public
12
12
  */ function mixinLight(BaseCls) {
13
13
  if (BaseCls.lightMixed) {
14
14
  return BaseCls;
@@ -51,31 +51,31 @@ import { ShaderHelper } from '../shader/helper.js';
51
51
  set doubleSidedLighting(val) {
52
52
  this.useFeature(FEATURE_DOUBLE_SIDED_LIGHTING, !!val);
53
53
  }
54
- /**
55
- * Calculates the normalized vector from world coordinates to the viewpoint.
56
- *
57
- * @param scope - Shader scope
58
- *
59
- * @returns The view vector
54
+ /**
55
+ * Calculates the normalized vector from world coordinates to the viewpoint.
56
+ *
57
+ * @param scope - Shader scope
58
+ *
59
+ * @returns The view vector
60
60
  */ calculateViewVector(scope, worldPos) {
61
61
  const pb = scope.$builder;
62
62
  return pb.normalize(pb.sub(ShaderHelper.getCameraPosition(scope), worldPos.xyz));
63
63
  }
64
- /**
65
- * Calculate the reflection vector of the view vector with respect to the normal.
66
- *
67
- * @param scope - Shader scope
68
- * @param normal - Surface normal
69
- * @param viewVec - The view vector
70
- * @returns The reflection vector
64
+ /**
65
+ * Calculate the reflection vector of the view vector with respect to the normal.
66
+ *
67
+ * @param scope - Shader scope
68
+ * @param normal - Surface normal
69
+ * @param viewVec - The view vector
70
+ * @returns The reflection vector
71
71
  */ calculateReflectionVector(scope, normal, viewVec) {
72
72
  const pb = scope.$builder;
73
73
  return pb.reflect(pb.neg(viewVec), normal);
74
74
  }
75
- /**
76
- * Calculate the normal vector for current fragment
77
- * @param scope - The shader scope
78
- * @returns Normal vector for current fragment
75
+ /**
76
+ * Calculate the normal vector for current fragment
77
+ * @param scope - The shader scope
78
+ * @returns Normal vector for current fragment
79
79
  */ calculateNormal(scope, worldPos, worldNormal, worldTangent, worldBinormal) {
80
80
  const pb = scope.$builder;
81
81
  const that = this;
@@ -115,17 +115,17 @@ import { ShaderHelper } from '../shader/helper.js';
115
115
  });
116
116
  return pb.getGlobalScope()[funcName](...args);
117
117
  }
118
- /**
119
- * Normal scale uniform
120
- * @return Normal scale uniform
118
+ /**
119
+ * Normal scale uniform
120
+ * @return Normal scale uniform
121
121
  */ getUniformNormalScale(scope) {
122
122
  return scope.zNormalScale;
123
123
  }
124
- /**
125
- * Calculate the normal vector for current fragment
126
- *
127
- * @param scope - The shader scope
128
- * @returns Structure that contains normal vector and TBN matrix
124
+ /**
125
+ * Calculate the normal vector for current fragment
126
+ *
127
+ * @param scope - The shader scope
128
+ * @returns Structure that contains normal vector and TBN matrix
129
129
  */ calculateNormalAndTBN(scope, worldPos, worldNormal, worldTangent, worldBinormal) {
130
130
  const pb = scope.$builder;
131
131
  const NormalStruct = pb.defineStruct([
@@ -169,11 +169,11 @@ import { ShaderHelper } from '../shader/helper.js';
169
169
  });
170
170
  return pb.getGlobalScope()[funcName](...args);
171
171
  }
172
- /**
173
- * Calculate the TBN matrix
174
- *
175
- * @param scope - The shader scope
176
- * @returns TBN matrix
172
+ /**
173
+ * Calculate the TBN matrix
174
+ *
175
+ * @param scope - The shader scope
176
+ * @returns TBN matrix
177
177
  */ calculateTBN(scope, worldPos, worldNormal, worldTangent, worldBinormal) {
178
178
  const pb = scope.$builder;
179
179
  const that = this;
@@ -253,9 +253,9 @@ import { ShaderHelper } from '../shader/helper.js';
253
253
  });
254
254
  return pb.getGlobalScope()[funcName](...args);
255
255
  }
256
- /**
257
- * {@inheritDoc MeshMaterial.applyUniformsValues}
258
- * @override
256
+ /**
257
+ * {@inheritDoc MeshMaterial.applyUniformsValues}
258
+ * @override
259
259
  */ applyUniformValues(bindGroup, ctx, pass) {
260
260
  super.applyUniformValues(bindGroup, ctx, pass);
261
261
  if (ctx.renderPass.type === RENDER_PASS_TYPE_LIGHT) {
@@ -264,20 +264,20 @@ import { ShaderHelper } from '../shader/helper.js';
264
264
  }
265
265
  }
266
266
  }
267
- /**
268
- * Check if the environment lighting should be calculated.
269
- *
270
- * @returns true Environment lighting should be calculated, otherwise false
267
+ /**
268
+ * Check if the environment lighting should be calculated.
269
+ *
270
+ * @returns true Environment lighting should be calculated, otherwise false
271
271
  */ needCalculateEnvLight() {
272
272
  return this.drawContext.renderPass.type === RENDER_PASS_TYPE_LIGHT && this.drawContext.drawEnvLight;
273
273
  }
274
- /**
275
- * Get irradiance of current environment light
276
- *
277
- * @param scope - Shader scope
278
- * @param normal - Fragment normal vector
279
- *
280
- * @returns Irradiance of current environment light of type vec3
274
+ /**
275
+ * Get irradiance of current environment light
276
+ *
277
+ * @param scope - Shader scope
278
+ * @param normal - Fragment normal vector
279
+ *
280
+ * @returns Irradiance of current environment light of type vec3
281
281
  */ getEnvLightIrradiance(scope, normal) {
282
282
  if (!this.needCalculateEnvLight()) {
283
283
  console.warn('getEnvLightIrradiance(): No need to calculate environment lighting');
@@ -285,14 +285,14 @@ import { ShaderHelper } from '../shader/helper.js';
285
285
  }
286
286
  return this.drawContext.env.light.envLight.hasIrradiance() ? scope.$builder.mul(this.drawContext.env.light.envLight.getIrradiance(scope, normal).rgb, ShaderHelper.getEnvLightStrength(scope)) : scope.$builder.vec3(0);
287
287
  }
288
- /**
289
- * Get Radiance of current environment light
290
- *
291
- * @param scope - Shader scope
292
- * @param reflectVec - The reflection vector
293
- * @param roughness - Roughness value of current fragment
294
- *
295
- * @returns Radiance of current environment light of type vec3
288
+ /**
289
+ * Get Radiance of current environment light
290
+ *
291
+ * @param scope - Shader scope
292
+ * @param reflectVec - The reflection vector
293
+ * @param roughness - Roughness value of current fragment
294
+ *
295
+ * @returns Radiance of current environment light of type vec3
296
296
  */ getEnvLightRadiance(scope, reflectVec, roughness) {
297
297
  if (!this.needCalculateEnvLight()) {
298
298
  console.warn('getEnvLightRadiance(): No need to calculate environment lighting');
@@ -300,19 +300,19 @@ import { ShaderHelper } from '../shader/helper.js';
300
300
  }
301
301
  return this.drawContext.env.light.envLight.hasRadiance() ? scope.$builder.mul(this.drawContext.env.light.envLight.getRadiance(scope, reflectVec, roughness).rgb, ShaderHelper.getEnvLightStrength(scope), ShaderHelper.getEnvLightSpecularStrength(scope)) : scope.$builder.vec3(0);
302
302
  }
303
- /**
304
- * Checks if shadow should be computed
305
- *
306
- * @returns true if shadow should be computed, other wise false
303
+ /**
304
+ * Checks if shadow should be computed
305
+ *
306
+ * @returns true if shadow should be computed, other wise false
307
307
  */ needCalculateShadow() {
308
308
  return this.drawContext.renderPass.type === RENDER_PASS_TYPE_LIGHT && !!this.drawContext.currentShadowLight;
309
309
  }
310
- /**
311
- * Calculates shadow of current fragment
312
- *
313
- * @param scope - Shader scope
314
- * @param NoL - NdotL vector
315
- * @returns Shadow of current fragment, 1 means no shadow and 0 means full shadowed.
310
+ /**
311
+ * Calculates shadow of current fragment
312
+ *
313
+ * @param scope - Shader scope
314
+ * @param NoL - NdotL vector
315
+ * @returns Shadow of current fragment, 1 means no shadow and 0 means full shadowed.
316
316
  */ calculateShadow(scope, worldPos, NoL) {
317
317
  const pb = scope.$builder;
318
318
  if (!this.needCalculateShadow()) {
@@ -350,12 +350,7 @@ import { ShaderHelper } from '../shader/helper.js';
350
350
  this.$l.f = pb.div(this.dist2, pb.max(this.range2, 0.0001));
351
351
  this.$l.f2 = pb.clamp(pb.sub(1, pb.mul(this.f, this.f)), 0, 1);
352
352
  this.$return(pb.mul(this.lightAtten, pb.mul(this.f2, this.f2)));
353
- /*
354
- this.$l.smooth = pb.clamp(pb.)
355
- this.$l.dist = pb.distance(this.posRange.xyz, this.worldPos);
356
- this.$l.falloff = pb.max(0, pb.sub(1, pb.div(this.dist, this.posRange.w)));
357
- this.$return(pb.mul(this.falloff, this.falloff));
358
- */ });
353
+ });
359
354
  return pb.getGlobalScope()[funcName](worldPos, posRange);
360
355
  }
361
356
  calculateSpotLightAttenuation(scope, worldPos, posRange, dirCutoff) {
@@ -458,11 +453,11 @@ import { ShaderHelper } from '../shader/helper.js';
458
453
  });
459
454
  }
460
455
  }
461
- /**
462
- * Fragment shader implementation
463
- *
464
- * @param scope - Shader scope
465
- * @returns Calucated fragment color
456
+ /**
457
+ * Fragment shader implementation
458
+ *
459
+ * @param scope - Shader scope
460
+ * @returns Calucated fragment color
466
461
  */ fragmentShader(scope) {
467
462
  super.fragmentShader(scope);
468
463
  const pb = scope.$builder;
@@ -472,9 +467,9 @@ import { ShaderHelper } from '../shader/helper.js';
472
467
  }
473
468
  }
474
469
  }
475
- /**
476
- * {@inheritDoc Material.supportLighting}
477
- * @override
470
+ /**
471
+ * {@inheritDoc Material.supportLighting}
472
+ * @override
478
473
  */ supportLighting() {
479
474
  return true;
480
475
  }