auto-git:
[change] src/viewport-three/viewport-host.ts [change] tests/unit/viewport-canvas.test.tsx
This commit is contained in:
@@ -288,8 +288,6 @@ export class ViewportHost {
|
|||||||
private readonly cameraForward = new Vector3();
|
private readonly cameraForward = new Vector3();
|
||||||
private readonly cameraRight = new Vector3();
|
private readonly cameraRight = new Vector3();
|
||||||
private readonly cameraUp = new Vector3();
|
private readonly cameraUp = new Vector3();
|
||||||
private readonly transformOrientation = new Quaternion();
|
|
||||||
private readonly transformOrientationInverse = new Quaternion();
|
|
||||||
private readonly transformAxisDelta = new Vector3();
|
private readonly transformAxisDelta = new Vector3();
|
||||||
private readonly fogLocalCameraPosition = new Vector3();
|
private readonly fogLocalCameraPosition = new Vector3();
|
||||||
private readonly cameraSpherical = new Spherical();
|
private readonly cameraSpherical = new Spherical();
|
||||||
@@ -415,7 +413,7 @@ export class ViewportHost {
|
|||||||
|
|
||||||
for (const gridHelper of Object.values(this.gridHelpers)) {
|
for (const gridHelper of Object.values(this.gridHelpers)) {
|
||||||
const gridMaterial = gridHelper.material as LineBasicMaterial;
|
const gridMaterial = gridHelper.material as LineBasicMaterial;
|
||||||
const centerLineMaterial = gridHelper.children[0]?.material as LineBasicMaterial | undefined;
|
const centerLineMaterial = (gridHelper.children[0] as LineSegments<BufferGeometry, LineBasicMaterial> | undefined)?.material;
|
||||||
|
|
||||||
gridMaterial.transparent = true;
|
gridMaterial.transparent = true;
|
||||||
gridMaterial.opacity = 0.48;
|
gridMaterial.opacity = 0.48;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
|||||||
const viewportHostInstances: Array<{
|
const viewportHostInstances: Array<{
|
||||||
mount: ReturnType<typeof vi.fn>;
|
mount: ReturnType<typeof vi.fn>;
|
||||||
dispose: ReturnType<typeof vi.fn>;
|
dispose: ReturnType<typeof vi.fn>;
|
||||||
|
setRenderEnabled: ReturnType<typeof vi.fn>;
|
||||||
updateWorld: ReturnType<typeof vi.fn>;
|
updateWorld: ReturnType<typeof vi.fn>;
|
||||||
updateAssets: ReturnType<typeof vi.fn>;
|
updateAssets: ReturnType<typeof vi.fn>;
|
||||||
updateDocument: ReturnType<typeof vi.fn>;
|
updateDocument: ReturnType<typeof vi.fn>;
|
||||||
@@ -38,6 +39,7 @@ const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
|||||||
class MockViewportHost {
|
class MockViewportHost {
|
||||||
mount = vi.fn();
|
mount = vi.fn();
|
||||||
dispose = vi.fn();
|
dispose = vi.fn();
|
||||||
|
setRenderEnabled = vi.fn();
|
||||||
updateWorld = vi.fn();
|
updateWorld = vi.fn();
|
||||||
updateAssets = vi.fn();
|
updateAssets = vi.fn();
|
||||||
updateDocument = vi.fn();
|
updateDocument = vi.fn();
|
||||||
|
|||||||
Reference in New Issue
Block a user