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

Backdrop proposal for readibility #4

Open
Utopiah opened this issue Sep 23, 2022 · 1 comment
Open

Backdrop proposal for readibility #4

Utopiah opened this issue Sep 23, 2022 · 1 comment

Comments

@Utopiah
Copy link

Utopiah commented Sep 23, 2022

As background seems to be transparent by default sometimes having a backdrop helps, in particular when there is text.

const geometry = new THREE.PlaneGeometry( el.object3D.children[0].geometry.parameters.width*1.1,
                el.object3D.children[0].geometry.parameters.height*1.1 );
const material = new THREE.MeshBasicMaterial( {color: 0xffffff, side: THREE.DoubleSide} );
const plane = new THREE.Mesh( geometry, material );
plane.position.z = -.1
el.object3D.add( plane );

I tend to use this relatively often. If useful to others could be an optional, disabled by default, parameter for the component. Itself with color as a parameter.

@AdaRoseCannon
Copy link
Owner

My suggested method would be to set a background color for the root element being used but it seems nice that it has a little a offset, if you would like to add this feature as a PR I wouldn’t mind merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants