typo fixed

This commit is contained in:
azykov@mail.ru
2026-06-20 18:44:35 +03:00
parent 579fe36e6c
commit 98e387c490
3 changed files with 6 additions and 6 deletions
@@ -1,5 +1,5 @@
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import { ObjectGeomertiesLayer } from "./ObjectGeomertiesLayer"; import { ObjectGeometriesLayer } from "./ObjectGeometriesLayer";
import { Canvas } from "@react-three/fiber"; import { Canvas } from "@react-three/fiber";
import { Perf } from "r3f-perf"; import { Perf } from "r3f-perf";
import { state } from "../../state"; import { state } from "../../state";
@@ -17,7 +17,7 @@ export const LayeredThreeView = observer(function () {
<Perf position="bottom-right" /> <Perf position="bottom-right" />
<CameraLayer camera={state.worldEditor.camera} /> <CameraLayer camera={state.worldEditor.camera} />
<ObjectGeomertiesLayer /> <ObjectGeometriesLayer />
</Canvas> </Canvas>
</>; </>;
}); });
@@ -4,7 +4,7 @@ import { ObjectGeometryList } from "../../rendering/ObjectGeometryList";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import { state } from "../../state"; import { state } from "../../state";
export const ObjectGeomertiesLayer = observer(function () { export const ObjectGeometriesLayer = observer(function () {
const geometries = state.view.objectGeometries; const geometries = state.view.objectGeometries;
@@ -48,8 +48,8 @@ export class ObjectGeometryList {
this.items.values.forEach((item) => { this.items.values.forEach((item) => {
const obj = item.object; const obj = item.object;
this._p.set(obj.position[0], obj.position[1], obj.position[2]); this._p.set(...obj.position);
this._e.set(obj.rotation[0], obj.rotation[1], obj.rotation[2]); this._e.set(...obj.rotation);
this._q.setFromEuler(this._e); this._q.setFromEuler(this._e);
const typeId = item.objectTypeGeometry.objectType.id; const typeId = item.objectTypeGeometry.objectType.id;
@@ -60,7 +60,7 @@ export class ObjectGeometryList {
for (const mesh of item.objectTypeGeometry.meshes ?? []) { for (const mesh of item.objectTypeGeometry.meshes ?? []) {
this.matrixObj.position.copy(this._p); this.matrixObj.position.copy(this._p);
this.matrixObj.quaternion.copy(this._q); this.matrixObj.quaternion.copy(this._q);
this.matrixObj.scale.set(obj.scale[0], obj.scale[1], obj.scale[2]); this.matrixObj.scale.set(...obj.scale);
this.matrixObj.updateMatrix(); this.matrixObj.updateMatrix();
mesh.setMatrixAt(instanceIdx, this.matrixObj.matrix); mesh.setMatrixAt(instanceIdx, this.matrixObj.matrix);
} }