diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..4ca50b6c --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,27 @@ +### TODO +- [ ] Is this a question or bug? [Stack Overflow](https://stackoverflow.com/questions/tagged/createjs) is a much better place to ask any questions you may have. + +- [ ] Did you search the [issues](https://github.com/CreateJS/SoundJS/issues) to see if someone else has already reported your issue? If yes, please add more details if you have any! + +- [ ] If you're using an older [version](https://github.com/CreateJS/SoundJS/blob/master/VERSIONS.txt), have you tried the latest? + +- [ ] If you're requesting a new feature; provide as many details as you can. Why do you want this feature? Do you have ideas for how this feature should be implemented? Pseudocode is always welcome! + + +### Issue Details +* Version used (Ex; 1.0): + + +* Describe whats happening (Include any relevant console errors, a [Gist](https://gist.github.com/) is preferred for longer errors): + + + +* OS & Browser version *(Please be specific)* (Ex; Windows 10 Home, Chrome 62.0.3202.94): + + + +* Do you know of any workarounds? + + + +* Provide any extra details that will help us fix your issue. Including a link to a [CodePen.io](https://codepen.io) or [JSFiddle.net](https://jsfiddle.net) example that shows the issue in isolation will greatly increase the chance of getting a quick response. diff --git a/examples/Game/Ship.js b/examples/Game/Ship.js index 090bc4bd..fc6a2bae 100644 --- a/examples/Game/Ship.js +++ b/examples/Game/Ship.js @@ -101,7 +101,7 @@ } p.accelerate = function () { - //increase push ammount for acceleration + //increase push amount for acceleration this.thrust += this.thrust + 0.6; if (this.thrust >= Ship.MAX_THRUST) { this.thrust = Ship.MAX_THRUST; @@ -118,4 +118,4 @@ window.Ship = createjs.promote(Ship, "Container"); -}(window)); \ No newline at end of file +}(window)); diff --git a/examples/Game/SpaceRock.js b/examples/Game/SpaceRock.js index e3dd5375..334bf18f 100644 --- a/examples/Game/SpaceRock.js +++ b/examples/Game/SpaceRock.js @@ -18,7 +18,7 @@ p.bounds; //visual radial size p.hit; //average radial disparity p.size; //size value itself - p.spin; //spin ammount + p.spin; //spin amount p.score; //score value p.vX; //velocity X diff --git a/src/createjs/events/Event.js b/src/createjs/events/Event.js index 1a983378..f010e269 100644 --- a/src/createjs/events/Event.js +++ b/src/createjs/events/Event.js @@ -53,8 +53,8 @@ this.createjs = this.createjs||{}; * rely on an event object's state outside of the call stack it was received in. * @class Event * @param {String} type The event type. - * @param {Boolean} bubbles Indicates whether the event will bubble through the display list. - * @param {Boolean} cancelable Indicates whether the default behaviour of this event can be cancelled. + * @param {Boolean} [bubbles=false] Indicates whether the event will bubble through the display list. + * @param {Boolean} [cancelable=false] Indicates whether the default behaviour of this event can be cancelled. * @constructor **/ function Event(type, bubbles, cancelable) { @@ -173,7 +173,7 @@ this.createjs = this.createjs||{}; // public methods: /** - * Sets {{#crossLink "Event/defaultPrevented"}}{{/crossLink}} to true if the event is cancelable. + * Sets {{#crossLink "Event/defaultPrevented:property"}}{{/crossLink}} to true if the event is cancelable. * Mirrors the DOM level 2 event standard. In general, cancelable events that have `preventDefault()` called will * cancel the default behaviour associated with the event. * @method preventDefault @@ -183,7 +183,7 @@ this.createjs = this.createjs||{}; }; /** - * Sets {{#crossLink "Event/propagationStopped"}}{{/crossLink}} to true. + * Sets {{#crossLink "Event/propagationStopped:property"}}{{/crossLink}} to true. * Mirrors the DOM event standard. * @method stopPropagation **/ @@ -192,8 +192,8 @@ this.createjs = this.createjs||{}; }; /** - * Sets {{#crossLink "Event/propagationStopped"}}{{/crossLink}} and - * {{#crossLink "Event/immediatePropagationStopped"}}{{/crossLink}} to true. + * Sets {{#crossLink "Event/propagationStopped:property"}}{{/crossLink}} and + * {{#crossLink "Event/immediatePropagationStopped:property"}}{{/crossLink}} to true. * Mirrors the DOM event standard. * @method stopImmediatePropagation **/ diff --git a/src/preloadjs/data/Methods.js b/src/preloadjs/data/Methods.js index dc4cacd1..92fe4da0 100644 --- a/src/preloadjs/data/Methods.js +++ b/src/preloadjs/data/Methods.js @@ -1,7 +1,50 @@ +/* + * Methods + * Visit http://createjs.com/ for documentation, updates and examples. + * + * + * Copyright (c) 2012 gskinner.com, inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * @module PreloadJS + */ + // namespace: this.createjs = this.createjs || {}; (function() { + + "use strict"; + + /** + * Defines the method types for XHR requests. Currently, PreloadJS only supports "POST" and "GET", however + * any HTML method can be used with PreloadJS utilities. + * + * @class Methods + * @static + */ var s = {}; /** diff --git a/src/preloadjs/data/Types.js b/src/preloadjs/data/Types.js index 96b18e9a..93b739ce 100644 --- a/src/preloadjs/data/Types.js +++ b/src/preloadjs/data/Types.js @@ -1,7 +1,59 @@ +/* + * Types + * Visit http://createjs.com/ for documentation, updates and examples. + * + * + * Copyright (c) 2012 gskinner.com, inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * @module PreloadJS + */ + // namespace: this.createjs = this.createjs || {}; (function() { + + "use strict"; + + /** + * Defines the load types that PreloadJS supports by default. This is typically used when passing a type override to + * a {{#crossLink "LoadQueue"}}{{/crossLink}}. + * + *

