@galacean/engine-core 0.0.0-experimental-animator-additive.1
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/main.js +24671 -0
- package/dist/main.js.map +1 -0
- package/dist/miniprogram.js +24671 -0
- package/dist/module.js +24554 -0
- package/dist/module.js.map +1 -0
- package/package.json +26 -0
- package/types/2d/assembler/IAssembler.d.ts +1 -0
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +1 -0
- package/types/2d/atlas/FontAtlas.d.ts +1 -0
- package/types/2d/atlas/SpriteAtlas.d.ts +36 -0
- package/types/2d/atlas/types.d.ts +64 -0
- package/types/2d/data/RenderData2D.d.ts +1 -0
- package/types/2d/data/VertexData2D.d.ts +1 -0
- package/types/2d/enums/FontStyle.d.ts +11 -0
- package/types/2d/enums/SpriteDirtyFlag.d.ts +13 -0
- package/types/2d/enums/SpriteDrawMode.d.ts +9 -0
- package/types/2d/enums/SpriteMaskInteraction.d.ts +11 -0
- package/types/2d/enums/SpriteMaskLayer.d.ts +71 -0
- package/types/2d/enums/SpriteModifyFlags.d.ts +13 -0
- package/types/2d/enums/TextAlignment.d.ts +22 -0
- package/types/2d/enums/TextOverflow.d.ts +9 -0
- package/types/2d/index.d.ts +9 -0
- package/types/2d/sprite/Sprite.d.ts +97 -0
- package/types/2d/sprite/SpriteMask.d.ts +63 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +77 -0
- package/types/2d/sprite/index.d.ts +3 -0
- package/types/2d/text/CharInfo.d.ts +1 -0
- package/types/2d/text/CharRenderData.d.ts +1 -0
- package/types/2d/text/CharRenderDataPool.d.ts +1 -0
- package/types/2d/text/Font.d.ts +26 -0
- package/types/2d/text/SubFont.d.ts +1 -0
- package/types/2d/text/TextRenderer.d.ts +123 -0
- package/types/2d/text/TextUtils.d.ts +1 -0
- package/types/2d/text/index.d.ts +2 -0
- package/types/Background.d.ts +43 -0
- package/types/BoolUpdateFlag.d.ts +12 -0
- package/types/Camera.d.ts +206 -0
- package/types/Canvas.d.ts +9 -0
- package/types/Component.d.ts +32 -0
- package/types/ComponentsDependencies.d.ts +17 -0
- package/types/ComponentsManager.d.ts +46 -0
- package/types/DisorderedArray.d.ts +18 -0
- package/types/Engine.d.ts +140 -0
- package/types/EngineSettings.d.ts +8 -0
- package/types/Entity.d.ts +151 -0
- package/types/Layer.d.ts +73 -0
- package/types/ListenerUpdateFlag.d.ts +12 -0
- package/types/Platform.d.ts +15 -0
- package/types/RenderPipeline/Basic2DBatcher.d.ts +20 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +66 -0
- package/types/RenderPipeline/ClassPool.d.ts +17 -0
- package/types/RenderPipeline/MeshRenderData.d.ts +15 -0
- package/types/RenderPipeline/MeshRenderElement.d.ts +17 -0
- package/types/RenderPipeline/RenderContext.d.ts +1 -0
- package/types/RenderPipeline/RenderData.d.ts +7 -0
- package/types/RenderPipeline/RenderElement.d.ts +11 -0
- package/types/RenderPipeline/RenderPass.d.ts +55 -0
- package/types/RenderPipeline/RenderQueue.d.ts +38 -0
- package/types/RenderPipeline/SpriteBatcher.d.ts +1 -0
- package/types/RenderPipeline/SpriteElement.d.ts +13 -0
- package/types/RenderPipeline/SpriteMaskBatcher.d.ts +10 -0
- package/types/RenderPipeline/SpriteMaskElement.d.ts +10 -0
- package/types/RenderPipeline/SpriteMaskManager.d.ts +1 -0
- package/types/RenderPipeline/SpriteMaskRenderData.d.ts +10 -0
- package/types/RenderPipeline/SpriteRenderData.d.ts +12 -0
- package/types/RenderPipeline/TextRenderData.d.ts +6 -0
- package/types/RenderPipeline/TextRenderElement.d.ts +6 -0
- package/types/RenderPipeline/enums/PipelineStage.d.ts +9 -0
- package/types/RenderPipeline/index.d.ts +4 -0
- package/types/Renderer.d.ts +119 -0
- package/types/Scene.d.ts +142 -0
- package/types/SceneManager.d.ts +28 -0
- package/types/Script.d.ts +118 -0
- package/types/SystemInfo.d.ts +14 -0
- package/types/Transform.d.ts +258 -0
- package/types/UpdateFlag.d.ts +20 -0
- package/types/UpdateFlagManager.d.ts +1 -0
- package/types/Utils.d.ts +3 -0
- package/types/VirtualCamera.d.ts +1 -0
- package/types/animation/AnimationClip.d.ts +58 -0
- package/types/animation/AnimationClipCurveBinding.d.ts +21 -0
- package/types/animation/AnimationEvent.d.ts +11 -0
- package/types/animation/Animator.d.ts +86 -0
- package/types/animation/AnimatorController.d.ts +32 -0
- package/types/animation/AnimatorControllerLayer.d.ts +18 -0
- package/types/animation/AnimatorState.d.ts +60 -0
- package/types/animation/AnimatorStateMachine.d.ts +37 -0
- package/types/animation/AnimatorStatePlayData.d.ts +1 -0
- package/types/animation/AnimatorStateTransition.d.ts +12 -0
- package/types/animation/AnimatorTransition.d.ts +14 -0
- package/types/animation/AnimatorTransitionBase.d.ts +10 -0
- package/types/animation/Keyframe.d.ts +19 -0
- package/types/animation/StateMachineScript.d.ts +32 -0
- package/types/animation/animationCurve/AnimationArrayCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationBoolCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationColorCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +12 -0
- package/types/animation/animationCurve/AnimationFloatCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationVector2Curve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationVector3Curve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationVector4Curve.d.ts +8 -0
- package/types/animation/animationCurve/index.d.ts +10 -0
- package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +1 -0
- package/types/animation/enums/AnimatorConditionMode.d.ts +8 -0
- package/types/animation/enums/AnimatorCullingMode.d.ts +9 -0
- package/types/animation/enums/AnimatorLayerBlendingMode.d.ts +4 -0
- package/types/animation/enums/AnimatorStatePlayState.d.ts +1 -0
- package/types/animation/enums/InterpolationType.d.ts +13 -0
- package/types/animation/enums/LayerState.d.ts +13 -0
- package/types/animation/enums/PlayState.d.ts +13 -0
- package/types/animation/enums/StateMachineState.d.ts +13 -0
- package/types/animation/enums/WrapMode.d.ts +9 -0
- package/types/animation/index.d.ts +21 -0
- package/types/animation/internal/AnimationEventHandler.d.ts +1 -0
- package/types/animation/internal/AnimatorLayerData.d.ts +1 -0
- package/types/animation/internal/AnimatorPlayableObject.d.ts +23 -0
- package/types/animation/internal/AnimatorStateData.d.ts +1 -0
- package/types/animation/internal/AnimatorStateInfo.d.ts +1 -0
- package/types/animation/internal/AnimatorStateMachineData.d.ts +1 -0
- package/types/animation/internal/AnimatorStatePlayData.d.ts +1 -0
- package/types/animation/internal/AnimatorTempValue.d.ts +1 -0
- package/types/animation/internal/CrossCurveData.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +5 -0
- package/types/animation/internal/animationCurveOwner/Assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/IAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/asset/AssetPromise.d.ts +56 -0
- package/types/asset/AssetType.d.ts +52 -0
- package/types/asset/ContentRestorer.d.ts +17 -0
- package/types/asset/GraphicsResource.d.ts +9 -0
- package/types/asset/IRefObject.d.ts +2 -0
- package/types/asset/IReferable.d.ts +2 -0
- package/types/asset/LoadItem.d.ts +33 -0
- package/types/asset/Loader.d.ts +30 -0
- package/types/asset/RefObject.d.ts +27 -0
- package/types/asset/ReferResource.d.ts +27 -0
- package/types/asset/ResourceManager.d.ts +101 -0
- package/types/asset/request.d.ts +25 -0
- package/types/base/Constant.d.ts +110 -0
- package/types/base/EngineObject.d.ts +24 -0
- package/types/base/Event.d.ts +24 -0
- package/types/base/EventDispatcher.d.ts +79 -0
- package/types/base/Logger.d.ts +11 -0
- package/types/base/StaticInterfaceImplement.d.ts +5 -0
- package/types/base/Time.d.ts +41 -0
- package/types/base/Util.d.ts +14 -0
- package/types/base/index.d.ts +7 -0
- package/types/clone/CloneManager.d.ts +31 -0
- package/types/clone/ComponentCloner.d.ts +14 -0
- package/types/clone/enums/CloneMode.d.ts +13 -0
- package/types/enums/BackgroundMode.d.ts +9 -0
- package/types/enums/BackgroundTextureFillMode.d.ts +8 -0
- package/types/enums/CameraClearFlags.d.ts +13 -0
- package/types/enums/ColorSpace.d.ts +9 -0
- package/types/enums/FogMode.d.ts +13 -0
- package/types/env-probe/CubeProbe.d.ts +34 -0
- package/types/env-probe/Probe.d.ts +58 -0
- package/types/env-probe/index.d.ts +2 -0
- package/types/fog/EXP2Fog.d.ts +15 -0
- package/types/fog/Fog.d.ts +14 -0
- package/types/fog/LinearFog.d.ts +22 -0
- package/types/fog/index.d.ts +3 -0
- package/types/graphic/Buffer.d.ts +105 -0
- package/types/graphic/BufferUtil.d.ts +11 -0
- package/types/graphic/IndexBufferBinding.d.ts +21 -0
- package/types/graphic/Mesh.d.ts +70 -0
- package/types/graphic/SubMesh.d.ts +19 -0
- package/types/graphic/VertexBufferBinding.d.ts +20 -0
- package/types/graphic/VertexElement.d.ts +44 -0
- package/types/graphic/enums/BufferBindFlag.d.ts +9 -0
- package/types/graphic/enums/BufferUsage.d.ts +11 -0
- package/types/graphic/enums/IndexFormat.d.ts +11 -0
- package/types/graphic/enums/MeshTopology.d.ts +19 -0
- package/types/graphic/enums/SetDataOptions.d.ts +9 -0
- package/types/graphic/enums/VertexElementFormat.d.ts +37 -0
- package/types/graphic/index.d.ts +13 -0
- package/types/index.d.ts +53 -0
- package/types/input/InputManager.d.ts +67 -0
- package/types/input/enums/Keys.d.ts +398 -0
- package/types/input/enums/PointerButton.d.ts +33 -0
- package/types/input/enums/PointerPhase.d.ts +15 -0
- package/types/input/index.d.ts +5 -0
- package/types/input/interface/IInput.d.ts +18 -0
- package/types/input/keyboard/KeyboardManager.d.ts +1 -0
- package/types/input/pointer/Pointer.d.ts +25 -0
- package/types/input/pointer/PointerManager.d.ts +1 -0
- package/types/input/wheel/WheelManager.d.ts +1 -0
- package/types/lighting/AmbientLight.d.ts +67 -0
- package/types/lighting/DirectLight.d.ts +21 -0
- package/types/lighting/KHR_lights.d.ts +4 -0
- package/types/lighting/Light.d.ts +48 -0
- package/types/lighting/LightManager.d.ts +5 -0
- package/types/lighting/PointLight.d.ts +18 -0
- package/types/lighting/SpotLight.d.ts +36 -0
- package/types/lighting/enums/DiffuseMode.d.ts +13 -0
- package/types/lighting/index.d.ts +6 -0
- package/types/material/BaseMaterial.d.ts +88 -0
- package/types/material/BlinnPhongMaterial.d.ts +71 -0
- package/types/material/Material.d.ts +51 -0
- package/types/material/PBRBaseMaterial.d.ts +101 -0
- package/types/material/PBRMaterial.d.ts +36 -0
- package/types/material/PBRSpecularMaterial.d.ts +38 -0
- package/types/material/UnlitMaterial.d.ts +33 -0
- package/types/material/enums/BlendMode.d.ts +9 -0
- package/types/material/enums/RenderFace.d.ts +11 -0
- package/types/material/enums/TextureCoordinate.d.ts +13 -0
- package/types/material/index.d.ts +10 -0
- package/types/mesh/BlendShape.d.ts +39 -0
- package/types/mesh/BlendShapeFrame.d.ts +22 -0
- package/types/mesh/BlendShapeManager.d.ts +1 -0
- package/types/mesh/BufferMesh.d.ts +59 -0
- package/types/mesh/MeshRenderer.d.ts +30 -0
- package/types/mesh/ModelMesh.d.ts +226 -0
- package/types/mesh/PrimitiveMesh.d.ts +86 -0
- package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
- package/types/mesh/Skin.d.ts +16 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +62 -0
- package/types/mesh/enums/VertexAttribute.d.ts +33 -0
- package/types/mesh/index.d.ts +8 -0
- package/types/particle/ParticleRenderer.d.ts +235 -0
- package/types/particle/index.d.ts +1 -0
- package/types/physics/CharacterController.d.ts +53 -0
- package/types/physics/Collider.d.ts +29 -0
- package/types/physics/DynamicCollider.d.ts +161 -0
- package/types/physics/HitResult.d.ts +15 -0
- package/types/physics/PhysicsManager.d.ts +95 -0
- package/types/physics/PhysicsMaterial.d.ts +37 -0
- package/types/physics/StaticCollider.d.ts +7 -0
- package/types/physics/enums/ColliderShapeUpAxis.d.ts +11 -0
- package/types/physics/enums/ControllerCollisionFlag.d.ts +11 -0
- package/types/physics/enums/ControllerNonWalkableMode.d.ts +9 -0
- package/types/physics/enums/HingeJointFlag.d.ts +1 -0
- package/types/physics/enums/PhysicsMaterialCombineMode.d.ts +13 -0
- package/types/physics/enums/index.d.ts +4 -0
- package/types/physics/index.d.ts +10 -0
- package/types/physics/joint/FixedJoint.d.ts +3 -0
- package/types/physics/joint/HingeJoint.d.ts +57 -0
- package/types/physics/joint/Joint.d.ts +58 -0
- package/types/physics/joint/JointLimits.d.ts +15 -0
- package/types/physics/joint/JointMotor.d.ts +13 -0
- package/types/physics/joint/SpringJoint.d.ts +42 -0
- package/types/physics/joint/index.d.ts +6 -0
- package/types/physics/shape/BoxColliderShape.d.ts +15 -0
- package/types/physics/shape/CapsuleColliderShape.d.ts +26 -0
- package/types/physics/shape/ColliderShape.d.ts +51 -0
- package/types/physics/shape/PlaneColliderShape.d.ts +7 -0
- package/types/physics/shape/SphereColliderShape.d.ts +13 -0
- package/types/physics/shape/index.d.ts +5 -0
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +6 -0
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +8 -0
- package/types/renderingHardwareInterface/IPlatformRenderTarget.d.ts +20 -0
- package/types/renderingHardwareInterface/IPlatformTexture.d.ts +36 -0
- package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +37 -0
- package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +40 -0
- package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +41 -0
- package/types/renderingHardwareInterface/index.d.ts +6 -0
- package/types/shader/Shader.d.ts +72 -0
- package/types/shader/ShaderData.d.ts +350 -0
- package/types/shader/ShaderMacro.d.ts +10 -0
- package/types/shader/ShaderMacroCollection.d.ts +1 -0
- package/types/shader/ShaderPart.d.ts +41 -0
- package/types/shader/ShaderPass.d.ts +9 -0
- package/types/shader/ShaderPool.d.ts +1 -0
- package/types/shader/ShaderProgram.d.ts +1 -0
- package/types/shader/ShaderProgramPool.d.ts +1 -0
- package/types/shader/ShaderProperty.d.ts +13 -0
- package/types/shader/ShaderTagKey.d.ts +16 -0
- package/types/shader/ShaderUniform.d.ts +1 -0
- package/types/shader/ShaderUniformBlock.d.ts +1 -0
- package/types/shader/SubShader.d.ts +19 -0
- package/types/shader/enums/BlendFactor.d.ts +32 -0
- package/types/shader/enums/BlendOperation.d.ts +16 -0
- package/types/shader/enums/ColorWriteMask.d.ts +18 -0
- package/types/shader/enums/CompareFunction.d.ts +22 -0
- package/types/shader/enums/CullMode.d.ts +12 -0
- package/types/shader/enums/RenderQueueType.d.ts +11 -0
- package/types/shader/enums/ShaderDataGroup.d.ts +13 -0
- package/types/shader/enums/ShaderPropertyType.d.ts +27 -0
- package/types/shader/enums/StencilOperation.d.ts +22 -0
- package/types/shader/index.d.ts +12 -0
- package/types/shader/state/BlendState.d.ts +16 -0
- package/types/shader/state/DepthState.d.ts +14 -0
- package/types/shader/state/RasterState.d.ts +13 -0
- package/types/shader/state/RenderState.d.ts +20 -0
- package/types/shader/state/RenderTargetBlendState.d.ts +24 -0
- package/types/shader/state/StencilState.d.ts +34 -0
- package/types/shaderlib/ShaderFactory.d.ts +17 -0
- package/types/shaderlib/ShaderLib.d.ts +57 -0
- package/types/shaderlib/index.d.ts +1 -0
- package/types/shaderlib/pbr/index.d.ts +9 -0
- package/types/shaderlib/shadow/index.d.ts +8 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +47 -0
- package/types/shadow/ShadowSliceData.d.ts +1 -0
- package/types/shadow/ShadowUtils.d.ts +1 -0
- package/types/shadow/enum/ShadowCascadesMode.d.ts +11 -0
- package/types/shadow/enum/ShadowMode.d.ts +13 -0
- package/types/shadow/enum/ShadowResolution.d.ts +13 -0
- package/types/shadow/enum/ShadowType.d.ts +13 -0
- package/types/shadow/index.d.ts +3 -0
- package/types/sky/Sky.d.ts +14 -0
- package/types/sky/SkyBoxMaterial.d.ts +25 -0
- package/types/sky/index.d.ts +2 -0
- package/types/texture/RenderTarget.d.ts +95 -0
- package/types/texture/Texture.d.ts +77 -0
- package/types/texture/Texture2D.d.ts +68 -0
- package/types/texture/Texture2DArray.d.ts +81 -0
- package/types/texture/TextureCube.d.ts +70 -0
- package/types/texture/enums/RenderBufferDepthFormat.d.ts +21 -0
- package/types/texture/enums/TextureCubeFace.d.ts +17 -0
- package/types/texture/enums/TextureDepthCompareFunction.d.ts +21 -0
- package/types/texture/enums/TextureFilterMode.d.ts +11 -0
- package/types/texture/enums/TextureFormat.d.ts +69 -0
- package/types/texture/enums/TextureWrapMode.d.ts +11 -0
- package/types/texture/index.d.ts +11 -0
- package/types/trail/TrailMaterial.d.ts +5 -0
- package/types/trail/TrailRenderer.d.ts +40 -0
- package/types/trail/index.d.ts +2 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Light } from "./Light";
|
|
3
|
+
/**
|
|
4
|
+
* Spot light.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SpotLight extends Light {
|
|
7
|
+
private static _cullingMaskProperty;
|
|
8
|
+
private static _colorProperty;
|
|
9
|
+
private static _positionProperty;
|
|
10
|
+
private static _directionProperty;
|
|
11
|
+
private static _distanceProperty;
|
|
12
|
+
private static _angleCosProperty;
|
|
13
|
+
private static _penumbraCosProperty;
|
|
14
|
+
private static _combinedData;
|
|
15
|
+
/** Defines a distance cutoff at which the light's intensity must be considered zero. */
|
|
16
|
+
distance: number;
|
|
17
|
+
/** Angle, in radians, from centre of spotlight where falloff begins. */
|
|
18
|
+
angle: number;
|
|
19
|
+
/** Angle, in radians, from falloff begins to ends. */
|
|
20
|
+
penumbra: number;
|
|
21
|
+
private _forward;
|
|
22
|
+
private _inverseDirection;
|
|
23
|
+
private _projectMatrix;
|
|
24
|
+
/**
|
|
25
|
+
* Get light position.
|
|
26
|
+
*/
|
|
27
|
+
get position(): Vector3;
|
|
28
|
+
/**
|
|
29
|
+
* Get light direction.
|
|
30
|
+
*/
|
|
31
|
+
get direction(): Vector3;
|
|
32
|
+
/**
|
|
33
|
+
* Get the opposite direction of the spotlight.
|
|
34
|
+
*/
|
|
35
|
+
get reverseDirection(): Vector3;
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diffuse mode.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum DiffuseMode {
|
|
5
|
+
/** Solid color mode. */
|
|
6
|
+
SolidColor = 0,
|
|
7
|
+
/**
|
|
8
|
+
* SH mode
|
|
9
|
+
* @remarks
|
|
10
|
+
* Use SH3 to represent irradiance environment maps efficiently, allowing for interactive rendering of diffuse objects under distant illumination.
|
|
11
|
+
*/
|
|
12
|
+
SphericalHarmonics = 1
|
|
13
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { Shader } from "../shader";
|
|
3
|
+
import { ShaderMacro } from "../shader/ShaderMacro";
|
|
4
|
+
import { BlendMode } from "./enums/BlendMode";
|
|
5
|
+
import { RenderFace } from "./enums/RenderFace";
|
|
6
|
+
import { Material } from "./Material";
|
|
7
|
+
export declare class BaseMaterial extends Material {
|
|
8
|
+
protected static _baseColorProp: import("../shader").ShaderProperty;
|
|
9
|
+
protected static _baseTextureProp: import("../shader").ShaderProperty;
|
|
10
|
+
protected static _baseTextureMacro: ShaderMacro;
|
|
11
|
+
protected static _tilingOffsetProp: import("../shader").ShaderProperty;
|
|
12
|
+
protected static _normalTextureProp: import("../shader").ShaderProperty;
|
|
13
|
+
protected static _normalIntensityProp: import("../shader").ShaderProperty;
|
|
14
|
+
protected static _normalTextureMacro: ShaderMacro;
|
|
15
|
+
protected static _emissiveColorProp: import("../shader").ShaderProperty;
|
|
16
|
+
protected static _emissiveTextureProp: import("../shader").ShaderProperty;
|
|
17
|
+
protected static _emissiveTextureMacro: ShaderMacro;
|
|
18
|
+
protected static _transparentMacro: ShaderMacro;
|
|
19
|
+
private static _alphaCutoffProp;
|
|
20
|
+
private static _alphaCutoffMacro;
|
|
21
|
+
private _renderFace;
|
|
22
|
+
private _isTransparent;
|
|
23
|
+
private _blendMode;
|
|
24
|
+
/**
|
|
25
|
+
* Shader used by the material.
|
|
26
|
+
*/
|
|
27
|
+
get shader(): Shader;
|
|
28
|
+
set shader(value: Shader);
|
|
29
|
+
/**
|
|
30
|
+
* Whethor transparent of first shader pass render state.
|
|
31
|
+
*/
|
|
32
|
+
get isTransparent(): boolean;
|
|
33
|
+
set isTransparent(value: boolean);
|
|
34
|
+
/**
|
|
35
|
+
* Blend mode of first shader pass render state.
|
|
36
|
+
* @remarks Only take effect when `isTransparent` is `true`.
|
|
37
|
+
*/
|
|
38
|
+
get blendMode(): BlendMode;
|
|
39
|
+
set blendMode(value: BlendMode);
|
|
40
|
+
/**
|
|
41
|
+
* Alpha cutoff value.
|
|
42
|
+
* @remarks
|
|
43
|
+
* Fragments with alpha channel lower than cutoff value will be discarded.
|
|
44
|
+
* `0` means no fragment will be discarded.
|
|
45
|
+
*/
|
|
46
|
+
get alphaCutoff(): number;
|
|
47
|
+
set alphaCutoff(value: number);
|
|
48
|
+
/**
|
|
49
|
+
* Face for render of first shader pass render state.
|
|
50
|
+
*/
|
|
51
|
+
get renderFace(): RenderFace;
|
|
52
|
+
set renderFace(value: RenderFace);
|
|
53
|
+
/**
|
|
54
|
+
* Create a BaseMaterial instance.
|
|
55
|
+
* @param engine - Engine to which the material belongs
|
|
56
|
+
* @param shader - Shader used by the material
|
|
57
|
+
*/
|
|
58
|
+
constructor(engine: Engine, shader: Shader);
|
|
59
|
+
/**
|
|
60
|
+
* Set if is transparent of the shader pass render state.
|
|
61
|
+
* @param passIndex - Shader pass index
|
|
62
|
+
* @param isTransparent - If is transparent
|
|
63
|
+
*/
|
|
64
|
+
setIsTransparent(passIndex: number, isTransparent: boolean): void;
|
|
65
|
+
/**
|
|
66
|
+
* Set the blend mode of shader pass render state.
|
|
67
|
+
* @param passIndex - Shader pass index
|
|
68
|
+
* @param blendMode - Blend mode
|
|
69
|
+
*/
|
|
70
|
+
setBlendMode(passIndex: number, blendMode: BlendMode): void;
|
|
71
|
+
/**
|
|
72
|
+
* Set the render face of shader pass render state.
|
|
73
|
+
* @param passIndex - Shader pass index
|
|
74
|
+
* @param renderFace - Render face
|
|
75
|
+
*/
|
|
76
|
+
setRenderFace(passIndex: number, renderFace: RenderFace): void;
|
|
77
|
+
/**
|
|
78
|
+
* @override
|
|
79
|
+
* Clone and return the instance.
|
|
80
|
+
*/
|
|
81
|
+
clone(): BaseMaterial;
|
|
82
|
+
/**
|
|
83
|
+
* @override
|
|
84
|
+
* Clone to the target material.
|
|
85
|
+
* @param target - target material
|
|
86
|
+
*/
|
|
87
|
+
cloneTo(target: BaseMaterial): void;
|
|
88
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Color, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { Texture2D } from "../texture/Texture2D";
|
|
4
|
+
import { BaseMaterial } from "./BaseMaterial";
|
|
5
|
+
/**
|
|
6
|
+
* Blinn-phong Material.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BlinnPhongMaterial extends BaseMaterial {
|
|
9
|
+
private static _specularColorProp;
|
|
10
|
+
private static _shininessProp;
|
|
11
|
+
private static _specularTextureProp;
|
|
12
|
+
/**
|
|
13
|
+
* Base color.
|
|
14
|
+
*/
|
|
15
|
+
get baseColor(): Color;
|
|
16
|
+
set baseColor(value: Color);
|
|
17
|
+
/**
|
|
18
|
+
* Base texture.
|
|
19
|
+
*/
|
|
20
|
+
get baseTexture(): Texture2D;
|
|
21
|
+
set baseTexture(value: Texture2D);
|
|
22
|
+
/**
|
|
23
|
+
* Specular color.
|
|
24
|
+
*/
|
|
25
|
+
get specularColor(): Color;
|
|
26
|
+
set specularColor(value: Color);
|
|
27
|
+
/**
|
|
28
|
+
* Specular texture.
|
|
29
|
+
*/
|
|
30
|
+
get specularTexture(): Texture2D;
|
|
31
|
+
set specularTexture(value: Texture2D);
|
|
32
|
+
/**
|
|
33
|
+
* Emissive color.
|
|
34
|
+
*/
|
|
35
|
+
get emissiveColor(): Color;
|
|
36
|
+
set emissiveColor(value: Color);
|
|
37
|
+
/**
|
|
38
|
+
* Emissive texture.
|
|
39
|
+
*/
|
|
40
|
+
get emissiveTexture(): Texture2D;
|
|
41
|
+
set emissiveTexture(value: Texture2D);
|
|
42
|
+
/**
|
|
43
|
+
* Normal texture.
|
|
44
|
+
*/
|
|
45
|
+
get normalTexture(): Texture2D;
|
|
46
|
+
set normalTexture(value: Texture2D);
|
|
47
|
+
/**
|
|
48
|
+
* Normal texture intensity.
|
|
49
|
+
*/
|
|
50
|
+
get normalIntensity(): number;
|
|
51
|
+
set normalIntensity(value: number);
|
|
52
|
+
/**
|
|
53
|
+
* Set the specular reflection coefficient, the larger the value, the more convergent the specular reflection effect.
|
|
54
|
+
*/
|
|
55
|
+
get shininess(): number;
|
|
56
|
+
set shininess(value: number);
|
|
57
|
+
/**
|
|
58
|
+
* Tiling and offset of main textures.
|
|
59
|
+
*/
|
|
60
|
+
get tilingOffset(): Vector4;
|
|
61
|
+
set tilingOffset(value: Vector4);
|
|
62
|
+
/**
|
|
63
|
+
* Create a BlinnPhong material instance.
|
|
64
|
+
* @param engine - Engine to which the material belongs
|
|
65
|
+
*/
|
|
66
|
+
constructor(engine: Engine);
|
|
67
|
+
/**
|
|
68
|
+
* @override
|
|
69
|
+
*/
|
|
70
|
+
clone(): BlinnPhongMaterial;
|
|
71
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { IClone } from "@galacean/engine-design";
|
|
2
|
+
import { RefObject } from "../asset/RefObject";
|
|
3
|
+
import { Engine } from "../Engine";
|
|
4
|
+
import { Shader } from "../shader/Shader";
|
|
5
|
+
import { ShaderData } from "../shader/ShaderData";
|
|
6
|
+
import { RenderState } from "../shader/state/RenderState";
|
|
7
|
+
/**
|
|
8
|
+
* Material.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Material extends RefObject implements IClone {
|
|
11
|
+
/** Name. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Shader data. */
|
|
14
|
+
readonly shaderData: ShaderData;
|
|
15
|
+
/**
|
|
16
|
+
* Shader used by the material.
|
|
17
|
+
*/
|
|
18
|
+
get shader(): Shader;
|
|
19
|
+
set shader(value: Shader);
|
|
20
|
+
/**
|
|
21
|
+
* First Render state.
|
|
22
|
+
*/
|
|
23
|
+
get renderState(): RenderState;
|
|
24
|
+
/**
|
|
25
|
+
* Render states.
|
|
26
|
+
*/
|
|
27
|
+
get renderStates(): Readonly<RenderState[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Create a material instance.
|
|
30
|
+
* @param engine - Engine to which the material belongs
|
|
31
|
+
* @param shader - Shader used by the material
|
|
32
|
+
*/
|
|
33
|
+
constructor(engine: Engine, shader: Shader);
|
|
34
|
+
/**
|
|
35
|
+
* Clone and return the instance.
|
|
36
|
+
*/
|
|
37
|
+
clone(): Material;
|
|
38
|
+
/**
|
|
39
|
+
* Clone to the target material.
|
|
40
|
+
* @param target - target material
|
|
41
|
+
*/
|
|
42
|
+
cloneTo(target: Material): void;
|
|
43
|
+
/**
|
|
44
|
+
* @override
|
|
45
|
+
*/
|
|
46
|
+
_addRefCount(value: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* @override
|
|
49
|
+
*/
|
|
50
|
+
protected _onDestroy(): void;
|
|
51
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Color, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { Shader } from "../shader/Shader";
|
|
4
|
+
import { Texture2D } from "../texture/Texture2D";
|
|
5
|
+
import { BaseMaterial } from "./BaseMaterial";
|
|
6
|
+
import { TextureCoordinate } from "./enums/TextureCoordinate";
|
|
7
|
+
/**
|
|
8
|
+
* PBR (Physically-Based Rendering) Material.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class PBRBaseMaterial extends BaseMaterial {
|
|
11
|
+
private static _occlusionTextureIntensityProp;
|
|
12
|
+
private static _occlusionTextureCoordProp;
|
|
13
|
+
private static _occlusionTextureProp;
|
|
14
|
+
private static _clearCoatProp;
|
|
15
|
+
private static _clearCoatTextureProp;
|
|
16
|
+
private static _clearCoatRoughnessProp;
|
|
17
|
+
private static _clearCoatRoughnessTextureProp;
|
|
18
|
+
private static _clearCoatNormalTextureProp;
|
|
19
|
+
/**
|
|
20
|
+
* Base color.
|
|
21
|
+
*/
|
|
22
|
+
get baseColor(): Color;
|
|
23
|
+
set baseColor(value: Color);
|
|
24
|
+
/**
|
|
25
|
+
* Base texture.
|
|
26
|
+
*/
|
|
27
|
+
get baseTexture(): Texture2D;
|
|
28
|
+
set baseTexture(value: Texture2D);
|
|
29
|
+
/**
|
|
30
|
+
* Normal texture.
|
|
31
|
+
*/
|
|
32
|
+
get normalTexture(): Texture2D;
|
|
33
|
+
set normalTexture(value: Texture2D);
|
|
34
|
+
/**
|
|
35
|
+
* Normal texture intensity.
|
|
36
|
+
*/
|
|
37
|
+
get normalTextureIntensity(): number;
|
|
38
|
+
set normalTextureIntensity(value: number);
|
|
39
|
+
/**
|
|
40
|
+
* Emissive color.
|
|
41
|
+
*/
|
|
42
|
+
get emissiveColor(): Color;
|
|
43
|
+
set emissiveColor(value: Color);
|
|
44
|
+
/**
|
|
45
|
+
* Emissive texture.
|
|
46
|
+
*/
|
|
47
|
+
get emissiveTexture(): Texture2D;
|
|
48
|
+
set emissiveTexture(value: Texture2D);
|
|
49
|
+
/**
|
|
50
|
+
* Occlusion texture.
|
|
51
|
+
*/
|
|
52
|
+
get occlusionTexture(): Texture2D;
|
|
53
|
+
set occlusionTexture(value: Texture2D);
|
|
54
|
+
/**
|
|
55
|
+
* Occlusion texture intensity.
|
|
56
|
+
*/
|
|
57
|
+
get occlusionTextureIntensity(): number;
|
|
58
|
+
set occlusionTextureIntensity(value: number);
|
|
59
|
+
/**
|
|
60
|
+
* Occlusion texture uv coordinate.
|
|
61
|
+
* @remarks Must be UV0 or UV1.
|
|
62
|
+
*/
|
|
63
|
+
get occlusionTextureCoord(): TextureCoordinate;
|
|
64
|
+
set occlusionTextureCoord(value: TextureCoordinate);
|
|
65
|
+
/**
|
|
66
|
+
* Tiling and offset of main textures.
|
|
67
|
+
*/
|
|
68
|
+
get tilingOffset(): Vector4;
|
|
69
|
+
set tilingOffset(value: Vector4);
|
|
70
|
+
/**
|
|
71
|
+
* The clearCoat layer intensity, default 0.
|
|
72
|
+
*/
|
|
73
|
+
get clearCoat(): number;
|
|
74
|
+
set clearCoat(value: number);
|
|
75
|
+
/**
|
|
76
|
+
* The clearCoat layer intensity texture.
|
|
77
|
+
*/
|
|
78
|
+
get clearCoatTexture(): Texture2D;
|
|
79
|
+
set clearCoatTexture(value: Texture2D);
|
|
80
|
+
/**
|
|
81
|
+
* The clearCoat layer roughness, default 0.
|
|
82
|
+
*/
|
|
83
|
+
get clearCoatRoughness(): number;
|
|
84
|
+
set clearCoatRoughness(value: number);
|
|
85
|
+
/**
|
|
86
|
+
* The clearCoat layer roughness texture.
|
|
87
|
+
*/
|
|
88
|
+
get clearCoatRoughnessTexture(): Texture2D;
|
|
89
|
+
set clearCoatRoughnessTexture(value: Texture2D);
|
|
90
|
+
/**
|
|
91
|
+
* The clearCoat normal map texture.
|
|
92
|
+
*/
|
|
93
|
+
get clearCoatNormalTexture(): Texture2D;
|
|
94
|
+
set clearCoatNormalTexture(value: Texture2D);
|
|
95
|
+
/**
|
|
96
|
+
* Create a pbr base material instance.
|
|
97
|
+
* @param engine - Engine to which the material belongs
|
|
98
|
+
* @param shader - Shader used by the material
|
|
99
|
+
*/
|
|
100
|
+
protected constructor(engine: Engine, shader: Shader);
|
|
101
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { Texture2D } from "../texture/Texture2D";
|
|
3
|
+
import { PBRBaseMaterial } from "./PBRBaseMaterial";
|
|
4
|
+
/**
|
|
5
|
+
* PBR (Metallic-Roughness Workflow) Material.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PBRMaterial extends PBRBaseMaterial {
|
|
8
|
+
private static _metallicProp;
|
|
9
|
+
private static _roughnessProp;
|
|
10
|
+
private static _roughnessMetallicTextureProp;
|
|
11
|
+
/**
|
|
12
|
+
* Metallic, default 1.0.
|
|
13
|
+
*/
|
|
14
|
+
get metallic(): number;
|
|
15
|
+
set metallic(value: number);
|
|
16
|
+
/**
|
|
17
|
+
* Roughness, default 1.0.
|
|
18
|
+
*/
|
|
19
|
+
get roughness(): number;
|
|
20
|
+
set roughness(value: number);
|
|
21
|
+
/**
|
|
22
|
+
* Roughness metallic texture.
|
|
23
|
+
* @remarks G channel is roughness, B channel is metallic
|
|
24
|
+
*/
|
|
25
|
+
get roughnessMetallicTexture(): Texture2D;
|
|
26
|
+
set roughnessMetallicTexture(value: Texture2D);
|
|
27
|
+
/**
|
|
28
|
+
* Create a pbr metallic-roughness workflow material instance.
|
|
29
|
+
* @param engine - Engine to which the material belongs
|
|
30
|
+
*/
|
|
31
|
+
constructor(engine: Engine);
|
|
32
|
+
/**
|
|
33
|
+
* @override
|
|
34
|
+
*/
|
|
35
|
+
clone(): PBRMaterial;
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Color } from "@galacean/engine-math";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { Texture2D } from "../texture/Texture2D";
|
|
4
|
+
import { PBRBaseMaterial } from "./PBRBaseMaterial";
|
|
5
|
+
/**
|
|
6
|
+
* PBR (Specular-Glossiness Workflow) Material.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PBRSpecularMaterial extends PBRBaseMaterial {
|
|
9
|
+
private static _specularColorProp;
|
|
10
|
+
private static _glossinessProp;
|
|
11
|
+
private static _specularGlossinessTextureProp;
|
|
12
|
+
private static _specularGlossinessTextureMacro;
|
|
13
|
+
/**
|
|
14
|
+
* Specular color.
|
|
15
|
+
*/
|
|
16
|
+
get specularColor(): Color;
|
|
17
|
+
set specularColor(value: Color);
|
|
18
|
+
/**
|
|
19
|
+
* Glossiness.
|
|
20
|
+
*/
|
|
21
|
+
get glossiness(): number;
|
|
22
|
+
set glossiness(value: number);
|
|
23
|
+
/**
|
|
24
|
+
* Specular glossiness texture.
|
|
25
|
+
* @remarks RGB is specular, A is glossiness
|
|
26
|
+
*/
|
|
27
|
+
get specularGlossinessTexture(): Texture2D;
|
|
28
|
+
set specularGlossinessTexture(value: Texture2D);
|
|
29
|
+
/**
|
|
30
|
+
* Create a pbr specular-glossiness workflow material instance.
|
|
31
|
+
* @param engine - Engine to which the material belongs
|
|
32
|
+
*/
|
|
33
|
+
constructor(engine: Engine);
|
|
34
|
+
/**
|
|
35
|
+
* @override
|
|
36
|
+
*/
|
|
37
|
+
clone(): PBRSpecularMaterial;
|
|
38
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Color, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { Texture2D } from "../texture/Texture2D";
|
|
4
|
+
import { BaseMaterial } from "./BaseMaterial";
|
|
5
|
+
/**
|
|
6
|
+
* Unlit Material.
|
|
7
|
+
*/
|
|
8
|
+
export declare class UnlitMaterial extends BaseMaterial {
|
|
9
|
+
/**
|
|
10
|
+
* Base color.
|
|
11
|
+
*/
|
|
12
|
+
get baseColor(): Color;
|
|
13
|
+
set baseColor(value: Color);
|
|
14
|
+
/**
|
|
15
|
+
* Base texture.
|
|
16
|
+
*/
|
|
17
|
+
get baseTexture(): Texture2D;
|
|
18
|
+
set baseTexture(value: Texture2D);
|
|
19
|
+
/**
|
|
20
|
+
* Tiling and offset of main textures.
|
|
21
|
+
*/
|
|
22
|
+
get tilingOffset(): Vector4;
|
|
23
|
+
set tilingOffset(value: Vector4);
|
|
24
|
+
/**
|
|
25
|
+
* Create a unlit material instance.
|
|
26
|
+
* @param engine - Engine to which the material belongs
|
|
27
|
+
*/
|
|
28
|
+
constructor(engine: Engine);
|
|
29
|
+
/**
|
|
30
|
+
* @override
|
|
31
|
+
*/
|
|
32
|
+
clone(): UnlitMaterial;
|
|
33
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { BaseMaterial } from "./BaseMaterial";
|
|
2
|
+
export { BlinnPhongMaterial } from "./BlinnPhongMaterial";
|
|
3
|
+
export { BlendMode } from "./enums/BlendMode";
|
|
4
|
+
export { RenderFace } from "./enums/RenderFace";
|
|
5
|
+
export { TextureCoordinate } from "./enums/TextureCoordinate";
|
|
6
|
+
export { Material } from "./Material";
|
|
7
|
+
export { PBRBaseMaterial } from "./PBRBaseMaterial";
|
|
8
|
+
export { PBRMaterial } from "./PBRMaterial";
|
|
9
|
+
export { PBRSpecularMaterial } from "./PBRSpecularMaterial";
|
|
10
|
+
export { UnlitMaterial } from "./UnlitMaterial";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { BlendShapeFrame } from "./BlendShapeFrame";
|
|
3
|
+
/**
|
|
4
|
+
* BlendShape.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BlendShape {
|
|
7
|
+
/** Name of BlendShape. */
|
|
8
|
+
name: string;
|
|
9
|
+
private _dataChangeManager;
|
|
10
|
+
private _frames;
|
|
11
|
+
/**
|
|
12
|
+
* Frames of BlendShape.
|
|
13
|
+
*/
|
|
14
|
+
get frames(): Readonly<BlendShapeFrame[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a BlendShape.
|
|
17
|
+
* @param name - BlendShape name.
|
|
18
|
+
*/
|
|
19
|
+
constructor(name: string);
|
|
20
|
+
/**
|
|
21
|
+
* Add a BlendShapeFrame by weight, deltaPositions, deltaNormals and deltaTangents.
|
|
22
|
+
* @param weight - Weight of BlendShapeFrame
|
|
23
|
+
* @param deltaPositions - Delta positions for the frame being added
|
|
24
|
+
* @param deltaNormals - Delta normals for the frame being added
|
|
25
|
+
* @param deltaTangents - Delta tangents for the frame being added
|
|
26
|
+
*/
|
|
27
|
+
addFrame(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]): BlendShapeFrame;
|
|
28
|
+
/**
|
|
29
|
+
* Add a BlendShapeFrame.
|
|
30
|
+
* @param frame - The BlendShapeFrame.
|
|
31
|
+
*/
|
|
32
|
+
addFrame(frame: BlendShapeFrame): void;
|
|
33
|
+
/**
|
|
34
|
+
* Clear all frames.
|
|
35
|
+
*/
|
|
36
|
+
clearFrames(): void;
|
|
37
|
+
private _addFrame;
|
|
38
|
+
private _updateUseNormalAndTangent;
|
|
39
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
/**
|
|
3
|
+
* BlendShapeFrame.
|
|
4
|
+
*/
|
|
5
|
+
export declare class BlendShapeFrame {
|
|
6
|
+
/** Weight of BlendShapeFrame. */
|
|
7
|
+
readonly weight: number;
|
|
8
|
+
/** Delta positions for the frame being added. */
|
|
9
|
+
readonly deltaPositions: Readonly<Readonly<Vector3>[]>;
|
|
10
|
+
/** Delta normals for the frame being added. */
|
|
11
|
+
readonly deltaNormals: Readonly<Readonly<Vector3[]> | null>;
|
|
12
|
+
/** Delta tangents for the frame being added. */
|
|
13
|
+
readonly deltaTangents: Readonly<Readonly<Vector3[]> | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Create a BlendShapeFrame.
|
|
16
|
+
* @param weight - Weight of BlendShapeFrame
|
|
17
|
+
* @param deltaPositions - Delta positions for the frame being added
|
|
18
|
+
* @param deltaNormals - Delta normals for the frame being added
|
|
19
|
+
* @param deltaTangents - Delta tangents for the frame being added
|
|
20
|
+
*/
|
|
21
|
+
constructor(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]);
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { IndexBufferBinding, IndexFormat, Mesh, Buffer, VertexBufferBinding, VertexElement } from "../graphic";
|
|
2
|
+
/**
|
|
3
|
+
* BufferMesh.
|
|
4
|
+
*/
|
|
5
|
+
export declare class BufferMesh extends Mesh {
|
|
6
|
+
/**
|
|
7
|
+
* Instanced count, disable instanced drawing when set zero.
|
|
8
|
+
*/
|
|
9
|
+
get instanceCount(): number;
|
|
10
|
+
set instanceCount(value: number);
|
|
11
|
+
/**
|
|
12
|
+
* Vertex buffer binding collection.
|
|
13
|
+
*/
|
|
14
|
+
get vertexBufferBindings(): Readonly<VertexBufferBinding[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Index buffer binding.
|
|
17
|
+
*/
|
|
18
|
+
get indexBufferBinding(): IndexBufferBinding;
|
|
19
|
+
/**
|
|
20
|
+
* Vertex element collection.
|
|
21
|
+
*/
|
|
22
|
+
get vertexElements(): Readonly<VertexElement[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Set vertex elements.
|
|
25
|
+
* @param elements - Vertex element collection
|
|
26
|
+
*/
|
|
27
|
+
setVertexElements(elements: VertexElement[]): void;
|
|
28
|
+
/**
|
|
29
|
+
* Set vertex buffer binding.
|
|
30
|
+
* @param vertexBufferBindings - Vertex buffer binding
|
|
31
|
+
* @param index - Vertex buffer index, the default value is 0
|
|
32
|
+
*/
|
|
33
|
+
setVertexBufferBinding(vertexBufferBindings: VertexBufferBinding, index?: number): void;
|
|
34
|
+
/**
|
|
35
|
+
* Set vertex buffer binding.
|
|
36
|
+
* @param vertexBuffer - Vertex buffer
|
|
37
|
+
* @param stride - Vertex buffer data stride
|
|
38
|
+
* @param index - Vertex buffer index, the default value is 0
|
|
39
|
+
*/
|
|
40
|
+
setVertexBufferBinding(vertexBuffer: Buffer, stride: number, index?: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* Set vertex buffer binding.
|
|
43
|
+
* @param vertexBufferBindings - Vertex buffer binding
|
|
44
|
+
* @param firstIndex - First vertex buffer index, the default value is 0
|
|
45
|
+
*/
|
|
46
|
+
setVertexBufferBindings(vertexBufferBindings: VertexBufferBinding[], firstIndex?: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* Set index buffer binding.
|
|
49
|
+
* @param buffer - Index buffer
|
|
50
|
+
* @param format - Index buffer format
|
|
51
|
+
*/
|
|
52
|
+
setIndexBufferBinding(buffer: Buffer, format: IndexFormat): void;
|
|
53
|
+
/**
|
|
54
|
+
* Set index buffer binding.
|
|
55
|
+
* @param bufferBinding - Index buffer binding
|
|
56
|
+
* @remarks When bufferBinding is null, it will clear IndexBufferBinding
|
|
57
|
+
*/
|
|
58
|
+
setIndexBufferBinding(bufferBinding: IndexBufferBinding | null): void;
|
|
59
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
+
import { ICustomClone } from "../clone/ComponentCloner";
|
|
3
|
+
import { Mesh } from "../graphic/Mesh";
|
|
4
|
+
import { Renderer } from "../Renderer";
|
|
5
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
6
|
+
/**
|
|
7
|
+
* MeshRenderer Component.
|
|
8
|
+
*/
|
|
9
|
+
export declare class MeshRenderer extends Renderer implements ICustomClone {
|
|
10
|
+
private static _uvMacro;
|
|
11
|
+
private static _uv1Macro;
|
|
12
|
+
private static _normalMacro;
|
|
13
|
+
private static _tangentMacro;
|
|
14
|
+
private static _vertexColorMacro;
|
|
15
|
+
/**
|
|
16
|
+
* Mesh assigned to the renderer.
|
|
17
|
+
*/
|
|
18
|
+
get mesh(): Mesh;
|
|
19
|
+
set mesh(value: Mesh);
|
|
20
|
+
/**
|
|
21
|
+
* @override
|
|
22
|
+
*/
|
|
23
|
+
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
24
|
+
/**
|
|
25
|
+
* @override
|
|
26
|
+
*/
|
|
27
|
+
protected _render(context: RenderContext): void;
|
|
28
|
+
private _setMesh;
|
|
29
|
+
private _onMeshChanged;
|
|
30
|
+
}
|