@galacean/engine-core 0.9.0-beta.80
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 +24255 -0
- package/dist/main.js.map +1 -0
- package/dist/miniprogram.js +24255 -0
- package/dist/module.js +24138 -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/assembler/TiledSpriteAssembler.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 +53 -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/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/SpriteTileMode.d.ts +11 -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/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/AnimatorTransition.d.ts +14 -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/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/AnimatorStateData.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/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 +95 -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/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/Collision.d.ts +4 -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 +58 -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/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/SkyProceduralMaterial.d.ts +72 -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,18 @@
|
|
|
1
|
+
export interface IInput {
|
|
2
|
+
/**
|
|
3
|
+
* Handler function updated every frame.
|
|
4
|
+
*/
|
|
5
|
+
_update(frameCount?: number): void;
|
|
6
|
+
/**
|
|
7
|
+
* Function called when the engine is destroyed.
|
|
8
|
+
*/
|
|
9
|
+
_destroy(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Function called when focused.
|
|
12
|
+
*/
|
|
13
|
+
_onFocus(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Function called when focus is lost.
|
|
16
|
+
*/
|
|
17
|
+
_onBlur(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Vector2 } from "@galacean/engine-math";
|
|
2
|
+
import { PointerButton } from "../enums/PointerButton";
|
|
3
|
+
import { PointerPhase } from "../enums/PointerPhase";
|
|
4
|
+
/**
|
|
5
|
+
* Pointer.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Pointer {
|
|
8
|
+
/**
|
|
9
|
+
* Unique id.
|
|
10
|
+
* @remarks Start from 0.
|
|
11
|
+
*/
|
|
12
|
+
readonly id: number;
|
|
13
|
+
/** The phase of pointer. */
|
|
14
|
+
phase: PointerPhase;
|
|
15
|
+
/** The button that triggers the pointer event. */
|
|
16
|
+
button: PointerButton;
|
|
17
|
+
/** The currently pressed buttons for this pointer. */
|
|
18
|
+
pressedButtons: PointerButton;
|
|
19
|
+
/** The position of the pointer in screen space pixel coordinates. */
|
|
20
|
+
position: Vector2;
|
|
21
|
+
/** The change of the pointer. */
|
|
22
|
+
deltaPosition: Vector2;
|
|
23
|
+
private _currentPressedEntity;
|
|
24
|
+
private _currentEnteredEntity;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Color, SphericalHarmonics3 } from "@galacean/engine-math";
|
|
2
|
+
import { TextureCube } from "../texture";
|
|
3
|
+
import { DiffuseMode } from "./enums/DiffuseMode";
|
|
4
|
+
/**
|
|
5
|
+
* Ambient light.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AmbientLight {
|
|
8
|
+
private static _shMacro;
|
|
9
|
+
private static _specularMacro;
|
|
10
|
+
private static _decodeRGBMMacro;
|
|
11
|
+
private static _diffuseColorProperty;
|
|
12
|
+
private static _diffuseSHProperty;
|
|
13
|
+
private static _diffuseIntensityProperty;
|
|
14
|
+
private static _specularTextureProperty;
|
|
15
|
+
private static _specularIntensityProperty;
|
|
16
|
+
private static _mipLevelProperty;
|
|
17
|
+
private _diffuseSphericalHarmonics;
|
|
18
|
+
private _diffuseSolidColor;
|
|
19
|
+
private _diffuseIntensity;
|
|
20
|
+
private _specularTexture;
|
|
21
|
+
private _specularIntensity;
|
|
22
|
+
private _diffuseMode;
|
|
23
|
+
private _shArray;
|
|
24
|
+
private _scenes;
|
|
25
|
+
private _specularTextureDecodeRGBM;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to decode from specularTexture with RGBM format.
|
|
28
|
+
*/
|
|
29
|
+
get specularTextureDecodeRGBM(): boolean;
|
|
30
|
+
set specularTextureDecodeRGBM(value: boolean);
|
|
31
|
+
/**
|
|
32
|
+
* Diffuse mode of ambient light.
|
|
33
|
+
*/
|
|
34
|
+
get diffuseMode(): DiffuseMode;
|
|
35
|
+
set diffuseMode(value: DiffuseMode);
|
|
36
|
+
/**
|
|
37
|
+
* Diffuse reflection solid color.
|
|
38
|
+
* @remarks Effective when diffuse reflection mode is `DiffuseMode.SolidColor`.
|
|
39
|
+
*/
|
|
40
|
+
get diffuseSolidColor(): Color;
|
|
41
|
+
set diffuseSolidColor(value: Color);
|
|
42
|
+
/**
|
|
43
|
+
* Diffuse reflection spherical harmonics 3.
|
|
44
|
+
* @remarks Effective when diffuse reflection mode is `DiffuseMode.SphericalHarmonics`.
|
|
45
|
+
*/
|
|
46
|
+
get diffuseSphericalHarmonics(): SphericalHarmonics3;
|
|
47
|
+
set diffuseSphericalHarmonics(value: SphericalHarmonics3);
|
|
48
|
+
/**
|
|
49
|
+
* Diffuse reflection intensity.
|
|
50
|
+
*/
|
|
51
|
+
get diffuseIntensity(): number;
|
|
52
|
+
set diffuseIntensity(value: number);
|
|
53
|
+
/**
|
|
54
|
+
* Specular reflection texture.
|
|
55
|
+
*/
|
|
56
|
+
get specularTexture(): TextureCube;
|
|
57
|
+
set specularTexture(value: TextureCube);
|
|
58
|
+
/**
|
|
59
|
+
* Specular reflection intensity.
|
|
60
|
+
*/
|
|
61
|
+
get specularIntensity(): number;
|
|
62
|
+
set specularIntensity(value: number);
|
|
63
|
+
private _setDiffuseMode;
|
|
64
|
+
private _setSpecularTexture;
|
|
65
|
+
private _setSpecularTextureDecodeRGBM;
|
|
66
|
+
private _preComputeSH;
|
|
67
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Light } from "./Light";
|
|
3
|
+
/**
|
|
4
|
+
* Directional light.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DirectLight extends Light {
|
|
7
|
+
private static _cullingMaskProperty;
|
|
8
|
+
private static _colorProperty;
|
|
9
|
+
private static _directionProperty;
|
|
10
|
+
private static _combinedData;
|
|
11
|
+
private _forward;
|
|
12
|
+
private _reverseDirection;
|
|
13
|
+
/**
|
|
14
|
+
* Get direction.
|
|
15
|
+
*/
|
|
16
|
+
get direction(): Vector3;
|
|
17
|
+
/**
|
|
18
|
+
* Get the opposite direction of the directional light direction.
|
|
19
|
+
*/
|
|
20
|
+
get reverseDirection(): Vector3;
|
|
21
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Color, Matrix } from "@galacean/engine-math";
|
|
2
|
+
import { Component } from "../Component";
|
|
3
|
+
import { Layer } from "../Layer";
|
|
4
|
+
import { ShadowType } from "../shadow";
|
|
5
|
+
/**
|
|
6
|
+
* Light base class.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class Light extends Component {
|
|
9
|
+
/**
|
|
10
|
+
* Each type of light source is at most 10, beyond which it will not take effect.
|
|
11
|
+
* */
|
|
12
|
+
protected static _maxLight: number;
|
|
13
|
+
/** Light Intensity */
|
|
14
|
+
intensity: number;
|
|
15
|
+
/**
|
|
16
|
+
* Culling mask - which layers the light affect.
|
|
17
|
+
* @remarks Support bit manipulation, corresponding to `Layer`.
|
|
18
|
+
*/
|
|
19
|
+
cullingMask: Layer;
|
|
20
|
+
/** How this light casts shadows. */
|
|
21
|
+
shadowType: ShadowType;
|
|
22
|
+
/** Shadow bias.*/
|
|
23
|
+
shadowBias: number;
|
|
24
|
+
/** Shadow mapping normal-based bias. */
|
|
25
|
+
shadowNormalBias: number;
|
|
26
|
+
/** Near plane value to use for shadow frustums. */
|
|
27
|
+
shadowNearPlane: number;
|
|
28
|
+
/** Shadow intensity, the larger the value, the clearer and darker the shadow. */
|
|
29
|
+
shadowStrength: number;
|
|
30
|
+
private _color;
|
|
31
|
+
private _viewMat;
|
|
32
|
+
private _inverseViewMat;
|
|
33
|
+
private _lightColor;
|
|
34
|
+
/**
|
|
35
|
+
* Light Color.
|
|
36
|
+
*/
|
|
37
|
+
get color(): Color;
|
|
38
|
+
set color(value: Color);
|
|
39
|
+
/**
|
|
40
|
+
* View matrix.
|
|
41
|
+
*/
|
|
42
|
+
get viewMatrix(): Matrix;
|
|
43
|
+
/**
|
|
44
|
+
* Inverse view matrix.
|
|
45
|
+
*/
|
|
46
|
+
get inverseViewMatrix(): Matrix;
|
|
47
|
+
protected _getLightColor(): Color;
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Light } from "./Light";
|
|
3
|
+
/**
|
|
4
|
+
* Point light.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PointLight extends Light {
|
|
7
|
+
private static _cullingMaskProperty;
|
|
8
|
+
private static _colorProperty;
|
|
9
|
+
private static _positionProperty;
|
|
10
|
+
private static _distanceProperty;
|
|
11
|
+
private static _combinedData;
|
|
12
|
+
/** Defines a distance cutoff at which the light's intensity must be considered zero. */
|
|
13
|
+
distance: number;
|
|
14
|
+
/**
|
|
15
|
+
* Get light position.
|
|
16
|
+
*/
|
|
17
|
+
get position(): Vector3;
|
|
18
|
+
}
|
|
@@ -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
|
+
}
|