{
  "pixi-import": {
    "file": "src/stage.tsx",
    "ref": "eead3caec5407c14cdd8cdb698a12c633295f8ef",
    "start": 1,
    "end": 5,
    "code": "'use client';\nimport { useEffect, useRef } from 'react';\nimport { Application, Sprite, Texture } from 'pixi.js';\nimport 'pixi.js/advanced-blend-modes';\nimport { layerSurface, type StudioDoc } from './document';",
    "url": "https://github.com/Abraham721/photoshot/blob/eead3caec5407c14cdd8cdb698a12c633295f8ef/src/stage.tsx#L1-L5",
    "sha256": "fe81a6718f1626d82ef70df4539cc3065ef9bca0727283c6353d2d064aa7436e"
  },
  "pixi-layer": {
    "file": "src/stage.tsx",
    "ref": "eead3caec5407c14cdd8cdb698a12c633295f8ef",
    "start": 27,
    "end": 33,
    "code": "      const s = new Sprite(Texture.from(canvas));\n      s.anchor.set(0.5);\n      s.position.set(l.x + l.width / 2, l.y + l.height / 2);\n      s.rotation = (l.rotation * Math.PI) / 180;\n      s.alpha = l.opacity;\n      s.blendMode = l.blend;\n      a.stage.addChild(s);",
    "url": "https://github.com/Abraham721/photoshot/blob/eead3caec5407c14cdd8cdb698a12c633295f8ef/src/stage.tsx#L27-L33",
    "sha256": "fe81a6718f1626d82ef70df4539cc3065ef9bca0727283c6353d2d064aa7436e"
  },
  "mask": {
    "file": "src/document.ts",
    "ref": "19f45ed6dd99800f910c0587baa53e73d46ab4fb",
    "start": 192,
    "end": 196,
    "code": "  if (layer.mask?.enabled) {\n    ctx.globalCompositeOperation = 'destination-in';\n    ctx.drawImage(maskSurface(layer.mask), 0, 0, c.width, c.height);\n    ctx.globalCompositeOperation = 'source-over';\n  }",
    "url": "https://github.com/Abraham721/photoshot/blob/19f45ed6dd99800f910c0587baa53e73d46ab4fb/src/document.ts#L192-L196",
    "sha256": "96abe98d6ce310460318f70f7612a1bc9fdf677bfc0e29c5bd041a6581a50af4"
  },
  "preview": {
    "file": "src/stage.tsx",
    "ref": "19f45ed6dd99800f910c0587baa53e73d46ab4fb",
    "start": 31,
    "end": 35,
    "code": "          const image = await composite(d, false, {\n            maxEdge: 1600,\n            cancelled: () => !mounted.current || r !== revision.current,\n          });\n          if (!mounted.current) break;",
    "url": "https://github.com/Abraham721/photoshot/blob/19f45ed6dd99800f910c0587baa53e73d46ab4fb/src/stage.tsx#L31-L35",
    "sha256": "5cebeba5ed90345da8b6a9fa94d1a41c743d54ae9dbc8082024f289452b68ef2"
  },
  "brightness-old": {
    "file": "src/adjustments.ts",
    "ref": "19f45ed6dd99800f910c0587baa53e73d46ab4fb",
    "start": 506,
    "end": 510,
    "code": "        if (t === 'brightness' && a.revision !== 2) {\n          x = v.brightness < 0 ? x * (1 + v.brightness / 100) : x + ((1 - x) * v.brightness) / 100;\n          const contrast = v.contrast < 0 ? 1 + v.contrast / 100 : 1 / (1 - v.contrast / 101);\n          x = (x - 0.5) * contrast + 0.5;\n        }",
    "url": "https://github.com/Abraham721/photoshot/blob/19f45ed6dd99800f910c0587baa53e73d46ab4fb/src/adjustments.ts#L506-L510",
    "sha256": "fe8aa93504fe28873020f44be867428a279390c7d73cff418f2cc6aae38f28a3"
  },
  "brightness-new": {
    "file": "src/adjustments.ts",
    "ref": "19f45ed6dd99800f910c0587baa53e73d46ab4fb",
    "start": 517,
    "end": 518,
    "code": "            x = sampleResponse(toneResponse.brightness, v.brightness, -150, x);\n            x = sampleResponse(toneResponse.contrast, v.contrast, -50, x);",
    "url": "https://github.com/Abraham721/photoshot/blob/19f45ed6dd99800f910c0587baa53e73d46ab4fb/src/adjustments.ts#L517-L518",
    "sha256": "fe8aa93504fe28873020f44be867428a279390c7d73cff418f2cc6aae38f28a3"
  },
  "lut": {
    "file": "src/adjustments.ts",
    "ref": "19f45ed6dd99800f910c0587baa53e73d46ab4fb",
    "start": 503,
    "end": 505,
    "code": "    const tables = ['r', 'g', 'b'].map((channel) =>\n      Float64Array.from({ length: 256 }, (_, i) => {\n        let x = i / 255;",
    "url": "https://github.com/Abraham721/photoshot/blob/19f45ed6dd99800f910c0587baa53e73d46ab4fb/src/adjustments.ts#L503-L505",
    "sha256": "fe8aa93504fe28873020f44be867428a279390c7d73cff418f2cc6aae38f28a3"
  }
}