next: add API for Canvas' plugin-props #74
Copy link
Copy link
Open
Description
Currently we have the following API for adding/overwriting props:
const T = createT(THREE, [xrEvents()])
return <T.Mesh onXRSelect={...} />
return <Entity from={...} plugins={[xrEvents()]} />But this only sets props to the objects in the scene.
There is currently no API for setting Canvas plugin-props.
For the xr-events plugin (see #65) it would be handy if we could add additional props to the <Canvas/> component too.
Idea for API on the consuming side:
const [T, Canvas] = createT.withCanvas(THREE, [xrEvents()])
return (
<Canvas onXRSelect={...} >
<T.Mesh onXRSelect={...} />
</Canvas>
)Not sure yet how the authoring should look like, specifically the question if you want to add a prop only to Canvas, how do you filter for it as there is no corresponding three.js class?
Metadata
Metadata
Assignees
Labels
No labels
Activity