-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3.8.3 merges v3.8.2 #16682
Merged
Merged
v3.8.3 merges v3.8.2 #16682
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: qiuguohua <[email protected]>
…s name different with default. (cocos#16603)
fix spine crash
…on mini-game platforms. (cocos#16565)
…eleton while spine working at sharedCache mode (cocos#16593) * Refine: make multi skeleton component shared one instance of spine.Skeleton while spine working at sharedCache mode
* Update .cocos-project.json * Fix build error
Fixed that when switching scenes, re-adding the light probe group component will empty the baking data.
…s#16618) Co-authored-by: qiuguohua <[email protected]>
…ocos#16617) * fix unregister child events when removing 'light-probe-group-footer' * refine code
* improve `cc.Color.fromHEX()` * support hex-number * better performance
Co-authored-by: qiuguohua <[email protected]>
* update label outline and shadow deprecated log
* improve performance * fix typo
…) (cocos#16655) Co-authored-by: cocos-robot <[email protected]>
* fix glsl macro bug * lint
* Fix spine can not be paused while running in realTime mode
…3.8.3 # Conflicts: # package-lock.json # package.json
Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -16811,11 +16811,17 @@
*/
static fromVec4(value: Vec4, out?: Color): Color;
/**
* @en Converts the hexadecimal formal color into rgb formal and save the results to out color.
+ * the argument `hex` could be hex-string or hex-number (8-digit or 6-digit).
+ * the hex-string should be like : '#12345678' '#123456', '123456', '12345678'.
+ * the hex-number should be like : 0x12345678, 0x123456 .
* @zh 从十六进制颜色字符串中读入颜色到 out 中
+ * 参数 hex 支持 16进制字符串 或者 16进制数值 (8位数字 或者 6位数字).
+ * 16进制字符串的格式应该类似: '#12345678' '#123456', '123456', '12345678'.
+ * 16进制数值的格式应该类似: 0x12345678, 0x123456 .
*/
- static fromHEX<Out extends IColorLike>(out: Out, hexString: string): Out;
+ static fromHEX<Out extends IColorLike>(out: Out, hex: string | number): Out;
/**
* @en Add two colors by components. And save the results to out color.
* @zh 逐通道颜色加法
*/
@@ -35815,19 +35821,105 @@
* 不匹配会引起未定义行为。
* @param name @en descriptor name in shader. @zh 填写着色器中的描述符(descriptor)名字
*/
setSampler(name: string, sampler: gfx.Sampler): void;
+ /**
+ * @en Set builtin camera constants of CCCamera, such as cc_matView.
+ * For list of constants, please check CCCamera in cc-global.chunk.
+ * @zh 设置内置相机常量,例如cc_matView。
+ * 具体常量见cc-global.chunk中的CCCamera.
+ * @param camera @en The camera instance to be set. @zh 当前相机
+ */
setBuiltinCameraConstants(camera: renderer.scene.Camera): void;
+ /**
+ * @deprecated Method will be removed in 3.9.0
+ * @en Same as setBuiltinDirectionalLightConstants
+ * @zh 同setBuiltinDirectionalLightConstants
+ * @param light @en The main light. @zh 主光
+ */
setBuiltinShadowMapConstants(light: renderer.scene.DirectionalLight): void;
+ /**
+ * @en Set builtin directional light and shadow constants.
+ * For list of constants, please check CCShadow in cc-shadow.chunk and CCCamera in cc-global.chunk.
+ * @zh 设置内置方向光与阴影常量。
+ * 具体常量见cc-shadow.chunk中的CCShadow与cc-global.chunk中的CCCamera。
+ * @param light @en The main light. @zh 主光
+ * @param camera @en The camera instance to be set. @zh 当前相机
+ */
setBuiltinDirectionalLightConstants(light: renderer.scene.DirectionalLight, camera: renderer.scene.Camera): void;
+ /**
+ * @en Set builtin sphere light and shadow constants.
+ * For list of constants, please check CCShadow in cc-shadow.chunk and CCForwardLight in cc-forward-light.chunk.
+ * @zh 设置内置球形光与阴影常量。
+ * 具体常量见cc-shadow.chunk中的CCShadow与cc-forward-light.chunk中的CCForwardLight。
+ * @param light @en The sphere light. @zh 球形光源
+ * @param camera @en The camera instance to be set. @zh 当前相机
+ */
setBuiltinSphereLightConstants(light: renderer.scene.SphereLight, camera: renderer.scene.Camera): void;
+ /**
+ * @en Set builtin spot light and shadow constants.
+ * For list of constants, please check CCShadow in cc-shadow.chunk and CCForwardLight in cc-forward-light.chunk.
+ * @zh 设置内置探照光与阴影常量。
+ * 具体常量见cc-shadow.chunk中的CCShadow与cc-forward-light.chunk中的CCForwardLight。
+ * @param light @en The spot light. @zh 探照光源
+ * @param camera @en The camera instance to be set. @zh 当前相机
+ */
setBuiltinSpotLightConstants(light: renderer.scene.SpotLight, camera: renderer.scene.Camera): void;
+ /**
+ * @en Set builtin point light and shadow constants.
+ * For list of constants, please check CCShadow in cc-shadow.chunk and CCForwardLight in cc-forward-light.chunk.
+ * @zh 设置内置点光与阴影常量。
+ * 具体常量见cc-shadow.chunk中的CCShadow与cc-forward-light.chunk中的CCForwardLight。
+ * @param light @en The point light. @zh 点光源
+ * @param camera @en The camera instance to be set. @zh 当前相机
+ */
setBuiltinPointLightConstants(light: renderer.scene.PointLight, camera: renderer.scene.Camera): void;
+ /**
+ * @en Set builtin ranged directional light and shadow constants.
+ * For list of constants, please check CCShadow in cc-shadow.chunk and CCForwardLight in cc-forward-light.chunk.
+ * @zh 设置内置区间平行光与阴影常量。
+ * 具体常量见cc-shadow.chunk中的CCShadow与cc-forward-light.chunk中的CCForwardLight。
+ * @param light @en The ranged directional light. @zh 区间平行光源
+ * @param camera @en The camera instance to be set. @zh 当前相机
+ */
setBuiltinRangedDirectionalLightConstants(light: renderer.scene.RangedDirectionalLight, camera: renderer.scene.Camera): void;
+ /**
+ * @en Set builtin directional light frustum and shadow constants.
+ * These constants are used in builtin shadow map, cascaded shadow map and planar shadow.
+ * For list of constants, please check CCShadow in cc-shadow.chunk and CCCSM in cc-csm.chunk.
+ * @zh 设置内置平行光视锥与阴影常量。
+ * 这些常量用于内置的阴影、级联阴影与平面阴影。
+ * 具体常量见cc-shadow.chunk中的CCShadow与cc-csm.chunk中的CCCSM。
+ * @param light @en The directional light. @zh 平行光源
+ * @param camera @en The camera instance to be set. @zh 当前相机
+ * @param csmLevel @en Curent level of cascaded shadow map @zh 级联阴影等级
+ */
setBuiltinDirectionalLightFrustumConstants(camera: renderer.scene.Camera, light: renderer.scene.DirectionalLight, csmLevel?: number): void;
+ /**
+ * @en Set builtin spot light frustum and shadow constants.
+ * These constants are used in builtin shadow map.
+ * For list of constants, please check CCShadow in cc-shadow.chunk.
+ * @zh 设置内置探照光视锥与阴影常量。
+ * 这些常量用于内置的阴影。
+ * 具体常量见cc-shadow.chunk中的CCShadow。
+ * @param light @en The spot light. @zh 探照光源
+ */
setBuiltinSpotLightFrustumConstants(light: renderer.scene.SpotLight): void;
}
+ /**
+ * @en Scene
+ * A scene is an abstraction of content for rendering.
+ * @zh 场景。需要绘制的场景内容。
+ */
export interface SceneBuilder extends Setter {
+ /**
+ * @en Use the frustum information of light instead of camera.
+ * Often used in building shadow map.
+ * @zh 使用光源视锥进行投影,而不是用相机。常用于shadow map的生成。
+ * @param light @en The light used for projection @zh 用于投影的光源
+ * @param csmLevel @en Curent level of cascaded shadow map @zh 级联阴影等级
+ * @param optCamera @en Additional scene culling camera. @zh 额外的场景裁切相机
+ */
useLightFrustum(light: renderer.scene.Light, csmLevel?: number, optCamera?: renderer.scene.Camera): void;
}
/**
* @en Render queue
@@ -35846,8 +35938,18 @@
* @param light @en Lighting information of the scene @zh 场景光照信息
* @param sceneFlags @en Rendering flags of the scene @zh 场景渲染标志位
*/
addSceneOfCamera(camera: renderer.scene.Camera, light: LightInfo, sceneFlags?: SceneFlags): void;
+ /**
+ * @en Add the scene to be rendered.
+ * If SceneFlags.NON_BUILTIN is specified, no builtin constants will be set.
+ * Otherwise, related builtin constants will be set automatically.
+ * @zh 添加需要绘制的场景。
+ * 如果设置了SceneFlags.NON_BUILTIN,那么不会自动设置内置常量。
+ * @param camera @en Camera used for projection @zh 用于投影的相机
+ * @param sceneFlags @en Rendering flags of the scene @zh 场景渲染标志位
+ * @param light @en Light used for lighting computation @zh 用于光照的光源
+ */
addScene(camera: renderer.scene.Camera, sceneFlags: SceneFlags, light?: renderer.scene.Light): SceneBuilder;
/**
* @en Render a full-screen quad.
* @zh 渲染全屏四边形
@@ -35961,27 +36063,52 @@
* @zh 在屏幕上渲染统计数据
*/
showStatistics: boolean;
}
+ /**
+ * @en Basic multisample render pass builder
+ * Support resolve render targets and depth stencil.
+ * This render pass only contains one render subpass.
+ * If resolve targets are specified, they will be resolved at the end of the render pass.
+ * After resolving, the contents of multisample render targets and depth stencils are unspecified.
+ * @zh 基础的多重采样渲染通道。支持决算(Resolve)渲染目标与深度缓冲。
+ * 此渲染通道只包含一个渲染子通道。
+ * 如果添加了决算对象,那么在渲染通道结束时,会进行决算。
+ * 决算后多重采样渲染目标与深度缓冲的内容是未定义的。
+ */
export interface BasicMultisampleRenderPassBuilder extends BasicRenderPassBuilder {
+ /**
+ * @en Set resolve render target
+ * @zh 设置决算渲染目标
+ */
resolveRenderTarget(source: string, target: string): void;
+ /**
+ * @en Set resolve depth stencil
+ * @zh 设置决算深度模板缓冲
+ */
resolveDepthStencil(source: string, target: string, depthMode?: gfx.ResolveMode, stencilMode?: gfx.ResolveMode): void;
}
/**
* @en BasicPipeline
* Basic pipeline provides basic rendering features which are supported on all platforms.
* User can register resources which will be used in the render graph.
* Theses resources are generally read and write, and will be managed by the pipeline.
+ * The residency information of resource should not be changed after registration.
* In each frame, user can create a render graph to be executed by the pipeline.
* @zh 基础渲染管线。
* 基础渲染管线提供基础的渲染能力,能在全平台使用。
* 用户可以在渲染管线中注册资源,这些资源将由管线托管,用于render graph。
* 这些资源一般是可读写的资源。
+ * 资源在注册后,不能更改驻留属性。
* 用户可以每帧构建一个render graph,然后交由管线执行。
*/
export interface BasicPipeline extends __private._cocos_rendering_custom_pipeline__PipelineRuntime {
readonly type: PipelineType;
readonly capabilities: PipelineCapabilities;
+ /**
+ * @en Enable cpu culling of objects affected by the light. Enabled by default.
+ * @zh 光照计算时,裁切受光源影响的物件。默认开启。
+ */
enableCpuLightCulling: boolean;
/**
* @en Check whether the resource has been registered in the pipeline.
* @zh 检查资源是否在管线中已注册
@@ -35989,10 +36116,10 @@
* @returns Exist or not
*/
containsResource(name: string): boolean;
/**
- * @en Add render window to the pipeline.
- * @zh 注册渲染窗口(RenderWindow)
+ * @en Add or update render window to the pipeline.
+ * @zh 注册或更新渲染窗口(RenderWindow)
* @param name @en Resource name @zh 资源名字
* @param format @en Expected format of the render window @zh 期望的渲染窗口格式
* @param width @en Expected width of the render window @zh 期望的渲染窗口宽度
* @param height @en Expected height of the render window @zh 期望的渲染窗口高度
@@ -36000,17 +36127,18 @@
* @returns Resource ID
*/
addRenderWindow(name: string, format: gfx.Format, width: number, height: number, renderWindow: __private._cocos_render_scene_core_render_window__RenderWindow): number;
/**
+ * @deprecated Method will be removed in 3.9.0
* @en Update render window information.
* When render window information is updated, such as resized, user should notify the pipeline.
* @zh 更新渲染窗口信息。当渲染窗口发生更新时,用户应通知管线。
* @param renderWindow @en The render window to update. @zh 渲染窗口
*/
updateRenderWindow(name: string, renderWindow: __private._cocos_render_scene_core_render_window__RenderWindow): void;
/**
- * @en Add 2D render target.
- * @zh 添加2D渲染目标
+ * @en Add or update 2D render target.
+ * @zh 添加或更新2D渲染目标
* @param name @en Resource name @zh 资源名字
* @param format @en Format of the resource @zh 资源的格式
* @param width @en Width of the resource @zh 资源的宽度
* @param height @en Height of the resource @zh 资源的高度
@@ -36018,10 +36146,10 @@
* @returns Resource ID
*/
addRenderTarget(name: string, format: gfx.Format, width: number, height: number, residency?: ResourceResidency): number;
/**
- * @en Add 2D depth stencil.
- * @zh 添加2D深度模板缓冲
+ * @en Add or update 2D depth stencil.
+ * @zh 添加或更新2D深度模板缓冲
* @param name @en Resource name @zh 资源名字
* @param format @en Format of the resource @zh 资源的格式
* @param width @en Width of the resource @zh 资源的宽度
* @param height @en Height of the resource @zh 资源的高度
@@ -36029,8 +36157,9 @@
* @returns Resource ID
*/
addDepthStencil(name: string, format: gfx.Format, width: number, height: number, residency?: ResourceResidency): number;
/**
+ * @deprecated Method will be removed in 3.9.0
* @en Update render target information.
* @zh 更新渲染目标的信息
* @param name @en Resource name @zh 资源名字
* @param width @en Width of the resource @zh 资源的宽度
@@ -36038,23 +36167,114 @@
* @param format @en Format of the resource @zh 资源的格式
*/
updateRenderTarget(name: string, width: number, height: number, format?: gfx.Format): void;
/**
+ * @deprecated Method will be removed in 3.9.0
* @en Update depth stencil information.
* @zh 更新深度模板缓冲的信息
* @param name @en Resource name @zh 资源名字
* @param width @en Width of the resource @zh 资源的宽度
* @param height @en Height of the resource @zh 资源的高度
* @param format @en Format of the resource @zh 资源的格式
*/
updateDepthStencil(name: string, width: number, height: number, format?: gfx.Format): void;
+ /**
+ * @en Add or update buffer.
+ * @zh 添加或更新缓冲
+ * @param name @en Resource name @zh 资源名字
+ * @param size @en Size of the resource in bytes @zh 资源的大小
+ * @param flags @en Flags of the resource @zh 资源的标志位
+ * @param residency @en Residency of the resource. @zh 资源的驻留性
+ * @returns Resource ID
+ */
addBuffer(name: string, size: number, flags: ResourceFlags, residency: ResourceResidency): number;
+ /**
+ * @deprecated Method will be removed in 3.9.0
+ * @en Update buffer information.
+ * @zh 更新缓冲的信息
+ * @param name @en Resource name @zh 资源名字
+ * @param size @en Size of the resource in bytes @zh 资源的大小
+ */
updateBuffer(name: string, size: number): void;
+ /**
+ * @en Add or update external texture.
+ * Must be readonly.
+ * @zh 添加或更新外部的贴图。贴图必须是只读的。
+ * @param name @en Resource name @zh 资源名字
+ * @param texture @en External unmanaged texture @zh 外部不受管理的贴图
+ * @param flags @en Flags of the resource @zh 资源的标志位
+ * @returns Resource ID
+ */
addExternalTexture(name: string, texture: gfx.Texture, flags: ResourceFlags): number;
+ /**
+ * @deprecated Method will be removed in 3.9.0
+ * @en Update external texture information.
+ * @zh 更新外部的贴图信息
+ * @param name @en Resource name @zh 资源名字
+ * @param texture @en External unmanaged texture @zh 外部不受管理的贴图
+ */
updateExternalTexture(name: string, texture: gfx.Texture): void;
+ /**
+ * @en Add or update texture.
+ * @zh 添加或更新外部的贴图。
+ * @param name @en Resource name @zh 资源名字
+ * @param type @en Type of the texture @zh 贴图的类型
+ * @param format @en Format of the texture @zh 贴图的格式
+ * @param width @en Width of the resource @zh 资源的宽度
+ * @param height @en Height of the resource @zh 资源的高度
+ * @param depth @en Depth of the resource @zh 资源的深度
+ * @param arraySize @en Size of the array @zh 资源数组的大小
+ * @param mipLevels @en Mip levels of the texture @zh 贴图的Mipmap数目
+ * @param sampleCount @en Sample count of the texture @zh 贴图的采样数目
+ * @param flags @en Flags of the resource @zh 资源的标志位
+ * @param residency @en Residency of the resource. @zh 资源的驻留性
+ * @returns Resource ID
+ */
addTexture(name: string, type: gfx.TextureType, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount, flags: ResourceFlags, residency: ResourceResidency): number;
+ /**
+ * @deprecated Method will be removed in 3.9.0
+ * @en Update texture information.
+ * @zh 更新贴图信息
+ * @param name @en Resource name @zh 资源名字
+ * @param format @en Format of the texture @zh 贴图的格式
+ * @param width @en Width of the resource @zh 资源的宽度
+ * @param height @en Height of the resource @zh 资源的高度
+ * @param depth @en Depth of the resource @zh 资源的深度
+ * @param arraySize @en Size of the array @zh 资源数组的大小
+ * @param mipLevels @en Mip levels of the texture @zh 贴图的Mipmap数目
+ * @param sampleCount @en Sample count of the texture @zh 贴图的采样数目
+ */
updateTexture(name: string, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount): void;
+ /**
+ * @en Add or update resource.
+ * @zh 添加或更新资源
+ * @param name @en Resource name @zh 资源名字
+ * @param dimension @en Dimension of the resource @zh 资源的维度
+ * @param format @en Format of the texture @zh 资源的格式
+ * @param width @en Width of the resource @zh 资源的宽度
+ * @param height @en Height of the resource @zh 资源的高度
+ * @param depth @en Depth of the resource @zh 资源的深度
+ * @param arraySize @en Size of the array @zh 资源数组的大小
+ * @param mipLevels @en Mip levels of the texture @zh 资源的Mipmap数目
+ * @param sampleCount @en Sample count of the texture @zh 资源的采样数目
+ * @param flags @en Flags of the resource @zh 资源的标志位
+ * @param residency @en Residency of the resource. @zh 资源的驻留性
+ * @returns Resource ID
+ */
addResource(name: string, dimension: ResourceDimension, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount, flags: ResourceFlags, residency: ResourceResidency): number;
+ /**
+ * @deprecated Method will be removed in 3.9.0
+ * @en Update resource information.
+ * @zh 更新资源信息
+ * @param name @en Resource name @zh 资源名字
+ * @param format @en Format of the texture @zh 资源的格式
+ * @param width @en Width of the resource @zh 资源的宽度
+ * @param height @en Height of the resource @zh 资源的高度
+ * @param depth @en Depth of the resource @zh 资源的深度
+ * @param arraySize @en Size of the array @zh 资源数组的大小
+ * @param mipLevels @en Mip levels of the texture @zh 资源的Mipmap数目
+ * @param sampleCount @en Sample count of the texture @zh 资源的采样数目
+ */
updateResource(name: string, format: gfx.Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: gfx.SampleCount): void;
/**
* @en Add render pass
* @zh 添加渲染通道
@@ -36100,8 +36320,13 @@
*
* @param copyPairs @en Array of copy source and target @zh 拷贝来源与目标的数组
*/
addCopyPass(copyPairs: CopyPair[]): void;
+ /**
+ * @en Builtin reflection probe pass
+ * @zh 添加内置环境光反射通道
+ * @param camera @en Capturing camera @zh 用于捕捉的相机
+ */
addBuiltinReflectionProbePass(camera: renderer.scene.Camera): void;
}
/**
* @beta Feature is under development
@@ -36376,10 +36601,28 @@
* @experimental
*/
setCustomShaderStages(name: string, stageFlags: gfx.ShaderStageFlagBit): void;
}
+ /**
+ * @en Multisample render pass builder
+ * @zh 多重采样渲染通道。
+ */
export interface MultisampleRenderPassBuilder extends BasicMultisampleRenderPassBuilder {
+ /**
+ * @en Add storage buffer
+ * @zh 添加存储缓冲
+ * @param name @en Name of the storage buffer @zh 存储缓冲的名字
+ * @param accessType @en Access type of the buffer in the render pass @zh 渲染通道中缓冲的读写状态
+ * @param slotName @en name of the descriptor in shader @zh 着色器中描述符的名字
+ */
addStorageBuffer(name: string, accessType: AccessType, slotName: string): void;
+ /**
+ * @en Add storage image
+ * @zh 添加存储贴图
+ * @param name @en Name of the storage texture @zh 存储贴图的名字
+ * @param accessType @en Access type of the texture in the render pass @zh 渲染通道中贴图的读写状态
+ * @param slotName @en name of the descriptor in shader @zh 着色器中描述符的名字
+ */
addStorageImage(name: string, accessType: AccessType, slotName: string): void;
}
/**
* @en Compute pass
@@ -36454,19 +36697,19 @@
* @zh 渲染管线
*/
export interface Pipeline extends BasicPipeline {
/**
- * @en Add storage buffer.
- * @zh 添加存储缓冲
+ * @en Add or update storage buffer.
+ * @zh 添加或更新存储缓冲
* @param name @en Resource name @zh 资源名字
* @param format @en Format of the resource @zh 资源的格式
- * @param size @en Size of the resource @zh 资源的大小
+ * @param size @en Size of the resource in bytes @zh 资源的大小
* @param residency @en Residency of the resource. @zh 资源的驻留性
*/
addStorageBuffer(name: string, format: gfx.Format, size: number, residency?: ResourceResidency): number;
/**
- * @en Add 2D storage texture
- * @zh 添加2D存储贴图
+ * @en Add or update 2D storage texture
+ * @zh 添加或更新2D存储贴图
* @param name @en Resource name @zh 资源名字
* @param format @en Format of the resource @zh 资源的格式
* @param width @en Width of the resource @zh 资源的宽度
* @param height @en Height of the resource @zh 资源的高度
@@ -36474,10 +36717,10 @@
*/
addStorageTexture(name: string, format: gfx.Format, width: number, height: number, residency?: ResourceResidency): number;
/**
* @experimental
- * @en Add 2D shading rate texture
- * @zh 添加2D着色率贴图
+ * @en Add or update 2D shading rate texture
+ * @zh 添加或更新2D着色率贴图
* @param name @en Resource name @zh 资源名字
* @param width @en Width of the resource @zh 资源的宽度
* @param height @en Height of the resource @zh 资源的高度
* @param residency @en Residency of the resource. @zh 资源的驻留性
@@ -36486,9 +36729,9 @@
/**
* @en Update storage buffer information.
* @zh 更新存储缓冲的信息
* @param name @en Resource name @zh 资源名字
- * @param size @en Size of the resource @zh 资源的大小
+ * @param size @en Size of the resource in bytes @zh 资源的大小
* @param format @en Format of the resource @zh 资源的格式
*/
updateStorageBuffer(name: string, size: number, format?: gfx.Format): void;
/**
@@ -36516,8 +36759,18 @@
* @param passName @en Pass name declared in the effect. Default value is 'default' @zh effect中的pass name,缺省为'default'
* @returns Render pass builder
*/
addRenderPass(width: number, height: number, passName: string): RenderPassBuilder;
+ /**
+ * @en Add multisample render pass
+ * @zh 添加多重采样渲染通道
+ * @param width @en Width of the render pass @zh 渲染通道的宽度
+ * @param height @en Height of the render pass @zh 渲染通道的高度
+ * @param count @en Sample count @zh 采样数目
+ * @param quality @en Sample quality (default is 0) @zh 采样质量(默认为0)
+ * @param passName @en Pass name declared in the effect. Default value is 'default' @zh effect中的pass name,缺省为'default'
+ * @returns Multisample render pass builder
+ */
addMultisampleRenderPass(width: number, height: number, count: number, quality: number, passName: string): MultisampleRenderPassBuilder;
/**
* @en Add compute pass
* @zh 添加计算通道
@@ -36566,10 +36819,8 @@
*
* @param movePairs @en Array of move source and target @zh 移动来源与目标的数组
*/
addMovePass(movePairs: MovePair[]): void;
- addBuiltinGpuCullingPass(camera: renderer.scene.Camera, hzbName?: string, light?: renderer.scene.Light): void;
- addBuiltinHzbGenerationPass(sourceDepthStencilName: string, targetHzbName: string): void;
/**
* @experimental
*/
addCustomBuffer(name: string, info: gfx.BufferInfo, type: string): number;
@@ -36593,8 +36844,12 @@
* @param cameras @en Camera list to render @zh 需要渲染的相机列表
* @param pipeline @en Current render pipeline @zh 当前管线
*/
setup(cameras: renderer.scene.Camera[], pipeline: BasicPipeline): void;
+ /**
+ * @en Callback of pipeline state changed
+ * @zh 渲染管线状态更新的回调
+ */
onGlobalPipelineStateChanged?(): void;
}
}
export namespace postProcess {
@@ -51771,8 +52026,9 @@
isCache: boolean;
isDelete: boolean;
enable: boolean;
setTrackEntryListener: any;
+ destroy();
initSkeleton(data: SkeletonData);
getAnimationState();
setAnimation(trackIndex: number, name: string, loop: boolean): spine.TrackEntry | null;
setSkin(name: string);
@@ -51799,8 +52055,9 @@
static createSpineSkeletonDataWithJson(jsonStr: string, atlasText: string): SkeletonData;
static createSpineSkeletonDataWithBinary(byteSize: number, atlasText: string): SkeletonData;
static registerSpineSkeletonDataWithUUID(data: SkeletonData, uuid: string);
static destroySpineSkeletonDataWithUUID(uuid: string);
+ static destroySpineSkeleton(skeleton: Skeleton): void;
static getCurrentListenerID(): number;
static getCurrentEventType(): EventType;
static getCurrentTrackEntry(): TrackEntry;
static getCurrentEvent(): Event;
@@ -51973,9 +52230,9 @@
protected _debugSlots: boolean;
protected _enableBatch: boolean;
protected _runtimeData: spine.SkeletonData | null;
_skeleton: spine.Skeleton;
- protected _instance: spine.SkeletonInstance;
+ protected _instance: spine.SkeletonInstance | null;
protected _state: spine.AnimationState;
protected _textures: Texture2D[];
protected _animationName: string;
protected _skinName: string;
@@ -52118,12 +52375,18 @@
*/
onDisable(): void;
onDestroy(): void;
/**
- * @en Clear animation and set to setup pose.
- * @zh 清除动画并还原到初始姿势。
+ * @en Clear animation and set to setup pose, default value of track index is 0.
+ * @zh 清除指定动画并还原到初始姿势, 默认清除 track索引 为0的动画。
+ * @param {NUmber} [trackIndex] @en track index. @zh track 的索引。
*/
- clearAnimation(): void;
+ clearAnimation(trackIndex?: number): void;
+ /**
+ * @en Clear all animations and set to setup pose.
+ * @zh 清除所有动画并还原到初始姿势。
+ */
+ clearAnimations(): void;
protected _updateSkeletonData(): void;
/**
* @en
* Sets runtime skeleton data to sp.Skeleton.<br>
@@ -61432,9 +61695,16 @@
readonly geometryRenderer: GeometryRenderer | null;
/**
* @en Get shading scale.
* Shading scale affects shading texels per pixel.
+ * Currently it affects classic native forward pipeline and builtin custom pipeline.
+ * Users can change the size of the render targets according to the shading scale,
+ * when writing their own custom pipelines.
+ * To change screen size, please check director.root.resize.
* @zh 获得渲染倍率(ShadingScale),每像素(pixel)绘制的纹素(texel)会根据渲染倍率进行调整。
+ * 目前仅对原有原生Forward管线以及内置自定义管线生效。
+ * 用户编写自定义管线时,可以根据渲染倍率进行渲染目标尺寸大小的调整。
+ * 如果要修改屏幕大小,详见director.root.resize。
*/
shadingScale: number;
/**
* @en Get macro as string.
@@ -64884,8 +65154,12 @@
depthSlotName: string;
shadowPass: any;
forwardPass: any;
postProcess: postProcess.PostProcess | undefined;
+ maxSpotLights: number;
+ maxSphereLights: number;
+ maxPointLights: number;
+ maxRangedDirLights: number;
setClearFlag(clearFlag: gfx.ClearFlagBit): _cocos_rendering_post_process_utils_pass_context__PassContext;
setClearColor(x: number, y: number, z: number, w: number): _cocos_rendering_post_process_utils_pass_context__PassContext;
setClearDepthColor(x: number, y: number, z: number, w: number): _cocos_rendering_post_process_utils_pass_context__PassContext;
version(): _cocos_rendering_post_process_utils_pass_context__PassContext;
@@ -67204,9 +67478,9 @@
model: _cocos_spine_skeleton_cache__SpineModel;
boneInfos: _cocos_spine_skeleton_cache__FrameBoneInfo[];
}
export class _cocos_spine_skeleton_cache__AnimationCache {
- protected _instance: sp.spine.SkeletonInstance;
+ protected _instance: sp.spine.SkeletonInstance | null;
protected _state: sp.spine.AnimationState;
protected _skeletonData: sp.spine.SkeletonData;
protected _skeleton: sp.spine.Skeleton;
_privateMode: boolean;
@@ -67250,8 +67524,9 @@
curAnimationCache: _cocos_spine_skeleton_cache__AnimationCache | null;
animationsCache: {
[key: string]: _cocos_spine_skeleton_cache__AnimationCache;
};
+ assetUUID: string;
}
export class _cocos_spine_skeleton_cache__SkeletonCache {
static readonly FrameTime: number;
static sharedCache: _cocos_spine_skeleton_cache__SkeletonCache;
@@ -67265,10 +67540,11 @@
constructor();
enablePrivateMode(): void;
clear(): void;
invalidAnimationCache(uuid: string): void;
- removeSkeleton(uuid: string): void;
- getSkeletonCache(uuid: string, skeletonData: sp.spine.SkeletonData): _cocos_spine_skeleton_cache__SkeletonCacheItemInfo;
+ destroySkeleton(assetUuid: string): void;
+ createSkeletonInfo(skeletonAsset: sp.SkeletonData): _cocos_spine_skeleton_cache__SkeletonCacheItemInfo;
+ getSkeletonInfo(skeletonAsset: sp.SkeletonData): null | _cocos_spine_skeleton_cache__SkeletonCacheItemInfo;
getAnimationCache(uuid: string, animationName: string): null | _cocos_spine_skeleton_cache__AnimationCache;
initAnimationCache(uuid: string, data: sp.SkeletonData, animationName: string): null | _cocos_spine_skeleton_cache__AnimationCache;
destroyCachedAnimations(uuid?: string): void;
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re: #
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: