157 Commits

Author SHA1 Message Date
Christopher Willis-Ford
737a94b04b Lint fixes 2017-09-06 15:50:01 -06:00
Chris Willis-Ford
9221fcec83 Merge pull request #165 from LLK/greenkeeper/eslint-4.6.1
chore(package): update eslint to version 4.6.1
2017-09-06 15:28:32 -06:00
Christopher Willis-Ford
49f7b06dbe Lint fixes 2017-09-06 15:23:28 -06:00
Paul Kaplan
d59089e1b5 Merge pull request #159 from paulkaplan/color-picking
Add color extraction method to renderer
2017-09-06 13:54:08 -04:00
Paul Kaplan
ca0004f043 Fix clear color 2017-09-06 13:50:22 -04:00
Paul Kaplan
471f03e310 Fixup from CWF comments on blending 2017-09-05 15:29:37 -04:00
DD Liu
ef7f1d2558 Merge pull request #163 from fsih/updateSvg2
Update references to the old skin
2017-08-31 17:17:54 -04:00
DD
553af92910 Update references to the old skin 2017-08-31 17:04:05 -04:00
DD Liu
4d04f3c646 Merge pull request #160 from fsih/updateSvg
Add updateSVGSkin
2017-08-31 13:17:49 -04:00
DD
fa12b523c9 Don't change the skin ID when making a new one 2017-08-31 11:38:44 -04:00
Chris Willis-Ford
9736ced8df Merge pull request #155 from joshlory/drawable-aabb-tests
Add initial test coverage for Drawable.prototype.getAABB
2017-08-30 16:56:11 -07:00
DD
29366df1d0 Make updateSVGSkin work when converting from bitmap to SVG 2017-08-30 18:24:56 -04:00
DD
66f362faed Add updateSVGSkin 2017-08-30 17:47:13 -04:00
Paul Kaplan
c33f0e46ce Add color extraction method to renderer 2017-08-25 10:05:46 -04:00
Chris Willis-Ford
a23287ab5a Merge pull request #138 from a49594a/patch-2
fix the bug #131 Rotation center is incorrect while sprite is scaled by "changeSize" block or "setSize" block
2017-08-24 10:02:35 -07:00
Chris Willis-Ford
1ad55771a7 Merge pull request #156 from joshlory/fix-empty-sprite-rotation-center
Scratch 2.0 compat: don't modify rotation center of empty sprites
2017-08-18 12:14:30 -07:00
Josh Lory
0d1d7dab3a Scratch 2.0 compat: don't modify rotation center of empty sprites 2017-08-09 23:01:09 -07:00
Josh Lory
f8a754f71a Inline shader require statements, to allow using ShaderManager in tests 2017-08-09 18:50:07 -07:00
Paul Kaplan
46b8784217 Correctly convert input coords into scratch coords 2017-08-09 15:40:32 -04:00
Josh Lory
48bf025380 Fix scratch-render playground
Loading skin by URL is deprecated (see: 64c5991486).
2017-08-09 10:31:02 -07:00
liam4
4707349028
Fix 'draw a point' typo in drawLine doc 2017-06-05 19:56:41 -03:00
john
ada1902fa6 fix the rotation center bug
fix the bug #131 Rotation center is incorrect while sprite is scaled by "changeSize" block or "setSize" block

the "rotationAdjusted" should be scaled while the drawable target is scaled.
2017-04-22 11:46:02 +08:00
Chris Willis-Ford
3ab8f4a70b Merge pull request #135 from bigeyex/feature/fix-skin-share-soft-limit
Increase SKIN_SHARE_SOFT_LIMIT to 301 to avoid sprite clone limit warning
2017-04-19 12:06:22 -07:00
Wang Yu
dc6ab7da08 Increased SKIN_SHARE_SOFT_LIMIT to 301, so
scratch-vm will not throw a EventEmitter memory leak warning.

Reason:
the max number of clones is 300, plus 1 for itself.
Then the shared skin will exceed it's limit.
Changing the number from 300 to 301 fixes this issue.
2017-04-18 20:06:02 +08:00
a49594a
56fbe57dd9 Update RenderWebGL.js
fix exception "Invalid offset/length when creating typed array" in ms edge browser
2017-04-11 08:12:55 +08:00
Christopher Willis-Ford
53147d7e39 Remove createSkinFromURL and related code
Changes:
- Removed the `createSkinFromURL` method.
- Removed `skin` property handling from `updateDrawableProperties`.
- Removed the URL-to-skin mapping cache.
- Removed `RenderConstants` items related to choosing a default skin.
- Removed `xhr` package dependency.
- `Drawable` now starts with a `null` skin instead of a default skin.
- `DrawThese` now skips any item with a `null` skin.
2017-03-09 09:59:16 -08:00
Christopher Willis-Ford
10db85594f Generate /playground from /src/playground
The playground now must be loaded with a URL that ends in "/playground/"
or "/playground/index.html"; loading at "/" will no longer work.

