diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/packages/canvas/canvas-text/LICENSE b/packages/canvas/canvas-text/LICENSE new file mode 100644 index 0000000..148e3eb --- /dev/null +++ b/packages/canvas/canvas-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2018 Mathew Groves, Chad Engler + +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. \ No newline at end of file diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/packages/canvas/canvas-text/LICENSE b/packages/canvas/canvas-text/LICENSE new file mode 100644 index 0000000..148e3eb --- /dev/null +++ b/packages/canvas/canvas-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2018 Mathew Groves, Chad Engler + +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. \ No newline at end of file diff --git a/packages/canvas/canvas-text/README.md b/packages/canvas/canvas-text/README.md new file mode 100644 index 0000000..d6d3b4c --- /dev/null +++ b/packages/canvas/canvas-text/README.md @@ -0,0 +1,13 @@ +# @pixi/canvas-text + +## Installation + +```bash +npm install @pixi/canvas-text +``` + +## Usage + +```js +import '@pixi/canvas-text'; +``` \ No newline at end of file diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/packages/canvas/canvas-text/LICENSE b/packages/canvas/canvas-text/LICENSE new file mode 100644 index 0000000..148e3eb --- /dev/null +++ b/packages/canvas/canvas-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2018 Mathew Groves, Chad Engler + +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. \ No newline at end of file diff --git a/packages/canvas/canvas-text/README.md b/packages/canvas/canvas-text/README.md new file mode 100644 index 0000000..d6d3b4c --- /dev/null +++ b/packages/canvas/canvas-text/README.md @@ -0,0 +1,13 @@ +# @pixi/canvas-text + +## Installation + +```bash +npm install @pixi/canvas-text +``` + +## Usage + +```js +import '@pixi/canvas-text'; +``` \ No newline at end of file diff --git a/packages/canvas/canvas-text/package.json b/packages/canvas/canvas-text/package.json new file mode 100644 index 0000000..7d3ba59 --- /dev/null +++ b/packages/canvas/canvas-text/package.json @@ -0,0 +1,28 @@ +{ + "name": "@pixi/canvas-text", + "version": "5.0.4", + "main": "lib/canvas-text.js", + "module": "lib/canvas-text.es.js", + "bundle": "dist/canvas-text.js", + "bundleNoExports": true, + "description": "Canvas mixin for the text package", + "author": "Dave Moore", + "homepage": "http://pixijs.com/", + "bugs": "https://github.com/pixijs/pixi.js/issues", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pixijs/pixi.js.git" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "dist" + ], + "dependencies": { + "@pixi/sprite": "^5.0.4", + "@pixi/text": "^5.0.4" + } +} diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/packages/canvas/canvas-text/LICENSE b/packages/canvas/canvas-text/LICENSE new file mode 100644 index 0000000..148e3eb --- /dev/null +++ b/packages/canvas/canvas-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2018 Mathew Groves, Chad Engler + +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. \ No newline at end of file diff --git a/packages/canvas/canvas-text/README.md b/packages/canvas/canvas-text/README.md new file mode 100644 index 0000000..d6d3b4c --- /dev/null +++ b/packages/canvas/canvas-text/README.md @@ -0,0 +1,13 @@ +# @pixi/canvas-text + +## Installation + +```bash +npm install @pixi/canvas-text +``` + +## Usage + +```js +import '@pixi/canvas-text'; +``` \ No newline at end of file diff --git a/packages/canvas/canvas-text/package.json b/packages/canvas/canvas-text/package.json new file mode 100644 index 0000000..7d3ba59 --- /dev/null +++ b/packages/canvas/canvas-text/package.json @@ -0,0 +1,28 @@ +{ + "name": "@pixi/canvas-text", + "version": "5.0.4", + "main": "lib/canvas-text.js", + "module": "lib/canvas-text.es.js", + "bundle": "dist/canvas-text.js", + "bundleNoExports": true, + "description": "Canvas mixin for the text package", + "author": "Dave Moore", + "homepage": "http://pixijs.com/", + "bugs": "https://github.com/pixijs/pixi.js/issues", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pixijs/pixi.js.git" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "dist" + ], + "dependencies": { + "@pixi/sprite": "^5.0.4", + "@pixi/text": "^5.0.4" + } +} diff --git a/packages/canvas/canvas-text/src/Text.js b/packages/canvas/canvas-text/src/Text.js new file mode 100644 index 0000000..0e0f9f5 --- /dev/null +++ b/packages/canvas/canvas-text/src/Text.js @@ -0,0 +1,23 @@ +import { Text } from '@pixi/text'; +import { Sprite } from '@pixi/sprite'; + +/** + * Renders the object using the Canvas renderer + * + * @method _renderCanvas + * @memberof PIXI.Text# + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ +Text.prototype._renderCanvas = function _renderCanvas(renderer) +{ + if (this._autoResolution && this._resolution !== renderer.resolution) + { + this._resolution = renderer.resolution; + this.dirty = true; + } + + this.updateText(true); + + Sprite.prototype._renderCanvas.call(this, renderer); +}; diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/packages/canvas/canvas-text/LICENSE b/packages/canvas/canvas-text/LICENSE new file mode 100644 index 0000000..148e3eb --- /dev/null +++ b/packages/canvas/canvas-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2018 Mathew Groves, Chad Engler + +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. \ No newline at end of file diff --git a/packages/canvas/canvas-text/README.md b/packages/canvas/canvas-text/README.md new file mode 100644 index 0000000..d6d3b4c --- /dev/null +++ b/packages/canvas/canvas-text/README.md @@ -0,0 +1,13 @@ +# @pixi/canvas-text + +## Installation + +```bash +npm install @pixi/canvas-text +``` + +## Usage + +```js +import '@pixi/canvas-text'; +``` \ No newline at end of file diff --git a/packages/canvas/canvas-text/package.json b/packages/canvas/canvas-text/package.json new file mode 100644 index 0000000..7d3ba59 --- /dev/null +++ b/packages/canvas/canvas-text/package.json @@ -0,0 +1,28 @@ +{ + "name": "@pixi/canvas-text", + "version": "5.0.4", + "main": "lib/canvas-text.js", + "module": "lib/canvas-text.es.js", + "bundle": "dist/canvas-text.js", + "bundleNoExports": true, + "description": "Canvas mixin for the text package", + "author": "Dave Moore", + "homepage": "http://pixijs.com/", + "bugs": "https://github.com/pixijs/pixi.js/issues", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pixijs/pixi.js.git" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "dist" + ], + "dependencies": { + "@pixi/sprite": "^5.0.4", + "@pixi/text": "^5.0.4" + } +} diff --git a/packages/canvas/canvas-text/src/Text.js b/packages/canvas/canvas-text/src/Text.js new file mode 100644 index 0000000..0e0f9f5 --- /dev/null +++ b/packages/canvas/canvas-text/src/Text.js @@ -0,0 +1,23 @@ +import { Text } from '@pixi/text'; +import { Sprite } from '@pixi/sprite'; + +/** + * Renders the object using the Canvas renderer + * + * @method _renderCanvas + * @memberof PIXI.Text# + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ +Text.prototype._renderCanvas = function _renderCanvas(renderer) +{ + if (this._autoResolution && this._resolution !== renderer.resolution) + { + this._resolution = renderer.resolution; + this.dirty = true; + } + + this.updateText(true); + + Sprite.prototype._renderCanvas.call(this, renderer); +}; diff --git a/packages/canvas/canvas-text/src/index.js b/packages/canvas/canvas-text/src/index.js new file mode 100644 index 0000000..7bdb7ed --- /dev/null +++ b/packages/canvas/canvas-text/src/index.js @@ -0,0 +1 @@ +import './Text'; diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/packages/canvas/canvas-text/LICENSE b/packages/canvas/canvas-text/LICENSE new file mode 100644 index 0000000..148e3eb --- /dev/null +++ b/packages/canvas/canvas-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2018 Mathew Groves, Chad Engler + +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. \ No newline at end of file diff --git a/packages/canvas/canvas-text/README.md b/packages/canvas/canvas-text/README.md new file mode 100644 index 0000000..d6d3b4c --- /dev/null +++ b/packages/canvas/canvas-text/README.md @@ -0,0 +1,13 @@ +# @pixi/canvas-text + +## Installation + +```bash +npm install @pixi/canvas-text +``` + +## Usage + +```js +import '@pixi/canvas-text'; +``` \ No newline at end of file diff --git a/packages/canvas/canvas-text/package.json b/packages/canvas/canvas-text/package.json new file mode 100644 index 0000000..7d3ba59 --- /dev/null +++ b/packages/canvas/canvas-text/package.json @@ -0,0 +1,28 @@ +{ + "name": "@pixi/canvas-text", + "version": "5.0.4", + "main": "lib/canvas-text.js", + "module": "lib/canvas-text.es.js", + "bundle": "dist/canvas-text.js", + "bundleNoExports": true, + "description": "Canvas mixin for the text package", + "author": "Dave Moore", + "homepage": "http://pixijs.com/", + "bugs": "https://github.com/pixijs/pixi.js/issues", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pixijs/pixi.js.git" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "dist" + ], + "dependencies": { + "@pixi/sprite": "^5.0.4", + "@pixi/text": "^5.0.4" + } +} diff --git a/packages/canvas/canvas-text/src/Text.js b/packages/canvas/canvas-text/src/Text.js new file mode 100644 index 0000000..0e0f9f5 --- /dev/null +++ b/packages/canvas/canvas-text/src/Text.js @@ -0,0 +1,23 @@ +import { Text } from '@pixi/text'; +import { Sprite } from '@pixi/sprite'; + +/** + * Renders the object using the Canvas renderer + * + * @method _renderCanvas + * @memberof PIXI.Text# + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ +Text.prototype._renderCanvas = function _renderCanvas(renderer) +{ + if (this._autoResolution && this._resolution !== renderer.resolution) + { + this._resolution = renderer.resolution; + this.dirty = true; + } + + this.updateText(true); + + Sprite.prototype._renderCanvas.call(this, renderer); +}; diff --git a/packages/canvas/canvas-text/src/index.js b/packages/canvas/canvas-text/src/index.js new file mode 100644 index 0000000..7bdb7ed --- /dev/null +++ b/packages/canvas/canvas-text/src/index.js @@ -0,0 +1 @@ +import './Text'; diff --git a/packages/text/src/Text.js b/packages/text/src/Text.js index e702d74..b1625d0 100644 --- a/packages/text/src/Text.js +++ b/packages/text/src/Text.js @@ -330,9 +330,10 @@ /** * Renders the object using the WebGL renderer * + * @private * @param {PIXI.Renderer} renderer - The renderer */ - render(renderer) + _render(renderer) { if (this._autoResolution && this._resolution !== renderer.resolution) { @@ -342,26 +343,7 @@ this.updateText(true); - super.render(renderer); - } - - /** - * Renders the object using the Canvas renderer - * - * @private - * @param {PIXI.CanvasRenderer} renderer - The renderer - */ - _renderCanvas(renderer) - { - if (this._autoResolution && this._resolution !== renderer.resolution) - { - this._resolution = renderer.resolution; - this.dirty = true; - } - - this.updateText(true); - - super._renderCanvas(renderer); + super._render(renderer); } /** diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/packages/canvas/canvas-text/LICENSE b/packages/canvas/canvas-text/LICENSE new file mode 100644 index 0000000..148e3eb --- /dev/null +++ b/packages/canvas/canvas-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2018 Mathew Groves, Chad Engler + +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. \ No newline at end of file diff --git a/packages/canvas/canvas-text/README.md b/packages/canvas/canvas-text/README.md new file mode 100644 index 0000000..d6d3b4c --- /dev/null +++ b/packages/canvas/canvas-text/README.md @@ -0,0 +1,13 @@ +# @pixi/canvas-text + +## Installation + +```bash +npm install @pixi/canvas-text +``` + +## Usage + +```js +import '@pixi/canvas-text'; +``` \ No newline at end of file diff --git a/packages/canvas/canvas-text/package.json b/packages/canvas/canvas-text/package.json new file mode 100644 index 0000000..7d3ba59 --- /dev/null +++ b/packages/canvas/canvas-text/package.json @@ -0,0 +1,28 @@ +{ + "name": "@pixi/canvas-text", + "version": "5.0.4", + "main": "lib/canvas-text.js", + "module": "lib/canvas-text.es.js", + "bundle": "dist/canvas-text.js", + "bundleNoExports": true, + "description": "Canvas mixin for the text package", + "author": "Dave Moore", + "homepage": "http://pixijs.com/", + "bugs": "https://github.com/pixijs/pixi.js/issues", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pixijs/pixi.js.git" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "dist" + ], + "dependencies": { + "@pixi/sprite": "^5.0.4", + "@pixi/text": "^5.0.4" + } +} diff --git a/packages/canvas/canvas-text/src/Text.js b/packages/canvas/canvas-text/src/Text.js new file mode 100644 index 0000000..0e0f9f5 --- /dev/null +++ b/packages/canvas/canvas-text/src/Text.js @@ -0,0 +1,23 @@ +import { Text } from '@pixi/text'; +import { Sprite } from '@pixi/sprite'; + +/** + * Renders the object using the Canvas renderer + * + * @method _renderCanvas + * @memberof PIXI.Text# + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ +Text.prototype._renderCanvas = function _renderCanvas(renderer) +{ + if (this._autoResolution && this._resolution !== renderer.resolution) + { + this._resolution = renderer.resolution; + this.dirty = true; + } + + this.updateText(true); + + Sprite.prototype._renderCanvas.call(this, renderer); +}; diff --git a/packages/canvas/canvas-text/src/index.js b/packages/canvas/canvas-text/src/index.js new file mode 100644 index 0000000..7bdb7ed --- /dev/null +++ b/packages/canvas/canvas-text/src/index.js @@ -0,0 +1 @@ +import './Text'; diff --git a/packages/text/src/Text.js b/packages/text/src/Text.js index e702d74..b1625d0 100644 --- a/packages/text/src/Text.js +++ b/packages/text/src/Text.js @@ -330,9 +330,10 @@ /** * Renders the object using the WebGL renderer * + * @private * @param {PIXI.Renderer} renderer - The renderer */ - render(renderer) + _render(renderer) { if (this._autoResolution && this._resolution !== renderer.resolution) { @@ -342,26 +343,7 @@ this.updateText(true); - super.render(renderer); - } - - /** - * Renders the object using the Canvas renderer - * - * @private - * @param {PIXI.CanvasRenderer} renderer - The renderer - */ - _renderCanvas(renderer) - { - if (this._autoResolution && this._resolution !== renderer.resolution) - { - this._resolution = renderer.resolution; - this.dirty = true; - } - - this.updateText(true); - - super._renderCanvas(renderer); + super._render(renderer); } /** diff --git a/tools/integration-tests/package.json b/tools/integration-tests/package.json index d8fbbfa..3ad5fea 100644 --- a/tools/integration-tests/package.json +++ b/tools/integration-tests/package.json @@ -9,6 +9,7 @@ "@pixi/canvas-mesh": "^5.0.4", "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "@pixi/core": "^5.0.4", "@pixi/display": "^5.0.4", "@pixi/graphics": "^5.0.4", diff --git a/bundles/pixi.js-legacy/package.json b/bundles/pixi.js-legacy/package.json index 1565ef3..97abd4a 100644 --- a/bundles/pixi.js-legacy/package.json +++ b/bundles/pixi.js-legacy/package.json @@ -40,6 +40,7 @@ "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", "@pixi/canvas-sprite-tiling": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "pixi.js": "^5.0.4" } } diff --git a/bundles/pixi.js-legacy/src/index.js b/bundles/pixi.js-legacy/src/index.js index 956019c..f1598a1 100644 --- a/bundles/pixi.js-legacy/src/index.js +++ b/bundles/pixi.js-legacy/src/index.js @@ -8,6 +8,7 @@ import '@pixi/canvas-sprite-tiling'; import '@pixi/canvas-particles'; import '@pixi/canvas-display'; +import '@pixi/canvas-text'; CanvasRenderer.registerPlugin('accessibility', accessibility.AccessibilityManager); CanvasRenderer.registerPlugin('extract', canvasExtract.CanvasExtract); diff --git a/packages/canvas/canvas-text/LICENSE b/packages/canvas/canvas-text/LICENSE new file mode 100644 index 0000000..148e3eb --- /dev/null +++ b/packages/canvas/canvas-text/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2018 Mathew Groves, Chad Engler + +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. \ No newline at end of file diff --git a/packages/canvas/canvas-text/README.md b/packages/canvas/canvas-text/README.md new file mode 100644 index 0000000..d6d3b4c --- /dev/null +++ b/packages/canvas/canvas-text/README.md @@ -0,0 +1,13 @@ +# @pixi/canvas-text + +## Installation + +```bash +npm install @pixi/canvas-text +``` + +## Usage + +```js +import '@pixi/canvas-text'; +``` \ No newline at end of file diff --git a/packages/canvas/canvas-text/package.json b/packages/canvas/canvas-text/package.json new file mode 100644 index 0000000..7d3ba59 --- /dev/null +++ b/packages/canvas/canvas-text/package.json @@ -0,0 +1,28 @@ +{ + "name": "@pixi/canvas-text", + "version": "5.0.4", + "main": "lib/canvas-text.js", + "module": "lib/canvas-text.es.js", + "bundle": "dist/canvas-text.js", + "bundleNoExports": true, + "description": "Canvas mixin for the text package", + "author": "Dave Moore", + "homepage": "http://pixijs.com/", + "bugs": "https://github.com/pixijs/pixi.js/issues", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pixijs/pixi.js.git" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "dist" + ], + "dependencies": { + "@pixi/sprite": "^5.0.4", + "@pixi/text": "^5.0.4" + } +} diff --git a/packages/canvas/canvas-text/src/Text.js b/packages/canvas/canvas-text/src/Text.js new file mode 100644 index 0000000..0e0f9f5 --- /dev/null +++ b/packages/canvas/canvas-text/src/Text.js @@ -0,0 +1,23 @@ +import { Text } from '@pixi/text'; +import { Sprite } from '@pixi/sprite'; + +/** + * Renders the object using the Canvas renderer + * + * @method _renderCanvas + * @memberof PIXI.Text# + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ +Text.prototype._renderCanvas = function _renderCanvas(renderer) +{ + if (this._autoResolution && this._resolution !== renderer.resolution) + { + this._resolution = renderer.resolution; + this.dirty = true; + } + + this.updateText(true); + + Sprite.prototype._renderCanvas.call(this, renderer); +}; diff --git a/packages/canvas/canvas-text/src/index.js b/packages/canvas/canvas-text/src/index.js new file mode 100644 index 0000000..7bdb7ed --- /dev/null +++ b/packages/canvas/canvas-text/src/index.js @@ -0,0 +1 @@ +import './Text'; diff --git a/packages/text/src/Text.js b/packages/text/src/Text.js index e702d74..b1625d0 100644 --- a/packages/text/src/Text.js +++ b/packages/text/src/Text.js @@ -330,9 +330,10 @@ /** * Renders the object using the WebGL renderer * + * @private * @param {PIXI.Renderer} renderer - The renderer */ - render(renderer) + _render(renderer) { if (this._autoResolution && this._resolution !== renderer.resolution) { @@ -342,26 +343,7 @@ this.updateText(true); - super.render(renderer); - } - - /** - * Renders the object using the Canvas renderer - * - * @private - * @param {PIXI.CanvasRenderer} renderer - The renderer - */ - _renderCanvas(renderer) - { - if (this._autoResolution && this._resolution !== renderer.resolution) - { - this._resolution = renderer.resolution; - this.dirty = true; - } - - this.updateText(true); - - super._renderCanvas(renderer); + super._render(renderer); } /** diff --git a/tools/integration-tests/package.json b/tools/integration-tests/package.json index d8fbbfa..3ad5fea 100644 --- a/tools/integration-tests/package.json +++ b/tools/integration-tests/package.json @@ -9,6 +9,7 @@ "@pixi/canvas-mesh": "^5.0.4", "@pixi/canvas-renderer": "^5.0.4", "@pixi/canvas-sprite": "^5.0.4", + "@pixi/canvas-text": "^5.0.4", "@pixi/core": "^5.0.4", "@pixi/display": "^5.0.4", "@pixi/graphics": "^5.0.4", diff --git a/tools/integration-tests/test/display/getLocalBounds.js b/tools/integration-tests/test/display/getLocalBounds.js index ae99ee3..28efe81 100644 --- a/tools/integration-tests/test/display/getLocalBounds.js +++ b/tools/integration-tests/test/display/getLocalBounds.js @@ -10,6 +10,7 @@ const { CanvasMeshRenderer } = require('@pixi/canvas-mesh'); require('@pixi/canvas-display'); +require('@pixi/canvas-text'); CanvasRenderer.registerPlugin('sprite', CanvasSpriteRenderer); CanvasRenderer.registerPlugin('graphics', CanvasGraphicsRenderer);