@galacean/engine-core 2.0.0-alpha.43 → 2.0.0-alpha.45
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 +3 -3
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -3
- 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 +34 -1
- package/types/ComponentsManager.d.ts +17 -0
- package/types/Engine.d.ts +106 -2
- package/types/Entity.d.ts +88 -0
- 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 +13 -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 +31 -3
- 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,6 +1,8 @@
|
|
|
1
1
|
import { Ray, Vector3, Quaternion } from "@galacean/engine-math";
|
|
2
2
|
import { Layer } from "../Layer";
|
|
3
3
|
import { Scene } from "../Scene";
|
|
4
|
+
import { CharacterController } from "./CharacterController";
|
|
5
|
+
import { Collider } from "./Collider";
|
|
4
6
|
import { HitResult } from "./HitResult";
|
|
5
7
|
import { ColliderShape } from "./shape";
|
|
6
8
|
/**
|
|
@@ -265,6 +267,55 @@ export declare class PhysicsScene {
|
|
|
265
267
|
* @returns The collider shapes overlapping with the capsule
|
|
266
268
|
*/
|
|
267
269
|
overlapCapsuleAll(center: Vector3, radius: number, height: number, orientation?: Quaternion, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
|
|
270
|
+
/**
|
|
271
|
+
* Call on every frame to update pose of objects.
|
|
272
|
+
* @internal
|
|
273
|
+
*/
|
|
274
|
+
_update(deltaTime: number): void;
|
|
275
|
+
/**
|
|
276
|
+
* Add collider into the manager.
|
|
277
|
+
* @param collider - StaticCollider or DynamicCollider.
|
|
278
|
+
* @internal
|
|
279
|
+
*/
|
|
280
|
+
_addCollider(collider: Collider): void;
|
|
281
|
+
/**
|
|
282
|
+
* Add character controller into the manager.
|
|
283
|
+
* @param controller - Character Controller.
|
|
284
|
+
* @internal
|
|
285
|
+
*/
|
|
286
|
+
_addCharacterController(controller: CharacterController): void;
|
|
287
|
+
/**
|
|
288
|
+
* Remove collider.
|
|
289
|
+
* @param collider - StaticCollider or DynamicCollider.
|
|
290
|
+
* @internal
|
|
291
|
+
*/
|
|
292
|
+
_removeCollider(collider: Collider): void;
|
|
293
|
+
/**
|
|
294
|
+
* Remove collider.
|
|
295
|
+
* @param controller - Character Controller.
|
|
296
|
+
* @internal
|
|
297
|
+
*/
|
|
298
|
+
_removeCharacterController(controller: CharacterController): void;
|
|
299
|
+
/**
|
|
300
|
+
* @internal
|
|
301
|
+
*/
|
|
302
|
+
_addContactEventConsumer(delta: 1 | -1): void;
|
|
303
|
+
/**
|
|
304
|
+
* @internal
|
|
305
|
+
*/
|
|
306
|
+
_callColliderOnUpdate(): void;
|
|
307
|
+
/**
|
|
308
|
+
* @internal
|
|
309
|
+
*/
|
|
310
|
+
_callColliderOnLateUpdate(): void;
|
|
311
|
+
/**
|
|
312
|
+
* @internal
|
|
313
|
+
*/
|
|
314
|
+
_gc(): void;
|
|
315
|
+
/**
|
|
316
|
+
* @internal
|
|
317
|
+
*/
|
|
318
|
+
_destroy(): void;
|
|
268
319
|
private _dispatchEvents;
|
|
269
320
|
private _setGravity;
|
|
270
321
|
private _createPreFilter;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { Entity } from "../Entity";
|
|
1
2
|
import { Collider } from "./Collider";
|
|
2
3
|
/**
|
|
3
4
|
* A static collider component that will not move.
|
|
4
5
|
* @remarks Mostly used for object which always stays at the same place and never moves around.
|
|
5
6
|
*/
|
|
6
7
|
export declare class StaticCollider extends Collider {
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
constructor(entity: Entity);
|
|
7
12
|
}
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Flags specific to the Hinge Joint.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare enum HingeJointFlag {
|
|
6
|
+
/** None. */
|
|
7
|
+
None = 0,
|
|
8
|
+
/** Enable the limit. */
|
|
9
|
+
LimitEnabled = 1,
|
|
10
|
+
/** Enable the drive. */
|
|
11
|
+
DriveEnabled = 2,
|
|
12
|
+
/** If the existing velocity is beyond the drive velocity, do not add force. */
|
|
13
|
+
DriveFreeSpin = 4
|
|
14
|
+
}
|
|
@@ -53,6 +53,10 @@ export declare class HingeJoint extends Joint {
|
|
|
53
53
|
get limits(): JointLimits;
|
|
54
54
|
set limits(value: JointLimits);
|
|
55
55
|
constructor(entity: Entity);
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
_onDisableInScene(): void;
|
|
56
60
|
protected _createJoint(): void;
|
|
57
61
|
protected _syncNative(): void;
|
|
58
62
|
private _onMotorChanged;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
1
2
|
import { IJoint } from "@galacean/engine-design";
|
|
2
3
|
import { Vector3 } from "@galacean/engine-math";
|
|
3
4
|
import { Component } from "../../Component";
|
|
@@ -70,6 +71,14 @@ export declare abstract class Joint extends Component {
|
|
|
70
71
|
get breakTorque(): number;
|
|
71
72
|
set breakTorque(value: number);
|
|
72
73
|
constructor(entity: Entity);
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
_onEnableInScene(): void;
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
_onDisableInScene(): void;
|
|
73
82
|
protected abstract _createJoint(): void;
|
|
74
83
|
protected _syncNative(): void;
|
|
75
84
|
private _calculateConnectedAnchor;
|
|
@@ -79,3 +88,14 @@ export declare abstract class Joint extends Component {
|
|
|
79
88
|
private _updateRotation;
|
|
80
89
|
private _updateActualAnchor;
|
|
81
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
declare class JointColliderInfo extends DataObject {
|
|
95
|
+
collider: Collider;
|
|
96
|
+
anchor: Vector3;
|
|
97
|
+
actualAnchor: Vector3;
|
|
98
|
+
massScale: number;
|
|
99
|
+
inertiaScale: number;
|
|
100
|
+
}
|
|
101
|
+
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { UpdateFlagManager } from "../../UpdateFlagManager";
|
|
2
3
|
/**
|
|
3
4
|
* JointLimits is used to limit the joints angle.
|
|
4
5
|
*/
|
|
5
6
|
export declare class JointLimits extends DataObject {
|
|
7
|
+
/** @internal */
|
|
8
|
+
_updateFlagManager: UpdateFlagManager;
|
|
6
9
|
private _max;
|
|
7
10
|
private _min;
|
|
8
11
|
private _contactDistance;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { UpdateFlagManager } from "../../UpdateFlagManager";
|
|
2
3
|
/**
|
|
3
4
|
* The JointMotor is used to motorize a joint.
|
|
4
5
|
*/
|
|
5
6
|
export declare class JointMotor extends DataObject {
|
|
7
|
+
/** @internal */
|
|
8
|
+
_updateFlagManager: UpdateFlagManager;
|
|
6
9
|
private _targetVelocity;
|
|
7
10
|
private _forceLimit;
|
|
8
11
|
private _gearRatio;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { IColliderShape } from "@galacean/engine-design";
|
|
2
3
|
import { PhysicsMaterial } from "../PhysicsMaterial";
|
|
3
4
|
import { Vector3 } from "@galacean/engine-math";
|
|
4
5
|
import { Collider } from "../Collider";
|
|
@@ -8,12 +9,24 @@ import type { ICloneHook } from "../../clone/ICloneHook";
|
|
|
8
9
|
*/
|
|
9
10
|
export declare abstract class ColliderShape extends DataObject implements ICloneHook<ColliderShape> {
|
|
10
11
|
private static _idGenerator;
|
|
12
|
+
/** @internal */
|
|
13
|
+
_collider: Collider;
|
|
14
|
+
/** @internal */
|
|
15
|
+
_nativeShape: IColliderShape;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_isShapeAttached: boolean;
|
|
11
18
|
protected _id: number;
|
|
12
19
|
protected _material: PhysicsMaterial;
|
|
13
20
|
private _isTrigger;
|
|
14
21
|
private _rotation;
|
|
15
22
|
private _position;
|
|
16
23
|
private _contactOffset;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
* @beta
|
|
27
|
+
* Whether raycast can select it.
|
|
28
|
+
*/
|
|
29
|
+
isSceneQuery: boolean;
|
|
17
30
|
/**
|
|
18
31
|
* Collider owner of this shape.
|
|
19
32
|
*/
|
|
@@ -60,6 +73,10 @@ export declare abstract class ColliderShape extends DataObject implements IClone
|
|
|
60
73
|
* @inheritdoc
|
|
61
74
|
*/
|
|
62
75
|
_onClone(target: ColliderShape): void;
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
_destroy(): void;
|
|
63
80
|
protected _syncNative(): void;
|
|
64
81
|
private _setPosition;
|
|
65
82
|
private _setRotation;
|
|
@@ -38,6 +38,10 @@ export declare class MeshColliderShape extends ColliderShape {
|
|
|
38
38
|
* @inheritdoc
|
|
39
39
|
*/
|
|
40
40
|
_onClone(target: MeshColliderShape): void;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
_destroy(): void;
|
|
41
45
|
private _clearMeshData;
|
|
42
46
|
private _destroyNativeShape;
|
|
43
47
|
private _extractMeshData;
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { Camera } from "../Camera";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { PipelinePass } from "../RenderPipeline/PipelinePass";
|
|
4
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
5
|
+
import { RenderTarget } from "../texture";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
* Processing sRGB Conversion and FXAA.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FinalPass extends PipelinePass {
|
|
11
|
+
private _inputRenderTarget;
|
|
12
|
+
private _srgbRenderTarget;
|
|
13
|
+
private _antiAliasingMaterial;
|
|
14
|
+
private _sRGBmaterial;
|
|
15
|
+
constructor(engine: Engine);
|
|
16
|
+
onConfig(camera: Camera, inputRenderTarget: RenderTarget): void;
|
|
17
|
+
onRender(context: RenderContext): void;
|
|
18
|
+
release(): void;
|
|
19
|
+
}
|
|
@@ -13,6 +13,8 @@ export declare class PostProcess extends Component {
|
|
|
13
13
|
* The outer distance to start blending from, only takes effect when the `isGlobal` is false.
|
|
14
14
|
*/
|
|
15
15
|
blendDistance: number;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_effects: PostProcessEffect[];
|
|
16
18
|
private _priority;
|
|
17
19
|
private _isGlobal;
|
|
18
20
|
/**
|
|
@@ -17,6 +17,10 @@ export declare class PostProcessEffect extends DataObject {
|
|
|
17
17
|
* This method can be overridden to control the effect's real validity.
|
|
18
18
|
*/
|
|
19
19
|
isValid(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
_lerp(to: PostProcessEffect, factor: number): void;
|
|
20
24
|
/**
|
|
21
25
|
* Get all parameters of the post process effect.
|
|
22
26
|
* @remarks
|
|
@@ -19,6 +19,10 @@ export declare abstract class PostProcessEffectParameter<T> extends DataObject {
|
|
|
19
19
|
get value(): T;
|
|
20
20
|
set value(value: T);
|
|
21
21
|
constructor(value: T, needLerp?: boolean);
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
_lerp(to: T, factor: number): void;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
28
|
* Represents a float parameter of a post process effect.
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { Camera } from "../Camera";
|
|
1
2
|
import { Scene } from "../Scene";
|
|
3
|
+
import { Material } from "../material";
|
|
4
|
+
import { RenderTarget } from "../texture";
|
|
5
|
+
import { PostProcess } from "./PostProcess";
|
|
2
6
|
import { PostProcessEffect } from "./PostProcessEffect";
|
|
3
7
|
/**
|
|
4
8
|
* A global manager of the PostProcess.
|
|
@@ -7,6 +11,12 @@ export declare class PostProcessManager {
|
|
|
7
11
|
readonly scene: Scene;
|
|
8
12
|
private static _tempColliders;
|
|
9
13
|
private static _tempVector3;
|
|
14
|
+
/** @internal */
|
|
15
|
+
_uberMaterial: Material;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_postProcessNeedSorting: boolean;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_postProcessPassNeedSorting: boolean;
|
|
10
20
|
private _activePostProcesses;
|
|
11
21
|
private _swapRenderTarget;
|
|
12
22
|
private _srcRenderTarget;
|
|
@@ -22,6 +32,23 @@ export declare class PostProcessManager {
|
|
|
22
32
|
* @param scene - Scene to which the current PostProcessManager belongs
|
|
23
33
|
*/
|
|
24
34
|
constructor(scene: Scene);
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
* Whether has any valid post process pass.
|
|
38
|
+
*/
|
|
39
|
+
_isValid(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
_update(camera: Camera): void;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
_addPostProcess(postProcess: PostProcess): void;
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
_removePostProcess(postProcess: PostProcess): void;
|
|
25
52
|
/**
|
|
26
53
|
* Get the blend effect by type.
|
|
27
54
|
* @remarks
|
|
@@ -30,6 +57,22 @@ export declare class PostProcessManager {
|
|
|
30
57
|
* @returns The PostProcessEffect instance found
|
|
31
58
|
*/
|
|
32
59
|
getBlendEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T>;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
_render(camera: Camera, srcRenderTarget: RenderTarget, destRenderTarget: RenderTarget): void;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
_releaseSwapRenderTarget(): void;
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
_releaseOutputRenderTarget(): void;
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
_getOutputRenderTarget(camera: Camera): RenderTarget;
|
|
33
76
|
private _sortActivePostProcess;
|
|
34
77
|
private _resetDefaultValue;
|
|
35
78
|
private _initSwapRenderTarget;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShaderMacro, ShaderProperty } from "../../shader";
|
|
1
2
|
import { PostProcessEffect } from "../PostProcessEffect";
|
|
2
3
|
import { PostProcessEffectBoolParameter, PostProcessEffectColorParameter, PostProcessEffectEnumParameter, PostProcessEffectFloatParameter, PostProcessEffectTextureParameter } from "../PostProcessEffectParameter";
|
|
3
4
|
/**
|
|
@@ -11,6 +12,30 @@ export declare enum BloomDownScaleMode {
|
|
|
11
12
|
}
|
|
12
13
|
export declare class BloomEffect extends PostProcessEffect {
|
|
13
14
|
static readonly SHADER_NAME = "PostProcess/Bloom";
|
|
15
|
+
/** @internal */
|
|
16
|
+
static _maxIterations: number;
|
|
17
|
+
/** @internal */
|
|
18
|
+
static _hqMacro: ShaderMacro;
|
|
19
|
+
/** @internal */
|
|
20
|
+
static _dirtMacro: ShaderMacro;
|
|
21
|
+
/** @internal */
|
|
22
|
+
static _bloomParams: ShaderProperty;
|
|
23
|
+
/** @internal */
|
|
24
|
+
static _lowMipTextureProp: ShaderProperty;
|
|
25
|
+
/** @internal */
|
|
26
|
+
static _lowMipTexelSizeProp: ShaderProperty;
|
|
27
|
+
/** @internal */
|
|
28
|
+
static _enableMacro: ShaderMacro;
|
|
29
|
+
/** @internal */
|
|
30
|
+
static _bloomTextureProp: ShaderProperty;
|
|
31
|
+
/** @internal */
|
|
32
|
+
static _dirtTextureProp: ShaderProperty;
|
|
33
|
+
/** @internal */
|
|
34
|
+
static _tintProp: ShaderProperty;
|
|
35
|
+
/** @internal */
|
|
36
|
+
static _bloomIntensityParams: ShaderProperty;
|
|
37
|
+
/** @internal */
|
|
38
|
+
static _dirtTilingOffsetProp: ShaderProperty;
|
|
14
39
|
/**
|
|
15
40
|
* Controls whether to use bicubic sampling instead of bilinear sampling for the upSampling passes.
|
|
16
41
|
* @remarks This is slightly more expensive but helps getting smoother visuals.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShaderMacro } from "../../shader";
|
|
1
2
|
import { PostProcessEffect } from "../PostProcessEffect";
|
|
2
3
|
import { PostProcessEffectEnumParameter } from "../PostProcessEffectParameter";
|
|
3
4
|
/**
|
|
@@ -18,6 +19,8 @@ export declare enum TonemappingMode {
|
|
|
18
19
|
ACES = 1
|
|
19
20
|
}
|
|
20
21
|
export declare class TonemappingEffect extends PostProcessEffect {
|
|
22
|
+
/** @internal */
|
|
23
|
+
static _enableMacro: ShaderMacro;
|
|
21
24
|
/**
|
|
22
25
|
* Use this to select a tonemapping algorithm to use.
|
|
23
26
|
*/
|
|
@@ -1 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
import { IPlatformBuffer } from "./IPlatformBuffer";
|
|
2
|
+
/**
|
|
3
|
+
* Platform interface for Transform Feedback operations.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface IPlatformTransformFeedback {
|
|
7
|
+
/**
|
|
8
|
+
* Bind a buffer range as Transform Feedback output at the given index.
|
|
9
|
+
*/
|
|
10
|
+
bindBufferRange(index: number, buffer: IPlatformBuffer, byteOffset: number, byteSize: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Unbind buffer from Transform Feedback output at the given index.
|
|
13
|
+
*/
|
|
14
|
+
unbindBuffer(index: number): void;
|
|
15
|
+
/**
|
|
16
|
+
* Begin a Transform Feedback pass.
|
|
17
|
+
* @param primitiveMode - The primitive mode (e.g., POINTS)
|
|
18
|
+
*/
|
|
19
|
+
begin(primitiveMode: number): void;
|
|
20
|
+
/**
|
|
21
|
+
* End the current Transform Feedback pass.
|
|
22
|
+
*/
|
|
23
|
+
end(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Bind this Transform Feedback object as the active TF.
|
|
26
|
+
*/
|
|
27
|
+
bind(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Unbind the Transform Feedback object.
|
|
30
|
+
*/
|
|
31
|
+
unbind(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Destroy native resources.
|
|
34
|
+
*/
|
|
35
|
+
destroy(): void;
|
|
36
|
+
}
|
|
@@ -1 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Platform interface for Transform Feedback primitive operations.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export interface IPlatformTransformFeedbackPrimitive {
|
|
6
|
+
/**
|
|
7
|
+
* Update vertex layout. Auto-rebuilds when program changes.
|
|
8
|
+
* @param program - Shader program (for attribute locations)
|
|
9
|
+
* @param readBinding - Current read buffer binding
|
|
10
|
+
* @param writeBinding - Current write buffer binding
|
|
11
|
+
* @param feedbackElements - Vertex elements for feedback buffer
|
|
12
|
+
* @param inputBinding - Input buffer binding
|
|
13
|
+
* @param inputElements - Vertex elements for input buffer
|
|
14
|
+
*/
|
|
15
|
+
updateVertexLayout(program: any, readBinding: any, writeBinding: any, feedbackElements: any[], inputBinding: any, inputElements: any[]): void;
|
|
16
|
+
/**
|
|
17
|
+
* Bind attribute state for the given read direction.
|
|
18
|
+
* @param readIsA - Whether to use direction A as read
|
|
19
|
+
*/
|
|
20
|
+
bind(readIsA: boolean): void;
|
|
21
|
+
/**
|
|
22
|
+
* Unbind attribute state.
|
|
23
|
+
*/
|
|
24
|
+
unbind(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Issue a draw call.
|
|
27
|
+
* @param mode - Primitive topology
|
|
28
|
+
* @param first - First vertex index
|
|
29
|
+
* @param count - Number of vertices
|
|
30
|
+
*/
|
|
31
|
+
draw(mode: number, first: number, count: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Invalidate cached state, forcing rebuild on next updateVertexLayout.
|
|
34
|
+
*/
|
|
35
|
+
invalidate(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Destroy native resources.
|
|
38
|
+
*/
|
|
39
|
+
destroy(): void;
|
|
40
|
+
}
|
package/types/shader/Shader.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { IShaderCompiler, IPrecompiledShader } from "@galacean/engine-design";
|
|
1
2
|
import { Engine } from "../Engine";
|
|
2
3
|
import { IReferable } from "../asset/IReferable";
|
|
3
4
|
import { ShaderMacro } from "./ShaderMacro";
|
|
5
|
+
import { ShaderMacroCollection } from "./ShaderMacroCollection";
|
|
4
6
|
import { ShaderPass } from "./ShaderPass";
|
|
5
7
|
import { ShaderProperty } from "./ShaderProperty";
|
|
6
8
|
import { SubShader } from "./SubShader";
|
|
@@ -10,6 +12,10 @@ import { ShaderLanguage } from "./enums/ShaderLanguage";
|
|
|
10
12
|
*/
|
|
11
13
|
export declare class Shader implements IReferable {
|
|
12
14
|
readonly name: string;
|
|
15
|
+
/** @internal */
|
|
16
|
+
static readonly _compileMacros: ShaderMacroCollection;
|
|
17
|
+
/** @internal */
|
|
18
|
+
static _shaderCompiler?: IShaderCompiler;
|
|
13
19
|
private static _shaderMap;
|
|
14
20
|
/**
|
|
15
21
|
* Create a shader by source code.
|
|
@@ -53,6 +59,14 @@ export declare class Shader implements IReferable {
|
|
|
53
59
|
* @param name - Name of the shader
|
|
54
60
|
*/
|
|
55
61
|
static find(name: string): Shader;
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
static _createFromPrecompiled(data: IPrecompiledShader): Shader;
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
static _clear(engine: Engine): void;
|
|
56
70
|
private static _resolveUsePass;
|
|
57
71
|
private static _applyRenderStates;
|
|
58
72
|
private static _applyConstRenderStates;
|
|
@@ -85,6 +99,14 @@ export declare class Shader implements IReferable {
|
|
|
85
99
|
* @returns Whether the release was successful.
|
|
86
100
|
*/
|
|
87
101
|
destroy(force?: boolean): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
_getReferCount(): number;
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
_addReferCount(value: number): void;
|
|
88
110
|
/**
|
|
89
111
|
* @deprecated Please use `ShaderMacro.getByName` instead
|
|
90
112
|
*
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Shader block property, used to identify uniform blocks by id.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ShaderBlockProperty {
|
|
6
|
+
private static _counter;
|
|
7
|
+
private static _nameMap;
|
|
8
|
+
/**
|
|
9
|
+
* Get shader block property by name.
|
|
10
|
+
* @param name - Name of the uniform block
|
|
11
|
+
* @returns Shader block property
|
|
12
|
+
*/
|
|
13
|
+
static getByName(name: string): ShaderBlockProperty;
|
|
14
|
+
/** Uniform block name. */
|
|
15
|
+
readonly name: string;
|
|
16
|
+
/** @internal */
|
|
17
|
+
readonly _uniqueId: number;
|
|
18
|
+
private constructor();
|
|
19
|
+
}
|
|
@@ -5,14 +5,27 @@ import { IReferable } from "../asset/IReferable";
|
|
|
5
5
|
import type { ICloneHook } from "../clone/ICloneHook";
|
|
6
6
|
import { Texture } from "../texture/Texture";
|
|
7
7
|
import { ShaderMacro } from "./ShaderMacro";
|
|
8
|
+
import { ShaderMacroCollection } from "./ShaderMacroCollection";
|
|
8
9
|
import { ShaderProperty } from "./ShaderProperty";
|
|
10
|
+
import { ShaderDataGroup } from "./enums/ShaderDataGroup";
|
|
11
|
+
import { ShaderPropertyType } from "./enums/ShaderPropertyType";
|
|
9
12
|
/**
|
|
10
13
|
* Shader data collection,Correspondence includes shader properties data and macros data.
|
|
11
14
|
*/
|
|
12
15
|
export declare class ShaderData extends DataObject implements IReferable, IClone, ICloneHook<ShaderData> {
|
|
16
|
+
/** @internal */
|
|
17
|
+
_group: ShaderDataGroup;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_propertyValueMap: Record<number, ShaderPropertyValueType>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_macroCollection: ShaderMacroCollection;
|
|
13
22
|
private _batchSharedFields;
|
|
14
23
|
private _macroMap;
|
|
15
24
|
private _refCount;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
constructor(group: ShaderDataGroup);
|
|
16
29
|
/**
|
|
17
30
|
* Get float by shader property name.
|
|
18
31
|
* @param propertyName - Shader property name
|
|
@@ -353,6 +366,22 @@ export declare class ShaderData extends DataObject implements IReferable, IClone
|
|
|
353
366
|
* @inheritdoc
|
|
354
367
|
*/
|
|
355
368
|
_onClone(target: ShaderData): void;
|
|
369
|
+
/**
|
|
370
|
+
* @internal
|
|
371
|
+
*/
|
|
372
|
+
_setPropertyValue<T extends ShaderPropertyValueType>(property: string | ShaderProperty, type: ShaderPropertyType, value: T): void;
|
|
373
|
+
/**
|
|
374
|
+
* @internal
|
|
375
|
+
*/
|
|
376
|
+
_matchesRendererBatchShared(other: ShaderData): boolean;
|
|
377
|
+
/**
|
|
378
|
+
* @internal
|
|
379
|
+
*/
|
|
380
|
+
_getReferCount(): number;
|
|
381
|
+
/**
|
|
382
|
+
* @internal
|
|
383
|
+
*/
|
|
384
|
+
_addReferCount(value: number): void;
|
|
356
385
|
private _addTexturesReferCount;
|
|
357
386
|
private _updateRendererBatchSharedFields;
|
|
358
387
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Engine } from "../Engine";
|
|
2
|
+
import { ShaderProperty } from "./ShaderProperty";
|
|
2
3
|
/**
|
|
3
4
|
* Shader registry and GLSL utilities. Holds the `#include` lookup table
|
|
4
5
|
* the runtime preprocessor reads, the GLSL ES 100 → 300 syntax converter
|
|
@@ -53,3 +54,25 @@ export declare class ShaderFactory {
|
|
|
53
54
|
private static _buildFieldDefines;
|
|
54
55
|
private static _replaceMRTShader;
|
|
55
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export interface InstanceFieldInfo {
|
|
61
|
+
property: ShaderProperty;
|
|
62
|
+
type: string;
|
|
63
|
+
offset: number;
|
|
64
|
+
/** offset / 4, precomputed to avoid repeated division in upload loop */
|
|
65
|
+
offsetInElements: number;
|
|
66
|
+
useIntView: boolean;
|
|
67
|
+
pack: InstancePackFunc;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export interface InstanceBufferLayout {
|
|
73
|
+
instanceFields: InstanceFieldInfo[];
|
|
74
|
+
instanceMaxCount: number;
|
|
75
|
+
structSize: number;
|
|
76
|
+
}
|
|
77
|
+
type InstancePackFunc = (view: Float32Array | Int32Array, offset: number, value: any) => void;
|
|
78
|
+
export {};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { ShaderMacroCollection } from "./ShaderMacroCollection";
|
|
1
2
|
/**
|
|
2
3
|
* Shader macro。
|
|
3
4
|
*/
|
|
4
5
|
export declare class ShaderMacro {
|
|
6
|
+
/** @internal */
|
|
7
|
+
static _macroMaskMap: ShaderMacro[][];
|
|
8
|
+
/** @internal */
|
|
9
|
+
static _macroNameIdMap: Record<string, number>;
|
|
5
10
|
private static _macroNameCounter;
|
|
6
11
|
private static _macroCounter;
|
|
7
12
|
private static _macroMap;
|
|
@@ -18,9 +23,19 @@ export declare class ShaderMacro {
|
|
|
18
23
|
* @returns Shader macro
|
|
19
24
|
*/
|
|
20
25
|
static getByName(name: string, value: string): ShaderMacro;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
static _getMacrosElements(macros: ShaderMacroCollection, out: ShaderMacro[]): void;
|
|
21
30
|
/** Name. */
|
|
22
31
|
readonly name: string;
|
|
23
32
|
/** Value. */
|
|
24
33
|
readonly value: string;
|
|
34
|
+
/** @internal */
|
|
35
|
+
_nameId: number;
|
|
36
|
+
/** @internal */
|
|
37
|
+
_maskIndex: number;
|
|
38
|
+
/** @internal */
|
|
39
|
+
_maskValue: number;
|
|
25
40
|
private constructor();
|
|
26
41
|
}
|