[READ-ONLY] Mirror of https://github.com/excaliburjs/Excalibur. 🎮 Your friendly TypeScript 2D game engine for the web 🗡️ excaliburjs.com
excalibur excaliburjs game-development game-engine game-framework gamedev games html5-canvas typescript
2

Configure Feed

Select the types of activity you want to include in your feed.

fix audio story

Erik Onarheim (Dec 31, 2025, 11:29 AM -0600) 356fc95f 0b6bd7c9

+7 -3
+7 -3
src/stories/audio.stories.ts
··· 4 4 import pauseIcon from '@fortawesome/fontawesome-free/svgs/solid/pause.svg'; 5 5 import stopIcon from '@fortawesome/fontawesome-free/svgs/solid/stop.svg'; 6 6 import type { NativeSoundEvent, NativeSoundProcessedEvent } from '../engine'; 7 - import { Actor, Sound, Loader, Color, EasingFunctions } from '../engine'; 7 + import { Actor, Sound, Loader, Color, linear, vec } from '../engine'; 8 8 import { ImageSource, Sprite } from '../engine/graphics'; 9 9 import { withEngine } from './utils'; 10 10 ··· 71 71 if (guitarLoopSound.duration > 0) { 72 72 startTime = Date.now(); 73 73 elapsedTime = 0; 74 - playHead.actions.easeTo(playheadEndPos, playHead.pos.y, guitarLoopSound.duration * 1000, EasingFunctions.Linear); 74 + playHead.actions.moveTo({ pos: vec(playheadEndPos, playHead.pos.y), duration: guitarLoopSound.duration * 1000, easing: linear }); 75 75 } 76 76 startOrPauseBtn.graphics.use('pause'); 77 77 action('playbackstart')(e); ··· 87 87 guitarLoopSound.on('resume', (e: NativeSoundEvent) => { 88 88 startTime = Date.now(); 89 89 if (guitarLoopSound.duration > 0) { 90 - playHead.actions.easeTo(playheadEndPos, playHead.pos.y, guitarLoopSound.duration * 1000 - elapsedTime, EasingFunctions.Linear); 90 + playHead.actions.moveTo({ 91 + pos: vec(playheadEndPos, playHead.pos.y), 92 + duration: guitarLoopSound.duration * 1000 - elapsedTime, 93 + easing: linear 94 + }); 91 95 } 92 96 startOrPauseBtn.graphics.use('pause'); 93 97 action('resume')(e);