Skip to Content
ExamplesChange Mesh Material

Change Mesh Material

import { useUtilsEditor, useUtilsMaterial} from '@amaspace-editor/editor-3d' const utils = useUtilsEditor() const utilsMat = useUtilsMaterial() const changeMaterial = () => { const material = utilsMat.createMaterialFromAsset(asset) const node = utils.getMeshById(id) if (!node) return utils.updateObjectData(node, { material }) }
Last updated on