aframe-htmlmesh icon indicating copy to clipboard operation
aframe-htmlmesh copied to clipboard

Backdrop proposal for readibility

Open Utopiah opened this issue 3 years ago • 1 comments

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.

Utopiah avatar Sep 23 '22 07:09 Utopiah

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.

AdaRoseCannon avatar Sep 23 '22 08:09 AdaRoseCannon