amazing
This commit is contained in:
@@ -2,14 +2,13 @@ import { TextureLoader } from "three";
|
||||
|
||||
function assignParams(mesh, params){
|
||||
['scale', 'rotation', 'position'].forEach(p=>params[p] && mesh[p].fromArray(params[p]));
|
||||
['visible', 'name'].forEach(p=>{
|
||||
['visible', 'name', 'fontSize', 'color'].forEach(p=>{
|
||||
if (params[p]!==undefined) mesh[p] = params[p];
|
||||
});
|
||||
}
|
||||
|
||||
function assignMaterial(mesh, params, context){
|
||||
if (params.name && params.material){
|
||||
console.log(mesh)
|
||||
//let mp = params.material.metalness ? new MeshStandardMaterial(params.material) : new MeshBasicMaterial(params.material)
|
||||
Object.assign(mesh.material, params.material)
|
||||
if (params.dm){
|
||||
|
||||
Reference in New Issue
Block a user