Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

chore(editor): remove the Sequencer dev sample button (real .esanim open is wired)

esengine3abeb30930fe
diff --git a/desktop/src/panels/Sequencer.tsx b/desktop/src/panels/Sequencer.tsx
index 62fd51d7e..d890b0a71 100644
--- a/desktop/src/panels/Sequencer.tsx
+++ b/desktop/src/panels/Sequencer.tsx
@@ -23,7 +23,6 @@ import { useSelection } from '@/store/selectionStore';
import { SceneModel } from '@/engine/SceneModel';
import { ContextMenu, type MenuItem } from '@/components/Menu';
import { SequencerCurve } from '@/panels/SequencerCurve';
-import { sampleTimelineAsset } from '@/timeline/sampleTimeline';
import {
buildTimelineRows, visibleRows, frameCount, timeToPct, pctToTime, findChannel, muteKey,
type SeqRow, type ChannelRef,
@@ -83,19 +82,7 @@ function EmptyState() {
<div className="seq-empty">
<Film size={30} strokeWidth={1.3} />
<div className="seq-empty__title">没有打开的动画</div>
- <div className="seq-empty__hint">在内容浏览器双击 .estimeline,或下方加载示例</div>
- <button
- type="button"
- className="seq-empty__btn"
- onClick={() => {
- // Bind the preview to the current selection so scrubbing animates it.
- const rootEntity = useSelection.getState().selectedId;
- TimelineDocument.open({ asset: sampleTimelineAsset(), filePath: null, fps: 12, rootEntity });
- useSequencerStore.getState().resetForClip();
- }}
- >
- 加载示例(开发)
- </button>
+ <div className="seq-empty__hint">在内容浏览器双击 .esanim / .estimeline 打开动画片段</div>
</div>
);
}
diff --git a/desktop/src/theme/sequencer.css b/desktop/src/theme/sequencer.css
index 4bb0dde1f..82864805d 100644
--- a/desktop/src/theme/sequencer.css
+++ b/desktop/src/theme/sequencer.css
@@ -230,9 +230,3 @@
}
.seq-empty__title { color: var(--text-dim); font-size: 13px; }
.seq-empty__hint { font-size: var(--fs-xs); }
-.seq-empty__btn {
- margin-top: 6px; border: 1px solid var(--border); background: var(--raised);
- color: var(--text-dim); border-radius: var(--r-md); padding: 5px 12px;
- font-size: var(--fs-xs); cursor: pointer;
-}
-.seq-empty__btn:hover { color: var(--text); border-color: var(--acc); }
diff --git a/desktop/src/timeline/sampleTimeline.ts b/desktop/src/timeline/sampleTimeline.ts
deleted file mode 100644
index 104430506..000000000
--- a/desktop/src/timeline/sampleTimeline.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * @file sampleTimeline.ts
- * @brief A built-in sample .estimeline for skeleton verification (DEV ONLY).
- *
- * Lets the Sequencer render a real track tree before the Content Browser "open
- * .estimeline" flow lands (P2). Remove once opening real clips is wired.
- */
-
-import { parseTimelineAsset, type TimelineAsset } from 'esengine';
-
-const RAW = {
- version: '1.1',
- type: 'timeline',
- duration: 2.0,
- wrapMode: 'loop',
- tracks: [
- {
- type: 'property',
- name: 'Move',
- childPath: '',
- component: 'Transform',
- channels: [
- {
- property: 'position.x',
- keyframes: [
- { time: 0, value: 0, inTangent: 0, outTangent: 0, interpolation: 'linear' },
- { time: 1, value: 120, inTangent: 0, outTangent: 0, interpolation: 'easeInOut' },
- { time: 2, value: 0, inTangent: 0, outTangent: 0, interpolation: 'linear' },
- ],
- },
- {
- property: 'position.y',
- keyframes: [
- { time: 0, value: 0, inTangent: 0, outTangent: 0 },
- { time: 1, value: 60, inTangent: 0, outTangent: 0 },
- { time: 2, value: 0, inTangent: 0, outTangent: 0 },
- ],
- },
- {
- property: 'rotation.z',
- keyframes: [
- { time: 0, value: 0, inTangent: 0, outTangent: 0, interpolation: 'linear' },
- { time: 2, value: Math.PI * 2, inTangent: 0, outTangent: 0, interpolation: 'linear' },
- ],
- },
- ],
- },
- {
- type: 'property',
- name: 'Fade',
- childPath: '',
- component: 'Sprite',
- channels: [
- {
- property: 'color.a',
- keyframes: [
- { time: 0, value: 1, inTangent: 0, outTangent: 0 },
- { time: 1, value: 0.2, inTangent: 0, outTangent: 0 },
- { time: 2, value: 1, inTangent: 0, outTangent: 0 },
- ],
- },
- ],
- },
- {
- type: 'audio',
- name: 'Step',
- childPath: '',
- events: [{ time: 0.5, clip: 'sfx/step.mp3', volume: 0.8 }],
- },
- ],
-};
-
-export function sampleTimelineAsset(): TimelineAsset {
- // Parse a fresh copy each call so edits don't mutate the shared literal.
- return parseTimelineAsset(JSON.parse(JSON.stringify(RAW)));
-}