Sorry my impertinence but i want those transparents block in the (x,y,z) function
EDIT 1:
`// Cutout Transparent Material using alphaTest
const materialCutout = new THREE.MeshStandardMaterial({
map: textureCutout,
transparent: false, // Crucial: We keep this false so it writes to the depth buffer normally!
alphaTest: 0.5, // Pixels with alpha values < 0.5 will be discarded entirely
side: THREE.DoubleSide // Show inside faces if we peer into it
});`
In my script that’s impossible…
And… where i import the glass function into it?
EDIT 2:
Your configuration doesnt make glass acts correctly:
materials: {
brick: new THREE.MeshStandardMaterial({ map: textureBrick,transparent:false, alphaTest: 0.5, side: THREE.DoubleSide }),
asfalto: new THREE.MeshStandardMaterial({ map: textureAsfalto,transparent:false, alphaTest: 0.5, side: THREE.DoubleSide }),
chapa: new THREE.MeshStandardMaterial({ map: textureBrick,transparent:false, alphaTest: 0.5, side: THREE.DoubleSide }),
grass: new THREE.MeshStandardMaterial({ map: textureAsfalto,transparent:false, alphaTest: 0.5, side: THREE.DoubleSide }),
leaves: new THREE.MeshStandardMaterial({ map: textureBrick,transparent:false, alphaTest: 0.5, side: THREE.DoubleSide }),
glass: new THREE.MeshStandardMaterial({ map: textureBrick,transparent:false, alphaTest: 0.5, side: THREE.DoubleSide }),
}
It says THREE is not defined ...
EDIT 3: Maybe this trouble is impossible with voxel engine. I comment this because i tried so far commands and is not any form to keep glass as I want.
EDIT 4: GitHub - voxel/voxel-glass: transparent and translucent glass blocks (voxel.js plugin) · GitHub is ded.