Skip to content
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

Update encoding to colorSpace and add transparent image support #267

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add colorspace config for react element
update docs
  • Loading branch information
danrossi committed Jul 11, 2023
commit 1520490ff4b48024003edabb8d01f8ad54fea224
2 changes: 2 additions & 0 deletions docs/troika-3d/scenes.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ The `<Canvas3D>` React component is your starting point. This component creates

- `outputEncoding` - Sets the Three.js renderer's [`outputEncoding`](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.outputEncoding)

- `outputColorSpace` - Sets the Three.js v153+ renderer's [`outputColorSpace`](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.outputColorSpace)

- `pixelRatio` - Sets the pixel ratio for the canvas. Defaults to the current screen's reported `window.devicePixelRatio`.

- `rendererClass` - Lets you override the Three.js `WebGLRenderer` class with a custom subclass of your own.
Expand Down
1 change: 1 addition & 0 deletions packages/troika-3d/src/react/Canvas3D.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Canvas3D extends ReactCanvasBase {
background: props.background,
environment: props.environment,
outputEncoding: props.outputEncoding,
outputColorSpace: props.outputColorSpace,
toneMapping: props.toneMapping,
shadows: props.shadows,
camera: props.camera,
Expand Down