@galacean/engine-core 2.0.0-alpha.6 → 2.0.0-alpha.60
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/main.js +28967 -22183
- package/dist/main.js.map +1 -1
- package/dist/module.js +28951 -22175
- package/dist/module.js.map +1 -1
- package/package.json +3 -5
- package/types/2d/assembler/ISpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/ISpriteRenderer.d.ts +3 -2
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +1 -0
- package/types/2d/atlas/FontAtlas.d.ts +23 -1
- package/types/2d/atlas/SpriteAtlas.d.ts +8 -0
- package/types/2d/sprite/Sprite.d.ts +30 -4
- package/types/2d/sprite/SpriteMask.d.ts +49 -1
- package/types/2d/sprite/SpriteRenderer.d.ts +35 -1
- package/types/2d/text/CharInfo.d.ts +20 -1
- package/types/2d/text/CharRenderInfo.d.ts +15 -1
- package/types/2d/text/Font.d.ts +11 -1
- package/types/2d/text/ITextRenderer.d.ts +3 -0
- package/types/2d/text/SubFont.d.ts +35 -1
- package/types/2d/text/TextRenderer.d.ts +54 -1
- package/types/2d/text/TextUtils.d.ts +89 -1
- package/types/Background.d.ts +19 -2
- package/types/BasicResources.d.ts +58 -0
- package/types/Camera.d.ts +79 -1
- package/types/Canvas.d.ts +36 -7
- package/types/Component.d.ts +35 -2
- package/types/ComponentsDependencies.d.ts +38 -1
- package/types/ComponentsManager.d.ts +20 -0
- package/types/Engine.d.ts +114 -7
- package/types/EngineEventType.d.ts +13 -0
- package/types/Entity.d.ts +112 -21
- package/types/Polyfill.d.ts +12 -1
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +4 -2
- package/types/RenderPipeline/BatcherManager.d.ts +23 -1
- package/types/RenderPipeline/Blitter.d.ts +1 -1
- package/types/RenderPipeline/CullingResults.d.ts +17 -1
- package/types/RenderPipeline/DepthOnlyPass.d.ts +15 -1
- package/types/RenderPipeline/InstanceBuffer.d.ts +28 -0
- package/types/RenderPipeline/MaskManager.d.ts +36 -1
- package/types/RenderPipeline/OpaqueTexturePass.d.ts +16 -1
- package/types/RenderPipeline/PipelineUtils.d.ts +11 -1
- package/types/RenderPipeline/PrimitiveChunk.d.ts +27 -1
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +16 -1
- package/types/RenderPipeline/RenderContext.d.ts +46 -1
- package/types/RenderPipeline/RenderElement.d.ts +26 -6
- package/types/RenderPipeline/RenderQueue.d.ts +23 -1
- package/types/RenderPipeline/RenderTargetPool.d.ts +17 -1
- package/types/RenderPipeline/SubPrimitiveChunk.d.ts +14 -1
- package/types/RenderPipeline/VertexArea.d.ts +10 -1
- package/types/RenderPipeline/VertexMergeBatcher.d.ts +11 -0
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
- package/types/RenderPipeline/index.d.ts +4 -1
- package/types/Renderer.d.ts +82 -19
- package/types/Scene.d.ts +34 -7
- package/types/SceneManager.d.ts +18 -6
- package/types/Script.d.ts +41 -0
- package/types/Signal.d.ts +71 -0
- package/types/SystemInfo.d.ts +14 -2
- package/types/Transform.d.ts +26 -1
- package/types/UpdateFlag.d.ts +4 -1
- package/types/UpdateFlagManager.d.ts +41 -1
- package/types/Utils.d.ts +20 -0
- package/types/VirtualCamera.d.ts +16 -1
- package/types/animation/AnimationClip.d.ts +13 -2
- package/types/animation/AnimationClipCurveBinding.d.ts +17 -2
- package/types/animation/AnimationEvent.d.ts +2 -2
- package/types/animation/Animator.d.ts +49 -10
- package/types/animation/AnimatorController.d.ts +20 -2
- package/types/animation/AnimatorControllerLayer.d.ts +17 -2
- package/types/animation/AnimatorControllerParameter.d.ts +4 -0
- package/types/animation/AnimatorState.d.ts +46 -2
- package/types/animation/AnimatorStateInstance.d.ts +46 -0
- package/types/animation/AnimatorStateMachine.d.ts +17 -2
- package/types/animation/AnimatorStateTransition.d.ts +9 -0
- package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -1
- package/types/animation/Keyframe.d.ts +1 -1
- package/types/animation/StateMachineScript.d.ts +2 -0
- package/types/animation/animationCurve/AnimationArrayCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationBoolCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationColorCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationCurve.d.ts +9 -1
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +38 -0
- package/types/animation/animationCurve/AnimationFloatCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +41 -0
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +18 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +20 -2
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationVector2Curve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationVector3Curve.d.ts +43 -0
- package/types/animation/animationCurve/AnimationVector4Curve.d.ts +39 -0
- package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +18 -1
- package/types/animation/enums/AnimatorStatePlayState.d.ts +8 -1
- package/types/animation/index.d.ts +1 -0
- package/types/animation/internal/AnimationCurveLayerOwner.d.ts +15 -1
- package/types/animation/internal/AnimationEventHandler.d.ts +8 -1
- package/types/animation/internal/AnimatorLayerData.d.ts +28 -1
- package/types/animation/internal/AnimatorStateData.d.ts +14 -1
- package/types/animation/internal/AnimatorStatePlayData.d.ts +27 -1
- package/types/animation/internal/AnimatorTempValue.d.ts +12 -1
- package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +39 -0
- package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +12 -1
- package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +10 -1
- package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +23 -1
- package/types/asset/AssetPromise.d.ts +4 -4
- package/types/asset/AssetType.d.ts +7 -9
- package/types/asset/GraphicsResource.d.ts +10 -0
- package/types/asset/IReferable.d.ts +8 -0
- package/types/asset/JSONAsset.d.ts +1 -1
- package/types/asset/LoadItem.d.ts +1 -1
- package/types/asset/Loader.d.ts +2 -2
- package/types/asset/ReferResource.d.ts +28 -0
- package/types/asset/RenderingStatistics.d.ts +8 -0
- package/types/asset/ResourceManager.d.ts +117 -9
- package/types/audio/AudioClip.d.ts +8 -0
- package/types/audio/AudioManager.d.ts +18 -0
- package/types/audio/AudioSource.d.ts +20 -2
- package/types/base/Constant.d.ts +2 -19
- package/types/base/DataObject.d.ts +6 -0
- package/types/base/EngineObject.d.ts +4 -0
- package/types/base/Time.d.ts +13 -0
- package/types/base/index.d.ts +1 -0
- package/types/clone/CloneDecorators.d.ts +37 -0
- package/types/clone/CloneUtil.d.ts +30 -0
- package/types/clone/ComponentCloner.d.ts +4 -10
- package/types/clone/ICloneHook.d.ts +12 -0
- package/types/enums/CameraType.d.ts +9 -1
- package/types/env-probe/CubeProbe.d.ts +2 -0
- package/types/env-probe/Probe.d.ts +1 -1
- package/types/graphic/Buffer.d.ts +23 -3
- package/types/graphic/BufferUtil.d.ts +8 -0
- package/types/graphic/ElementRangeMapping.d.ts +9 -0
- package/types/graphic/IndexBufferBinding.d.ts +4 -0
- package/types/graphic/Mesh.d.ts +58 -1
- package/types/graphic/Primitive.d.ts +50 -1
- package/types/graphic/TransformFeedback.d.ts +46 -0
- package/types/graphic/TransformFeedbackPrimitive.d.ts +57 -0
- package/types/graphic/TransformFeedbackSimulator.d.ts +55 -0
- package/types/graphic/VertexBufferBinding.d.ts +4 -0
- package/types/graphic/VertexElement.d.ts +1 -0
- package/types/graphic/enums/BufferBindFlag.d.ts +5 -3
- package/types/index.d.ts +7 -4
- package/types/input/InputManager.d.ts +25 -6
- package/types/input/enums/PointerButton.d.ts +8 -0
- package/types/input/keyboard/KeyboardManager.d.ts +41 -1
- package/types/input/pointer/Pointer.d.ts +37 -1
- package/types/input/pointer/PointerEventData.d.ts +4 -0
- package/types/input/pointer/PointerManager.d.ts +58 -0
- package/types/input/pointer/emitter/IHitResult.d.ts +11 -1
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +20 -1
- package/types/input/wheel/WheelManager.d.ts +34 -1
- package/types/lighting/AmbientLight.d.ts +9 -8
- package/types/lighting/DirectLight.d.ts +17 -0
- package/types/lighting/KHR_lights.d.ts +13 -1
- package/types/lighting/Light.d.ts +2 -0
- package/types/lighting/LightManager.d.ts +57 -0
- package/types/lighting/PointLight.d.ts +17 -0
- package/types/lighting/SpotLight.d.ts +17 -0
- package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +4 -0
- package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +37 -1
- package/types/material/BaseMaterial.d.ts +15 -11
- package/types/material/Material.d.ts +6 -9
- package/types/mesh/BlendShape.d.ts +14 -1
- package/types/mesh/BlendShapeFrame.d.ts +11 -4
- package/types/mesh/BlendShapeManager.d.ts +100 -1
- package/types/mesh/BufferMesh.d.ts +2 -2
- package/types/mesh/MeshRenderer.d.ts +42 -0
- package/types/mesh/MeshTangentUtils.d.ts +9 -0
- package/types/mesh/ModelMesh.d.ts +28 -12
- package/types/mesh/PrimitiveMesh.d.ts +266 -104
- package/types/mesh/PrimitiveMeshOptions.d.ts +415 -0
- package/types/mesh/Skin.d.ts +12 -3
- package/types/mesh/SkinnedMeshRenderer.d.ts +27 -1
- package/types/mesh/enums/PrimitiveMeshCapMode.d.ts +21 -0
- package/types/mesh/index.d.ts +2 -0
- package/types/mesh/primitive/MeshPathUtils.d.ts +13 -0
- package/types/mesh/primitive/PolygonUtils.d.ts +44 -0
- package/types/mesh/primitive/PrimitiveMeshBuilder.d.ts +25 -0
- package/types/mesh/primitive/PrimitiveMeshRestorer.d.ts +15 -0
- package/types/mesh/primitive/SubdivisionUtils.d.ts +9 -0
- package/types/particle/ParticleBounds.d.ts +87 -0
- package/types/particle/ParticleBufferUtils.d.ts +33 -1
- package/types/particle/ParticleGenerator.d.ts +142 -24
- package/types/particle/ParticleMaterial.d.ts +3 -1
- package/types/particle/ParticleRenderer.d.ts +62 -6
- package/types/particle/ParticleSubEmitterSpawnState.d.ts +36 -0
- package/types/particle/ParticleSystemManager.d.ts +17 -0
- package/types/particle/ParticleTransformFeedbackSimulator.d.ts +48 -0
- package/types/particle/enums/ParticleInheritVelocityMode.d.ts +14 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +26 -1
- package/types/particle/enums/ParticleScaleMode.d.ts +5 -5
- package/types/particle/enums/ParticleSubEmitterInheritProperty.d.ts +17 -0
- package/types/particle/enums/ParticleSubEmitterType.d.ts +12 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
- package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +10 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +19 -1
- package/types/particle/index.d.ts +9 -0
- package/types/particle/modules/BirthSubEmitterCommand.d.ts +29 -0
- package/types/particle/modules/BirthSubEmitterState.d.ts +9 -0
- package/types/particle/modules/Burst.d.ts +23 -2
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +19 -0
- package/types/particle/modules/CustomDataModule.d.ts +90 -0
- package/types/particle/modules/DeathSubEmitterCommand.d.ts +19 -0
- package/types/particle/modules/EmissionModule.d.ts +51 -4
- package/types/particle/modules/EmissionState.d.ts +13 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
- package/types/particle/modules/InheritVelocityModule.d.ts +86 -0
- package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +163 -0
- package/types/particle/modules/MainModule.d.ts +56 -11
- package/types/particle/modules/NoiseModule.d.ts +114 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +46 -4
- package/types/particle/modules/ParticleCompositeGradient.d.ts +8 -2
- package/types/particle/modules/ParticleCurve.d.ts +31 -2
- package/types/particle/modules/ParticleGeneratorModule.d.ts +9 -3
- package/types/particle/modules/ParticleGradient.d.ts +22 -5
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +27 -3
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +25 -0
- package/types/particle/modules/SubEmitter.d.ts +32 -0
- package/types/particle/modules/SubEmittersModule.d.ts +111 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +124 -3
- package/types/particle/modules/shape/BaseShape.d.ts +65 -2
- package/types/particle/modules/shape/BoxShape.d.ts +13 -2
- package/types/particle/modules/shape/CircleShape.d.ts +13 -1
- package/types/particle/modules/shape/ConeShape.d.ts +13 -4
- package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
- package/types/particle/modules/shape/MeshShape.d.ts +26 -3
- package/types/particle/modules/shape/ShapeUtils.d.ts +13 -1
- package/types/particle/modules/shape/SphereShape.d.ts +13 -0
- package/types/physics/CharacterController.d.ts +24 -3
- package/types/physics/Collider.d.ts +47 -3
- package/types/physics/Collision.d.ts +3 -0
- package/types/physics/DynamicCollider.d.ts +33 -7
- package/types/physics/HitResult.d.ts +2 -2
- package/types/physics/PhysicsMaterial.d.ts +11 -2
- package/types/physics/PhysicsScene.d.ts +99 -7
- package/types/physics/StaticCollider.d.ts +5 -0
- package/types/physics/enums/HingeJointFlag.d.ts +14 -1
- package/types/physics/joint/HingeJoint.d.ts +4 -0
- package/types/physics/joint/Joint.d.ts +22 -2
- package/types/physics/joint/JointLimits.d.ts +2 -1
- package/types/physics/joint/JointMotor.d.ts +2 -1
- package/types/physics/shape/ColliderShape.d.ts +44 -7
- package/types/physics/shape/MeshColliderShape.d.ts +13 -12
- package/types/postProcess/FinalPass.d.ts +20 -1
- package/types/postProcess/PostProcess.d.ts +11 -6
- package/types/postProcess/PostProcessEffect.d.ts +6 -1
- package/types/postProcess/PostProcessEffectParameter.d.ts +23 -3
- package/types/postProcess/PostProcessManager.d.ts +43 -0
- package/types/postProcess/PostProcessPass.d.ts +3 -2
- package/types/postProcess/PostProcessUberPass.d.ts +2 -1
- package/types/postProcess/effects/BloomEffect.d.ts +26 -1
- package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +74 -0
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +1 -0
- package/types/renderingHardwareInterface/IPlatformPrimitive.d.ts +6 -0
- package/types/renderingHardwareInterface/IPlatformShaderProgram.d.ts +4 -0
- package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +0 -1
- package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +0 -1
- package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +39 -0
- package/types/renderingHardwareInterface/index.d.ts +5 -0
- package/types/shader/BuiltinShaders.d.ts +27 -0
- package/types/shader/Shader.d.ts +52 -25
- package/types/shader/ShaderBlockProperty.d.ts +19 -0
- package/types/shader/ShaderData.d.ts +43 -4
- package/types/shader/ShaderFactory.d.ts +77 -0
- package/types/shader/ShaderMacro.d.ts +17 -2
- package/types/shader/ShaderMacroCollection.d.ts +57 -1
- package/types/shader/ShaderMacroProcessor.d.ts +54 -0
- package/types/shader/ShaderPass.d.ts +42 -13
- package/types/shader/ShaderProgram.d.ts +92 -1
- package/types/shader/ShaderProgramMap.d.ts +20 -0
- package/types/shader/ShaderProperty.d.ts +17 -0
- package/types/shader/ShaderTagKey.d.ts +2 -0
- package/types/shader/ShaderUniform.d.ts +49 -1
- package/types/shader/ShaderUniformBlock.d.ts +9 -1
- package/types/shader/enums/ConstantBufferBindingPoint.d.ts +7 -0
- package/types/shader/enums/ShaderLanguage.d.ts +1 -3
- package/types/shader/enums/ShaderPreprocessorDirective.d.ts +22 -0
- package/types/shader/index.d.ts +3 -1
- package/types/shader/state/BlendState.d.ts +16 -1
- package/types/shader/state/DepthState.d.ts +16 -1
- package/types/shader/state/RasterState.d.ts +19 -1
- package/types/shader/state/RenderState.d.ts +13 -2
- package/types/shader/state/RenderTargetBlendState.d.ts +2 -1
- package/types/shader/state/StencilState.d.ts +15 -1
- package/types/shadow/CascadedShadowCasterPass.d.ts +5 -3
- package/types/shadow/ShadowSliceData.d.ts +13 -1
- package/types/shadow/ShadowUtils.d.ts +41 -1
- package/types/sky/Sky.d.ts +13 -4
- package/types/sky/SkyBoxMaterial.d.ts +0 -7
- package/types/texture/RenderTarget.d.ts +28 -3
- package/types/texture/Texture.d.ts +46 -12
- package/types/texture/Texture2D.d.ts +4 -1
- package/types/texture/Texture2DArray.d.ts +4 -1
- package/types/texture/TextureCube.d.ts +4 -1
- package/types/texture/TextureUtils.d.ts +15 -1
- package/types/texture/enums/TextureFormat.d.ts +1 -9
- package/types/trail/TrailRenderer.d.ts +13 -8
- package/types/ui/IUICanvas.d.ts +16 -1
- package/types/utils/DisorderedArray.d.ts +3 -1
- package/types/xr/XRManager.d.ts +28 -0
- package/types/RenderPipeline/BatchUtils.d.ts +0 -1
- package/types/RenderPipeline/SubRenderElement.d.ts +0 -22
- package/types/clone/CloneManager.d.ts +0 -31
- package/types/clone/enums/CloneMode.d.ts +0 -13
- package/types/mesh/PrimitiveMeshRestorer.d.ts +0 -1
- package/types/physics/enums/ColliderShapeChangeFlag.d.ts +0 -1
- package/types/shader/ShaderPool.d.ts +0 -1
- package/types/shader/ShaderProgramPool.d.ts +0 -1
- package/types/shader/state/index.d.ts +0 -6
- package/types/shaderlib/ShaderFactory.d.ts +0 -20
- package/types/shaderlib/ShaderLib.d.ts +0 -73
- package/types/shaderlib/index.d.ts +0 -1
- package/types/shaderlib/particle/index.d.ts +0 -15
- package/types/shaderlib/pbr/index.d.ts +0 -11
- package/types/shaderlib/shadow/index.d.ts +0 -8
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { UpdateFlagManager } from "../UpdateFlagManager";
|
|
2
3
|
import { BlendShapeFrame } from "./BlendShapeFrame";
|
|
3
4
|
/**
|
|
4
5
|
* BlendShape.
|
|
@@ -6,6 +7,14 @@ import { BlendShapeFrame } from "./BlendShapeFrame";
|
|
|
6
7
|
export declare class BlendShape {
|
|
7
8
|
/** Name of BlendShape. */
|
|
8
9
|
name: string;
|
|
10
|
+
/** @internal */
|
|
11
|
+
_useBlendShapeNormal: boolean;
|
|
12
|
+
/** @internal */
|
|
13
|
+
_useBlendShapeTangent: boolean;
|
|
14
|
+
/** @internal */
|
|
15
|
+
_layoutChangeManager: UpdateFlagManager;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_dataChangeManager: UpdateFlagManager;
|
|
9
18
|
private _frames;
|
|
10
19
|
/**
|
|
11
20
|
* Frames of BlendShape.
|
|
@@ -23,7 +32,7 @@ export declare class BlendShape {
|
|
|
23
32
|
* @param deltaNormals - Delta normals for the frame being added
|
|
24
33
|
* @param deltaTangents - Delta tangents for the frame being added
|
|
25
34
|
*/
|
|
26
|
-
addFrame(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]): BlendShapeFrame;
|
|
35
|
+
addFrame(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[] | null, deltaTangents?: Vector3[] | null): BlendShapeFrame;
|
|
27
36
|
/**
|
|
28
37
|
* Add a BlendShapeFrame.
|
|
29
38
|
* @param frame - The BlendShapeFrame.
|
|
@@ -33,6 +42,10 @@ export declare class BlendShape {
|
|
|
33
42
|
* Clear all frames.
|
|
34
43
|
*/
|
|
35
44
|
clearFrames(): void;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
_releaseData(): void;
|
|
36
49
|
private _addFrame;
|
|
37
50
|
private _updateUseNormalAndTangent;
|
|
38
51
|
private _frameDataChangeListener;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { UpdateFlagManager } from "../UpdateFlagManager";
|
|
2
3
|
/**
|
|
3
4
|
* BlendShapeFrame.
|
|
4
5
|
*/
|
|
5
6
|
export declare class BlendShapeFrame {
|
|
6
7
|
/** Weight of BlendShapeFrame. */
|
|
7
8
|
readonly weight: number;
|
|
9
|
+
/** @internal */
|
|
10
|
+
_dataChangeManager: UpdateFlagManager;
|
|
8
11
|
private _dirty;
|
|
9
12
|
private _deltaPositions;
|
|
10
13
|
private _deltaNormals;
|
|
@@ -13,19 +16,19 @@ export declare class BlendShapeFrame {
|
|
|
13
16
|
* Delta positions for the frame being added.
|
|
14
17
|
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
15
18
|
*/
|
|
16
|
-
get deltaPositions(): Vector3[];
|
|
19
|
+
get deltaPositions(): Vector3[] | null;
|
|
17
20
|
set deltaPositions(value: Vector3[]);
|
|
18
21
|
/**
|
|
19
22
|
* Delta normals for the frame being added.
|
|
20
23
|
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
21
24
|
*/
|
|
22
|
-
get deltaNormals(): Vector3[];
|
|
25
|
+
get deltaNormals(): Vector3[] | null;
|
|
23
26
|
set deltaNormals(value: Vector3[]);
|
|
24
27
|
/**
|
|
25
28
|
* Delta tangents for the frame being added.
|
|
26
29
|
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
27
30
|
*/
|
|
28
|
-
get deltaTangents(): Vector3[];
|
|
31
|
+
get deltaTangents(): Vector3[] | null;
|
|
29
32
|
set deltaTangents(value: Vector3[]);
|
|
30
33
|
/**
|
|
31
34
|
* Create a BlendShapeFrame.
|
|
@@ -34,7 +37,11 @@ export declare class BlendShapeFrame {
|
|
|
34
37
|
* @param deltaNormals - Delta normals for the frame being added
|
|
35
38
|
* @param deltaTangents - Delta tangents for the frame being added
|
|
36
39
|
*/
|
|
37
|
-
constructor(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]);
|
|
40
|
+
constructor(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[] | null, deltaTangents?: Vector3[] | null);
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
_releaseData(): void;
|
|
38
45
|
}
|
|
39
46
|
export declare enum BlendShapeFrameDirty {
|
|
40
47
|
Position = 1,
|
|
@@ -1 +1,100 @@
|
|
|
1
|
-
|
|
1
|
+
import { BoolUpdateFlag } from "../BoolUpdateFlag";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { Buffer } from "../graphic/Buffer";
|
|
4
|
+
import { ShaderData } from "../shader/ShaderData";
|
|
5
|
+
import { Texture2DArray } from "../texture";
|
|
6
|
+
import { BlendShape } from "./BlendShape";
|
|
7
|
+
import { ModelMesh } from "./ModelMesh";
|
|
8
|
+
import { SkinnedMeshRenderer } from "./SkinnedMeshRenderer";
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class BlendShapeManager {
|
|
13
|
+
private static _blendShapeMacro;
|
|
14
|
+
private static _blendShapeTextureMacro;
|
|
15
|
+
private static _blendShapeNormalMacro;
|
|
16
|
+
private static _blendShapeTangentMacro;
|
|
17
|
+
private static _blendShapeWeightsProperty;
|
|
18
|
+
private static _blendShapeTextureProperty;
|
|
19
|
+
private static _blendShapeTextureInfoProperty;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_blendShapeCount: number;
|
|
22
|
+
/** @internal */
|
|
23
|
+
_blendShapes: BlendShape[];
|
|
24
|
+
/** @internal */
|
|
25
|
+
_subDataDirtyFlags: BoolUpdateFlag[];
|
|
26
|
+
/** @internal */
|
|
27
|
+
_vertexTexture: Texture2DArray;
|
|
28
|
+
/** @internal */
|
|
29
|
+
_vertexBuffers: Buffer[];
|
|
30
|
+
/** @internal */
|
|
31
|
+
_vertices: Float32Array | null;
|
|
32
|
+
/** @internal */
|
|
33
|
+
_uniformOccupiesCount: number;
|
|
34
|
+
/** @internal */
|
|
35
|
+
_bufferBindingOffset: number;
|
|
36
|
+
/** @internal */
|
|
37
|
+
_vertexElementOffset: number;
|
|
38
|
+
private _useBlendNormal;
|
|
39
|
+
private _useBlendTangent;
|
|
40
|
+
private _vertexElementCount;
|
|
41
|
+
private _storeInVertexBufferInfo;
|
|
42
|
+
private _maxCountSingleVertexBuffer;
|
|
43
|
+
private readonly _engine;
|
|
44
|
+
private readonly _modelMesh;
|
|
45
|
+
private readonly _lastHostCreatedInfo;
|
|
46
|
+
private readonly _dataTextureInfo;
|
|
47
|
+
constructor(engine: Engine, modelMesh: ModelMesh);
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
_addBlendShape(blendShape: BlendShape): void;
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
_clearBlendShapes(): void;
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
_updateShaderData(shaderData: ShaderData, skinnedMeshRenderer: SkinnedMeshRenderer): void;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
_useTextureMode(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
_isCreateHost(vertexCount: number): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
_vertexElementsNeedUpdate(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
_needUpdateData(): boolean;
|
|
76
|
+
private _updateVertexBufferIndex;
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
_addVertexElements(modelMesh: ModelMesh): number;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
_update(noLongerReadable: boolean): void;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
_releaseMemoryCache(): void;
|
|
89
|
+
private _createVertexBuffers;
|
|
90
|
+
private _createTextureArray;
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
_updateVertexBuffers(vertexCount: number, force: boolean): void;
|
|
95
|
+
private _updateTextureArray;
|
|
96
|
+
private _updateLayoutChange;
|
|
97
|
+
private _attributeModeUpdateVertexElement;
|
|
98
|
+
private _getVertexBufferModeSupportCount;
|
|
99
|
+
private _filterCondensedBlendShapeWeights;
|
|
100
|
+
}
|
|
@@ -11,11 +11,11 @@ export declare class BufferMesh extends Mesh {
|
|
|
11
11
|
/**
|
|
12
12
|
* Vertex buffer binding collection.
|
|
13
13
|
*/
|
|
14
|
-
get vertexBufferBindings(): Readonly<VertexBufferBinding[]>;
|
|
14
|
+
get vertexBufferBindings(): Readonly<(VertexBufferBinding | null)[]>;
|
|
15
15
|
/**
|
|
16
16
|
* Index buffer binding.
|
|
17
17
|
*/
|
|
18
|
-
get indexBufferBinding(): IndexBufferBinding;
|
|
18
|
+
get indexBufferBinding(): IndexBufferBinding | null;
|
|
19
19
|
/**
|
|
20
20
|
* Vertex element collection.
|
|
21
21
|
*/
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
+
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
3
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
4
|
+
import { RenderElement } from "../RenderPipeline/RenderElement";
|
|
1
5
|
import { Renderer } from "../Renderer";
|
|
2
6
|
import { Mesh } from "../graphic/Mesh";
|
|
7
|
+
import { ShaderMacro } from "../shader/ShaderMacro";
|
|
3
8
|
/**
|
|
4
9
|
* MeshRenderer Component.
|
|
5
10
|
*/
|
|
6
11
|
export declare class MeshRenderer extends Renderer {
|
|
12
|
+
/** @internal */
|
|
13
|
+
static _enableVertexColorMacro: ShaderMacro;
|
|
7
14
|
private static _uvMacro;
|
|
8
15
|
private static _uv1Macro;
|
|
9
16
|
private static _normalMacro;
|
|
10
17
|
private static _tangentMacro;
|
|
11
18
|
private _enableVertexColor;
|
|
19
|
+
/** @internal */
|
|
20
|
+
_mesh: Mesh;
|
|
12
21
|
/**
|
|
13
22
|
* Mesh assigned to the renderer.
|
|
14
23
|
*/
|
|
@@ -19,6 +28,39 @@ export declare class MeshRenderer extends Renderer {
|
|
|
19
28
|
*/
|
|
20
29
|
get enableVertexColor(): boolean;
|
|
21
30
|
set enableVertexColor(value: boolean);
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
constructor(entity: Entity);
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
protected _onDestroy(): void;
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
* @inheritdoc
|
|
42
|
+
*/
|
|
43
|
+
_onClone(target: MeshRenderer): void;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
_prepareRender(context: RenderContext): void;
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
protected _render(context: RenderContext): void;
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
_canBatch(preElement: RenderElement, curElement: RenderElement): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
_batch(preElement: RenderElement | null, curElement: RenderElement): void;
|
|
22
64
|
private _setMesh;
|
|
23
65
|
private _onMeshChanged;
|
|
24
66
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare class MeshTangentUtils {
|
|
6
|
+
static calculateTangents(positions: readonly Vector3[], normals: readonly Vector3[], uvs: readonly Vector2[], indices: ArrayLike<number> | null): Vector4[];
|
|
7
|
+
static calculateTangentsFromBuffer(vertices: Float32Array, indices: ArrayLike<number> | null): Float32Array;
|
|
8
|
+
private static _calculateTangents;
|
|
9
|
+
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Color, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
|
+
import { DataType, TypedArray } from "../base";
|
|
3
4
|
import { Buffer } from "../graphic/Buffer";
|
|
4
5
|
import { Mesh } from "../graphic/Mesh";
|
|
5
6
|
import { VertexBufferBinding } from "../graphic/VertexBufferBinding";
|
|
6
7
|
import { VertexElement } from "../graphic/VertexElement";
|
|
7
8
|
import { BlendShape } from "./BlendShape";
|
|
9
|
+
import { BlendShapeManager } from "./BlendShapeManager";
|
|
8
10
|
import { VertexAttribute } from "./enums/VertexAttribute";
|
|
9
11
|
/**
|
|
10
12
|
* Mesh containing common vertex elements of the model.
|
|
13
|
+
* Define draw ranges with `addSubMesh()` and assign a material to each corresponding MeshRenderer slot.
|
|
11
14
|
*/
|
|
12
15
|
export declare class ModelMesh extends Mesh {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private static _tempVec4;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_blendShapeManager: BlendShapeManager;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_internalVertexBufferIndex: number;
|
|
18
20
|
private _vertexCount;
|
|
19
21
|
private _vertexCountDirty;
|
|
20
22
|
private _dataVersionCounter;
|
|
@@ -55,7 +57,7 @@ export declare class ModelMesh extends Mesh {
|
|
|
55
57
|
/**
|
|
56
58
|
* Vertex buffer binding collection.
|
|
57
59
|
*/
|
|
58
|
-
get vertexBufferBindings(): ReadonlyArray<VertexBufferBinding>;
|
|
60
|
+
get vertexBufferBindings(): ReadonlyArray<VertexBufferBinding | null>;
|
|
59
61
|
/**
|
|
60
62
|
* BlendShapes of this ModelMesh.
|
|
61
63
|
*/
|
|
@@ -160,7 +162,7 @@ export declare class ModelMesh extends Mesh {
|
|
|
160
162
|
/**
|
|
161
163
|
* Get indices for the mesh.
|
|
162
164
|
*/
|
|
163
|
-
getIndices(): Uint8Array | Uint16Array | Uint32Array;
|
|
165
|
+
getIndices(): Uint8Array | Uint16Array | Uint32Array | null;
|
|
164
166
|
/**
|
|
165
167
|
* Set vertex elements.
|
|
166
168
|
* @param elements - Vertex element collection
|
|
@@ -210,18 +212,32 @@ export declare class ModelMesh extends Mesh {
|
|
|
210
212
|
*/
|
|
211
213
|
getBlendShapeName(index: number): string;
|
|
212
214
|
/**
|
|
213
|
-
* Upload data to GPU
|
|
214
|
-
*
|
|
215
|
+
* Upload mesh data to the GPU, generating vertex elements and buffer bindings as needed.
|
|
216
|
+
* Bounds must be set separately for culling.
|
|
215
217
|
*
|
|
216
218
|
* @param releaseData - Whether to release the data cache, release data can reduce memory usage.
|
|
217
219
|
*/
|
|
218
220
|
uploadData(releaseData: boolean): void;
|
|
219
221
|
/**
|
|
220
|
-
* Calculate
|
|
221
|
-
* @
|
|
222
|
-
*
|
|
222
|
+
* Calculate tangents from readable positions, normals and UVs.
|
|
223
|
+
* @remarks
|
|
224
|
+
* Without indices, every three consecutive vertices form a triangle.
|
|
225
|
+
* Incomplete trailing triangles and triangles with zero UV area are ignored.
|
|
226
|
+
* @see http://foundationsofgameenginedev.com/FGED2-sample.pdf
|
|
223
227
|
*/
|
|
224
228
|
calculateTangents(): void;
|
|
229
|
+
/**
|
|
230
|
+
* @internal
|
|
231
|
+
*/
|
|
232
|
+
_setVertexBufferBinding(index: number, binding: VertexBufferBinding | null): void;
|
|
233
|
+
/**
|
|
234
|
+
* @internal
|
|
235
|
+
*/
|
|
236
|
+
_getVertexTypedArray(vertexDataBuffer: ArrayBufferLike, dataType: DataType): TypedArray | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* @internal
|
|
239
|
+
*/
|
|
240
|
+
protected _onDestroy(): void;
|
|
225
241
|
private _getVertexElementData;
|
|
226
242
|
private _beforeSetAdvancedVertexData;
|
|
227
243
|
private _updateAdvancedVertexDataMarks;
|