13  Abstracting the File Loader

Now that you are familiar with factories and constructors from the previous chapter, you can abstract the audio buffer loader you created in Chapter 11 into a library that loads multiple sound files using less code. You do this using the factory pattern.

Images  Thinking about Code Abstraction

Organizing your code into abstractions can be a daunting task. However, there are two steps you can follow to simplify the process. The first step is to determine whether you need an abstraction in the first place. If you are repeatedly typing out a large amount of code for the same task, then the answer is probably yes. The second ...

Get JavaScript for Sound Artists now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.