支持mesh子网格创建
支持mesh子网格创建
Re: #
Changelog
Continuous Integration
This pull request:
- [ ] needs automatic test cases check.
Manual trigger with
@cocos-robot run test casesafterward. - [ ] does not change any runtime related code or build configuration
If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.
Compatibility Check
This pull request:
- [ ] changes public API, and have ensured backward compatibility with deprecated features.
- [ ] affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
- [ ] affects file structure of the build package or build configuration which requires user project upgrade.
- [ ] introduces breaking changes, please list all changes, affected features and the scope of violation.
Interface Check Report
! WARNING this pull request has changed these public interfaces:
@@ -4134,8 +4134,16 @@
* @param options @en options of creating @zh 创建选项
* @return @en The created dynamic mesh, which is same as out @zh 新创建的动态网格,同 out 参数
*/
static createDynamicMesh(primitiveIndex: number, geometry: primitives.IDynamicGeometry, out?: Mesh, options?: primitives.ICreateDynamicMeshOptions): Mesh;
+ /**
+ * @en create a dynamic mesh, which supports multiple sub meshes.
+ * @zh 创建一个动态网格,支持多个子网格。
+ * @param geometries @en geometry data use for creating @zh 用于创建的几何数据
+ * @param out @en output dynamic mesh @zh 输出的动态网格
+ * @return @en The created dynamic mesh, which is same as out @zh 新创建的动态网格,同 out 参数
+ */
+ static createDynamicMeshes(geometries: primitives.IDynamicGeometry[], out?: Mesh): Mesh;
}
export function readBuffer(target: DataView, format?: gfx.Format, offset?: number, length?: number, stride?: number, out?: number[]): number[];
export function writeBuffer(target: DataView, data: number[], format?: gfx.Format, offset?: number, stride?: number): void;
export function mapBuffer(target: DataView, callback: (cur: number, idx: number, view: DataView) => number, format?: gfx.Format, offset?: number, length?: number, stride?: number, out?: DataView): DataView;
- it seems break compatibility
- could you please fix the eslint error?
- it seems break compatibility
- could you please fix the eslint error?
好了
但是这个改动修改了接口,破坏了兼容性了。
之前那个就有问题,只支持一个子网格,新版本可以直接用这个,实在不行可以新增一个接口?
新增接口比较好。
理论上 createDynamicMesh 是 createDynamicMeshes 的特例。那能用 createDynamicMeshes 实现 createDynamicMesh 吗?
当然可以的
我的意思是类似这样的代码
static createDynamicMesh(...) {
...
createDynamicMeshes(...);
}
好的。可以,其实特例的参数就没用了而已
@minggo This PR was automatically closed since the target branch was deleted. And the developer could not re-open this Pull Request. We need to check whether to cherry-pick the changes to 3.8.6.
This PR break compatibility, can no be merged.