{
  "name": "@exercise/intro-scissor",
  "version": "1.0.0",
  "main": "server.js",
  "dependencies": {},
  "scripts": {
    "start": "node server.js"
  },
  "readme": "# Exercise\n\nPartition the screen into 4 equally sized colored rectangles, with two on top and two on the bottom.  These rectangles should have the following colors:\n\n* top-left: Red\n* top-right: Green\n* bottom-left: Blue\n* bottom-right: Yellow\n\nYou should do this using only the `gl.clear`, `gl.scissor` and `gl.enable` commands as we saw earlier.\n\n# Scissor Tests and Capabilities\n\nSometimes it is useful to split the drawing buffer into smaller pieces, for\nexample when updating a portion of an image.\n\nThe scissor test is similar to `gl.viewport`, with the key difference being that\nit doesn't change the position of the edges of an image. So, while changing the\nviewport is similar to resizing an image, a scissor test is similar to cropping\nan image.\n\nTo turn on the *scissor test*, you first call the following method on the WebGL\ncontext:\n\n```javascript\ngl.enable(gl.SCISSOR_TEST)\n```\n\nWe will use this `gl.enable` method many more times in these lessons.  The basic usage for the command is as follows:\n\n## `gl.enable(capability)`\n\n> Turns on the specified `capability`, modifying all subsequent drawing commands. The exact effects depend on the capability specified.\n\nOnce the scissor test is enabled, you can set the region of the drawing buffer which will be updated using the `gl.scissor` command:\n\n## `gl.scissor(x, y, width, height)`\n\n> Sets the scissor region. `x,y` is the pixel coordinate of the lower left corner of the scissor region and `width,height` are the dimensions of the scissor rectangle in pixels.\n\nWhen we are all done using the scissor test, we can turn it off using the `gl.disable` command:\n\n```javascript\ngl.disable(gl.SCISSOR_TEST)\n```\n\n## `gl.disable(capability)`\n\n> Turns off `capability`, undoing the effect of `gl.enable()`\n\nTo get the size of the drawing buffer in pixels, you can use the `gl.drawingBufferWidth` and `gl.drawingBufferHeight` properties of the WebGL context.\n",
  "readmeFilename": "README.md",
  "description": "Partition the screen into 4 equally sized colored rectangles, with two on top and two on the bottom.  These rectangles should have the following colors:",
  "_id": "@exercise/intro-scissor@1.0.0",
  "_shasum": "6db014b524b99600287eee3f29676ad5e80ac5ab",
  "_from": "exercises/intro-scissor",
  "_resolved": "file:exercises/intro-scissor"
}
