-
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
docs(core) replace glOptions
with deviceProps
#8945
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Chris Gervang <[email protected]>
@@ -248,7 +246,6 @@ const defaultProps = { | |||
device: null, | |||
deviceProps: {type: 'webgl'} as DeviceProps, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not provide any type hint for WebGL context options. Should be something like this?
DeviceProps & (
({type: 'webgl'} & WebGLContextAttributes)
| {type?: 'webgpu'}
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to specify preserveDrawingBuffer
even when omitting Device type or using type: 'best-available'
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is type
optional? What happens when someone doesn't specify the type
on deviceProps
, and let's deck define the device?
What will luma.createDevice do by default in deck? I think deck only registers a WebGLDevice in this logic but it's just a little unclear reading the code whether type is required, and if not, what that implies in deck?
Co-authored-by: Xiaoji Chen <[email protected]>
Co-authored-by: Xiaoji Chen <[email protected]>
@@ -83,7 +83,7 @@ function App() { | |||
initialViewState={INITIAL_VIEW_STATE} | |||
controller={true} | |||
onWebGLInitialized={setGLContext} | |||
glOptions={{stencil: true}} | |||
deviceProps={{type: 'webgl', stencil: true}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User's can forget to add type: 'webgl'
. Any problem with deck adding it by default if the user hasn't specified? Also technically if the user provides type
here it's a luma CreateDeviceProps
instead of DeviceProps
Signed-off-by: Chris Gervang <[email protected]>
Closes #8896
Background
glOptions
was removed in v9 and replaced bydeviceProps
.Change List
glOptions
(this has not been functional since v9)device
anddeviceProps
deviceProps: WebGLDeviceProps | WebGPUDeviceProps
(need to update luma)