Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/model/emptyProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export function createEmptyProject(): ProjectSpec {
const scene = createEmptyGameScene('scene-1');
return {
id: 'project-1',
pixelsPerUnit: 1,
renderMode: 'pixel-art',
pixelsPerUnit: 2,
renderMode: 'smooth-2d',
assets: { images: {}, spriteSheets: {}, fonts: {} },
audio: { sounds: {} },
inputMaps: {},
Expand Down
4 changes: 2 additions & 2 deletions src/model/projectPixelScale.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ProjectRenderMode, ProjectSpec, SpriteAssetSpec } from './types';

export const DEFAULT_PROJECT_PIXELS_PER_UNIT = 1;
export const DEFAULT_PROJECT_RENDER_MODE: ProjectRenderMode = 'pixel-art';
export const DEFAULT_PROJECT_PIXELS_PER_UNIT = 2;
export const DEFAULT_PROJECT_RENDER_MODE: ProjectRenderMode = 'smooth-2d';

export function normalizeProjectPixelsPerUnit(value: unknown, fallback = DEFAULT_PROJECT_PIXELS_PER_UNIT): number {
if (!Number.isFinite(value)) return fallback;
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/assets-dock.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ test.describe('Assets dock', () => {
return Object.values(entities).find((e: any) => e?.asset?.source?.kind === 'asset' && e?.asset?.source?.assetId === 'enemy-a') ?? null;
});
if (!created) throw new Error('Failed to find created entity');
expect(created.width).toBe(importedMeta.width);
expect(created.height).toBe(importedMeta.height);
expect(created.width).toBe(Math.round((importedMeta.width ?? 0) / 2));
expect(created.height).toBe(Math.round((importedMeta.height ?? 0) / 2));
expect(created.scaleX ?? 1).toBe(1);
expect(created.scaleY ?? 1).toBe(1);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/editor/assets-store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ describe('EditorStore assets actions', () => {
const entity = scene.entities[ids[0]];
expect(entity.x).toBe(10);
expect(entity.y).toBe(20);
expect(entity.width).toBe(256);
expect(entity.height).toBe(128);
expect(entity.width).toBe(128);
expect(entity.height).toBe(64);
expect(entity.scaleX ?? 1).toBe(1);
expect(entity.scaleY ?? 1).toBe(1);
expect(entity.asset?.source).toEqual({ kind: 'asset', assetId: 'player' });
Expand Down
Loading