Absulit / Absulit/points

RenderPass method refactor like uniforms, storages, and constants

未關閉
#279 0 則留言 0 個 reaction 已指派 1 人 已被 @Absulit 認領 在 GitHub 檢視
enhancement
主要語言
JavaScript
星號
56
分支
5
平均合併
2 分鐘
30 天內合併 PR
1

描述

To continue work from #275

RenderPass Class

```js

constructor(vertexShader, fragmentShader, computeShader, workgroupCountX, workgroupCountY, workgroupCountZ, init)

setCube(
name,
coordinate = { x: 0, y: 0, z: 0 },
dimensions = { width: 1, height: 1, depth: 1 },
color = { r: 1, g: 0, b: 1, a: 0 }
)

```

among others

The idea here would be to apply two changes
1- pass a config object as only parameter
2- use also a Builder Pattern, to call separate methods and leave the others as default

```js

const r0 = new RenderPass({...}) // here all its attributes or none
r0.setVertexShader(vertexvar)
.setFragmentShader(fragmentvar)
.setWorkGroupCountX(8)

points.setCube().setName('myCube')

```

Use Uniforms, Storages, and Constants as reference for this work.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。