typo fixed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { ObjectGeomertiesLayer } from "./ObjectGeomertiesLayer";
|
||||
import { ObjectGeometriesLayer } from "./ObjectGeometriesLayer";
|
||||
import { Canvas } from "@react-three/fiber";
|
||||
import { Perf } from "r3f-perf";
|
||||
import { state } from "../../state";
|
||||
@@ -17,7 +17,7 @@ export const LayeredThreeView = observer(function () {
|
||||
<Perf position="bottom-right" />
|
||||
|
||||
<CameraLayer camera={state.worldEditor.camera} />
|
||||
<ObjectGeomertiesLayer />
|
||||
<ObjectGeometriesLayer />
|
||||
</Canvas>
|
||||
</>;
|
||||
});
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { ObjectGeometryList } from "../../rendering/ObjectGeometryList";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { state } from "../../state";
|
||||
|
||||
export const ObjectGeomertiesLayer = observer(function () {
|
||||
export const ObjectGeometriesLayer = observer(function () {
|
||||
|
||||
const geometries = state.view.objectGeometries;
|
||||
|
||||
@@ -48,8 +48,8 @@ export class ObjectGeometryList {
|
||||
this.items.values.forEach((item) => {
|
||||
const obj = item.object;
|
||||
|
||||
this._p.set(obj.position[0], obj.position[1], obj.position[2]);
|
||||
this._e.set(obj.rotation[0], obj.rotation[1], obj.rotation[2]);
|
||||
this._p.set(...obj.position);
|
||||
this._e.set(...obj.rotation);
|
||||
this._q.setFromEuler(this._e);
|
||||
|
||||
const typeId = item.objectTypeGeometry.objectType.id;
|
||||
@@ -60,7 +60,7 @@ export class ObjectGeometryList {
|
||||
for (const mesh of item.objectTypeGeometry.meshes ?? []) {
|
||||
this.matrixObj.position.copy(this._p);
|
||||
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();
|
||||
mesh.setMatrixAt(instanceIdx, this.matrixObj.matrix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user