{"_id":"@ahmerhh/webgraphiclibrary-fixedbaseoperator","name":"@ahmerhh/webgraphiclibrary-fixedbaseoperator","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"@ahmerhh/webgraphiclibrary-fixedbaseoperator","version":"0.0.2","description":"WebWebGraphicLibrary framebuffer wrapper.","main":"dist/index.js","scripts":{"start":"budo example/index.js --live -- -t babelify","test":"browserify test/index.js -t babelify | browser-run --static . | tap-spec","build":"browserify src/index.js -t babelify -s @ahmerhh/WebGraphicLibrary-FixedBaseOperator > dist/index.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/ahmerhh/WebGraphicLibrary-FixedBaseOperator.git"},"keywords":["WebWebGraphicLibrary","framebuffer","fbo"],"author":{"name":"ahmerhh","email":"ahmerhh@protonmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ahmerhh/WebGraphicLibrary-FixedBaseOperator/issues"},"homepage":"https://github.com/ahmerhh/WebGraphicLibrary-FixedBaseOperator#readme","devDependencies":{"babel-preset-es2015":"^6.3.13","babelify":"^7.2.0","browser-run":"^3.0.8","browserify":"^13.0.0","budo":"^8.0.3","tap-spec":"^4.1.1","tape":"^4.4.0"},"dependencies":{"@ahmerhh/geo-plane":"^1.0.1","@ahmerhh/WebGraphicLibrary-buffer":"^1.0.2","@ahmerhh/WebGraphicLibrary-context":"^1.0.2","@ahmerhh/WebGraphicLibrary-program":"^1.0.3","@ahmerhh/WebGraphicLibrary-texture":"^2.0.1","@ahmerhh/WebGraphicLibrary-texture-display":"0.0.1","WebGraphicLibrary-matrix":"^2.3.1","math-functions":"^1.0.1"},"directories":{"example":"example","test":"test"},"_id":"@ahmerhh/webgraphiclibrary-fixedbaseoperator@0.0.2","gitHead":"c1f233f5fa29031492c0b319adb34ace918952d7","_nodeVersion":"18.15.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-ybVdQsCJazysakZs0HbAk1EnbZQvjL9uRUl3ANImu+6wdNaERAA3nDpCKjPTRFbwu1k/GOrxmhx9gWlNMfmNJw==","shasum":"1efbd586bdf45d2875393e8dee40470e0c770487","tarball":"https://registry.npmjs.org/@ahmerhh/webgraphiclibrary-fixedbaseoperator/-/webgraphiclibrary-fixedbaseoperator-0.0.2.tgz","fileCount":7,"unpackedSize":7706,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0br6RpYnMvHiZ15lQ5Sgtb/u6NAJfuQb2DZjm3oOILAiEA84wV1wwaBKBIPeEo5CDeaaMFMbU7ocYIa32X3I3lZbw="}]},"_npmUser":{"name":"ahmerhh","email":"ahmerhabibb@gmail.com"},"maintainers":[{"name":"ahmerhh","email":"ahmerhabibb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webgraphiclibrary-fixedbaseoperator_0.0.2_1691925598276_0.4705296225893907"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-13T11:19:58.198Z","0.0.2":"2023-08-13T11:19:58.442Z","modified":"2023-08-13T11:19:58.713Z"},"maintainers":[{"name":"ahmerhh","email":"ahmerhabibb@gmail.com"}],"description":"WebWebGraphicLibrary framebuffer wrapper.","homepage":"https://github.com/ahmerhh/WebGraphicLibrary-FixedBaseOperator#readme","keywords":["WebWebGraphicLibrary","framebuffer","fbo"],"repository":{"type":"git","url":"git+https://github.com/ahmerhh/WebGraphicLibrary-FixedBaseOperator.git"},"author":{"name":"ahmerhh","email":"ahmerhh@protonmail.com"},"bugs":{"url":"https://github.com/ahmerhh/WebGraphicLibrary-FixedBaseOperator/issues"},"license":"MIT","readme":"# Graphics Library - Fixed Base Operator\r\n\r\nWebGraphicsLibrary Render Target Encapsulation.\r\n\r\n## Installation\r\n\r\n```sh\r\n$ npm install --save @ahmerhh/WebGraphicsLibrary_FixedBaseOperator\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nimport FixedBaseOperator from '@ahmerhh/WebGraphicLibrary_FixedBaseOperator';\r\n\r\n\r\n// setup context(Graphic Library), program and buffers\r\n\r\nconst FixedBaseOperator = new FixedBaseOperator(context, 512, 512);\r\n\r\n// render to FixedBaseOperator\r\nFixedBaseOperator.bind();\r\ncontext.drawElements(context.POINTS, 0, 6);\r\nFixedBaseOperator.unbind();\r\n\r\n// render to default framebuffer\r\ncontext.drawElements(context.POINTS, 0, 6);\r\n```\r\n\r\n## API\r\n\r\n#### `FixedBaseOperator = new FixedBaseOperator(context, width, height)`\r\n\r\nCreate a new instance, where `context` is the [Webcontext context](https://github.com/ahmerhh/WebGraphicLibrary_FixedBaseOperator).\r\n\r\n#### `FixedBaseOperator.bind()`\r\n\r\nMake the FixedBaseOperator the active one. Every draw calls will target him. To restore the default framebuffer call `FixedBaseOperator.unbind()` or `context.bindFramebuffer(context.FRAMEBUFFER, null)`.\r\n\r\n#### `FixedBaseOperator.unbind()`\r\n\r\nSame as calling `context.bindFramebuffer(context.FRAMEBUFFER, null);`.\r\n\r\n#### `FixedBaseOperator.dispose()`\r\n\r\nDelete instance and underlying `Texture`. Calls `context.deleteFramebuffer`.\r\n\r\n## License\r\n\r\nMIT, see [LICENSE.md](https://github.com/ahmerhh/WebGraphicLibrary_FixedBaseOperator/blob/master/LICENSE.md) for more details.","readmeFilename":"README.md"}