Example

+ * + * queue.loadFile({src:"https://somecdn/wfossn3", type:createjs.Types.IMAGE}); + * + * You can also use the string value: + * + * queue.loadFile({src:"https://somecdn/wfossn3", type:"image"}); + * + * @class Types + * @static + */ + var s = {}; /** diff --git a/src/preloadjs/loaders/AbstractLoader.js b/src/preloadjs/loaders/AbstractLoader.js index cd8dbd47..a49adbc6 100644 --- a/src/preloadjs/loaders/AbstractLoader.js +++ b/src/preloadjs/loaders/AbstractLoader.js @@ -508,10 +508,7 @@ this.createjs = this.createjs || {}; * @protected */ p._isCanceled = function () { - if (window.createjs == null || this.canceled) { - return true; - } - return false; + return this.canceled; }; /** diff --git a/src/soundjs/AbstractPlugin.js b/src/soundjs/AbstractPlugin.js index a395a0fd..4fae3f5c 100644 --- a/src/soundjs/AbstractPlugin.js +++ b/src/soundjs/AbstractPlugin.js @@ -227,7 +227,7 @@ this.createjs = this.createjs || {}; this._soundInstances[src].push(si); } - // Plugins that don't have a setVolume should implement a setMasterVolune/setMasterMute + // Plugins that don't have a setVolume should implement a setMasterVolume/setMasterMute // So we have to check that here. si.setMasterVolume && si.setMasterVolume(createjs.Sound.volume); si.setMasterMute && si.setMasterMute(createjs.Sound.muted); @@ -284,14 +284,19 @@ this.createjs = this.createjs || {}; * @protected */ p._handlePreloadComplete = function (event) { - var src = event.target.getItem().src; - this._audioSources[src] = event.result; - for (var i = 0, l = this._soundInstances[src].length; i < l; i++) { - var item = this._soundInstances[src][i]; - item.playbackResource = this._audioSources[src]; - // ToDo consider adding play call here if playstate == playfailed - this._soundInstances[src] = null; + var src = event.target.getItem().src, + result = event.result, + instances = this._soundInstances[src]; + this._audioSources[src] = result; + + if (instances != null && instances.length > 0) { + for (var i=0, l=instances.length; i