diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 876190a7..e573f41a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,43 +4,6 @@ on: workflow_dispatch: jobs: - build-linux: - name: Linux (Ubuntu GCC) - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - cmake \ - ninja-build \ - libglfw3-dev \ - libgl1-mesa-dev \ - xorg-dev \ - libxkbcommon-dev \ - ccache - - - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2.20 - with: - key: ${{ runner.os }}-build-linux - max-size: 500M - - - name: Configure CMake - run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DES_ENABLE_CCACHE=ON - - - name: Build - run: cmake --build build - - - name: Test - working-directory: build - run: ctest --output-on-failure - build-emscripten: name: Web (Emscripten) runs-on: ubuntu-latest @@ -95,7 +58,7 @@ jobs: run: node build-tools/cli.js build -t all --no-sync --continue-on-error test: - name: Tests (SDK + Editor) + name: Tests (SDK) runs-on: ubuntu-latest steps: @@ -120,14 +83,8 @@ jobs: - name: Build SDK run: pnpm --filter ./sdk build - - name: Type-check Editor - run: pnpm exec tsc --noEmit -p editor/tsconfig.json - - name: Type-check Examples run: node build-tools/cli.js check-examples - name: Run SDK tests run: pnpm --filter ./sdk exec vitest run - - - name: Run Editor tests - run: pnpm --filter ./editor exec vitest run diff --git a/CMakeLists.txt b/CMakeLists.txt index ac0a036c..ea76a133 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,19 +231,15 @@ if(ES_BUILD_WEB OR ES_BUILD_WXGAME) src/esengine/platform/web/WebFileSystem.cpp ) else() + # Web-only repo: the native platform layer (NativePlatform/NativeFileSystem/ + # FileDialog) was removed in d9a08d87. Keep only the platform-agnostic + # sources a native tooling/test build still needs. list(APPEND ESENGINE_SOURCES - src/esengine/platform/native/NativePlatform.cpp - src/esengine/platform/native/NativeFileSystem.cpp - src/esengine/platform/FileDialog.cpp src/esengine/renderer/stb_image_impl.cpp src/esengine/resource/LoaderJobQueue.cpp src/esengine/resource/HotReloadManager.cpp src/esengine/resource/loaders/ShaderLoader.cpp ) - list(APPEND ESENGINE_HEADERS - src/esengine/platform/native/NativePlatform.hpp - src/esengine/platform/FileDialog.hpp - ) endif() # ============================================================================= diff --git a/examples/audio-demo/src/systems/sfx.ts b/examples/audio-demo/src/systems/sfx.ts index 2890cf15..1f066391 100644 --- a/examples/audio-demo/src/systems/sfx.ts +++ b/examples/audio-demo/src/systems/sfx.ts @@ -22,7 +22,7 @@ export const sfxTriggerSystem = defineSystem( trigger.cooldown = Math.max(0, trigger.cooldown - time.delta); const key = `Digit${triggerIndex + 1}`; - const clicked = events.hasEvent(entity, 'click'); + const clicked = events.query('click').some(e => e.target === entity); if ((input.isKeyPressed(key) || clicked) && trigger.cooldown <= 0) { const url = SFX_URLS[triggerIndex]; if (url) { diff --git a/examples/ui-controls/src/main.ts b/examples/ui-controls/src/main.ts index b0188bbd..e2d4123c 100644 --- a/examples/ui-controls/src/main.ts +++ b/examples/ui-controls/src/main.ts @@ -1,6 +1,5 @@ -import { addSystemToSchedule, Schedule } from 'esengine'; - +// The progress bars in this scene are declarative (defined in the .esscene). +// The old per-frame ProgressBar-component animation was removed: the SDK no +// longer exposes a queryable ProgressBar component — progress is now an +// imperative widget (createProgress -> ProgressHandle). import './components'; -import { progressAnimateSystem } from './systems/animate'; - -addSystemToSchedule(Schedule.Update, progressAnimateSystem); diff --git a/examples/ui-controls/src/systems/animate.ts b/examples/ui-controls/src/systems/animate.ts deleted file mode 100644 index 8fe5e882..00000000 --- a/examples/ui-controls/src/systems/animate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - defineSystem, Query, Mut, Res, Time, ProgressBar, -} from 'esengine'; -import { ProgressAnimator } from '../components'; - -export const progressAnimateSystem = defineSystem( - [Query(Mut(ProgressBar), Mut(ProgressAnimator)), Res(Time)], - (query, time) => { - for (const [_entity, bar, animator] of query) { - bar.value += animator.speed * animator.direction * time.delta; - if (bar.value >= 1) { - bar.value = 1; - animator.direction = -1; - } else if (bar.value <= 0) { - bar.value = 0; - animator.direction = 1; - } - } - }, - { name: 'ProgressAnimateSystem' } -); diff --git a/examples/ui-interaction/src/systems/dragFocus.ts b/examples/ui-interaction/src/systems/dragFocus.ts index ab0b5574..9966b88f 100644 --- a/examples/ui-interaction/src/systems/dragFocus.ts +++ b/examples/ui-interaction/src/systems/dragFocus.ts @@ -72,8 +72,8 @@ export const dragFocusSystem = defineSystem( return; } - const dragStartEntities = new Set(events.query('drag_start').map(e => e.entity)); - const dragEndEntities = new Set(events.query('drag_end').map(e => e.entity)); + const dragStartEntities = new Set(events.query('drag_start').map(e => e.target)); + const dragEndEntities = new Set(events.query('drag_end').map(e => e.target)); for (const e of dragStartEntities) { droppedEntities.delete(e); diff --git a/src/esengine/renderer/RenderFrameSubmit.cpp b/src/esengine/renderer/RenderFrameSubmit.cpp index 4367706a..2e9a88cd 100644 --- a/src/esengine/renderer/RenderFrameSubmit.cpp +++ b/src/esengine/renderer/RenderFrameSubmit.cpp @@ -83,9 +83,9 @@ void RenderFrame::submitSpineBatch( } u32 baseVertex = vOff / sizeof(BatchVertex); - std::vector offsetIndices(indexCount); + std::vector offsetIndices(indexCount); for (i32 i = 0; i < indexCount; ++i) { - offsetIndices[i] = static_cast(baseVertex + indices[i]); + offsetIndices[i] = static_cast(baseVertex + indices[i]); } u32 iOff = pool_.appendIndices(LayoutId::Batch, offsetIndices.data(), static_cast(indexCount));