@galacean/engine-core 2.0.0-alpha.44 → 2.0.0-alpha.46
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 +105 -30
- package/dist/main.js.map +1 -1
- package/dist/module.js +105 -30
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- 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 +27 -1
- package/types/2d/sprite/SpriteMask.d.ts +43 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +29 -0
- 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 +10 -0
- package/types/2d/text/SubFont.d.ts +35 -1
- package/types/2d/text/TextRenderer.d.ts +53 -0
- package/types/2d/text/TextUtils.d.ts +89 -1
- package/types/Background.d.ts +17 -0
- package/types/BasicResources.d.ts +52 -0
- package/types/Camera.d.ts +71 -1
- package/types/Canvas.d.ts +13 -0
- package/types/Component.d.ts +33 -0
- package/types/ComponentsDependencies.d.ts +38 -1
- package/types/ComponentsManager.d.ts +17 -0
- package/types/Engine.d.ts +106 -2
- package/types/Entity.d.ts +91 -1
- package/types/Polyfill.d.ts +12 -1
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +3 -0
- package/types/RenderPipeline/BatcherManager.d.ts +23 -1
- package/types/RenderPipeline/CullingResults.d.ts +17 -1
- package/types/RenderPipeline/DepthOnlyPass.d.ts +18 -1
- package/types/RenderPipeline/InstanceBuffer.d.ts +28 -1
- 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 +9 -0
- 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 -1
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
- package/types/RenderPipeline/index.d.ts +2 -0
- package/types/Renderer.d.ts +58 -0
- package/types/Scene.d.ts +28 -0
- package/types/SceneManager.d.ts +13 -0
- package/types/Script.d.ts +40 -0
- package/types/SystemInfo.d.ts +10 -0
- package/types/Transform.d.ts +19 -0
- package/types/UpdateFlag.d.ts +3 -0
- 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 +5 -0
- package/types/animation/AnimationClipCurveBinding.d.ts +16 -1
- package/types/animation/Animator.d.ts +25 -0
- package/types/animation/AnimatorController.d.ts +17 -0
- package/types/animation/AnimatorControllerLayer.d.ts +9 -0
- package/types/animation/AnimatorControllerParameter.d.ts +4 -0
- package/types/animation/AnimatorState.d.ts +44 -0
- package/types/animation/AnimatorStateInstance.d.ts +8 -0
- package/types/animation/AnimatorStateMachine.d.ts +14 -0
- package/types/animation/AnimatorStateTransition.d.ts +9 -0
- package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -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 +8 -0
- 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 +18 -0
- 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/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/GraphicsResource.d.ts +10 -0
- package/types/asset/IReferable.d.ts +8 -0
- package/types/asset/ReferResource.d.ts +28 -0
- package/types/asset/RenderingStatistics.d.ts +8 -0
- package/types/asset/ResourceManager.d.ts +94 -4
- package/types/audio/AudioClip.d.ts +8 -0
- package/types/audio/AudioManager.d.ts +14 -0
- package/types/audio/AudioSource.d.ts +17 -0
- package/types/base/EngineObject.d.ts +4 -0
- package/types/base/Time.d.ts +13 -0
- package/types/clone/CloneDecorators.d.ts +20 -0
- package/types/clone/CloneUtil.d.ts +30 -1
- package/types/clone/ComponentCloner.d.ts +11 -1
- package/types/enums/CameraType.d.ts +9 -1
- package/types/env-probe/CubeProbe.d.ts +2 -0
- package/types/graphic/Buffer.d.ts +10 -0
- package/types/graphic/BufferUtil.d.ts +5 -0
- package/types/graphic/IndexBufferBinding.d.ts +4 -0
- package/types/graphic/Mesh.d.ts +54 -0
- package/types/graphic/Primitive.d.ts +50 -1
- package/types/graphic/TransformFeedback.d.ts +46 -1
- package/types/graphic/TransformFeedbackPrimitive.d.ts +67 -1
- package/types/graphic/TransformFeedbackSimulator.d.ts +55 -1
- package/types/graphic/VertexBufferBinding.d.ts +4 -0
- package/types/input/InputManager.d.ts +19 -0
- 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 +36 -0
- 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 -0
- package/types/lighting/DirectLight.d.ts +17 -0
- 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 +38 -1
- package/types/material/BaseMaterial.d.ts +4 -0
- package/types/material/Material.d.ts +2 -0
- package/types/mesh/BlendShape.d.ts +13 -0
- package/types/mesh/BlendShapeFrame.d.ts +7 -0
- package/types/mesh/BlendShapeManager.d.ts +101 -1
- package/types/mesh/MeshRenderer.d.ts +37 -0
- package/types/mesh/ModelMesh.d.ts +18 -0
- package/types/mesh/PrimitiveMesh.d.ts +28 -0
- package/types/mesh/PrimitiveMeshRestorer.d.ts +107 -0
- package/types/mesh/Skin.d.ts +10 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +21 -0
- package/types/particle/ParticleBufferUtils.d.ts +26 -1
- package/types/particle/ParticleGenerator.d.ts +102 -0
- package/types/particle/ParticleRenderer.d.ts +55 -0
- package/types/particle/ParticleTransformFeedbackSimulator.d.ts +52 -1
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +25 -1
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
- package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +8 -1
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +17 -1
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +12 -0
- package/types/particle/modules/CustomDataModule.d.ts +5 -0
- package/types/particle/modules/EmissionModule.d.ts +28 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
- package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +20 -1
- package/types/particle/modules/MainModule.d.ts +33 -1
- package/types/particle/modules/NoiseModule.d.ts +12 -1
- package/types/particle/modules/ParticleCompositeCurve.d.ts +37 -0
- package/types/particle/modules/ParticleCurve.d.ts +28 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +7 -0
- package/types/particle/modules/ParticleGradient.d.ts +16 -0
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +12 -0
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +16 -0
- package/types/particle/modules/SubEmitter.d.ts +3 -0
- package/types/particle/modules/SubEmittersModule.d.ts +17 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +28 -1
- package/types/particle/modules/shape/BaseShape.d.ts +33 -1
- package/types/particle/modules/shape/BoxShape.d.ts +13 -1
- package/types/particle/modules/shape/CircleShape.d.ts +13 -0
- package/types/particle/modules/shape/ConeShape.d.ts +13 -0
- package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
- package/types/particle/modules/shape/MeshShape.d.ts +17 -0
- 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 +21 -0
- package/types/physics/Collider.d.ts +39 -0
- package/types/physics/Collision.d.ts +3 -0
- package/types/physics/DynamicCollider.d.ts +14 -0
- package/types/physics/PhysicsMaterial.d.ts +3 -0
- package/types/physics/PhysicsScene.d.ts +51 -0
- package/types/physics/StaticCollider.d.ts +5 -0
- package/types/physics/enums/ColliderShapeChangeFlag.d.ts +8 -1
- 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 +20 -0
- package/types/physics/joint/JointLimits.d.ts +3 -0
- package/types/physics/joint/JointMotor.d.ts +3 -0
- package/types/physics/shape/ColliderShape.d.ts +17 -0
- package/types/physics/shape/MeshColliderShape.d.ts +4 -0
- package/types/postProcess/FinalPass.d.ts +19 -1
- package/types/postProcess/PostProcess.d.ts +2 -0
- package/types/postProcess/PostProcessEffect.d.ts +4 -0
- package/types/postProcess/PostProcessEffectParameter.d.ts +4 -0
- package/types/postProcess/PostProcessManager.d.ts +43 -0
- package/types/postProcess/effects/BloomEffect.d.ts +25 -0
- package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -1
- package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +40 -1
- package/types/shader/Shader.d.ts +22 -0
- package/types/shader/ShaderBlockProperty.d.ts +19 -1
- package/types/shader/ShaderData.d.ts +29 -0
- package/types/shader/ShaderFactory.d.ts +23 -0
- package/types/shader/ShaderMacro.d.ts +15 -0
- package/types/shader/ShaderMacroCollection.d.ts +57 -1
- package/types/shader/ShaderMacroProcessor.d.ts +72 -1
- package/types/shader/ShaderPass.d.ts +38 -0
- package/types/shader/ShaderProgram.d.ts +91 -1
- package/types/shader/ShaderProgramMap.d.ts +20 -1
- 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 -1
- package/types/shader/state/BlendState.d.ts +14 -0
- package/types/shader/state/DepthState.d.ts +14 -0
- package/types/shader/state/RasterState.d.ts +17 -0
- package/types/shader/state/RenderState.d.ts +11 -0
- package/types/shader/state/StencilState.d.ts +13 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +5 -0
- package/types/shadow/ShadowSliceData.d.ts +13 -1
- package/types/shadow/ShadowUtils.d.ts +43 -1
- package/types/sky/Sky.d.ts +9 -0
- package/types/texture/RenderTarget.d.ts +21 -0
- package/types/texture/Texture.d.ts +21 -0
- package/types/texture/Texture2D.d.ts +4 -0
- package/types/texture/Texture2DArray.d.ts +4 -0
- package/types/texture/TextureCube.d.ts +4 -0
- package/types/texture/TextureUtils.d.ts +16 -1
- package/types/trail/TrailRenderer.d.ts +5 -0
- package/types/ui/IUICanvas.d.ts +16 -1
- package/types/utils/DisorderedArray.d.ts +2 -0
- package/types/xr/XRManager.d.ts +28 -0
|
@@ -1 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { ShaderData } from "./ShaderData";
|
|
3
|
+
import { ShaderUniformBlock } from "./ShaderUniformBlock";
|
|
4
|
+
import { InstanceBufferLayout } from "./ShaderFactory";
|
|
5
|
+
/**
|
|
6
|
+
* Shader program, corresponding to the GPU shader program.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare class ShaderProgram {
|
|
10
|
+
private static _counter;
|
|
11
|
+
private static _addLineNum;
|
|
12
|
+
id: number;
|
|
13
|
+
readonly sceneUniformBlock: ShaderUniformBlock;
|
|
14
|
+
readonly cameraUniformBlock: ShaderUniformBlock;
|
|
15
|
+
readonly rendererUniformBlock: ShaderUniformBlock;
|
|
16
|
+
readonly materialUniformBlock: ShaderUniformBlock;
|
|
17
|
+
readonly renderElementUniformBlock: ShaderUniformBlock;
|
|
18
|
+
readonly otherUniformBlock: ShaderUniformBlock;
|
|
19
|
+
/** @internal */
|
|
20
|
+
_uploadRenderCount: number;
|
|
21
|
+
/** @internal */
|
|
22
|
+
_uploadSceneId: number;
|
|
23
|
+
/** @internal */
|
|
24
|
+
_uploadCameraId: number;
|
|
25
|
+
/** @internal */
|
|
26
|
+
_uploadRendererId: number;
|
|
27
|
+
/** @internal */
|
|
28
|
+
_uploadMaterialId: number;
|
|
29
|
+
/** @internal */
|
|
30
|
+
_instanceLayout: InstanceBufferLayout | null;
|
|
31
|
+
attributeLocation: Record<string, GLint>;
|
|
32
|
+
uniformBlockIds: number[];
|
|
33
|
+
private _isValid;
|
|
34
|
+
private _engine;
|
|
35
|
+
private _gl;
|
|
36
|
+
private _glProgram;
|
|
37
|
+
private _activeTextureUint;
|
|
38
|
+
/**
|
|
39
|
+
* Whether this shader program is valid.
|
|
40
|
+
*/
|
|
41
|
+
get isValid(): boolean;
|
|
42
|
+
constructor(engine: Engine, vertexSource: string, fragmentSource: string, transformFeedbackVaryings?: string[]);
|
|
43
|
+
/**
|
|
44
|
+
* Upload all shader data in shader uniform block.
|
|
45
|
+
* @param uniformBlock - shader Uniform block
|
|
46
|
+
* @param shaderData - shader data
|
|
47
|
+
*/
|
|
48
|
+
uploadAll(uniformBlock: ShaderUniformBlock, shaderData: ShaderData): void;
|
|
49
|
+
/**
|
|
50
|
+
* Upload constant shader data in shader uniform block.
|
|
51
|
+
* @param uniformBlock - shader Uniform block
|
|
52
|
+
* @param shaderData - shader data
|
|
53
|
+
*/
|
|
54
|
+
uploadUniforms(uniformBlock: ShaderUniformBlock, shaderData: ShaderData): void;
|
|
55
|
+
/**
|
|
56
|
+
* Upload texture shader data in shader uniform block.
|
|
57
|
+
* @param uniformBlock - shader Uniform block
|
|
58
|
+
* @param shaderData - shader data
|
|
59
|
+
*/
|
|
60
|
+
uploadTextures(uniformBlock: ShaderUniformBlock, shaderData: ShaderData): void;
|
|
61
|
+
/**
|
|
62
|
+
* Upload ungroup texture shader data in shader uniform block.
|
|
63
|
+
*/
|
|
64
|
+
uploadUnGroupTextures(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Grouping other data.
|
|
67
|
+
*/
|
|
68
|
+
groupingOtherUniformBlock(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Bind this shader program.
|
|
71
|
+
* @returns Whether the shader program is switched.
|
|
72
|
+
*/
|
|
73
|
+
bind(): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Destroy this shader program.
|
|
76
|
+
*/
|
|
77
|
+
destroy(): void;
|
|
78
|
+
private _groupingSubOtherUniforms;
|
|
79
|
+
private _groupingUniform;
|
|
80
|
+
/**
|
|
81
|
+
* Init and link program with shader.
|
|
82
|
+
*/
|
|
83
|
+
private _createProgram;
|
|
84
|
+
private _createShader;
|
|
85
|
+
/**
|
|
86
|
+
* record the location of uniform/attribute.
|
|
87
|
+
*/
|
|
88
|
+
private _recordLocation;
|
|
89
|
+
private _getUniformInfos;
|
|
90
|
+
private _getAttributeInfos;
|
|
91
|
+
}
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { ShaderMacroCollection } from "./ShaderMacroCollection";
|
|
3
|
+
import { ShaderProgram } from "./ShaderProgram";
|
|
4
|
+
/**
|
|
5
|
+
* Map keyed by ShaderMacroCollection bitmask, caching ShaderProgram instances.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class ShaderProgramMap {
|
|
9
|
+
engine: Engine;
|
|
10
|
+
private _cacheHierarchyDepth;
|
|
11
|
+
private _cacheMap;
|
|
12
|
+
private _lastQueryMap;
|
|
13
|
+
private _lastQueryKey;
|
|
14
|
+
constructor(engine: Engine);
|
|
15
|
+
get(macros: ShaderMacroCollection): ShaderProgram | null;
|
|
16
|
+
cache(value: ShaderProgram): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
private _recursiveForEach;
|
|
19
|
+
private _resizeCacheMapHierarchy;
|
|
20
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { ShaderDataGroup } from "./enums/ShaderDataGroup";
|
|
1
2
|
import { ShaderPropertyType } from "./enums/ShaderPropertyType";
|
|
2
3
|
/**
|
|
3
4
|
* Shader property.
|
|
4
5
|
*/
|
|
5
6
|
export declare class ShaderProperty {
|
|
7
|
+
/** @internal */
|
|
8
|
+
static _propertyIdMap: Record<number, ShaderProperty>;
|
|
6
9
|
private static _propertyNameCounter;
|
|
7
10
|
private static _propertyNameMap;
|
|
8
11
|
/**
|
|
@@ -11,10 +14,24 @@ export declare class ShaderProperty {
|
|
|
11
14
|
* @returns Shader property
|
|
12
15
|
*/
|
|
13
16
|
static getByName(name: string): ShaderProperty;
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
static _getShaderPropertyGroup(propertyName: string): ShaderDataGroup | null;
|
|
21
|
+
/** @internal */
|
|
22
|
+
_uniqueId: number;
|
|
23
|
+
/** @internal */
|
|
24
|
+
_group: ShaderDataGroup;
|
|
25
|
+
/** @internal */
|
|
26
|
+
_type: ShaderPropertyType;
|
|
14
27
|
/** Shader property name. */
|
|
15
28
|
readonly name: string;
|
|
16
29
|
/**
|
|
17
30
|
* Shader property type.
|
|
18
31
|
*/
|
|
19
32
|
get type(): ShaderPropertyType;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
constructor(name: string);
|
|
20
37
|
}
|
|
@@ -1 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
import { Color, Matrix, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { Texture } from "../texture/Texture";
|
|
4
|
+
import { ShaderPropertyValueType } from "./ShaderData";
|
|
5
|
+
/**
|
|
6
|
+
* Shader uniform。
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare class ShaderUniform {
|
|
10
|
+
name: string;
|
|
11
|
+
propertyId: number;
|
|
12
|
+
location: WebGLUniformLocation;
|
|
13
|
+
applyFunc: (shaderUniform: ShaderUniform, value: ShaderPropertyValueType) => void;
|
|
14
|
+
cacheValue: number | Vector2 | Vector3 | Vector4;
|
|
15
|
+
textureIndex: GLenum | GLenum[];
|
|
16
|
+
textureDefault: Texture | Texture[];
|
|
17
|
+
textureUseCompareMode: boolean;
|
|
18
|
+
private _rhi;
|
|
19
|
+
private _gl;
|
|
20
|
+
constructor(engine: Engine);
|
|
21
|
+
upload1f(shaderUniform: ShaderUniform, value: number): void;
|
|
22
|
+
upload1fv(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
23
|
+
upload2f(shaderUniform: ShaderUniform, value: Vector2 | Vector3 | Vector4 | Color): void;
|
|
24
|
+
upload2fv(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
25
|
+
upload3f(shaderUniform: ShaderUniform, value: Vector3 | Vector4 | Color): void;
|
|
26
|
+
upload3fv(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
27
|
+
upload4f(shaderUniform: ShaderUniform, value: Vector4 | Color): void;
|
|
28
|
+
upload4fv(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
29
|
+
upload1i(shaderUniform: ShaderUniform, value: number): void;
|
|
30
|
+
upload1iv(shaderUniform: ShaderUniform, value: Int32Array): void;
|
|
31
|
+
upload2i(shaderUniform: ShaderUniform, value: Vector2 | Vector3 | Vector4 | Color): void;
|
|
32
|
+
upload2iv(shaderUniform: ShaderUniform, value: Int32Array): void;
|
|
33
|
+
upload3i(shaderUniform: ShaderUniform, value: Vector3 | Vector4 | Color): void;
|
|
34
|
+
upload3iv(shaderUniform: ShaderUniform, value: Int32Array): void;
|
|
35
|
+
upload4i(shaderUniform: ShaderUniform, value: Vector4 | Color): void;
|
|
36
|
+
upload4iv(shaderUniform: ShaderUniform, value: Int32Array): void;
|
|
37
|
+
uploadMat2(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
38
|
+
uploadMat3(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
39
|
+
uploadMat4(shaderUniform: ShaderUniform, value: Matrix): void;
|
|
40
|
+
uploadMat4v(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
41
|
+
uploadMat2x3(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
42
|
+
uploadMat2x4(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
43
|
+
uploadMat3x2(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
44
|
+
uploadMat3x4(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
45
|
+
uploadMat4x2(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
46
|
+
uploadMat4x3(shaderUniform: ShaderUniform, value: Float32Array): void;
|
|
47
|
+
uploadTexture(shaderUniform: ShaderUniform, value: Texture): void;
|
|
48
|
+
uploadTextureArray(shaderUniform: ShaderUniform, value: Texture[]): void;
|
|
49
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { IHardwareRenderer } from "@galacean/engine-design";
|
|
2
3
|
import { Color } from "@galacean/engine-math";
|
|
4
|
+
import { RenderStateElementMap } from "../../BasicResources";
|
|
5
|
+
import { ShaderData } from "../ShaderData";
|
|
6
|
+
import { ShaderProperty } from "../ShaderProperty";
|
|
7
|
+
import { RenderState } from "./RenderState";
|
|
3
8
|
import { RenderTargetBlendState } from "./RenderTargetBlendState";
|
|
4
9
|
/**
|
|
5
10
|
* Blend state.
|
|
@@ -13,5 +18,14 @@ export declare class BlendState extends DataObject {
|
|
|
13
18
|
readonly blendColor: Color;
|
|
14
19
|
/** Whether to use (Alpha-to-Coverage) technology. */
|
|
15
20
|
alphaToCoverage: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_applyShaderDataValue(renderStateDataMap: Record<number, ShaderProperty>, shaderData: ShaderData): void;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* Apply the current blend state by comparing with the last blend state.
|
|
28
|
+
*/
|
|
29
|
+
_apply(hardwareRenderer: IHardwareRenderer, lastRenderState: RenderState, customStates?: RenderStateElementMap): void;
|
|
16
30
|
private _platformApply;
|
|
17
31
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { IHardwareRenderer } from "@galacean/engine-design";
|
|
3
|
+
import { RenderStateElementMap } from "../../BasicResources";
|
|
4
|
+
import { ShaderData } from "../ShaderData";
|
|
5
|
+
import { ShaderProperty } from "../ShaderProperty";
|
|
2
6
|
import { CompareFunction } from "../enums/CompareFunction";
|
|
7
|
+
import { RenderState } from "./RenderState";
|
|
3
8
|
/**
|
|
4
9
|
* Depth state.
|
|
5
10
|
*/
|
|
@@ -11,5 +16,14 @@ export declare class DepthState extends DataObject {
|
|
|
11
16
|
compareFunction: CompareFunction;
|
|
12
17
|
/** Whether the depth value can be written.*/
|
|
13
18
|
writeEnabled: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
_applyShaderDataValue(renderStateDataMap: Record<number, ShaderProperty>, shaderData: ShaderData): void;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* Apply the current depth state by comparing with the last depth state.
|
|
26
|
+
*/
|
|
27
|
+
_apply(hardwareRenderer: IHardwareRenderer, lastRenderState: RenderState, customStates?: RenderStateElementMap): void;
|
|
14
28
|
private _platformApply;
|
|
15
29
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { IHardwareRenderer } from "@galacean/engine-design";
|
|
3
|
+
import { RenderStateElementMap } from "../../BasicResources";
|
|
4
|
+
import { ShaderData } from "../ShaderData";
|
|
5
|
+
import { ShaderProperty } from "../ShaderProperty";
|
|
2
6
|
import { CullMode } from "../enums/CullMode";
|
|
7
|
+
import { RenderState } from "./RenderState";
|
|
3
8
|
/**
|
|
4
9
|
* Raster state.
|
|
5
10
|
*/
|
|
@@ -10,5 +15,17 @@ export declare class RasterState extends DataObject {
|
|
|
10
15
|
depthBias: number;
|
|
11
16
|
/** The scale factor for the variable depth offset for each polygon. */
|
|
12
17
|
slopeScaledDepthBias: number;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_cullFaceEnable: boolean;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_frontFaceInvert: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
_applyShaderDataValue(renderStateDataMap: Record<number, ShaderProperty>, shaderData: ShaderData): void;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
_apply(hardwareRenderer: IHardwareRenderer, lastRenderState: RenderState, frontFaceInvert: boolean, customStates?: RenderStateElementMap): void;
|
|
13
30
|
private _platformApply;
|
|
14
31
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { ShaderData, ShaderProperty } from "..";
|
|
3
|
+
import { RenderStateElementMap } from "../../BasicResources";
|
|
4
|
+
import { Engine } from "../../Engine";
|
|
2
5
|
import { RenderQueueType } from "../enums/RenderQueueType";
|
|
3
6
|
import { BlendState } from "./BlendState";
|
|
4
7
|
import { DepthState } from "./DepthState";
|
|
@@ -18,4 +21,12 @@ export declare class RenderState extends DataObject {
|
|
|
18
21
|
readonly rasterState: RasterState;
|
|
19
22
|
/** Render queue type. */
|
|
20
23
|
renderQueueType: RenderQueueType;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
_applyStates(engine: Engine, frontFaceInvert: boolean, renderStateDataMap: Record<number, ShaderProperty>, shaderData: ShaderData, customRenderStates?: RenderStateElementMap): void;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
_getRenderQueueByShaderData(renderStateDataMap: Record<number, ShaderProperty>, shaderData: ShaderData): RenderQueueType;
|
|
21
32
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { IHardwareRenderer } from "@galacean/engine-design";
|
|
3
|
+
import { RenderStateElementMap } from "../../BasicResources";
|
|
4
|
+
import { ShaderData } from "../ShaderData";
|
|
5
|
+
import { ShaderProperty } from "../ShaderProperty";
|
|
2
6
|
import { CompareFunction } from "../enums/CompareFunction";
|
|
3
7
|
import { StencilOperation } from "../enums/StencilOperation";
|
|
8
|
+
import { RenderState } from "./RenderState";
|
|
4
9
|
/**
|
|
5
10
|
* Stencil state.
|
|
6
11
|
*/
|
|
@@ -31,5 +36,13 @@ export declare class StencilState extends DataObject {
|
|
|
31
36
|
zFailOperationFront: StencilOperation;
|
|
32
37
|
/** specifying the function to use for back face when the stencil test passes, but the depth test fails. */
|
|
33
38
|
zFailOperationBack: StencilOperation;
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
_applyShaderDataValue(renderStateDataMap: Record<number, ShaderProperty>, shaderData: ShaderData): void;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
_apply(hardwareRenderer: IHardwareRenderer, lastRenderState: RenderState, customStates?: RenderStateElementMap): void;
|
|
34
47
|
private _platformApply;
|
|
35
48
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Camera } from "../Camera";
|
|
2
2
|
import { PipelinePass } from "../RenderPipeline/PipelinePass";
|
|
3
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
4
|
/**
|
|
4
5
|
* Cascade shadow caster pass.
|
|
5
6
|
*/
|
|
@@ -36,6 +37,10 @@ export declare class CascadedShadowCasterPass extends PipelinePass {
|
|
|
36
37
|
private _renderTarget;
|
|
37
38
|
private _viewportOffsets;
|
|
38
39
|
constructor(camera: Camera);
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
onRender(context: RenderContext): void;
|
|
39
44
|
private _renderDirectShadowMap;
|
|
40
45
|
private _updateReceiversShaderData;
|
|
41
46
|
private _getCascadesSplitDistance;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { BoundingSphere, Plane } from "@galacean/engine-math";
|
|
2
|
+
import { VirtualCamera } from "../VirtualCamera";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class ShadowSliceData {
|
|
7
|
+
resolution: number;
|
|
8
|
+
virtualCamera: VirtualCamera;
|
|
9
|
+
cullPlanes: Plane[];
|
|
10
|
+
cullPlaneCount: number;
|
|
11
|
+
splitBoundSphere: BoundingSphere;
|
|
12
|
+
sphereCenterZ: number;
|
|
13
|
+
}
|
|
@@ -1 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
import { BoundingBox, BoundingFrustum, Matrix, Plane, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import { Camera } from "../Camera";
|
|
3
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
4
|
+
import { Renderer } from "../Renderer";
|
|
5
|
+
import { DirectLight, Light } from "../lighting";
|
|
6
|
+
import { TextureFormat } from "../texture";
|
|
7
|
+
import { ShadowSliceData } from "./ShadowSliceData";
|
|
8
|
+
import { ShadowResolution } from "./enum/ShadowResolution";
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class ShadowUtils {
|
|
13
|
+
private static _tempMatrix0;
|
|
14
|
+
/** @internal */
|
|
15
|
+
private static _shadowMapCoordMatrix;
|
|
16
|
+
private static _frustumCorners;
|
|
17
|
+
private static _adjustNearPlane;
|
|
18
|
+
private static _adjustFarPlane;
|
|
19
|
+
private static _backPlaneFaces;
|
|
20
|
+
private static _edgePlanePoint2;
|
|
21
|
+
/** near, far, left, right, bottom, top */
|
|
22
|
+
private static _frustumPlaneNeighbors;
|
|
23
|
+
/** near, far, left, right, bottom, top */
|
|
24
|
+
private static _frustumTwoPlaneCorners;
|
|
25
|
+
static readonly atlasBorderSize: number;
|
|
26
|
+
static shadowResolution(value: ShadowResolution): number;
|
|
27
|
+
static shadowDepthFormat(value: ShadowResolution, supportDepthTexture: boolean): TextureFormat;
|
|
28
|
+
static cullingRenderBounds(bounds: BoundingBox, cullPlaneCount: number, cullPlanes: Plane[]): boolean;
|
|
29
|
+
static shadowCullFrustum(context: RenderContext, light: Light, renderer: Renderer, shadowSliceData: ShadowSliceData): void;
|
|
30
|
+
static getBoundSphereByFrustum(near: number, far: number, camera: Camera, forward: Vector3, shadowSliceData: ShadowSliceData): void;
|
|
31
|
+
static getDirectionLightShadowCullPlanes(cameraFrustum: BoundingFrustum, splitDistance: number, cameraNear: number, direction: Vector3, shadowSliceData: ShadowSliceData): void;
|
|
32
|
+
static getDirectionalLightMatrices(lightUp: Vector3, lightSide: Vector3, lightForward: Vector3, cascadeIndex: number, nearPlane: number, shadowResolution: number, shadowSliceData: ShadowSliceData, outShadowMatrices: Float32Array): void;
|
|
33
|
+
static getMaxTileResolutionInAtlas(atlasWidth: number, atlasHeight: number, tileCount: number): number;
|
|
34
|
+
static getShadowBias(light: DirectLight, projectionMatrix: Matrix, shadowResolution: number, out: Vector2): void;
|
|
35
|
+
/**
|
|
36
|
+
* Apply shadow slice scale and offset
|
|
37
|
+
*/
|
|
38
|
+
static applySliceTransform(tileSize: number, atlasWidth: number, atlasHeight: number, cascadeIndex: number, atlasOffset: Vector2, outShadowMatrices: Float32Array): void;
|
|
39
|
+
/**
|
|
40
|
+
* Extract scale and bias from a fade distance to achieve a linear fading of the fade distance.
|
|
41
|
+
*/
|
|
42
|
+
static getScaleAndBiasForLinearDistanceFade(fadeDistance: number, border: number, outInfo: Vector4): void;
|
|
43
|
+
}
|
package/types/sky/Sky.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
1
2
|
import { Mesh } from "../graphic/Mesh";
|
|
2
3
|
import { Material } from "../material";
|
|
3
4
|
/**
|
|
@@ -19,4 +20,12 @@ export declare class Sky {
|
|
|
19
20
|
*/
|
|
20
21
|
get mesh(): Mesh;
|
|
21
22
|
set mesh(value: Mesh);
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
destroy(): void;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
_render(context: RenderContext): void;
|
|
22
31
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
|
+
import { IPlatformRenderTarget } from "../renderingHardwareInterface";
|
|
3
4
|
import { RenderBufferDepthFormat } from "./enums/RenderBufferDepthFormat";
|
|
4
5
|
import { TextureFormat } from "./enums/TextureFormat";
|
|
5
6
|
import { Texture } from "./Texture";
|
|
@@ -7,6 +8,14 @@ import { Texture } from "./Texture";
|
|
|
7
8
|
* The render target used for off-screen rendering.
|
|
8
9
|
*/
|
|
9
10
|
export declare class RenderTarget extends GraphicsResource {
|
|
11
|
+
/** @internal */
|
|
12
|
+
_platformRenderTarget: IPlatformRenderTarget;
|
|
13
|
+
/** @internal */
|
|
14
|
+
_depth: Texture | TextureFormat | null;
|
|
15
|
+
/** @internal */
|
|
16
|
+
_antiAliasing: number;
|
|
17
|
+
/** @internal */
|
|
18
|
+
_depthFormat: TextureFormat | null;
|
|
10
19
|
private _autoGenerateMipmaps;
|
|
11
20
|
private _width;
|
|
12
21
|
private _height;
|
|
@@ -93,4 +102,16 @@ export declare class RenderTarget extends GraphicsResource {
|
|
|
93
102
|
* Generate the mipmap of each attachment texture of the renderTarget according to the configuration.
|
|
94
103
|
*/
|
|
95
104
|
generateMipmaps(): void;
|
|
105
|
+
/**
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
protected _onDestroy(): void;
|
|
109
|
+
/**
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
_blitRenderTarget(): void;
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
_rebuild(): void;
|
|
96
117
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
|
+
import { IPlatformTexture } from "../renderingHardwareInterface";
|
|
3
4
|
import { TextureDepthCompareFunction } from "./enums/TextureDepthCompareFunction";
|
|
4
5
|
import { TextureFilterMode } from "./enums/TextureFilterMode";
|
|
5
6
|
import { TextureFormat } from "./enums/TextureFormat";
|
|
@@ -10,6 +11,14 @@ import { TextureWrapMode } from "./enums/TextureWrapMode";
|
|
|
10
11
|
*/
|
|
11
12
|
export declare abstract class Texture extends GraphicsResource {
|
|
12
13
|
name: string;
|
|
14
|
+
/** @internal */
|
|
15
|
+
_platformTexture: IPlatformTexture;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_mipmap: boolean;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_isDepthTexture: boolean;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_memorySize: number;
|
|
13
22
|
protected _format: TextureFormat;
|
|
14
23
|
protected _width: number;
|
|
15
24
|
protected _height: number;
|
|
@@ -77,6 +86,18 @@ export declare abstract class Texture extends GraphicsResource {
|
|
|
77
86
|
* Generate multi-level textures based on the 0th level data.
|
|
78
87
|
*/
|
|
79
88
|
generateMipmaps(): void;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
_setUseDepthCompareMode(value: boolean): void;
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
_rebuild(): void;
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
protected _onDestroy(): void;
|
|
80
101
|
/**
|
|
81
102
|
* Get the maximum mip level of the corresponding size:rounding down.
|
|
82
103
|
* @remarks http://download.nvidia.com/developer/Papers/2005/NP2_Mipmapping/NP2_Mipmap_Creation.pdf
|
|
@@ -79,4 +79,8 @@ export declare class Texture2DArray extends Texture {
|
|
|
79
79
|
* @param out - Color buffer
|
|
80
80
|
*/
|
|
81
81
|
getPixelBuffer(elementIndex: number, x: number, y: number, width: number, height: number, mipLevel: number, out: ArrayBufferView): void;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
_rebuild(): void;
|
|
82
86
|
}
|
|
@@ -68,4 +68,8 @@ export declare class TextureCube extends Texture {
|
|
|
68
68
|
* @param out - Color buffer
|
|
69
69
|
*/
|
|
70
70
|
getPixelBuffer(face: TextureCubeFace, x: number, y: number, width: number, height: number, mipLevel: number, out: ArrayBufferView): void;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
_rebuild(): void;
|
|
71
75
|
}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { TextureFormat } from "./enums/TextureFormat";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class TextureUtils {
|
|
7
|
+
/**
|
|
8
|
+
* Check if the texture config supports auto mipmap generation with real correction for mipmap and isSRGBColorSpace.
|
|
9
|
+
*/
|
|
10
|
+
static supportGenerateMipmapsWithCorrection(engine: Engine, width: number, height: number, format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean): boolean;
|
|
11
|
+
static supportSRGB(format: TextureFormat): boolean;
|
|
12
|
+
static supportMipmaps(width: number, height: any, isWebGL2: boolean): boolean;
|
|
13
|
+
static supportGenerateMipmaps(format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean, isWebGL2: boolean): boolean;
|
|
14
|
+
static getTextureByteCount(format: TextureFormat, width: number, height: number, mipmapCount: number, faceCount: number): number;
|
|
15
|
+
static getMipLevelByteCount(format: TextureFormat, width: number, height: number): number;
|
|
16
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BoundingBox, Vector2 } from "@galacean/engine-math";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
2
3
|
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
4
|
import { Renderer } from "../Renderer";
|
|
4
5
|
import { ParticleCurve } from "../particle/modules/ParticleCurve";
|
|
@@ -67,6 +68,10 @@ export declare class TrailRenderer extends Renderer {
|
|
|
67
68
|
*/
|
|
68
69
|
get textureScale(): Vector2;
|
|
69
70
|
set textureScale(value: Vector2);
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
constructor(entity: Entity);
|
|
70
75
|
/**
|
|
71
76
|
* Clear all trail points.
|
|
72
77
|
*/
|
package/types/ui/IUICanvas.d.ts
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { Camera } from "../Camera";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
3
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
4
|
+
import { RenderElement } from "../RenderPipeline/RenderElement";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface IUICanvas {
|
|
9
|
+
entity: Entity;
|
|
10
|
+
sortOrder: number;
|
|
11
|
+
_canvasIndex: number;
|
|
12
|
+
_renderElements: RenderElement[];
|
|
13
|
+
_batchedRenderElements: RenderElement[];
|
|
14
|
+
_canRender(camera: Camera): boolean;
|
|
15
|
+
_prepareRender(renderContext: RenderContext): void;
|
|
16
|
+
}
|