Skip to content

Commit 05c15bf

Browse files
committed
force images to support transparency
1 parent d44ee29 commit 05c15bf

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ Quickly add an image to your scene
366366
src="https://link-to-your-image.png"
367367
size={1} // size, default normalized to longest side = 1
368368
framed // adds a frame
369-
transparent // enables transparency on the image
370369
/>
371370
```
372371

src/ideas/physical/Image/components/ImageTexture.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export function ImageTexture(props: ImageProps) {
1212
frameMaterial,
1313
frameWidth = 1,
1414
innerFrameMaterial,
15-
transparent,
1615
} = props;
1716

1817
const texture = useTexture(src);
@@ -28,11 +27,7 @@ export function ImageTexture(props: ImageProps) {
2827
<group name="spacesvr-texture" {...props}>
2928
<mesh>
3029
<planeBufferGeometry args={[WIDTH, HEIGHT]} />
31-
<meshBasicMaterial
32-
map={texture}
33-
side={DoubleSide}
34-
transparent={transparent}
35-
/>
30+
<meshBasicMaterial map={texture} side={DoubleSide} transparent />
3631
</mesh>
3732
{framed && (
3833
<Frame

src/ideas/physical/Image/components/KTX2Texture.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export function KTX2Texture(props: ImageProps) {
1212
frameMaterial,
1313
frameWidth = 1,
1414
innerFrameMaterial,
15-
transparent,
1615
} = props;
1716

1817
const texture = useKTX2(src);
@@ -28,11 +27,7 @@ export function KTX2Texture(props: ImageProps) {
2827
<group name="spacesvr-ktx2" {...props}>
2928
<mesh rotation={[0, Math.PI, Math.PI]}>
3029
<planeBufferGeometry args={[WIDTH, HEIGHT]} />
31-
<meshBasicMaterial
32-
map={texture}
33-
side={DoubleSide}
34-
transparent={transparent}
35-
/>
30+
<meshBasicMaterial map={texture} side={DoubleSide} transparent />
3631
</mesh>
3732
{framed && (
3833
<Frame

src/ideas/physical/Image/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export type ImageProps = {
1111
frameMaterial?: Material;
1212
frameWidth?: number;
1313
innerFrameMaterial?: Material;
14-
transparent?: boolean;
1514
} & GroupProps;
1615

1716
export function Image(props: ImageProps) {

0 commit comments

Comments
 (0)