playcanvas / engine

Powerful web graphics runtime built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.73k stars 1.36k forks source link

CameraFrame API in the engine #7129

Closed mvaligursky closed 19 hours ago

mvaligursky commented 4 days ago

Fixes https://github.com/playcanvas/engine/pull/7129 (separate improvements / changes can be tracked separately)

This adds a new CameraFrame class as part of the engine, which is a public API for the currently exposed render pass based rendering. The script which exposes this to the Editor now uses an instance of this CameraFrame, and simply passes attributes to it, without containing any logic. This allows it to not access any private engine functionality.

This is the new public API (too long to copy here) https://github.com/playcanvas/engine/blob/mc-engine-camera-frame/src/extras/render-passes/camera-frame.js

mvaligursky commented 19 hours ago

I'll merge this for now, further feedback / changes will be address by a follow up PR @willeastcott