@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
package/types/Camera.d.ts
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { Matrix, Ray, Rect, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
1
|
+
import { BoundingFrustum, Matrix, Ray, Rect, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
2
|
import { Component } from "./Component";
|
|
3
|
+
import { Entity } from "./Entity";
|
|
3
4
|
import { Layer } from "./Layer";
|
|
5
|
+
import { BasicRenderPipeline } from "./RenderPipeline/BasicRenderPipeline";
|
|
6
|
+
import { VirtualCamera } from "./VirtualCamera";
|
|
4
7
|
import { AntiAliasing } from "./enums/AntiAliasing";
|
|
5
8
|
import { CameraClearFlags } from "./enums/CameraClearFlags";
|
|
9
|
+
import { CameraModifyFlags } from "./enums/CameraModifyFlags";
|
|
10
|
+
import { CameraType } from "./enums/CameraType";
|
|
6
11
|
import { DepthTextureMode } from "./enums/DepthTextureMode";
|
|
7
12
|
import { Downsampling } from "./enums/Downsampling";
|
|
8
13
|
import { MSAASamples } from "./enums/MSAASamples";
|
|
9
14
|
import { ReplacementFailureStrategy } from "./enums/ReplacementFailureStrategy";
|
|
10
15
|
import { Shader } from "./shader/Shader";
|
|
11
16
|
import { ShaderData } from "./shader/ShaderData";
|
|
17
|
+
import { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
|
|
18
|
+
import { ShaderProperty } from "./shader/ShaderProperty";
|
|
12
19
|
import { ShaderTagKey } from "./shader/ShaderTagKey";
|
|
20
|
+
import { TextureFormat } from "./texture";
|
|
13
21
|
import { RenderTarget } from "./texture/RenderTarget";
|
|
14
22
|
import { TextureCubeFace } from "./texture/enums/TextureCubeFace";
|
|
15
23
|
/**
|
|
@@ -17,6 +25,12 @@ import { TextureCubeFace } from "./texture/enums/TextureCubeFace";
|
|
|
17
25
|
* @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
|
|
18
26
|
*/
|
|
19
27
|
export declare class Camera extends Component {
|
|
28
|
+
/** @internal */
|
|
29
|
+
static _cameraDepthTextureProperty: ShaderProperty;
|
|
30
|
+
/** @internal */
|
|
31
|
+
static _cameraOpaqueTextureProperty: ShaderProperty;
|
|
32
|
+
/** @internal */
|
|
33
|
+
static _cameraAOTextureProperty: ShaderProperty;
|
|
20
34
|
private static _inverseViewMatrixProperty;
|
|
21
35
|
private static _cameraPositionProperty;
|
|
22
36
|
private static _cameraForwardProperty;
|
|
@@ -70,6 +84,24 @@ export declare class Camera extends Component {
|
|
|
70
84
|
* @defaultValue `false`
|
|
71
85
|
*/
|
|
72
86
|
isAlphaOutputRequired: boolean;
|
|
87
|
+
/** @internal */
|
|
88
|
+
_cameraType: CameraType;
|
|
89
|
+
/** @internal */
|
|
90
|
+
_globalShaderMacro: ShaderMacroCollection;
|
|
91
|
+
/** @internal */
|
|
92
|
+
_frustum: BoundingFrustum;
|
|
93
|
+
/** @internal */
|
|
94
|
+
_renderPipeline: BasicRenderPipeline;
|
|
95
|
+
/** @internal */
|
|
96
|
+
_virtualCamera: VirtualCamera;
|
|
97
|
+
/** @internal */
|
|
98
|
+
_replacementShader: Shader;
|
|
99
|
+
/** @internal */
|
|
100
|
+
_replacementSubShaderTag: ShaderTagKey;
|
|
101
|
+
/** @internal */
|
|
102
|
+
_replacementFailureStrategy: ReplacementFailureStrategy;
|
|
103
|
+
/** @internal */
|
|
104
|
+
_cameraIndex: number;
|
|
73
105
|
private _priority;
|
|
74
106
|
private _isCustomViewMatrix;
|
|
75
107
|
private _isCustomProjectionMatrix;
|
|
@@ -189,6 +221,10 @@ export declare class Camera extends Component {
|
|
|
189
221
|
*/
|
|
190
222
|
get msaaSamples(): MSAASamples;
|
|
191
223
|
set msaaSamples(value: MSAASamples);
|
|
224
|
+
/**
|
|
225
|
+
* @internal
|
|
226
|
+
*/
|
|
227
|
+
constructor(entity: Entity);
|
|
192
228
|
/**
|
|
193
229
|
* Restore the view matrix to the world matrix of the entity.
|
|
194
230
|
*/
|
|
@@ -302,6 +338,40 @@ export declare class Camera extends Component {
|
|
|
302
338
|
* @inheritdoc
|
|
303
339
|
*/
|
|
304
340
|
_onDisableInScene(): void;
|
|
341
|
+
/**
|
|
342
|
+
* @internal
|
|
343
|
+
* Whether independent canvas is enabled.
|
|
344
|
+
*/
|
|
345
|
+
_isIndependentCanvasEnabled(): boolean;
|
|
346
|
+
/**
|
|
347
|
+
* @internal
|
|
348
|
+
*/
|
|
349
|
+
_getInternalColorTextureFormat(): TextureFormat;
|
|
350
|
+
/**
|
|
351
|
+
* @internal
|
|
352
|
+
*/
|
|
353
|
+
_needFinalPass(): boolean;
|
|
354
|
+
/**
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
_getTargetColorTextureFormat(): TextureFormat;
|
|
358
|
+
/**
|
|
359
|
+
* @internal
|
|
360
|
+
*/
|
|
361
|
+
_isTargetFormatHDR(): boolean;
|
|
362
|
+
/**
|
|
363
|
+
* @internal
|
|
364
|
+
*/
|
|
365
|
+
_registerModifyListener(onChange: (flag: CameraModifyFlags) => void): void;
|
|
366
|
+
/**
|
|
367
|
+
* @internal
|
|
368
|
+
*/
|
|
369
|
+
_unRegisterModifyListener(onChange: (flag: CameraModifyFlags) => void): void;
|
|
370
|
+
/**
|
|
371
|
+
* @internal
|
|
372
|
+
* @inheritdoc
|
|
373
|
+
*/
|
|
374
|
+
protected _onDestroy(): void;
|
|
305
375
|
private _updatePixelViewport;
|
|
306
376
|
private _adjustPixelViewport;
|
|
307
377
|
private _viewMatrixChange;
|
package/types/Canvas.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { UpdateFlagManager } from "./UpdateFlagManager";
|
|
1
2
|
/**
|
|
2
3
|
* The canvas the engine renders to; owns the render-buffer resolution.
|
|
3
4
|
*/
|
|
4
5
|
export declare abstract class Canvas {
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
_sizeUpdateFlagManager: UpdateFlagManager;
|
|
5
10
|
private _width;
|
|
6
11
|
private _height;
|
|
7
12
|
/**
|
|
@@ -30,6 +35,14 @@ export declare abstract class Canvas {
|
|
|
30
35
|
*/
|
|
31
36
|
abstract setAutoResolution(scale?: number): void;
|
|
32
37
|
protected _setResolution(width: number, height: number): void;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
_pumpPendingResolution(): void;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
abstract _destroy(): void;
|
|
33
46
|
protected _exitAutoResolution(): void;
|
|
34
47
|
protected abstract _onResolutionChanged(width: number, height: number): void;
|
|
35
48
|
}
|
package/types/Component.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { IReferable } from "./asset/IReferable";
|
|
2
2
|
import { EngineObject } from "./base";
|
|
3
3
|
import { Entity } from "./Entity";
|
|
4
|
+
import { ActiveChangeFlag } from "./enums/ActiveChangeFlag";
|
|
4
5
|
import { Scene } from "./Scene";
|
|
5
6
|
/**
|
|
6
7
|
* The base class of the components.
|
|
7
8
|
*/
|
|
8
9
|
export declare class Component extends EngineObject {
|
|
10
|
+
/** @internal */
|
|
11
|
+
_entity: Entity;
|
|
12
|
+
/** @internal */
|
|
13
|
+
_awoken: boolean;
|
|
9
14
|
protected _phasedActiveInScene: boolean;
|
|
10
15
|
private _phasedActive;
|
|
11
16
|
private _enabled;
|
|
@@ -23,5 +28,33 @@ export declare class Component extends EngineObject {
|
|
|
23
28
|
*/
|
|
24
29
|
get scene(): Scene;
|
|
25
30
|
constructor(entity: Entity);
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
_onAwake(): void;
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
_onEnable(): void;
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
_onDisable(): void;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
_onEnableInScene(): void;
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
_onDisableInScene(): void;
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
_setActive(value: boolean, activeChangeFlag: ActiveChangeFlag): void;
|
|
26
55
|
protected _addResourceReferCount(resource: IReferable, count: number): void;
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
protected _onDestroy(): void;
|
|
27
60
|
}
|
|
@@ -1,4 +1,33 @@
|
|
|
1
|
-
import { ComponentConstructor } from "./Entity";
|
|
1
|
+
import { ComponentConstructor, Entity } from "./Entity";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Used for component dependency registration.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ComponentsDependencies {
|
|
7
|
+
private static _invDependenciesMap;
|
|
8
|
+
static _dependenciesMap: Map<ComponentConstructor, DependentInfo>;
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
static _addCheck(entity: Entity, type: ComponentConstructor): void;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
static _hasDependencies(type: ComponentConstructor): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
static _removeCheck(entity: Entity, type: ComponentConstructor, replace?: ComponentConstructor): void;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
static _addDependency(targetInfo: DependentInfo, dependentComponent: ComponentConstructor, map: Map<DependentInfo, ComponentConstructor[]>): void;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
static _addInvDependency(currentComponent: ComponentConstructor, dependentComponent: ComponentConstructor): void;
|
|
29
|
+
private constructor();
|
|
30
|
+
}
|
|
2
31
|
/**
|
|
3
32
|
* Declare dependent component.
|
|
4
33
|
* @param component - Dependent component
|
|
@@ -20,3 +49,11 @@ export declare enum DependentMode {
|
|
|
20
49
|
/** Auto add if dependent components do not exist. */
|
|
21
50
|
AutoAdd = 1
|
|
22
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
interface DependentInfo {
|
|
56
|
+
mode: DependentMode;
|
|
57
|
+
components: ComponentConstructor[];
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -4,10 +4,23 @@ import { Renderer } from "./Renderer";
|
|
|
4
4
|
import { Script } from "./Script";
|
|
5
5
|
import { Animator } from "./animation";
|
|
6
6
|
import { IUICanvas } from "./ui/IUICanvas";
|
|
7
|
+
import { DisorderedArray } from "./utils/DisorderedArray";
|
|
7
8
|
/**
|
|
8
9
|
* The manager of the components.
|
|
9
10
|
*/
|
|
10
11
|
export declare class ComponentsManager {
|
|
12
|
+
/** @internal */
|
|
13
|
+
_cameraNeedSorting: boolean;
|
|
14
|
+
/** @internal */
|
|
15
|
+
_activeCameras: DisorderedArray<Camera>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_renderers: DisorderedArray<Renderer>;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_overlayCanvases: DisorderedArray<IUICanvas>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_overlayCanvasesSortingDirty: boolean;
|
|
22
|
+
/** @internal */
|
|
23
|
+
_canvases: DisorderedArray<IUICanvas>;
|
|
11
24
|
private _onStartScripts;
|
|
12
25
|
private _onUpdateScripts;
|
|
13
26
|
private _onLateUpdateScripts;
|
|
@@ -45,4 +58,8 @@ export declare class ComponentsManager {
|
|
|
45
58
|
callCameraOnEndRender(camera: Camera): void;
|
|
46
59
|
getActiveChangedTempList(): Component[];
|
|
47
60
|
putActiveChangedTempList(componentContainer: Component[]): void;
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
_gc(): void;
|
|
48
65
|
}
|
package/types/Engine.d.ts
CHANGED
|
@@ -1,24 +1,100 @@
|
|
|
1
|
-
import { IHardwareRenderer, IInputOptions, IPhysics, IShaderCompiler, IXRDevice } from "@galacean/engine-design";
|
|
1
|
+
import { IHardwareRenderer, IInputOptions, IPhysics, IPhysicsManager, IShaderCompiler, IXRDevice } from "@galacean/engine-design";
|
|
2
|
+
import { CharRenderInfo } from "./2d/text/CharRenderInfo";
|
|
3
|
+
import { Font } from "./2d/text/Font";
|
|
4
|
+
import { BasicResources } from "./BasicResources";
|
|
2
5
|
import { Canvas } from "./Canvas";
|
|
3
6
|
import { EngineSettings } from "./EngineSettings";
|
|
4
7
|
import { Entity } from "./Entity";
|
|
8
|
+
import { BatcherManager } from "./RenderPipeline/BatcherManager";
|
|
9
|
+
import { RenderContext } from "./RenderPipeline/RenderContext";
|
|
10
|
+
import { RenderTargetPool } from "./RenderPipeline/RenderTargetPool";
|
|
11
|
+
import { RenderElement } from "./RenderPipeline/RenderElement";
|
|
12
|
+
import { Scene } from "./Scene";
|
|
5
13
|
import { SceneManager } from "./SceneManager";
|
|
6
14
|
import { RenderingStatistics } from "./asset/RenderingStatistics";
|
|
7
15
|
import { ResourceManager } from "./asset/ResourceManager";
|
|
8
|
-
import { EventDispatcher, Time } from "./base";
|
|
16
|
+
import { EngineObject, EventDispatcher, Time } from "./base";
|
|
9
17
|
import { InputManager } from "./input";
|
|
10
18
|
import { ParticleBufferUtils } from "./particle/ParticleBufferUtils";
|
|
19
|
+
import { ColliderShape } from "./physics/shape/ColliderShape";
|
|
11
20
|
import { PostProcessPass } from "./postProcess/PostProcessPass";
|
|
21
|
+
import { ShaderMacro } from "./shader/ShaderMacro";
|
|
22
|
+
import { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
|
|
23
|
+
import { ShaderProgramMap } from "./shader/ShaderProgramMap";
|
|
24
|
+
import { RenderState } from "./shader/state/RenderState";
|
|
25
|
+
import { Texture2D } from "./texture";
|
|
26
|
+
import { ClearableObjectPool } from "./utils/ClearableObjectPool";
|
|
27
|
+
import { ReturnableObjectPool } from "./utils/ReturnableObjectPool";
|
|
12
28
|
import { XRManager } from "./xr/XRManager";
|
|
13
29
|
/**
|
|
14
30
|
* Engine.
|
|
15
31
|
*/
|
|
16
32
|
export declare class Engine extends EventDispatcher {
|
|
33
|
+
/** @internal */
|
|
34
|
+
static _noDepthTextureMacro: ShaderMacro;
|
|
35
|
+
/** @internal */
|
|
36
|
+
static _noSRGBSupportMacro: ShaderMacro;
|
|
37
|
+
/** @internal */
|
|
38
|
+
static _outputSRGBCorrectMacro: ShaderMacro;
|
|
39
|
+
/** @internal Conversion of space units to pixel units for 2D. */
|
|
40
|
+
static _pixelsPerUnit: number;
|
|
41
|
+
/** @internal */
|
|
42
|
+
static _physicalObjectsMap: Record<number, ColliderShape>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
static _nativePhysics: IPhysics;
|
|
17
45
|
/** Input manager of Engine. */
|
|
18
46
|
readonly inputManager: InputManager;
|
|
19
47
|
/** XR manager of Engine. */
|
|
20
48
|
readonly xrManager: XRManager;
|
|
49
|
+
/** @internal */
|
|
50
|
+
_renderingStatistics: RenderingStatistics;
|
|
51
|
+
/** @internal */
|
|
52
|
+
_isDeviceLost: boolean;
|
|
53
|
+
/** @internal */
|
|
54
|
+
_batcherManager: BatcherManager;
|
|
21
55
|
_particleBufferUtils: ParticleBufferUtils;
|
|
56
|
+
/** @internal */
|
|
57
|
+
_frameInProcess: boolean;
|
|
58
|
+
/** @internal */
|
|
59
|
+
_pendingDestroyObjects: EngineObject[];
|
|
60
|
+
/** @internal */
|
|
61
|
+
_processingPendingDestroys: boolean;
|
|
62
|
+
/** @internal */
|
|
63
|
+
_physicsInitialized: boolean;
|
|
64
|
+
/** @internal */
|
|
65
|
+
_nativePhysicsManager: IPhysicsManager;
|
|
66
|
+
/** @internal */
|
|
67
|
+
_hardwareRenderer: IHardwareRenderer;
|
|
68
|
+
/** @internal */
|
|
69
|
+
_renderTargetPool: RenderTargetPool;
|
|
70
|
+
/** @internal */
|
|
71
|
+
_lastRenderState: RenderState;
|
|
72
|
+
/** @internal */
|
|
73
|
+
_renderElementPool: ClearableObjectPool<RenderElement>;
|
|
74
|
+
/** @internal */
|
|
75
|
+
_textRenderElementPool: ClearableObjectPool<RenderElement>;
|
|
76
|
+
/** @internal */
|
|
77
|
+
_charRenderInfoPool: ReturnableObjectPool<CharRenderInfo>;
|
|
78
|
+
/** @internal */
|
|
79
|
+
_basicResources: BasicResources;
|
|
80
|
+
/** @internal */
|
|
81
|
+
_textDefaultFont: Font;
|
|
82
|
+
/** @internal */
|
|
83
|
+
_renderContext: RenderContext;
|
|
84
|
+
/** @internal */
|
|
85
|
+
_depthTexture2D: Texture2D;
|
|
86
|
+
/** @internal */
|
|
87
|
+
_renderCount: number;
|
|
88
|
+
/** @internal */
|
|
89
|
+
_shaderProgramMaps: ShaderProgramMap[];
|
|
90
|
+
/** @internal */
|
|
91
|
+
_fontMap: Record<string, Font>;
|
|
92
|
+
/** @internal */
|
|
93
|
+
_macroCollection: ShaderMacroCollection;
|
|
94
|
+
/** @internal */
|
|
95
|
+
_postProcessPassNeedRefresh: boolean;
|
|
96
|
+
/** @internal */
|
|
97
|
+
protected _canvas: Canvas;
|
|
22
98
|
private _settings;
|
|
23
99
|
private _resourceManager;
|
|
24
100
|
private _sceneManager;
|
|
@@ -125,6 +201,18 @@ export declare class Engine extends EventDispatcher {
|
|
|
125
201
|
* @param pass - Post process pass to add
|
|
126
202
|
*/
|
|
127
203
|
addPostProcessPass(pass: PostProcessPass): void;
|
|
204
|
+
/**
|
|
205
|
+
* @internal
|
|
206
|
+
*/
|
|
207
|
+
_removePostProcessPass(pass: PostProcessPass): void;
|
|
208
|
+
/**
|
|
209
|
+
* @internal
|
|
210
|
+
*/
|
|
211
|
+
_refreshActivePostProcessPasses(): void;
|
|
212
|
+
/**
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
_getActivePostProcessPasses(): ReadonlyArray<PostProcessPass>;
|
|
128
216
|
private _processPendingDestroyObjects;
|
|
129
217
|
private _destroy;
|
|
130
218
|
/**
|
|
@@ -132,6 +220,22 @@ export declare class Engine extends EventDispatcher {
|
|
|
132
220
|
* @remarks If call during frame execution will delay until the end of the frame
|
|
133
221
|
*/
|
|
134
222
|
destroy(): void;
|
|
223
|
+
/**
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
|
+
_getShaderProgramMap(index: number, trackMaps?: ShaderProgramMap[]): ShaderProgramMap;
|
|
227
|
+
/**
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
_render(scenes: ReadonlyArray<Scene>): void;
|
|
231
|
+
/**
|
|
232
|
+
* @internal
|
|
233
|
+
*/
|
|
234
|
+
_pendingGC(): void;
|
|
235
|
+
/**
|
|
236
|
+
* @internal
|
|
237
|
+
*/
|
|
238
|
+
protected _initialize(configuration: EngineConfiguration): Promise<Engine>;
|
|
135
239
|
private _onDeviceLost;
|
|
136
240
|
private _onDeviceRestored;
|
|
137
241
|
private _gc;
|
package/types/Entity.d.ts
CHANGED
|
@@ -4,16 +4,66 @@ import { Component } from "./Component";
|
|
|
4
4
|
import { Engine } from "./Engine";
|
|
5
5
|
import { Layer } from "./Layer";
|
|
6
6
|
import { Scene } from "./Scene";
|
|
7
|
+
import { Script } from "./Script";
|
|
7
8
|
import { Transform } from "./Transform";
|
|
9
|
+
import { UpdateFlagManager } from "./UpdateFlagManager";
|
|
10
|
+
import { ReferResource } from "./asset/ReferResource";
|
|
8
11
|
import { EngineObject } from "./base";
|
|
12
|
+
import { ActiveChangeFlag } from "./enums/ActiveChangeFlag";
|
|
13
|
+
import { EntityModifyFlags } from "./enums/EntityModifyFlags";
|
|
14
|
+
import { DisorderedArray } from "./utils/DisorderedArray";
|
|
9
15
|
/**
|
|
10
16
|
* Entity, be used as components container.
|
|
11
17
|
*/
|
|
12
18
|
export declare class Entity extends EngineObject {
|
|
19
|
+
/** @internal */
|
|
20
|
+
static _tempComponentConstructors: ComponentConstructor[];
|
|
21
|
+
private static _isTransformType;
|
|
22
|
+
private static _checkTransformDependencies;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
static _findChildByName(entity: Entity, childIndex: number, paths: string[], pathIndex: number): Entity;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
static _traverseSetOwnerScene(entity: Entity, scene: Scene): void;
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
static _removeFromChildren(children: Entity[], entity: Entity): void;
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
static _addToChildren(children: Entity[], entity: Entity, index?: number): void;
|
|
13
39
|
/** The name of entity. */
|
|
14
40
|
name: string;
|
|
15
41
|
/** The layer the entity belongs to. */
|
|
16
42
|
layer: Layer;
|
|
43
|
+
/** @internal */
|
|
44
|
+
_isActiveInHierarchy: boolean;
|
|
45
|
+
/** @internal */
|
|
46
|
+
_isActiveInScene: boolean;
|
|
47
|
+
/** @internal */
|
|
48
|
+
_components: Component[];
|
|
49
|
+
/** @internal */
|
|
50
|
+
_scripts: DisorderedArray<Script>;
|
|
51
|
+
/** @internal */
|
|
52
|
+
_scriptsVersion: number;
|
|
53
|
+
/** @internal */
|
|
54
|
+
_children: Entity[];
|
|
55
|
+
/** @internal */
|
|
56
|
+
_scene: Scene;
|
|
57
|
+
/** @internal */
|
|
58
|
+
_isRoot: boolean;
|
|
59
|
+
/** @internal */
|
|
60
|
+
_isActive: boolean;
|
|
61
|
+
/** @internal */
|
|
62
|
+
_siblingIndex: number;
|
|
63
|
+
/** @internal */
|
|
64
|
+
_isTemplate: boolean;
|
|
65
|
+
/** @internal */
|
|
66
|
+
_updateFlagManager: UpdateFlagManager;
|
|
17
67
|
private _transform;
|
|
18
68
|
private _templateResource;
|
|
19
69
|
private _parent;
|
|
@@ -145,12 +195,52 @@ export declare class Entity extends EngineObject {
|
|
|
145
195
|
* @returns Change flag
|
|
146
196
|
*/
|
|
147
197
|
registerWorldChangeFlag(): BoolUpdateFlag;
|
|
198
|
+
/**
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
_markAsTemplate(templateResource: ReferResource): void;
|
|
148
202
|
private _createCloneEntity;
|
|
149
203
|
private _parseCloneEntity;
|
|
150
204
|
/**
|
|
151
205
|
* Destroy self.
|
|
152
206
|
*/
|
|
153
207
|
destroy(): void;
|
|
208
|
+
/**
|
|
209
|
+
* @internal
|
|
210
|
+
*/
|
|
211
|
+
_removeComponent(component: Component): void;
|
|
212
|
+
/**
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
_addScript(script: Script): void;
|
|
216
|
+
/**
|
|
217
|
+
* @internal
|
|
218
|
+
*/
|
|
219
|
+
_removeScript(script: Script): void;
|
|
220
|
+
/**
|
|
221
|
+
* @internal
|
|
222
|
+
*/
|
|
223
|
+
_removeFromParent(): void;
|
|
224
|
+
/**
|
|
225
|
+
* @internal
|
|
226
|
+
*/
|
|
227
|
+
_processActive(activeChangeFlag: ActiveChangeFlag): void;
|
|
228
|
+
/**
|
|
229
|
+
* @internal
|
|
230
|
+
*/
|
|
231
|
+
_processInActive(activeChangeFlag: ActiveChangeFlag): void;
|
|
232
|
+
/**
|
|
233
|
+
* @internal
|
|
234
|
+
*/
|
|
235
|
+
_setParentChange(): void;
|
|
236
|
+
/**
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
_registerModifyListener(onChange: (flag: EntityModifyFlags) => void): void;
|
|
240
|
+
/**
|
|
241
|
+
* @internal
|
|
242
|
+
*/
|
|
243
|
+
_unRegisterModifyListener(onChange: (flag: EntityModifyFlags) => void): void;
|
|
154
244
|
private _dispatchModify;
|
|
155
245
|
private _addToChildrenList;
|
|
156
246
|
private _setParent;
|
|
@@ -159,7 +249,7 @@ export declare class Entity extends EngineObject {
|
|
|
159
249
|
private _setActiveInHierarchy;
|
|
160
250
|
private _setInActiveInHierarchy;
|
|
161
251
|
private _setSiblingIndex;
|
|
162
|
-
private
|
|
252
|
+
private _replaceTransform;
|
|
163
253
|
private _invModelMatrix;
|
|
164
254
|
private _inverseWorldMatFlag;
|
|
165
255
|
/**
|
package/types/Polyfill.d.ts
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare class Polyfill {
|
|
5
|
+
static registerPolyfill(): void;
|
|
6
|
+
private static _registerMatchAll;
|
|
7
|
+
private static _registerAudioContext;
|
|
8
|
+
private static _registerOfflineAudioContext;
|
|
9
|
+
private static _promisifyDecodeAudioData;
|
|
10
|
+
private static _registerTextMetrics;
|
|
11
|
+
private static _registerPromiseFinally;
|
|
12
|
+
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Camera } from "../Camera";
|
|
2
2
|
import { CameraClearFlags } from "../enums/CameraClearFlags";
|
|
3
3
|
import { TextureCubeFace } from "../texture";
|
|
4
|
+
import { CullingResults } from "./CullingResults";
|
|
4
5
|
import { RenderContext } from "./RenderContext";
|
|
5
6
|
import { RenderElement } from "./RenderElement";
|
|
6
7
|
/**
|
|
7
8
|
* Basic render pipeline.
|
|
8
9
|
*/
|
|
9
10
|
export declare class BasicRenderPipeline {
|
|
11
|
+
/** @internal */
|
|
12
|
+
_cullingResults: CullingResults;
|
|
10
13
|
private _camera;
|
|
11
14
|
private _lastCanvasSize;
|
|
12
15
|
private _internalColorTarget;
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { InstanceBuffer } from "./InstanceBuffer";
|
|
3
|
+
import { PrimitiveChunkManager } from "./PrimitiveChunkManager";
|
|
4
|
+
import { RenderElement } from "./RenderElement";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class BatcherManager {
|
|
9
|
+
engine: Engine;
|
|
10
|
+
private _primitiveChunkManager2D;
|
|
11
|
+
private _primitiveChunkManagerMask;
|
|
12
|
+
private _primitiveChunkManagerUI;
|
|
13
|
+
private _instanceBuffer;
|
|
14
|
+
constructor(engine: Engine);
|
|
15
|
+
get instanceBuffer(): InstanceBuffer;
|
|
16
|
+
get primitiveChunkManager2D(): PrimitiveChunkManager;
|
|
17
|
+
get primitiveChunkManagerMask(): PrimitiveChunkManager;
|
|
18
|
+
get primitiveChunkManagerUI(): PrimitiveChunkManager;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
batch(input: RenderElement[], output: RenderElement[]): void;
|
|
21
|
+
private static _flush;
|
|
22
|
+
uploadBuffer(): void;
|
|
23
|
+
}
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { BatcherManager } from "./BatcherManager";
|
|
2
|
+
import { ContextRendererUpdateFlag } from "./RenderContext";
|
|
3
|
+
import { RenderQueue } from "./RenderQueue";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Culling results.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CullingResults {
|
|
9
|
+
readonly opaqueQueue: RenderQueue;
|
|
10
|
+
readonly transparentQueue: RenderQueue;
|
|
11
|
+
readonly alphaTestQueue: RenderQueue;
|
|
12
|
+
constructor();
|
|
13
|
+
reset(): void;
|
|
14
|
+
sortBatch(batcherManager: BatcherManager): void;
|
|
15
|
+
setRenderUpdateFlagTrue(rendererUpdateFlag: ContextRendererUpdateFlag): void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { Camera } from "../Camera";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { PipelinePass } from "../RenderPipeline/PipelinePass";
|
|
4
|
+
import { RenderTarget } from "../texture/RenderTarget";
|
|
5
|
+
import { CullingResults } from "./CullingResults";
|
|
6
|
+
import { RenderContext } from "./RenderContext";
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
* Depth only pass.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DepthOnlyPass extends PipelinePass {
|
|
12
|
+
readonly supportDepthTexture: boolean;
|
|
13
|
+
renderTarget: RenderTarget;
|
|
14
|
+
constructor(engine: Engine);
|
|
15
|
+
onConfig(camera: Camera): void;
|
|
16
|
+
onRender(context: RenderContext, cullingResults: CullingResults): void;
|
|
17
|
+
release(): void;
|
|
18
|
+
}
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { Buffer } from "../graphic/Buffer";
|
|
3
|
+
import { Renderer } from "../Renderer";
|
|
4
|
+
import { ShaderMacro } from "../shader/ShaderMacro";
|
|
5
|
+
import { InstanceBufferLayout } from "../shader/ShaderFactory";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
* Manages a UBO for GPU instancing, packing per-instance renderer data (ModelMat, Layer, etc.).
|
|
9
|
+
*/
|
|
10
|
+
export declare class InstanceBuffer {
|
|
11
|
+
static gpuInstanceMacro: ShaderMacro;
|
|
12
|
+
buffer: Buffer;
|
|
13
|
+
private _engine;
|
|
14
|
+
private _layout;
|
|
15
|
+
private _data;
|
|
16
|
+
private _floatView;
|
|
17
|
+
private _intView;
|
|
18
|
+
constructor(engine: Engine);
|
|
19
|
+
/**
|
|
20
|
+
* Set UBO layout and allocate buffer if needed.
|
|
21
|
+
*/
|
|
22
|
+
setLayout(layout: InstanceBufferLayout): void;
|
|
23
|
+
/**
|
|
24
|
+
* Pack renderer data into UBO and upload to GPU.
|
|
25
|
+
*/
|
|
26
|
+
upload(renderers: Renderer[], start: number, count: number): void;
|
|
27
|
+
destroy(): void;
|
|
28
|
+
}
|