I have been experimenting with the interactive cubes and recently implemented a click function that directs to specific links. Now, I am interested in assigning distinct text to each cube as a material when rendered. Currently, I am using a single material and considering creating an array for all possible materials. However, whenever I try to reference this array in the mesh object-building parameters, I encounter an error stating 'setHex() is undefined' in the console. How can I associate a unique material with each cube?
<html lang="en">
<head>
<title>Customized Text on Interactive Cubes</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Arial;
background-color: #ececec;
margin: 0px;
overflow: hidden;
}
div#stats{
display:none;
}
p{
position:absolute;
top:50%;
left:50%;
}
</style>
</head>
<body>
<script src="../build/three.min.js"></script>
<script src="js/renderers/Projector.js"></script>
<script src='../build/threex.dynamictexture.js'></script>
<script src="js/libs/stats.min.js"></script>
<script>
// Javascript code goes here
</script>
</body>
</html>