The /playground folder is now purely an output of the build process,
rather than being a mix of build output and static content. The static
content that was previously there (namely, index.html) has been moved
into /src/playground. The `contentBase` has been set to `false` to avoid
confusion between current, in-memory build output and stale, on-disk
build output.
2017-03-08 14:48:57 -08:00
Christopher Willis-Ford
7db54d9066 Explicitly specify raw-loader for shader files
This helps standardize our Webpack config
2017-03-08 14:23:28 -08:00
Paul Kaplan
76886ad92b Add JSDoc for isStamping opt flag 2017-03-07 12:21:30 -05:00
Paul Kaplan
983c704761 Add stamping flag to make draw ignore visibility 2017-03-07 11:19:39 -05:00
Ray Schamp
2de55f0474 Add scratchOffset data to extractDrawable
Makes it easier to translate between canvas coordinates and scratch coordinates
2017-03-03 09:18:20 -05:00
Andrew Sliwinski
e67d8a2126 Merge pull request #94 from CSnap/getBounds
Fix getBounds for Hidden Sprites
2017-03-02 11:31:45 -05:00
Andrew Sliwinski
fc7610716e Merge pull request #96 from CSnap/fix_getConvexHullPointsForDrawable
Round pixelBase
2017-03-02 08:47:00 -05:00
Ray Schamp
b6008078ed Merge pull request #93 from griffpatch/feature/FenceAgain
Feature fenceagain
2017-02-23 09:25:53 -05:00
griffpatch
04f7e2ac24 Add const for FENCE_WIDTH
Pull out the 15 pixels into a const
2017-02-23 14:09:00 +00:00
Ray Schamp
9824d109b0 Merge pull request #102 from rschamp/jsdoc
Generate docs from src, publish to gh-pages
2017-02-23 08:42:10 -05:00
Chris Willis-Ford
71135236f2 Merge pull request #107 from LLK/greenkeeper/twgl.js-3.0.2
chore(package): update twgl.js to version 3.0.2
2017-02-22 21:15:52 -08:00
Christopher Willis-Ford
58801fab14 Fix drawBufferInfo call for twgl API change 2017-02-22 21:07:47 -08:00
Chris Willis-Ford
ed0c39c2ac Merge pull request #100 from TheBrokenRail/patch-1
Fix IE/Edge Support (#85 and LLK/scratch-vm#367)
2017-02-22 11:45:26 -08:00
TheBrokenRail
1113149363 Fix 2017-02-21 15:43:39 -05:00
Ray Schamp
3c6511d94e Generate docs from src, publish to gh-pages
Fix any broken JSDoc syntax. Unfortunately there is no way to document tuples like `{[int, int]}` for a `[width, height]` array. We could possibly fix this and make the code more readable with `{width: number, height: number}` instead of tuples.

Remove single `@fileoverview` from Rectangle.js, since it was the only file with one and was weird to have that one module show up on the docs home page.

Add a `docs` script to `package.json`, run it from `npm test`, so invalid docs will cause tests to fail (eventually we may want to start using eslint-plugin-jsdoc to catch these errors with the linter alone).
2017-02-21 14:46:24 -05:00
Ray Schamp
b7d5610b23 Merge pull request #97 from rschamp/dnd
Add method to retrieve drawable pixel data
2017-02-21 14:45:17 -05:00
TheBrokenRail
ec2361cf91 Fix IE/Edge Support (#85) 2017-02-18 14:06:45 -05:00
Ray Schamp
68600e794d Return null for invalid drawableIDs 2017-02-18 12:18:04 -05:00
Ray Schamp
6dd3c0ed81 Don't clip drawables to stage when extracting 2017-02-17 17:37:05 -05:00
Ray Schamp
e035cadb04 Don't apply ghost when extracting drawables 2017-02-17 17:36:47 -05:00
Ray Schamp
3bc00176ed Refactor _drawThese to take options
So the number of arguments doesn't get out of hand
2017-02-17 17:35:45 -05:00
Ray Schamp
a65ea3daed Add method to retrieve drawable pixel data
Towards LLK/scratch-gui#66
2017-02-17 14:51:04 -05:00
SillyInventor
4eacde74e6 Round pixelBase to allow for non-integer SVG widths in _getConvexHullPointsForDrawable 2017-02-15 14:14:03 -05:00
griffpatch
f3b3f0aca7 Feature - Fencing again
This is a resubmission of the same scripts that got reverted. The actual
issues was within scratch-vm.
2017-02-15 16:19:08 +00:00