开发:清理低级代码

pull/2096/head
ChenX 2 years ago
parent 79b0d79887
commit a9962f98bd

@ -23,7 +23,7 @@ export class DrawArc implements Command
const updateArc = (p) =>
{
if (!equalv3(p, pt2) && !equalv3(p, pt2))
if (!equalv3(p, pt1) && !equalv3(p, pt2))
{
arc.FromThreePoint(pt1, pt2, p);
arc.Update();

@ -165,7 +165,7 @@ export class PhysicalMaterialRecord extends MaterialTableRecord
});
this.material.needsUpdate = true;
if (this.useMap && this.map && !this.map.IsErase)
if (this.useMap && this.map?.Object && !this.map.IsErase)
{
let map = this.map.Object as TextureTableRecord;
let texture = map.GetThreeTexture();
@ -189,7 +189,7 @@ export class PhysicalMaterialRecord extends MaterialTableRecord
this.material.emissiveMap = undefined;
}
if (this.useMap && this.useBumpMap && this.bumpMap && !this.bumpMap.IsErase)
if (this.useMap && this.useBumpMap && this.bumpMap?.Object && !this.bumpMap.IsErase)
{
let map = this.bumpMap.Object as TextureTableRecord;
let texture = map.GetThreeTexture();
@ -200,7 +200,7 @@ export class PhysicalMaterialRecord extends MaterialTableRecord
else
this.material.bumpMap = undefined;
if (this.useMap && this.roughnessMap && this.roughnessMap && !this.roughnessMap.IsErase)
if (this.useMap && this.roughnessMap?.Object && !this.roughnessMap.IsErase)
{
let map = this.roughnessMap.Object as TextureTableRecord;
let texture = map.GetThreeTexture();

@ -136,7 +136,7 @@ export class DynamicInput
}
if (this.isCtrlDown && !this._IsLock)
if (e.keyCode === KeyBoard.KeyZ || e.keyCode === KeyBoard.KeyZ)
if (e.keyCode === KeyBoard.KeyZ)
e.preventDefault();
if (e.keyCode !== KeyBoard.F8 && e.keyCode !== KeyBoard.KeyZ && e.keyCode !== KeyBoard.KeyY && !e.shiftKey)

Loading…
Cancel
Save