{"_id":"@dice-o-rolla/dice-engine","_rev":"7-3d0779fae616d8649ded825525b633a9","name":"@dice-o-rolla/dice-engine","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@dice-o-rolla/dice-engine","version":"0.1.0","keywords":["dice","dice-roller","physics","rpg","three.js","typescript"],"license":"Apache-2.0","_id":"@dice-o-rolla/dice-engine@0.1.0","maintainers":[{"name":"zerodi","email":"mail@zerodi.ru"}],"dist":{"shasum":"4d929fcc5a6358145b520dc03d2549ef0e15b44a","tarball":"https://registry.npmjs.org/@dice-o-rolla/dice-engine/-/dice-engine-0.1.0.tgz","fileCount":19,"integrity":"sha512-0A/5yejBAb6yM3jyru2tR/X9POZSZq0kJX2Ll8WejEEIrR0VmS3CZj5A3By0eVDNC0au0wVIKhlUjxEwq3NRUQ==","signatures":[{"sig":"MEQCIEt6Mv5mzmkw6c+d7/tf2W9tzCEVy/nxpkgbYm+cyB8SAiBGWjj60os8k+Tpp60Ga08U679yGE0K4uOW2RQZfMM+Ag==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45928},"type":"module","_from":"file:/Users/zerodi/Development/Active/dice-o-rolla/artifacts/npm/dice-engine-0.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js","default":"./dist/browser.js"}},"_npmUser":{"name":"zerodi","email":"mail@zerodi.ru"},"_resolved":"/Users/zerodi/Development/Active/dice-o-rolla/artifacts/npm/dice-engine-0.1.0.tgz","_integrity":"sha512-0A/5yejBAb6yM3jyru2tR/X9POZSZq0kJX2Ll8WejEEIrR0VmS3CZj5A3By0eVDNC0au0wVIKhlUjxEwq3NRUQ==","_npmVersion":"11.12.1","description":"Framework-neutral physical dice engine with Rapier and Three.js browser adapters.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"@dice-o-rolla/dice-core":"0.1.0","@dice-o-rolla/dice-physics":"0.1.0","@dice-o-rolla/dice-geometry":"0.1.0","@dice-o-rolla/dice-renderer":"0.1.0","@dice-o-rolla/dice-physics-rapier":"0.1.0","@dice-o-rolla/dice-renderer-three":"0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/dice-engine_0.1.0_1788010938092_0.2805595431079764","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dice-o-rolla/dice-engine","version":"0.1.1","keywords":["dice","dice-roller","physics","rpg","three.js","typescript"],"license":"Apache-2.0","_id":"@dice-o-rolla/dice-engine@0.1.1","maintainers":[{"name":"zerodi","email":"mail@zerodi.ru"}],"homepage":"https://github.com/creepiest-space/dice-o-rolla#readme","bugs":{"url":"https://github.com/creepiest-space/dice-o-rolla/issues"},"dist":{"shasum":"c66679a8dac809935245de3189c68ebb5a6beaa7","tarball":"https://registry.npmjs.org/@dice-o-rolla/dice-engine/-/dice-engine-0.1.1.tgz","fileCount":19,"integrity":"sha512-elNBSHb/Cqvbh+jgufB47QiXrr8pHJThG20VWjWFrThBA5RohYu2z40bfFjTNNGH8vpUIpCxG9QNGenjhO5oPQ==","signatures":[{"sig":"MEUCIFPaTYT1QZa8H1S/1Hl7egwSECFGDl4Xdb96CKnW+gGlAiEAgd7xMBZMb60IQQQgDeQoUTMIChIfE6RwJu9kf7RYqR8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46233},"type":"module","_from":"file:/Users/zerodi/Development/Active/dice-o-rolla/artifacts/npm/dice-engine-0.1.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js","default":"./dist/browser.js"}},"_npmUser":{"name":"zerodi","email":"mail@zerodi.ru"},"_resolved":"/Users/zerodi/Development/Active/dice-o-rolla/artifacts/npm/dice-engine-0.1.1.tgz","_integrity":"sha512-elNBSHb/Cqvbh+jgufB47QiXrr8pHJThG20VWjWFrThBA5RohYu2z40bfFjTNNGH8vpUIpCxG9QNGenjhO5oPQ==","repository":{"url":"git+https://github.com/creepiest-space/dice-o-rolla.git","type":"git","directory":"packages/dice-engine"},"_npmVersion":"11.12.1","description":"Framework-neutral physical dice engine with Rapier and Three.js browser adapters.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"@dice-o-rolla/dice-core":"0.1.1","@dice-o-rolla/dice-physics":"0.1.1","@dice-o-rolla/dice-geometry":"0.1.1","@dice-o-rolla/dice-renderer":"0.1.1","@dice-o-rolla/dice-physics-rapier":"0.1.1","@dice-o-rolla/dice-renderer-three":"0.1.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/dice-engine_0.1.1_1788022119860_0.7391951993288923","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@dice-o-rolla/dice-engine","version":"0.2.0","keywords":["dice","dice-roller","physics","rpg","three.js","typescript"],"license":"Apache-2.0","_id":"@dice-o-rolla/dice-engine@0.2.0","maintainers":[{"name":"zerodi","email":"mail@zerodi.ru"}],"homepage":"https://github.com/creepiest-space/dice-o-rolla#readme","bugs":{"url":"https://github.com/creepiest-space/dice-o-rolla/issues"},"dist":{"shasum":"41ca2394db318578e207d747379b43457097b8e1","tarball":"https://registry.npmjs.org/@dice-o-rolla/dice-engine/-/dice-engine-0.2.0.tgz","fileCount":21,"integrity":"sha512-WDbx824YCUmWAJTnHYtVeq5L4bRl+TkqHs9ZeQEnkFUiKt6fC+A9sJx9/twnFmSifMfEqqgGDpujxutxE3QiOQ==","signatures":[{"sig":"MEQCICf7AUtRcE4MmWhaU8VMu4i/lE+UHEXNd6sknEmN14juAiAH8gZa3oDMiudHcvCo0nCUZetpsc1R/KCkE1eNDmZ1gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dice-o-rolla%2fdice-engine@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":67461},"type":"module","_from":"file:/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js","default":"./dist/browser.js"}},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2cf771e0-25c0-45c3-900b-c9409e753e80"}},"_resolved":"/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.2.0.tgz","_integrity":"sha512-WDbx824YCUmWAJTnHYtVeq5L4bRl+TkqHs9ZeQEnkFUiKt6fC+A9sJx9/twnFmSifMfEqqgGDpujxutxE3QiOQ==","repository":{"url":"git+https://github.com/creepiest-space/dice-o-rolla.git","type":"git","directory":"packages/dice-engine"},"_npmVersion":"11.17.0","description":"Framework-neutral physical dice engine with Rapier and Three.js browser adapters.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@dice-o-rolla/dice-core":"0.2.0","@dice-o-rolla/dice-physics":"0.2.0","@dice-o-rolla/dice-geometry":"0.2.0","@dice-o-rolla/dice-renderer":"0.2.0","@dice-o-rolla/dice-physics-rapier":"0.2.0","@dice-o-rolla/dice-renderer-three":"0.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/dice-engine_0.2.0_1788168406062_0.9567254362927067","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@dice-o-rolla/dice-engine","version":"0.3.0","keywords":["dice","dice-roller","physics","rpg","three.js","typescript"],"license":"Apache-2.0","_id":"@dice-o-rolla/dice-engine@0.3.0","maintainers":[{"name":"zerodi","email":"mail@zerodi.ru"}],"homepage":"https://github.com/creepiest-space/dice-o-rolla#readme","bugs":{"url":"https://github.com/creepiest-space/dice-o-rolla/issues"},"dist":{"shasum":"9b8634ca516a5cb0433b68b8ff7e3743bc67513f","tarball":"https://registry.npmjs.org/@dice-o-rolla/dice-engine/-/dice-engine-0.3.0.tgz","fileCount":23,"integrity":"sha512-eZjED4yniWM+m7hCLCi6tYcadrkgr361u3WyUhEPhnwgVV/HRCLF88zes7JfMN+mt2nKnh+OD2icUrk0ZGdTfg==","signatures":[{"sig":"MEQCIGYHdA9/Lagj4NSgevtXCJOtfzYCkGMaP02wqgl1e3xGAiAcVHe7V+cEUm2zGo6yPipEo6Gbplbu0vA3vunoHE3Zmg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dice-o-rolla%2fdice-engine@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":108224},"type":"module","_from":"file:/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.3.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js","default":"./dist/browser.js"}},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2cf771e0-25c0-45c3-900b-c9409e753e80"}},"_resolved":"/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.3.0.tgz","_integrity":"sha512-eZjED4yniWM+m7hCLCi6tYcadrkgr361u3WyUhEPhnwgVV/HRCLF88zes7JfMN+mt2nKnh+OD2icUrk0ZGdTfg==","repository":{"url":"git+https://github.com/creepiest-space/dice-o-rolla.git","type":"git","directory":"packages/dice-engine"},"_npmVersion":"11.17.0","description":"Framework-neutral physical dice engine with Rapier and Three.js browser adapters.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@dice-o-rolla/dice-core":"0.3.0","@dice-o-rolla/dice-physics":"0.3.0","@dice-o-rolla/dice-geometry":"0.3.0","@dice-o-rolla/dice-renderer":"0.3.0","@dice-o-rolla/dice-physics-rapier":"0.3.0","@dice-o-rolla/dice-renderer-three":"0.3.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/dice-engine_0.3.0_1788276498972_0.7540139839519844","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@dice-o-rolla/dice-engine","version":"0.3.1","keywords":["dice","dice-roller","physics","rpg","three.js","typescript"],"license":"Apache-2.0","_id":"@dice-o-rolla/dice-engine@0.3.1","maintainers":[{"name":"zerodi","email":"mail@zerodi.ru"}],"homepage":"https://github.com/creepiest-space/dice-o-rolla#readme","bugs":{"url":"https://github.com/creepiest-space/dice-o-rolla/issues"},"dist":{"shasum":"a15f18de47d346e8813ea1ccde0dc5eabb2e8a88","tarball":"https://registry.npmjs.org/@dice-o-rolla/dice-engine/-/dice-engine-0.3.1.tgz","fileCount":23,"integrity":"sha512-ZVVCnb9t7YTk+DjajuSQe7twLRy5oqzea1YhcyRxzgiVBmDxZvGlJD4bf6+oyXkdyvQ5Q/8ye87ummp449SE2g==","signatures":[{"sig":"MEUCIG4bQ7Csc3clxMotCNFs7i9CuWA6FrdadRGHzAE5z5bCAiEAtO7awK6iaL0tOK9uCZRa1rT/LHfIg8fQSEywirizhEA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dice-o-rolla%2fdice-engine@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":108419},"type":"module","_from":"file:/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.3.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js","default":"./dist/browser.js"}},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2cf771e0-25c0-45c3-900b-c9409e753e80"}},"_resolved":"/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.3.1.tgz","_integrity":"sha512-ZVVCnb9t7YTk+DjajuSQe7twLRy5oqzea1YhcyRxzgiVBmDxZvGlJD4bf6+oyXkdyvQ5Q/8ye87ummp449SE2g==","repository":{"url":"git+https://github.com/creepiest-space/dice-o-rolla.git","type":"git","directory":"packages/dice-engine"},"_npmVersion":"11.17.0","description":"Framework-neutral physical dice engine with Rapier and Three.js browser adapters.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@dice-o-rolla/dice-core":"0.3.1","@dice-o-rolla/dice-physics":"0.3.1","@dice-o-rolla/dice-geometry":"0.3.1","@dice-o-rolla/dice-renderer":"0.3.1","@dice-o-rolla/dice-physics-rapier":"0.3.1","@dice-o-rolla/dice-renderer-three":"0.3.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/dice-engine_0.3.1_1788278917126_0.2536924277232069","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@dice-o-rolla/dice-engine","version":"0.4.0","keywords":["dice","dice-roller","physics","rpg","three.js","typescript"],"license":"Apache-2.0","_id":"@dice-o-rolla/dice-engine@0.4.0","maintainers":[{"name":"zerodi","email":"mail@zerodi.ru"}],"homepage":"https://github.com/creepiest-space/dice-o-rolla#readme","bugs":{"url":"https://github.com/creepiest-space/dice-o-rolla/issues"},"dist":{"shasum":"88dd9dbec79e646761628e8bddde24e5980cacf0","tarball":"https://registry.npmjs.org/@dice-o-rolla/dice-engine/-/dice-engine-0.4.0.tgz","fileCount":23,"integrity":"sha512-gp3wq/CO1up7G8IKPwNca0ZY0NWX1Kiu2ERJFPLD5wybFbKMibey0SAEKSufrttE554FNYgCLua5bktqcB2DdQ==","signatures":[{"sig":"MEYCIQDbAEB9HmJ7nfF46oJ5gQdvEh+OXy+kVoR4ocpVOsIMZAIhAOw7s/y9120+VQ7iRNCIyt2p2y6wWl+YGqPR3MYE6vys","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dice-o-rolla%2fdice-engine@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":113494},"type":"module","_from":"file:/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.4.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js","default":"./dist/browser.js"}},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2cf771e0-25c0-45c3-900b-c9409e753e80"}},"_resolved":"/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.4.0.tgz","_integrity":"sha512-gp3wq/CO1up7G8IKPwNca0ZY0NWX1Kiu2ERJFPLD5wybFbKMibey0SAEKSufrttE554FNYgCLua5bktqcB2DdQ==","repository":{"url":"git+https://github.com/creepiest-space/dice-o-rolla.git","type":"git","directory":"packages/dice-engine"},"_npmVersion":"11.17.0","description":"Framework-neutral physical dice engine with Rapier and Three.js browser adapters.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@dice-o-rolla/dice-core":"0.4.0","@dice-o-rolla/dice-physics":"0.4.0","@dice-o-rolla/dice-geometry":"0.4.0","@dice-o-rolla/dice-renderer":"0.4.0","@dice-o-rolla/dice-physics-rapier":"0.4.0","@dice-o-rolla/dice-renderer-three":"0.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/dice-engine_0.4.0_1788373476066_0.8721930601967582","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@dice-o-rolla/dice-engine","version":"0.5.0","description":"Framework-neutral physical dice engine with Rapier and Three.js browser adapters.","keywords":["dice","dice-roller","physics","rpg","three.js","typescript"],"homepage":"https://github.com/creepiest-space/dice-o-rolla#readme","bugs":{"url":"https://github.com/creepiest-space/dice-o-rolla/issues"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creepiest-space/dice-o-rolla.git","directory":"packages/dice-engine"},"type":"module","sideEffects":false,"types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js","default":"./dist/browser.js"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"dependencies":{"@dice-o-rolla/dice-core":"0.5.0","@dice-o-rolla/dice-geometry":"0.5.0","@dice-o-rolla/dice-physics":"0.5.0","@dice-o-rolla/dice-physics-rapier":"0.5.0","@dice-o-rolla/dice-renderer":"0.5.0","@dice-o-rolla/dice-renderer-three":"0.5.0"},"engines":{"node":">=20.0.0"},"_id":"@dice-o-rolla/dice-engine@0.5.0","_integrity":"sha512-hniVk49bwJSxsZm3FlD57odYE1m4opbHFJUi8AcYhau/fEbAqDh1Sf8W5muOaQTnjnbUJoMivQmCATtpmeKyhA==","_resolved":"/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.5.0.tgz","_from":"file:/home/runner/work/dice-o-rolla/dice-o-rolla/artifacts/npm/dice-engine-0.5.0.tgz","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-hniVk49bwJSxsZm3FlD57odYE1m4opbHFJUi8AcYhau/fEbAqDh1Sf8W5muOaQTnjnbUJoMivQmCATtpmeKyhA==","shasum":"53136636eebfcd79cfb688c83e3dbb0ecc74930e","tarball":"https://registry.npmjs.org/@dice-o-rolla/dice-engine/-/dice-engine-0.5.0.tgz","fileCount":23,"unpackedSize":113494,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dice-o-rolla%2fdice-engine@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGqxlaVfUvalB+11qurZiO4Yvc2FGBikkFYg++SSvFeqAiBp2SOgxMqLFnsbun0JRPXuemGwCpRGgCrt5n0Qb0hpIw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2cf771e0-25c0-45c3-900b-c9409e753e80"}},"directories":{},"maintainers":[{"name":"zerodi","email":"mail@zerodi.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dice-engine_0.5.0_1788904629201_0.7323920216147042"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-29T13:42:17.899Z","modified":"2026-09-08T21:57:09.676Z","0.1.0":"2026-08-29T13:42:18.225Z","0.1.1":"2026-08-29T16:48:39.989Z","0.2.0":"2026-08-31T09:26:46.179Z","0.3.0":"2026-09-01T15:28:19.104Z","0.3.1":"2026-09-01T16:08:37.269Z","0.4.0":"2026-09-02T18:24:36.201Z","0.5.0":"2026-09-08T21:57:09.319Z"},"bugs":{"url":"https://github.com/creepiest-space/dice-o-rolla/issues"},"license":"Apache-2.0","homepage":"https://github.com/creepiest-space/dice-o-rolla#readme","keywords":["dice","dice-roller","physics","rpg","three.js","typescript"],"repository":{"type":"git","url":"git+https://github.com/creepiest-space/dice-o-rolla.git","directory":"packages/dice-engine"},"description":"Framework-neutral physical dice engine with Rapier and Three.js browser adapters.","maintainers":[{"name":"zerodi","email":"mail@zerodi.ru"}],"readme":"# `@dice-o-rolla/dice-engine`\n\nFramework-neutral orchestration for physically simulated polyhedral dice. The package exposes a\nbackend-neutral engine and an optional browser composition backed by Rapier and Three.js.\n\n## Browser usage\n\n```ts\nimport { createDefaultDiceEngine } from '@dice-o-rolla/dice-engine/browser';\n\nconst container = document.querySelector<HTMLElement>('#dice-tray');\nif (container === null) throw new Error('Missing dice tray');\n\nconst engine = await createDefaultDiceEngine({ container });\nconst result = await engine.roll('2d20 + 4');\n\nconsole.log(result.total, result.dice);\nengine.destroy();\n```\n\nThe browser entry point initializes Rapier WASM, creates the Three.js renderer, uses Web Crypto for\nthrow generation, and releases partially initialized resources if composition fails. Concurrent\n`initialize()` calls coalesce, while every roll promise terminates by settlement, cancellation,\ntimeout, or failure.\n\n## Custom adapters\n\n```ts\nimport { DiceEngine } from '@dice-o-rolla/dice-engine';\n\nconst engine = new DiceEngine({ physics, renderer });\nawait engine.initialize();\n```\n\nThe main entry point depends on domain contracts rather than concrete Rapier or Three.js types.\n\n## Deterministic simulation and replay\n\n`simulate()` runs the configured physics adapter with a per-call seeded random source and returns a\nJSON-serializable `PhysicalRollTrace`. It does not render or emit the ordinary roll lifecycle events.\nSet `captureFrames: true` when the trace will be animated; otherwise the trace contains only its\nterminal frame.\n\n```ts\nconst trace = await engine.simulate('2d20kh1', {\n  seed: 2026,\n  captureFrames: true,\n  frameIntervalSteps: 2,\n});\n\nawait engine.replay(trace, {\n  theme: { material: 'matte', roughness: 0.85 },\n  signal: abortController.signal,\n});\n```\n\n`replay()` consumes the captured transforms without stepping physics. Its optional theme is applied\nthrough the normal engine theme state, and the terminal dice remain rendered until the next roll,\nreplay, `clear()`, or `destroy()`. Simulation and replay require an idle engine because the facade\nowns one physics world, renderer, and frame scheduler. Replay cancellation rejects with\n`RollCancelledError`.\n\nTraces include producer and physics profile metadata, initial throw conditions, definition\nfingerprints, collision/impact events, and the immutable logical result. Replay validates registered\ndefinitions, final orientation-derived faces, and the aggregate total before rendering. Default\ntrace limits are 1,200 frames, 60,000 die samples, and 20,000 events; customize them through\n`DiceEngineOptions.traceLimits`. `TraceLimitExceededError` identifies the rejected dimension.\n\n## Visual presets and optional effects\n\n`registerVisualPreset()` associates a logical die with a validated physical geometry, scale, face\nlabels, and optional value map. `skinId` and `soundPackId` are opaque application-owned references;\nthe engine does not load assets. Skins and sound definitions belong in the optional\n`@dice-o-rolla/dice-assets` package, which is not a dependency of the engine.\n\nUse `visualPresetSelector` in `roll()` or `simulate()` options to select a registered preset for\neach physical die. The callback receives stable term/die/physical indices, physical and logical die\ntypes, the current default, and paired-component metadata. Returning `undefined` keeps the default;\nthe engine rejects unknown IDs and presets for another physical die type before creating bodies.\n\nThe engine emits `die:spawn` and `die:remove` lifecycle events. Collision events are opt-in through\n`DiceEngineOptions.collisionEvents`, bounded by `maxEventsPerFrame`, and suitable for an external\nsound or effects adapter.\n\n## Supported notation\n\nThe initial grammar supports standard polyhedral expressions and integer modifiers, including:\n\n```text\nd20\n4d6 + 2\n4d6kh3\n2d20kl1\n5d20s{1=-2,17..19=1,20=2}\nd%\nd100\nd66\n```\n\nKeep/drop rolls retain every physical die in `result.dice` and expose the selection through\n`included`. Score maps expose each contribution through `score`; unlisted faces contribute zero.\nSelection is applied before scoring, followed by integer modifiers. Paired `d%`, `d100`, and `d66`\nterms currently reject keep/drop and score operations.\n\nEngine-produced dice also contain immutable `provenance`: stable term, logical-die, and physical-die\ncoordinates plus the settled face, inclusion state, and contribution. Consumers can explain a\ntotal without reparsing notation or depending on renderer state.\n\nDefault resource limits reject oversized notation, more than 50 logical or physical dice, and more\nthan eight pending rolls. Consumers may lower or explicitly raise these limits through\n`DiceEngineOptions.limits` after testing their target devices.\n\n## Trust and cleanup\n\nClient-side results are not authoritative for rankings, prizes, or wagering. Call `destroy()` when\nthe engine is no longer needed to release frame scheduling, observers, physics resources, WebGL\nresources, and the renderer canvas. `clear()` keeps the engine reusable; `destroy()` is idempotent\nand final. See the canonical\n[lifecycle and runtime contract](https://github.com/creepiest-space/dice-o-rolla/blob/main/docs/engine.md).\nConsumers upgrading from `0.1` should also review the\n[0.2 migration notes](https://github.com/creepiest-space/dice-o-rolla/blob/main/docs/migration-0.2.md).\nConsumers upgrading from `0.2` should review the\n[0.3 migration notes](https://github.com/creepiest-space/dice-o-rolla/blob/main/docs/migration-0.3.md).\n\n## License\n\nLicensed under the Apache License, Version 2.0. The package archive includes `LICENSE`, `NOTICE`, and\n`THIRD_PARTY_NOTICES.md`.\n","readmeFilename":"README.md"}