Absulit / Absulit/points

RenderPass method refactor like uniforms, storages, and constants

Đang mở
#279 0 bình luận 0 reaction 1 người được giao Được @Absulit nhận Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
56
Fork
5
Merge trung bình
2 phút
Pull request đã merge (30 ngày)
1

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.