开发:更新包
This commit is contained in:
25
api.esm.js
25
api.esm.js
@@ -1093,6 +1093,11 @@ let PhysicalMaterialRecord = class PhysicalMaterialRecord extends MaterialTableR
|
||||
material: "",
|
||||
};
|
||||
this.material = new MeshPhysicalMaterial({});
|
||||
Object.defineProperty(this.material, "ObjectId", {
|
||||
get: () => {
|
||||
return this?.objectId?.Index;
|
||||
}
|
||||
});
|
||||
}
|
||||
async Update() {
|
||||
this.material[USE_WORLD_UV] = this.UseWorldUV;
|
||||
@@ -25794,11 +25799,8 @@ let RoomHolePolyline = class RoomHolePolyline extends RoomHoleBase {
|
||||
get MaterialsIds() {
|
||||
let mtls = this.MeshMaterial;
|
||||
return mtls.map(mtl => {
|
||||
if (mtl.userData.Entity) {
|
||||
let mtlRc = mtl.userData.Entity;
|
||||
return mtlRc.objectId?.Index ?? 71;
|
||||
}
|
||||
return 71;
|
||||
//@ts-ignore
|
||||
return mtl.ObjectId ?? 71;
|
||||
});
|
||||
}
|
||||
GetPrintObject3D() {
|
||||
@@ -35691,6 +35693,16 @@ let EntityRef = class EntityRef extends Entity {
|
||||
this.Update();
|
||||
return this;
|
||||
}
|
||||
get OverWriteMaterial() {
|
||||
return this._OverWriteMaterial;
|
||||
}
|
||||
SetMaterialAtSlot(mtl, slotIndex) {
|
||||
if (this._OverWriteMaterial.get(slotIndex) !== mtl) {
|
||||
this.WriteAllObjectRecord();
|
||||
this._OverWriteMaterial.set(slotIndex, mtl);
|
||||
this.Update(UpdateDraw.Material);
|
||||
}
|
||||
}
|
||||
GetObjectSnapPoints(snapMode, pickPoint, lastPoint, viewXform) {
|
||||
let box = this.BoundingBox;
|
||||
let [x1, y1, z1] = [box.min.x, box.min.y, box.min.z];
|
||||
@@ -35757,7 +35769,8 @@ let EntityRef = class EntityRef extends Entity {
|
||||
for (let i = 0; i < size; i++) {
|
||||
let index = file.Read();
|
||||
let id = file.ReadHardObjectId();
|
||||
this._OverWriteMaterial.set(index, id);
|
||||
if (id)
|
||||
this._OverWriteMaterial.set(index, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user