You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add the material through the following code, but it does not work. How can I add the material? thank you
(The material is lost when exporting .ifc from SketchUp, after from .ifc convert to .xkt. so I want to add the material in this way)
const xktLoader = new XKTLoaderPlugin(viewer);
const sceneModel = xktLoader.load({
id: "myModel",
manifestSrc: "app/data/projects/test5/models/hongqi/model.manifest.json",
edges: true,
colorTextureEnabled:true
});
.....
sceneModel.on("loaded", () => {
var myMesh = viewer.scene.objects["2hN0_N64f4eBtacYJk9FSu"];
if(myMesh != null)
new Mesh(viewer.scene, {
geometry: new ReadableGeometry(viewer.scene, myMesh.geometry),
material: new SpecularMaterial(viewer.scene, {
// specular: [1.0, 0.0, 0.0],
normalMap: new Texture(viewer.scene, {
src: "assets/myMaterials/material_9.jpg"
})
})
});
.....
thank you.
The text was updated successfully, but these errors were encountered:
I want to add the material through the following code, but it does not work. How can I add the material? thank you
(The material is lost when exporting .ifc from SketchUp, after from .ifc convert to .xkt. so I want to add the material in this way)
const xktLoader = new XKTLoaderPlugin(viewer);
const sceneModel = xktLoader.load({
id: "myModel",
manifestSrc: "app/data/projects/test5/models/hongqi/model.manifest.json",
edges: true,
colorTextureEnabled:true
});
.....
sceneModel.on("loaded", () => {
var myMesh = viewer.scene.objects["2hN0_N64f4eBtacYJk9FSu"];
if(myMesh != null)
new Mesh(viewer.scene, {
geometry: new ReadableGeometry(viewer.scene, myMesh.geometry),
material: new SpecularMaterial(viewer.scene, {
// specular: [1.0, 0.0, 0.0],
normalMap: new Texture(viewer.scene, {
src: "assets/myMaterials/material_9.jpg"
})
})
});
.....
thank you.
The text was updated successfully, but these errors were encountered: