GithubHelp home page GithubHelp logo

kevinchen2046 / egret-sound-sheet Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 670 KB

白鹭的声音精灵图表,像图片图集一样将声音打包在一个文件里

HTML 0.32% JavaScript 95.82% TypeScript 3.86%

egret-sound-sheet's Introduction

egret-sound-sheet

白鹭的声音精灵图表,像图片图集一样将声音打包在一个文件里

使用示例

最简单的方式

sound.SoundSheet.from(egret.Sound.EFFECT, 'resource/assets/effect.mp3', {
    reload: { start: 0, end: 1 },
    gun: { start: 1.2, end: 2.4 },
    getshot: { start: 2.5, end: 3.065 }
}).play('reload');

严格方式

var sheetdata={
    reload: { start: 0, end: 1 },
    gun: { start: 1.2, end: 2.4 },
    getshot: { start: 2.5, end: 3.065 }
}
var sheet = new sound.SoundSheet()
sheet.initialize(egret.Sound.EFFECT, 'resource/assets/effect.mp3',sheetdata);
sheet.load(this,()=>{
    sheet.play('gun');
})

egret-sound-sheet's People

Contributors

kevinchen2046 avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.