@underpostnet/cyberia 3.2.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +14 -0
- package/.env.example +144 -0
- package/.github/workflows/cyberia-client.cd.yml +40 -0
- package/.github/workflows/cyberia-server.cd.yml +40 -0
- package/.github/workflows/docker-image.cyberia-client.ci.yml +71 -0
- package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +70 -0
- package/.github/workflows/docker-image.cyberia-server.ci.yml +71 -0
- package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +71 -0
- package/.github/workflows/docker-image.engine-cyberia.ci.yml +53 -0
- package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +53 -0
- package/.github/workflows/engine-cyberia.cd.yml +157 -0
- package/.github/workflows/engine-cyberia.ci.yml +125 -0
- package/.github/workflows/ghpkg.ci.yml +160 -0
- package/.github/workflows/gitlab.ci.yml +20 -0
- package/.github/workflows/hardhat.ci.yml +82 -0
- package/.github/workflows/npmpkg.ci.yml +126 -0
- package/.github/workflows/publish.ci.yml +87 -0
- package/.github/workflows/publish.cyberia.ci.yml +79 -0
- package/.github/workflows/pwa-microservices-template-page.cd.yml +65 -0
- package/.github/workflows/pwa-microservices-template-test.ci.yml +33 -0
- package/.github/workflows/release.cd.yml +46 -0
- package/.nycrc +9 -0
- package/.prettierignore +12 -0
- package/.prettierrc +9 -0
- package/.vscode/extensions.json +10 -0
- package/.vscode/settings.json +26 -0
- package/CHANGELOG.md +2516 -0
- package/CLI-HELP.md +1099 -0
- package/Dockerfile +161 -0
- package/Dockerfile.dev +161 -0
- package/Dockerfile.test +165 -0
- package/LICENSE +21 -0
- package/README.md +259 -0
- package/baremetal/commission-workflows.json +211 -0
- package/baremetal/packer-workflows.json +24 -0
- package/bin/build.js +261 -0
- package/bin/build.template.js +33 -0
- package/bin/cyberia.js +5627 -0
- package/bin/deploy.js +1547 -0
- package/bin/index.js +5627 -0
- package/bump.config.js +27 -0
- package/compose.env +144 -0
- package/conf.js +952 -0
- package/deployment.yaml +418 -0
- package/docker-compose.yml +434 -0
- package/examples/static-page/README.md +150 -0
- package/examples/static-page/ssr-components/CustomPage.js +554 -0
- package/examples/static-page/static-config-example.json +57 -0
- package/hardhat/.env.example +31 -0
- package/hardhat/contracts/ObjectLayerToken.sol +391 -0
- package/hardhat/deployments/.gitkeep +0 -0
- package/hardhat/deployments/hardhat-ObjectLayerToken.json +11 -0
- package/hardhat/hardhat.config.js +136 -0
- package/hardhat/ignition/modules/.gitkeep +0 -0
- package/hardhat/ignition/modules/ObjectLayerToken.js +21 -0
- package/hardhat/networks/besu-object-layer.network.json +138 -0
- package/hardhat/package-lock.json +2871 -0
- package/hardhat/package.json +43 -0
- package/hardhat/scripts/deployObjectLayerToken.js +98 -0
- package/hardhat/test/ObjectLayerToken.js +696 -0
- package/hardhat/types/ethers-contracts/ObjectLayerToken.ts +690 -0
- package/hardhat/types/ethers-contracts/common.ts +92 -0
- package/hardhat/types/ethers-contracts/factories/ObjectLayerToken__factory.ts +1055 -0
- package/hardhat/types/ethers-contracts/factories/index.ts +4 -0
- package/hardhat/types/ethers-contracts/hardhat.d.ts +47 -0
- package/hardhat/types/ethers-contracts/index.ts +6 -0
- package/ipfs/configure-ipfs.sh +13 -0
- package/jsconfig.json +9 -0
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +48 -0
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +48 -0
- package/manifests/deployment/adminer/deployment.yaml +32 -0
- package/manifests/deployment/adminer/kustomization.yaml +7 -0
- package/manifests/deployment/adminer/service.yaml +13 -0
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +418 -0
- package/manifests/deployment/dd-cyberia-development/grpc-service.yaml +17 -0
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +189 -0
- package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +164 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +163 -0
- package/manifests/deployment/dd-default-development/proxy.yaml +46 -0
- package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
- package/manifests/deployment/fastapi/backend-service.yml +19 -0
- package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
- package/manifests/deployment/fastapi/frontend-service.yml +15 -0
- package/manifests/deployment/fastapi/initial_data.sh +8 -0
- package/manifests/deployment/kafka/deployment.yaml +67 -0
- package/manifests/deployment/mongo-express/deployment.yaml +62 -0
- package/manifests/deployment/phpmyadmin/deployment.yaml +54 -0
- package/manifests/deployment/playwright/deployment.yaml +52 -0
- package/manifests/deployment/spark/spark-pi-py.yaml +20 -0
- package/manifests/deployment/tensorflow/tf-gpu-test.yaml +63 -0
- package/manifests/envoy-service-nodeport.yaml +22 -0
- package/manifests/grafana/deployment.yaml +64 -0
- package/manifests/grafana/kustomization.yaml +7 -0
- package/manifests/grafana/pvc.yaml +12 -0
- package/manifests/grafana/service.yaml +14 -0
- package/manifests/grafana/storage-class.yaml +9 -0
- package/manifests/ipfs/configmap.yaml +64 -0
- package/manifests/ipfs/headless-service.yaml +35 -0
- package/manifests/ipfs/kustomization.yaml +8 -0
- package/manifests/ipfs/statefulset.yaml +149 -0
- package/manifests/ipfs/storage-class.yaml +9 -0
- package/manifests/kind-config-dev.yaml +20 -0
- package/manifests/kind-config.yaml +12 -0
- package/manifests/kubeadm-calico-config.yaml +14 -0
- package/manifests/letsencrypt-prod.yaml +14 -0
- package/manifests/lxd/lxd-admin-profile.yaml +26 -0
- package/manifests/lxd/lxd-preseed.yaml +30 -0
- package/manifests/mariadb/kustomization.yaml +9 -0
- package/manifests/mariadb/pv.yaml +12 -0
- package/manifests/mariadb/pvc.yaml +10 -0
- package/manifests/mariadb/service.yaml +10 -0
- package/manifests/mariadb/statefulset.yaml +56 -0
- package/manifests/mariadb/storage-class.yaml +10 -0
- package/manifests/mongodb/headless-service.yaml +10 -0
- package/manifests/mongodb/kustomization.yaml +11 -0
- package/manifests/mongodb/pv-pvc.yaml +59 -0
- package/manifests/mongodb/statefulset.yaml +113 -0
- package/manifests/mongodb/storage-class.yaml +9 -0
- package/manifests/mongodb-4.4/headless-service.yaml +10 -0
- package/manifests/mongodb-4.4/kustomization.yaml +9 -0
- package/manifests/mongodb-4.4/mongodb-nodeport.yaml +17 -0
- package/manifests/mongodb-4.4/pv-pvc.yaml +19 -0
- package/manifests/mongodb-4.4/service-deployment.yaml +61 -0
- package/manifests/mongodb-4.4/statefulset.yaml +79 -0
- package/manifests/mongodb-4.4/storage-class.yaml +9 -0
- package/manifests/mysql/kustomization.yaml +7 -0
- package/manifests/mysql/pv-pvc.yaml +27 -0
- package/manifests/mysql/statefulset.yaml +55 -0
- package/manifests/postgresql/configmap.yaml +9 -0
- package/manifests/postgresql/kustomization.yaml +10 -0
- package/manifests/postgresql/pv.yaml +15 -0
- package/manifests/postgresql/pvc.yaml +13 -0
- package/manifests/postgresql/service.yaml +10 -0
- package/manifests/postgresql/statefulset.yaml +37 -0
- package/manifests/prometheus/deployment.yaml +82 -0
- package/manifests/pv-pvc-dd.yaml +34 -0
- package/manifests/valkey/kustomization.yaml +7 -0
- package/manifests/valkey/service.yaml +10 -0
- package/manifests/valkey/statefulset.yaml +37 -0
- package/manifests/valkey/valkey-nodeport.yaml +17 -0
- package/mongodb/entrypoint.sh +76 -0
- package/nginx.conf +128 -0
- package/nodemon.json +6 -0
- package/package.json +101 -0
- package/packer/images/Rocky9Amd64/Makefile +62 -0
- package/packer/images/Rocky9Amd64/QUICKSTART.md +113 -0
- package/packer/images/Rocky9Amd64/README.md +122 -0
- package/packer/images/Rocky9Amd64/http/rocky9.ks.pkrtpl.hcl +114 -0
- package/packer/images/Rocky9Amd64/rocky9.pkr.hcl +164 -0
- package/packer/images/Rocky9Arm64/Makefile +69 -0
- package/packer/images/Rocky9Arm64/README.md +122 -0
- package/packer/images/Rocky9Arm64/http/rocky9.ks.pkrtpl.hcl +114 -0
- package/packer/images/Rocky9Arm64/rocky9.pkr.hcl +171 -0
- package/packer/scripts/fuse-nbd +64 -0
- package/packer/scripts/fuse-tar-root +63 -0
- package/proxy.yaml +189 -0
- package/pv-pvc.yaml +164 -0
- package/scripts/device-scan.sh +65 -0
- package/scripts/disk-clean.sh +182 -0
- package/scripts/disk-devices.sh +13 -0
- package/scripts/gen-fqdns.sh +14 -0
- package/scripts/gpu-diag.sh +19 -0
- package/scripts/ip-info.sh +118 -0
- package/scripts/ipxe-setup.sh +200 -0
- package/scripts/k3s-node-setup.sh +124 -0
- package/scripts/kubeadm-node-setup.sh +317 -0
- package/scripts/link-local-underpost-cli.sh +6 -0
- package/scripts/lxd-vm-setup.sh +208 -0
- package/scripts/maas-nat-firewalld.sh +145 -0
- package/scripts/maas-setup.sh +135 -0
- package/scripts/maas-upload-boot-resource.sh +183 -0
- package/scripts/nat-iptables.sh +111 -0
- package/scripts/nvim.sh +91 -0
- package/scripts/packer-init-vars-file.sh +40 -0
- package/scripts/packer-setup.sh +289 -0
- package/scripts/ports-ls.sh +33 -0
- package/scripts/quick-tftp.sh +19 -0
- package/scripts/rhel-grpc-setup.sh +56 -0
- package/scripts/rocky-kickstart.sh +986 -0
- package/scripts/rocky-pwa.sh +200 -0
- package/scripts/rocky-setup.sh +106 -0
- package/scripts/rpmfusion-ffmpeg-setup.sh +32 -0
- package/scripts/ssl.sh +170 -0
- package/scripts/test-monitor.sh +248 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +30 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +155 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +39 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +382 -0
- package/src/api/core/core.controller.js +8 -0
- package/src/api/core/core.model.js +11 -0
- package/src/api/core/core.router.js +23 -0
- package/src/api/core/core.service.js +30 -0
- package/src/api/crypto/crypto.controller.js +10 -0
- package/src/api/crypto/crypto.model.js +23 -0
- package/src/api/crypto/crypto.router.js +23 -0
- package/src/api/crypto/crypto.service.js +64 -0
- package/src/api/cyberia-action/cyberia-action.controller.js +8 -0
- package/src/api/cyberia-action/cyberia-action.model.js +79 -0
- package/src/api/cyberia-action/cyberia-action.router.js +21 -0
- package/src/api/cyberia-action/cyberia-action.service.js +58 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.controller.js +27 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +100 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.router.js +70 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.service.js +152 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.controller.js +8 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.model.js +36 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +20 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +57 -0
- package/src/api/cyberia-entity/cyberia-entity.controller.js +6 -0
- package/src/api/cyberia-entity/cyberia-entity.model.js +25 -0
- package/src/api/cyberia-entity/cyberia-entity.router.js +17 -0
- package/src/api/cyberia-entity/cyberia-entity.service.js +42 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.controller.js +6 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.model.js +67 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.router.js +17 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.service.js +46 -0
- package/src/api/cyberia-instance/cyberia-fallback-world.js +337 -0
- package/src/api/cyberia-instance/cyberia-instance-boot.service.js +57 -0
- package/src/api/cyberia-instance/cyberia-instance-map.service.js +583 -0
- package/src/api/cyberia-instance/cyberia-instance.controller.js +42 -0
- package/src/api/cyberia-instance/cyberia-instance.model.js +117 -0
- package/src/api/cyberia-instance/cyberia-instance.router.js +75 -0
- package/src/api/cyberia-instance/cyberia-instance.service.js +190 -0
- package/src/api/cyberia-instance/cyberia-portal-connector.js +260 -0
- package/src/api/cyberia-instance/cyberia-world-generator.js +618 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.controller.js +6 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +200 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.router.js +17 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +46 -0
- package/src/api/cyberia-map/cyberia-map.controller.js +6 -0
- package/src/api/cyberia-map/cyberia-map.model.js +33 -0
- package/src/api/cyberia-map/cyberia-map.router.js +19 -0
- package/src/api/cyberia-map/cyberia-map.service.js +76 -0
- package/src/api/cyberia-quest/cyberia-quest.controller.js +9 -0
- package/src/api/cyberia-quest/cyberia-quest.model.js +67 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +26 -0
- package/src/api/cyberia-quest/cyberia-quest.service.js +97 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.controller.js +6 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.model.js +49 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.router.js +21 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.service.js +42 -0
- package/src/api/cyberia-saga/cyberia-saga.controller.js +6 -0
- package/src/api/cyberia-saga/cyberia-saga.model.js +59 -0
- package/src/api/cyberia-saga/cyberia-saga.router.js +17 -0
- package/src/api/cyberia-saga/cyberia-saga.service.js +42 -0
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +1076 -0
- package/src/api/cyberia-skill/cyberia-skill.controller.js +6 -0
- package/src/api/cyberia-skill/cyberia-skill.model.js +50 -0
- package/src/api/cyberia-skill/cyberia-skill.router.js +17 -0
- package/src/api/cyberia-skill/cyberia-skill.service.js +42 -0
- package/src/api/default/default.controller.js +6 -0
- package/src/api/default/default.model.js +20 -0
- package/src/api/default/default.router.js +21 -0
- package/src/api/default/default.service.js +42 -0
- package/src/api/document/document.controller.js +9 -0
- package/src/api/document/document.model.js +95 -0
- package/src/api/document/document.router.js +32 -0
- package/src/api/document/document.service.js +633 -0
- package/src/api/file/file.controller.js +15 -0
- package/src/api/file/file.model.js +127 -0
- package/src/api/file/file.ref.json +39 -0
- package/src/api/file/file.router.js +36 -0
- package/src/api/file/file.service.js +499 -0
- package/src/api/instance/instance.controller.js +8 -0
- package/src/api/instance/instance.model.js +34 -0
- package/src/api/instance/instance.router.js +27 -0
- package/src/api/instance/instance.service.js +75 -0
- package/src/api/ipfs/ipfs.controller.js +8 -0
- package/src/api/ipfs/ipfs.model.js +77 -0
- package/src/api/ipfs/ipfs.router.js +26 -0
- package/src/api/ipfs/ipfs.service.js +145 -0
- package/src/api/object-layer/object-layer.controller.js +18 -0
- package/src/api/object-layer/object-layer.model.js +200 -0
- package/src/api/object-layer/object-layer.router.js +729 -0
- package/src/api/object-layer/object-layer.service.js +894 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.controller.js +6 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.model.js +93 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.router.js +17 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.service.js +46 -0
- package/src/api/test/test.controller.js +14 -0
- package/src/api/test/test.model.js +14 -0
- package/src/api/test/test.router.js +23 -0
- package/src/api/test/test.service.js +35 -0
- package/src/api/types.js +24 -0
- package/src/api/user/guest.service.js +100 -0
- package/src/api/user/postman_collection.json +216 -0
- package/src/api/user/user.build.js +16 -0
- package/src/api/user/user.controller.js +35 -0
- package/src/api/user/user.model.js +142 -0
- package/src/api/user/user.router.js +367 -0
- package/src/api/user/user.service.js +582 -0
- package/src/api.js +23 -0
- package/src/cli/baremetal.js +3947 -0
- package/src/cli/cloud-init.js +673 -0
- package/src/cli/cluster.js +1395 -0
- package/src/cli/db.js +1533 -0
- package/src/cli/deploy.js +1542 -0
- package/src/cli/docker-compose.js +802 -0
- package/src/cli/env.js +177 -0
- package/src/cli/fs.js +380 -0
- package/src/cli/image.js +389 -0
- package/src/cli/index.js +1059 -0
- package/src/cli/ipfs.js +182 -0
- package/src/cli/kickstart.js +271 -0
- package/src/cli/kubectl.js +214 -0
- package/src/cli/lxd.js +1232 -0
- package/src/cli/monitor.js +659 -0
- package/src/cli/release.js +595 -0
- package/src/cli/repository.js +1969 -0
- package/src/cli/run.js +3326 -0
- package/src/cli/secrets.js +151 -0
- package/src/cli/ssh.js +975 -0
- package/src/cli/static.js +653 -0
- package/src/cli/system.js +332 -0
- package/src/cli/test.js +176 -0
- package/src/client/Cryptokoyn.index.js +30 -0
- package/src/client/CyberiaPortal.index.js +31 -0
- package/src/client/Default.index.js +77 -0
- package/src/client/Itemledger.index.js +35 -0
- package/src/client/Underpost.index.js +31 -0
- package/src/client/components/core/404.js +20 -0
- package/src/client/components/core/500.js +20 -0
- package/src/client/components/core/Account.js +630 -0
- package/src/client/components/core/AgGrid.js +238 -0
- package/src/client/components/core/Alert.js +76 -0
- package/src/client/components/core/AppStore.js +69 -0
- package/src/client/components/core/Auth.js +353 -0
- package/src/client/components/core/Badge.js +26 -0
- package/src/client/components/core/Blockchain.js +41 -0
- package/src/client/components/core/Blog.js +9 -0
- package/src/client/components/core/BtnIcon.js +109 -0
- package/src/client/components/core/CalendarCore.js +437 -0
- package/src/client/components/core/Chat.js +62 -0
- package/src/client/components/core/ClientEvents.js +163 -0
- package/src/client/components/core/ColorPaletteElement.js +309 -0
- package/src/client/components/core/CommonJs.js +1014 -0
- package/src/client/components/core/Content.js +349 -0
- package/src/client/components/core/Css.js +1134 -0
- package/src/client/components/core/CssCore.js +881 -0
- package/src/client/components/core/D3Chart.js +44 -0
- package/src/client/components/core/Docs.js +478 -0
- package/src/client/components/core/DropDown.js +321 -0
- package/src/client/components/core/EventBus.js +96 -0
- package/src/client/components/core/EventsUI.js +130 -0
- package/src/client/components/core/FileExplorer.js +1406 -0
- package/src/client/components/core/FullScreen.js +201 -0
- package/src/client/components/core/Input.js +537 -0
- package/src/client/components/core/Keyboard.js +80 -0
- package/src/client/components/core/KeyboardAvoidance.js +145 -0
- package/src/client/components/core/LoadingAnimation.js +152 -0
- package/src/client/components/core/LogIn.js +212 -0
- package/src/client/components/core/LogOut.js +72 -0
- package/src/client/components/core/Logger.js +22 -0
- package/src/client/components/core/Modal.js +2956 -0
- package/src/client/components/core/NotificationManager.js +80 -0
- package/src/client/components/core/Pagination.js +252 -0
- package/src/client/components/core/Panel.js +1308 -0
- package/src/client/components/core/PanelForm.js +915 -0
- package/src/client/components/core/Polyhedron.js +947 -0
- package/src/client/components/core/PublicProfile.js +895 -0
- package/src/client/components/core/Recover.js +211 -0
- package/src/client/components/core/Responsive.js +146 -0
- package/src/client/components/core/RichText.js +33 -0
- package/src/client/components/core/Router.js +523 -0
- package/src/client/components/core/Scroll.js +76 -0
- package/src/client/components/core/SearchBox.js +1007 -0
- package/src/client/components/core/SignUp.js +153 -0
- package/src/client/components/core/SocketIo.js +163 -0
- package/src/client/components/core/SocketIoHandler.js +75 -0
- package/src/client/components/core/Stream.js +161 -0
- package/src/client/components/core/ToggleSwitch.js +89 -0
- package/src/client/components/core/ToolTip.js +78 -0
- package/src/client/components/core/Translate.js +694 -0
- package/src/client/components/core/Validator.js +140 -0
- package/src/client/components/core/VanillaJs.js +485 -0
- package/src/client/components/core/Wallet.js +95 -0
- package/src/client/components/core/WebComponent.js +44 -0
- package/src/client/components/core/Webhook.js +58 -0
- package/src/client/components/core/Worker.js +313 -0
- package/src/client/components/core/windowGetDimensions.js +269 -0
- package/src/client/components/cryptokoyn/AppShellCryptokoyn.js +352 -0
- package/src/client/components/cryptokoyn/AppStoreCryptokoyn.js +5 -0
- package/src/client/components/cryptokoyn/CssCryptokoyn.js +212 -0
- package/src/client/components/cryptokoyn/LogInCryptokoyn.js +16 -0
- package/src/client/components/cryptokoyn/LogOutCryptokoyn.js +12 -0
- package/src/client/components/cryptokoyn/RouterCryptokoyn.js +37 -0
- package/src/client/components/cryptokoyn/SettingsCryptokoyn.js +16 -0
- package/src/client/components/cryptokoyn/SignUpCryptokoyn.js +11 -0
- package/src/client/components/cryptokoyn/SocketIoCryptokoyn.js +6 -0
- package/src/client/components/cyberia/ActionEngineCyberia.js +1867 -0
- package/src/client/components/cyberia/EntityEngineCyberia.js +585 -0
- package/src/client/components/cyberia/InstanceEngineCyberia.js +1088 -0
- package/src/client/components/cyberia/InstanceSelectionView.js +900 -0
- package/src/client/components/cyberia/MapEngineCyberia.js +1976 -0
- package/src/client/components/cyberia/ObjectLayerEngine.js +1540 -0
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +2420 -0
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +1522 -0
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +528 -0
- package/src/client/components/cyberia-portal/AppShellCyberiaPortal.js +772 -0
- package/src/client/components/cyberia-portal/AppStoreCyberiaPortal.js +5 -0
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +254 -0
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +21 -0
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +16 -0
- package/src/client/components/cyberia-portal/MainBodyCyberiaPortal.js +518 -0
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +72 -0
- package/src/client/components/cyberia-portal/SettingsCyberiaPortal.js +16 -0
- package/src/client/components/cyberia-portal/SignUpCyberiaPortal.js +13 -0
- package/src/client/components/cyberia-portal/SocketIoCyberiaPortal.js +6 -0
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +48 -0
- package/src/client/components/default/AppShellDefault.js +765 -0
- package/src/client/components/default/AppStoreDefault.js +5 -0
- package/src/client/components/default/CommonDefault.js +29 -0
- package/src/client/components/default/CssDefault.js +27 -0
- package/src/client/components/default/LogInDefault.js +16 -0
- package/src/client/components/default/LogOutDefault.js +12 -0
- package/src/client/components/default/RouterDefault.js +47 -0
- package/src/client/components/default/SettingsDefault.js +16 -0
- package/src/client/components/default/SignUpDefault.js +11 -0
- package/src/client/components/default/SocketIoDefault.js +6 -0
- package/src/client/components/default/TranslateDefault.js +7 -0
- package/src/client/components/itemledger/AppShellItemledger.js +353 -0
- package/src/client/components/itemledger/AppStoreItemledger.js +5 -0
- package/src/client/components/itemledger/CssItemledger.js +212 -0
- package/src/client/components/itemledger/LogInItemledger.js +17 -0
- package/src/client/components/itemledger/LogOutItemledger.js +12 -0
- package/src/client/components/itemledger/RouterItemledger.js +38 -0
- package/src/client/components/itemledger/SettingsItemledger.js +16 -0
- package/src/client/components/itemledger/SignUpItemledger.js +11 -0
- package/src/client/components/itemledger/SocketIoItemledger.js +6 -0
- package/src/client/components/itemledger/TranslateItemledger.js +7 -0
- package/src/client/components/underpost/AppShellUnderpost.js +691 -0
- package/src/client/components/underpost/AppStoreUnderpost.js +5 -0
- package/src/client/components/underpost/CssUnderpost.js +281 -0
- package/src/client/components/underpost/CyberpunkBloggerUnderpost.js +879 -0
- package/src/client/components/underpost/DocumentSearchProvider.js +448 -0
- package/src/client/components/underpost/LabGalleryUnderpost.js +79 -0
- package/src/client/components/underpost/LogInUnderpost.js +25 -0
- package/src/client/components/underpost/LogOutUnderpost.js +17 -0
- package/src/client/components/underpost/RouterUnderpost.js +45 -0
- package/src/client/components/underpost/SettingsUnderpost.js +16 -0
- package/src/client/components/underpost/SignUpUnderpost.js +11 -0
- package/src/client/components/underpost/SocketIoUnderpost.js +6 -0
- package/src/client/components/underpost/TranslateUnderpost.js +10 -0
- package/src/client/public/cryptokoyn/assets/banner/koyn-social.png +0 -0
- package/src/client/public/cryptokoyn/assets/logo/base-icon.png +0 -0
- package/src/client/public/cryptokoyn/assets/logo/cryptokoyn.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-192x192.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-256x256.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-36x36.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-48x48.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-72x72.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-96x96.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/favicon-16x16.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/favicon-32x32.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-150x150.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-310x150.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-310x310.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-70x70.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/safari-pinned-tab.svg +42 -0
- package/src/client/public/cryptokoyn/browserconfig.xml +12 -0
- package/src/client/public/cryptokoyn/favicon.ico +0 -0
- package/src/client/public/cryptokoyn/microdata.json +85 -0
- package/src/client/public/cryptokoyn/site.webmanifest +57 -0
- package/src/client/public/cryptokoyn/sitemap +148 -0
- package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +307 -0
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +309 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +204 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +341 -0
- package/src/client/public/cyberia-docs/CYBERIA-LORE.md +84 -0
- package/src/client/public/cyberia-docs/CYBERIA-SAGA.md +394 -0
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +294 -0
- package/src/client/public/cyberia-docs/CYBERIA.md +259 -0
- package/src/client/public/cyberia-docs/ENTITY-PROFILE.md +242 -0
- package/src/client/public/cyberia-docs/HARDHAT-MODULE.md +300 -0
- package/src/client/public/cyberia-docs/OFF-CHAIN-ECONOMY.md +309 -0
- package/src/client/public/cyberia-docs/QUEST-SYSTEM.md +228 -0
- package/src/client/public/cyberia-docs/ROADMAP.md +240 -0
- package/src/client/public/cyberia-docs/UNDERPOST-PLATFORM.md +106 -0
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +740 -0
- package/src/client/public/default/android-chrome-144x144.png +0 -0
- package/src/client/public/default/android-chrome-192x192.png +0 -0
- package/src/client/public/default/android-chrome-256x256.png +0 -0
- package/src/client/public/default/android-chrome-36x36.png +0 -0
- package/src/client/public/default/android-chrome-384x384.png +0 -0
- package/src/client/public/default/android-chrome-48x48.png +0 -0
- package/src/client/public/default/android-chrome-512x512.png +0 -0
- package/src/client/public/default/android-chrome-72x72.png +0 -0
- package/src/client/public/default/android-chrome-96x96.png +0 -0
- package/src/client/public/default/apple-touch-icon-1024x1024.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/default/apple-touch-icon-167x167.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/default/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1125x2436.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1136x640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1170x2532.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1179x2556.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2208.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2688.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1284x2778.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1290x2796.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1334x750.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1488x2266.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1536x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1620x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1640x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2224.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2388.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1792x828.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x1536.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x2732.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1620.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2208x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2224x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2266x1488.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2388x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2436x1125.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2532x1170.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2556x1179.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2688x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2732x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2778x1284.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2796x1290.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-640x1136.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-750x1334.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-828x1792.png +0 -0
- package/src/client/public/default/assets/background/dark.jpg +0 -0
- package/src/client/public/default/assets/background/dark.svg +557 -0
- package/src/client/public/default/assets/background/white.jpg +0 -0
- package/src/client/public/default/assets/background/white0-min.jpg +0 -0
- package/src/client/public/default/assets/background/white0.jpg +0 -0
- package/src/client/public/default/assets/logo/base-icon.png +0 -0
- package/src/client/public/default/assets/logo/underpost.gif +0 -0
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-default-avatar.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/browserconfig.xml +12 -0
- package/src/client/public/default/favicon-16x16.png +0 -0
- package/src/client/public/default/favicon-32x32.png +0 -0
- package/src/client/public/default/favicon-48x48.png +0 -0
- package/src/client/public/default/favicon.ico +0 -0
- package/src/client/public/default/manifest.webmanifest +69 -0
- package/src/client/public/default/mstile-144x144.png +0 -0
- package/src/client/public/default/mstile-150x150.png +0 -0
- package/src/client/public/default/mstile-310x150.png +0 -0
- package/src/client/public/default/mstile-310x310.png +0 -0
- package/src/client/public/default/mstile-70x70.png +0 -0
- package/src/client/public/default/safari-pinned-tab.svg +24 -0
- package/src/client/public/default/site.webmanifest +69 -0
- package/src/client/public/default/sitemap +148 -0
- package/src/client/public/default/yandex-browser-50x50.png +0 -0
- package/src/client/public/default/yandex-browser-manifest.json +9 -0
- package/src/client/public/doc/favicon.ico +0 -0
- package/src/client/public/doc/sitemap +148 -0
- package/src/client/public/itemledger/android-chrome-144x144.png +0 -0
- package/src/client/public/itemledger/android-chrome-192x192.png +0 -0
- package/src/client/public/itemledger/android-chrome-256x256.png +0 -0
- package/src/client/public/itemledger/android-chrome-36x36.png +0 -0
- package/src/client/public/itemledger/android-chrome-384x384.png +0 -0
- package/src/client/public/itemledger/android-chrome-48x48.png +0 -0
- package/src/client/public/itemledger/android-chrome-512x512.png +0 -0
- package/src/client/public/itemledger/android-chrome-72x72.png +0 -0
- package/src/client/public/itemledger/android-chrome-96x96.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-1024x1024.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-167x167.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1125x2436.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1136x640.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1170x2532.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1179x2556.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1242x2208.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1242x2688.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1284x2778.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1290x2796.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1334x750.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1488x2266.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1536x2048.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1620x2160.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1640x2160.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1668x2224.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1668x2388.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1792x828.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2048x1536.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2048x2732.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2160x1620.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2160x1640.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2208x1242.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2224x1668.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2266x1488.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2388x1668.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2436x1125.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2532x1170.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2556x1179.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2688x1242.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2732x2048.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2778x1284.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2796x1290.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-640x1136.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-750x1334.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-828x1792.png +0 -0
- package/src/client/public/itemledger/assets/logo/base-icon.png +0 -0
- package/src/client/public/itemledger/browserconfig.xml +12 -0
- package/src/client/public/itemledger/favicon-16x16.png +0 -0
- package/src/client/public/itemledger/favicon-32x32.png +0 -0
- package/src/client/public/itemledger/favicon-48x48.png +0 -0
- package/src/client/public/itemledger/favicon.ico +0 -0
- package/src/client/public/itemledger/manifest.webmanifest +69 -0
- package/src/client/public/itemledger/microdata.json +71 -0
- package/src/client/public/itemledger/mstile-144x144.png +0 -0
- package/src/client/public/itemledger/mstile-150x150.png +0 -0
- package/src/client/public/itemledger/mstile-310x150.png +0 -0
- package/src/client/public/itemledger/mstile-310x310.png +0 -0
- package/src/client/public/itemledger/mstile-70x70.png +0 -0
- package/src/client/public/itemledger/sitemap +148 -0
- package/src/client/public/itemledger/yandex-browser-50x50.png +0 -0
- package/src/client/public/itemledger/yandex-browser-manifest.json +9 -0
- package/src/client/public/test/favicon.ico +0 -0
- package/src/client/public/test/sitemap +148 -0
- package/src/client/services/atlas-sprite-sheet/atlas-sprite-sheet.service.js +137 -0
- package/src/client/services/core/core.service.js +309 -0
- package/src/client/services/crypto/crypto.service.js +68 -0
- package/src/client/services/cyberia-action/cyberia-action.service.js +99 -0
- package/src/client/services/cyberia-client-hints/cyberia-client-hints.service.js +99 -0
- package/src/client/services/cyberia-dialogue/cyberia-dialogue.service.js +99 -0
- package/src/client/services/cyberia-entity/cyberia-entity.management.js +57 -0
- package/src/client/services/cyberia-entity/cyberia-entity.service.js +99 -0
- package/src/client/services/cyberia-entity-type-default/cyberia-entity-type-default.service.js +99 -0
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +194 -0
- package/src/client/services/cyberia-instance/cyberia-instance.service.js +137 -0
- package/src/client/services/cyberia-instance-conf/cyberia-instance-conf.service.js +99 -0
- package/src/client/services/cyberia-map/cyberia-map.management.js +193 -0
- package/src/client/services/cyberia-map/cyberia-map.service.js +120 -0
- package/src/client/services/cyberia-quest/cyberia-quest.service.js +99 -0
- package/src/client/services/cyberia-quest-progress/cyberia-quest-progress.service.js +99 -0
- package/src/client/services/cyberia-saga/cyberia-saga.service.js +99 -0
- package/src/client/services/cyberia-skill/cyberia-skill.service.js +99 -0
- package/src/client/services/default/default.management.js +1015 -0
- package/src/client/services/default/default.service.js +99 -0
- package/src/client/services/document/document.service.js +134 -0
- package/src/client/services/file/file.service.js +94 -0
- package/src/client/services/instance/instance.management.js +78 -0
- package/src/client/services/instance/instance.service.js +107 -0
- package/src/client/services/ipfs/ipfs.service.js +118 -0
- package/src/client/services/object-layer/object-layer.management.js +414 -0
- package/src/client/services/object-layer/object-layer.service.js +208 -0
- package/src/client/services/object-layer-render-frames/object-layer-render-frames.service.js +99 -0
- package/src/client/services/test/test.service.js +68 -0
- package/src/client/services/user/guest.service.js +86 -0
- package/src/client/services/user/user.management.js +51 -0
- package/src/client/services/user/user.service.js +106 -0
- package/src/client/ssr/RootDocument.js +237 -0
- package/src/client/ssr/body/404.js +77 -0
- package/src/client/ssr/body/500.js +76 -0
- package/src/client/ssr/body/CacheControl.js +117 -0
- package/src/client/ssr/body/CyberiaDefaultSplashScreen.js +97 -0
- package/src/client/ssr/body/DefaultSplashScreen.js +97 -0
- package/src/client/ssr/body/SwaggerDarkMode.js +285 -0
- package/src/client/ssr/body/UnderpostDefaultSplashScreen.js +90 -0
- package/src/client/ssr/head/CryptokoynScripts.js +4 -0
- package/src/client/ssr/head/Css.js +241 -0
- package/src/client/ssr/head/CyberiaPortalScripts.js +6 -0
- package/src/client/ssr/head/DefaultScripts.js +6 -0
- package/src/client/ssr/head/ItemledgerScripts.js +4 -0
- package/src/client/ssr/head/Microdata.js +11 -0
- package/src/client/ssr/head/Production.js +1 -0
- package/src/client/ssr/head/Pwa.js +146 -0
- package/src/client/ssr/head/PwaItemledger.js +197 -0
- package/src/client/ssr/head/Seo.js +15 -0
- package/src/client/ssr/head/UnderpostScripts.js +6 -0
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +20 -0
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +16 -0
- package/src/client/ssr/views/Cyberia404.js +328 -0
- package/src/client/ssr/views/CyberiaServerMetrics.js +1070 -0
- package/src/client/ssr/views/Maintenance.js +64 -0
- package/src/client/ssr/views/NoNetworkConnection.js +68 -0
- package/src/client/ssr/views/Test.js +199 -0
- package/src/client/sw/core.sw.js +274 -0
- package/src/client-builder/client-build-docs.js +493 -0
- package/src/client-builder/client-build-live.js +100 -0
- package/src/client-builder/client-build.js +1092 -0
- package/src/client-builder/client-dev-server.js +88 -0
- package/src/client-builder/client-formatted.js +170 -0
- package/src/client-builder/client-icons.js +108 -0
- package/src/client-builder/ssr.js +124 -0
- package/src/client.build.js +17 -0
- package/src/client.dev.js +21 -0
- package/src/db/DataBaseProvider.js +213 -0
- package/src/db/mariadb/MariaDB.js +72 -0
- package/src/db/mongo/MongoBootstrap.js +657 -0
- package/src/db/mongo/MongooseDB.js +199 -0
- package/src/grpc/cyberia/grpc-server.js +162 -0
- package/src/index.js +357 -0
- package/src/mailer/EmailRender.js +116 -0
- package/src/mailer/MailerProvider.js +213 -0
- package/src/projects/cyberia/atlas-sprite-sheet-generator.js +413 -0
- package/src/projects/cyberia/besu-genesis-generator.js +1630 -0
- package/src/projects/cyberia/catalog-cyberia.js +90 -0
- package/src/projects/cyberia/gemini-client.js +175 -0
- package/src/projects/cyberia/generate-saga.js +2137 -0
- package/src/projects/cyberia/hot-reload-trigger.js +163 -0
- package/src/projects/cyberia/instance-data.js +719 -0
- package/src/projects/cyberia/ipfs-client.js +599 -0
- package/src/projects/cyberia/map-preview-generator.js +304 -0
- package/src/projects/cyberia/object-layer.js +978 -0
- package/src/projects/cyberia/semantic-layer-generator-floor.js +319 -0
- package/src/projects/cyberia/semantic-layer-generator-resource.js +259 -0
- package/src/projects/cyberia/semantic-layer-generator-skin.js +1164 -0
- package/src/projects/cyberia/semantic-layer-generator.js +753 -0
- package/src/projects/cyberia/shape-generator.js +1060 -0
- package/src/projects/underpost/catalog-underpost.js +60 -0
- package/src/proxy.js +19 -0
- package/src/runtime/cyberia-client/Dockerfile +49 -0
- package/src/runtime/cyberia-client/Dockerfile.dev +75 -0
- package/src/runtime/cyberia-server/Dockerfile +43 -0
- package/src/runtime/cyberia-server/Dockerfile.dev +56 -0
- package/src/runtime/engine-cyberia/Dockerfile +161 -0
- package/src/runtime/engine-cyberia/Dockerfile.dev +161 -0
- package/src/runtime/engine-cyberia/Dockerfile.test +165 -0
- package/src/runtime/engine-cyberia/compose.env +144 -0
- package/src/runtime/engine-cyberia/docker-compose.yml +434 -0
- package/src/runtime/engine-cyberia/ipfs/configure-ipfs.sh +13 -0
- package/src/runtime/engine-cyberia/mongodb/entrypoint.sh +76 -0
- package/src/runtime/engine-cyberia/nginx.conf +128 -0
- package/src/runtime/express/Dockerfile +45 -0
- package/src/runtime/express/Express.js +285 -0
- package/src/runtime/lampp/Dockerfile +62 -0
- package/src/runtime/lampp/Lampp.js +359 -0
- package/src/runtime/nginx/Nginx.js +250 -0
- package/src/runtime/wp/Dockerfile +62 -0
- package/src/runtime/wp/Wp.js +642 -0
- package/src/server/auth.js +713 -0
- package/src/server/backup.js +102 -0
- package/src/server/catalog.js +72 -0
- package/src/server/conf.js +2316 -0
- package/src/server/cron.js +476 -0
- package/src/server/crypto.js +210 -0
- package/src/server/data-query.js +461 -0
- package/src/server/dns.js +553 -0
- package/src/server/downloader.js +73 -0
- package/src/server/logger.js +229 -0
- package/src/server/middlewares.js +152 -0
- package/src/server/peer.js +75 -0
- package/src/server/process.js +299 -0
- package/src/server/proxy.js +139 -0
- package/src/server/runtime-status.js +252 -0
- package/src/server/runtime.js +183 -0
- package/src/server/start.js +272 -0
- package/src/server/tls.js +254 -0
- package/src/server/valkey.js +201 -0
- package/src/server.js +25 -0
- package/src/ws/IoInterface.js +129 -0
- package/src/ws/IoServer.js +68 -0
- package/src/ws/core/channels/core.ws.chat.js +68 -0
- package/src/ws/core/channels/core.ws.mailer.js +116 -0
- package/src/ws/core/channels/core.ws.stream.js +90 -0
- package/src/ws/core/core.ws.connection.js +41 -0
- package/src/ws/core/core.ws.emit.js +37 -0
- package/src/ws/core/core.ws.server.js +44 -0
- package/src/ws/default/channels/default.ws.main.js +57 -0
- package/src/ws/default/default.ws.connection.js +35 -0
- package/src/ws/default/default.ws.emit.js +14 -0
- package/src/ws/default/default.ws.server.js +39 -0
- package/test/api.test.js +53 -0
- package/test/crypto.test.js +117 -0
- package/test/cyberia-instance-conf-defaults.test.js +140 -0
- package/test/deploy-monitor.test.js +267 -0
- package/test/shape-generator.test.js +463 -0
- package/tsconfig.docs.json +15 -0
- package/typedoc.dd-cyberia.json +31 -0
- package/typedoc.json +31 -0
|
@@ -0,0 +1,947 @@
|
|
|
1
|
+
// https://underpost.net/cube.php
|
|
2
|
+
import { BtnIcon } from './BtnIcon.js';
|
|
3
|
+
import { getId, random } from './CommonJs.js';
|
|
4
|
+
import { dynamicCol } from './Css.js';
|
|
5
|
+
import { fullScreenIn, htmls, s } from './VanillaJs.js';
|
|
6
|
+
import { Translate } from './Translate.js';
|
|
7
|
+
// https://css-loaders.com/3d/
|
|
8
|
+
class Polyhedron {
|
|
9
|
+
static Tokens = {};
|
|
10
|
+
static async instance(options) {
|
|
11
|
+
const id = options?.id ? options.id : getId(Polyhedron.Tokens, 'polyhedron-');
|
|
12
|
+
if (!Polyhedron.Tokens[id])
|
|
13
|
+
Polyhedron.Tokens[id] = {
|
|
14
|
+
cr: [-25, -57, 90],
|
|
15
|
+
ct: [0, 0, 0],
|
|
16
|
+
dim: 150,
|
|
17
|
+
interval: null,
|
|
18
|
+
immersive: false,
|
|
19
|
+
immersiveParticles: null,
|
|
20
|
+
immersiveRAF: null,
|
|
21
|
+
immersiveStart: 0,
|
|
22
|
+
immersiveSeed: random(0, 1000000000),
|
|
23
|
+
immersiveEffect: 'waveLight', // 'waveLight' | 'darkElectronic' | 'prismBloom' | 'noirEmbers'
|
|
24
|
+
faceOpacity: 1,
|
|
25
|
+
chosenFace: 'front',
|
|
26
|
+
faces: {
|
|
27
|
+
front: null,
|
|
28
|
+
back: null,
|
|
29
|
+
left: null,
|
|
30
|
+
right: null,
|
|
31
|
+
top: null,
|
|
32
|
+
bottom: null,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
const getFaceSelector = (faceName) => `.face_${faceName}-${id}`;
|
|
36
|
+
const applyFaceBackground = (faceName) => {
|
|
37
|
+
const el = s(getFaceSelector(faceName));
|
|
38
|
+
if (!el) return;
|
|
39
|
+
const url = Polyhedron.Tokens[id].faces?.[faceName];
|
|
40
|
+
if (url) {
|
|
41
|
+
el.style.backgroundImage = `url("${url}")`;
|
|
42
|
+
// Always cover the full face area.
|
|
43
|
+
// Using `cover` ensures full coverage even during 3D transforms / resizes.
|
|
44
|
+
el.style.backgroundSize = 'cover';
|
|
45
|
+
el.style.backgroundPosition = 'center center';
|
|
46
|
+
el.style.backgroundRepeat = 'no-repeat';
|
|
47
|
+
} else {
|
|
48
|
+
el.style.backgroundImage = '';
|
|
49
|
+
el.style.backgroundSize = '';
|
|
50
|
+
el.style.backgroundPosition = '';
|
|
51
|
+
el.style.backgroundRepeat = '';
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const applyAllFaceBackgrounds = () => {
|
|
55
|
+
['front', 'back', 'left', 'right', 'top', 'bottom'].forEach(applyFaceBackground);
|
|
56
|
+
};
|
|
57
|
+
const applyFaceOpacity = () => {
|
|
58
|
+
const opacity = typeof Polyhedron.Tokens[id].faceOpacity === 'number' ? Polyhedron.Tokens[id].faceOpacity : 1;
|
|
59
|
+
const faces = document.querySelectorAll(`.face-${id}`);
|
|
60
|
+
faces.forEach((el) => {
|
|
61
|
+
el.style.opacity = `${opacity}`;
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const startImmersiveEffects = () => {
|
|
65
|
+
const scene = s(`.scene-${id}`);
|
|
66
|
+
if (!scene) return;
|
|
67
|
+
const canvas = s(`.polyhedron-immersive-canvas-${id}`);
|
|
68
|
+
if (!canvas) return;
|
|
69
|
+
if (!s(`.main-body-btn-ui-close`).classList.contains('hide')) s(`.main-body-btn-ui`).click();
|
|
70
|
+
if (!s(`.main-body-btn-ui-menu-close`).classList.contains('hide')) s(`.main-body-btn-menu`).click();
|
|
71
|
+
fullScreenIn();
|
|
72
|
+
// Ensure canvas is visible during immersive mode.
|
|
73
|
+
canvas.style.display = 'block';
|
|
74
|
+
const ctx = canvas.getContext('2d');
|
|
75
|
+
if (!ctx) return;
|
|
76
|
+
const resize = () => {
|
|
77
|
+
const dpr = Math.max(1, window.devicePixelRatio || 1);
|
|
78
|
+
const w = scene.clientWidth || window.innerWidth;
|
|
79
|
+
const h = scene.clientHeight || window.innerHeight;
|
|
80
|
+
canvas.width = Math.floor(w * dpr);
|
|
81
|
+
canvas.height = Math.floor(h * dpr);
|
|
82
|
+
canvas.style.width = `${w}px`;
|
|
83
|
+
canvas.style.height = `${h}px`;
|
|
84
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
85
|
+
};
|
|
86
|
+
resize();
|
|
87
|
+
const mkParticlesWaveLight = () => {
|
|
88
|
+
const count = 110;
|
|
89
|
+
const w = scene.clientWidth || window.innerWidth;
|
|
90
|
+
const h = scene.clientHeight || window.innerHeight;
|
|
91
|
+
return Array.from({ length: count }).map((_, i) => {
|
|
92
|
+
const r = random(1, 4);
|
|
93
|
+
return {
|
|
94
|
+
x: random(0, w),
|
|
95
|
+
y: random(0, h),
|
|
96
|
+
vx: (random(-100, 100) / 100) * 0.25,
|
|
97
|
+
vy: (random(-100, 100) / 100) * 0.25,
|
|
98
|
+
r,
|
|
99
|
+
phase: random(0, 628) / 100,
|
|
100
|
+
i,
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
const mkParticlesDarkElectronic = () => {
|
|
105
|
+
const count = 170;
|
|
106
|
+
const w = scene.clientWidth || window.innerWidth;
|
|
107
|
+
const h = scene.clientHeight || window.innerHeight;
|
|
108
|
+
return Array.from({ length: count }).map((_, i) => {
|
|
109
|
+
const r = random(1, 3);
|
|
110
|
+
return {
|
|
111
|
+
x: random(0, w),
|
|
112
|
+
y: random(0, h),
|
|
113
|
+
// slower, more "system-like" motion so the pipe network reads clearly
|
|
114
|
+
vx: (random(-100, 100) / 100) * 0.18,
|
|
115
|
+
vy: (random(-100, 100) / 100) * 0.18,
|
|
116
|
+
r,
|
|
117
|
+
phase: random(0, 628) / 100,
|
|
118
|
+
i,
|
|
119
|
+
// stronger spark makes "nodes" pop
|
|
120
|
+
spark: random(0, 1000) / 1000,
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
// New (light): Prism Bloom — bright prismatic bursts with bloom + gently swirling motion
|
|
125
|
+
const mkParticlesPrismBloom = () => {
|
|
126
|
+
const count = 160;
|
|
127
|
+
const w = scene.clientWidth || window.innerWidth;
|
|
128
|
+
const h = scene.clientHeight || window.innerHeight;
|
|
129
|
+
return Array.from({ length: count }).map((_, i) => {
|
|
130
|
+
const r = random(1, 4);
|
|
131
|
+
return {
|
|
132
|
+
x: random(0, w),
|
|
133
|
+
y: random(0, h),
|
|
134
|
+
vx: (random(-100, 100) / 100) * 0.18,
|
|
135
|
+
vy: (random(-100, 100) / 100) * 0.18,
|
|
136
|
+
r,
|
|
137
|
+
phase: random(0, 628) / 100,
|
|
138
|
+
i,
|
|
139
|
+
// prismatic palette offsets + burst timing
|
|
140
|
+
hueOffset: random(0, 360),
|
|
141
|
+
jitter: random(0, 1000) / 1000,
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
// New (dark): Noir Embers — smoky dark with warm embers + occasional flicker
|
|
146
|
+
const mkParticlesNoirEmbers = () => {
|
|
147
|
+
// Repurposed into a much more eye-catching "full fire" effect:
|
|
148
|
+
// denser, brighter, more turbulent + extra per-particle state for tongues of flame.
|
|
149
|
+
const count = 240;
|
|
150
|
+
const w = scene.clientWidth || window.innerWidth;
|
|
151
|
+
const h = scene.clientHeight || window.innerHeight;
|
|
152
|
+
return Array.from({ length: count }).map((_, i) => {
|
|
153
|
+
const r = random(1, 4);
|
|
154
|
+
return {
|
|
155
|
+
x: random(0, w),
|
|
156
|
+
y: random(h * 0.25, h + 60),
|
|
157
|
+
vx: (random(-100, 100) / 100) * 0.14,
|
|
158
|
+
vy: (random(-100, 100) / 100) * 0.35,
|
|
159
|
+
r,
|
|
160
|
+
phase: random(0, 628) / 100,
|
|
161
|
+
i,
|
|
162
|
+
heat: random(0, 1000) / 1000,
|
|
163
|
+
flicker: random(0, 1000) / 1000,
|
|
164
|
+
// flame "tongue" shape & motion
|
|
165
|
+
curl: random(0, 1000) / 1000,
|
|
166
|
+
life: random(0, 1000) / 1000,
|
|
167
|
+
// small bias so some particles stretch more than others
|
|
168
|
+
stretch: 0.6 + (random(0, 1000) / 1000) * 1.6,
|
|
169
|
+
};
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
const resetParticlesForEffect = () => {
|
|
173
|
+
const eff = Polyhedron.Tokens[id].immersiveEffect || 'waveLight';
|
|
174
|
+
console.error(eff);
|
|
175
|
+
if (eff === 'darkElectronic') Polyhedron.Tokens[id].immersiveParticles = mkParticlesDarkElectronic();
|
|
176
|
+
else if (eff === 'prismBloom') Polyhedron.Tokens[id].immersiveParticles = mkParticlesPrismBloom();
|
|
177
|
+
else if (eff === 'noirEmbers') Polyhedron.Tokens[id].immersiveParticles = mkParticlesNoirEmbers();
|
|
178
|
+
else Polyhedron.Tokens[id].immersiveParticles = mkParticlesWaveLight();
|
|
179
|
+
};
|
|
180
|
+
resetParticlesForEffect();
|
|
181
|
+
Polyhedron.Tokens[id].immersiveStart = performance.now();
|
|
182
|
+
const tick = (t) => {
|
|
183
|
+
if (!Polyhedron.Tokens[id].immersive) return;
|
|
184
|
+
// Keep canvas sized to the scene.
|
|
185
|
+
if (canvas.clientWidth !== scene.clientWidth || canvas.clientHeight !== scene.clientHeight) resize();
|
|
186
|
+
const w2 = canvas.clientWidth || window.innerWidth;
|
|
187
|
+
const h2 = canvas.clientHeight || window.innerHeight;
|
|
188
|
+
const tt = (t - Polyhedron.Tokens[id].immersiveStart) / 1000;
|
|
189
|
+
const eff = Polyhedron.Tokens[id].immersiveEffect || 'waveLight';
|
|
190
|
+
if (eff === 'darkElectronic') {
|
|
191
|
+
// Dark electronic: GREEN PIPES — grid/pipe network with bright green flow + pulsing nodes
|
|
192
|
+
ctx.fillStyle = 'rgba(0,0,0,1)';
|
|
193
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
194
|
+
// Pipe layout (more orthogonal so it reads like piping)
|
|
195
|
+
const base = 120; // green hue
|
|
196
|
+
const step = 52;
|
|
197
|
+
const driftX = Math.sin(tt * 0.35) * 10;
|
|
198
|
+
const driftY = Math.cos(tt * 0.28) * 10;
|
|
199
|
+
// faint background glow to lift the pipes off black
|
|
200
|
+
ctx.globalAlpha = 0.18;
|
|
201
|
+
const bgG = ctx.createRadialGradient(w2 * 0.5, h2 * 0.5, 0, w2 * 0.5, h2 * 0.5, Math.min(w2, h2) * 0.95);
|
|
202
|
+
bgG.addColorStop(0, `hsla(${base}, 90%, 18%, 0.9)`);
|
|
203
|
+
bgG.addColorStop(1, 'rgba(0,0,0,0)');
|
|
204
|
+
ctx.fillStyle = bgG;
|
|
205
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
206
|
+
ctx.globalAlpha = 1;
|
|
207
|
+
// scanlines, very subtle
|
|
208
|
+
ctx.globalAlpha = 0.04;
|
|
209
|
+
ctx.fillStyle = 'rgba(255,255,255,1)';
|
|
210
|
+
for (let y = 0; y < h2; y += 3) ctx.fillRect(0, y, w2, 1);
|
|
211
|
+
ctx.globalAlpha = 1;
|
|
212
|
+
// Pipes: horizontal lines
|
|
213
|
+
ctx.lineWidth = 2;
|
|
214
|
+
for (let y = 0; y <= h2 + step; y += step) {
|
|
215
|
+
const yy = y + (Math.sin(tt * 0.6 + y * 0.02) * 2 + driftY);
|
|
216
|
+
// glow pass
|
|
217
|
+
ctx.globalAlpha = 0.15;
|
|
218
|
+
ctx.strokeStyle = `hsla(${base}, 100%, 70%, 1)`;
|
|
219
|
+
ctx.beginPath();
|
|
220
|
+
ctx.moveTo(0, yy);
|
|
221
|
+
ctx.lineTo(w2, yy);
|
|
222
|
+
ctx.stroke();
|
|
223
|
+
// core pass
|
|
224
|
+
ctx.globalAlpha = 0.35;
|
|
225
|
+
ctx.strokeStyle = `hsla(${base}, 100%, 55%, 1)`;
|
|
226
|
+
ctx.beginPath();
|
|
227
|
+
ctx.moveTo(0, yy);
|
|
228
|
+
ctx.lineTo(w2, yy);
|
|
229
|
+
ctx.stroke();
|
|
230
|
+
}
|
|
231
|
+
ctx.globalAlpha = 1;
|
|
232
|
+
// Pipes: vertical lines
|
|
233
|
+
for (let x = 0; x <= w2 + step; x += step) {
|
|
234
|
+
const xx = x + (Math.cos(tt * 0.55 + x * 0.02) * 2 + driftX);
|
|
235
|
+
// glow pass
|
|
236
|
+
ctx.globalAlpha = 0.15;
|
|
237
|
+
ctx.strokeStyle = `hsla(${base}, 100%, 70%, 1)`;
|
|
238
|
+
ctx.beginPath();
|
|
239
|
+
ctx.moveTo(xx, 0);
|
|
240
|
+
ctx.lineTo(xx, h2);
|
|
241
|
+
ctx.stroke();
|
|
242
|
+
// core pass
|
|
243
|
+
ctx.globalAlpha = 0.35;
|
|
244
|
+
ctx.strokeStyle = `hsla(${base}, 100%, 55%, 1)`;
|
|
245
|
+
ctx.beginPath();
|
|
246
|
+
ctx.moveTo(xx, 0);
|
|
247
|
+
ctx.lineTo(xx, h2);
|
|
248
|
+
ctx.stroke();
|
|
249
|
+
}
|
|
250
|
+
ctx.globalAlpha = 1;
|
|
251
|
+
// Particles as flowing "packets" and junction nodes
|
|
252
|
+
const ps = Polyhedron.Tokens[id].immersiveParticles || [];
|
|
253
|
+
for (const p of ps) {
|
|
254
|
+
// quantize positions toward pipe lanes so motion reads as "through pipes"
|
|
255
|
+
const laneX = Math.round(p.x / step) * step;
|
|
256
|
+
const laneY = Math.round(p.y / step) * step;
|
|
257
|
+
// drift toward nearest lane
|
|
258
|
+
p.x += (laneX - p.x) * 0.04;
|
|
259
|
+
p.y += (laneY - p.y) * 0.04;
|
|
260
|
+
// move slowly along lanes
|
|
261
|
+
p.x += p.vx * 60;
|
|
262
|
+
p.y += p.vy * 60;
|
|
263
|
+
if (p.x < -20) p.x = w2 + 20;
|
|
264
|
+
if (p.x > w2 + 20) p.x = -20;
|
|
265
|
+
if (p.y < -20) p.y = h2 + 20;
|
|
266
|
+
if (p.y > h2 + 20) p.y = -20;
|
|
267
|
+
const sparkle = (0.25 + 0.75 * Math.max(0, Math.sin(tt * 5.2 + p.phase))) * (0.55 + p.spark);
|
|
268
|
+
// packet glow
|
|
269
|
+
ctx.beginPath();
|
|
270
|
+
ctx.fillStyle = `hsla(${base}, 100%, 72%, ${0.08 + sparkle * 0.16})`;
|
|
271
|
+
ctx.arc(p.x, p.y, p.r * 2.6, 0, Math.PI * 2);
|
|
272
|
+
ctx.fill();
|
|
273
|
+
// packet core
|
|
274
|
+
ctx.beginPath();
|
|
275
|
+
ctx.fillStyle = `hsla(${base + 10}, 100%, 62%, ${0.12 + sparkle * 0.22})`;
|
|
276
|
+
ctx.arc(p.x, p.y, Math.max(1, p.r * 1.05), 0, Math.PI * 2);
|
|
277
|
+
ctx.fill();
|
|
278
|
+
}
|
|
279
|
+
// Vignette
|
|
280
|
+
const vg = ctx.createRadialGradient(
|
|
281
|
+
w2 / 2,
|
|
282
|
+
h2 / 2,
|
|
283
|
+
Math.min(w2, h2) * 0.12,
|
|
284
|
+
w2 / 2,
|
|
285
|
+
h2 / 2,
|
|
286
|
+
Math.min(w2, h2) * 0.82,
|
|
287
|
+
);
|
|
288
|
+
vg.addColorStop(0, 'rgba(0,0,0,0)');
|
|
289
|
+
vg.addColorStop(1, 'rgba(0,0,0,0.75)');
|
|
290
|
+
ctx.fillStyle = vg;
|
|
291
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
292
|
+
// Polyhedron motion (calmer so the pipe aesthetic stays readable)
|
|
293
|
+
const drift = 9;
|
|
294
|
+
Polyhedron.Tokens[id].cr[1] += 0.44;
|
|
295
|
+
Polyhedron.Tokens[id].cr[0] += 0.14;
|
|
296
|
+
Polyhedron.Tokens[id].cr[2] += 0.08;
|
|
297
|
+
Polyhedron.Tokens[id].ct[0] = Math.sin(tt * 0.65) * drift;
|
|
298
|
+
Polyhedron.Tokens[id].ct[1] = Math.cos(tt * 0.45) * drift;
|
|
299
|
+
Polyhedron.Tokens[id].ct[2] = Math.sin(tt * 0.35) * (drift * 0.65);
|
|
300
|
+
} else if (eff === 'prismBloom') {
|
|
301
|
+
// Prism Bloom (light): COOL-CORES — soft light/white wave-lite style, slower particles
|
|
302
|
+
const tt2 = tt;
|
|
303
|
+
// cool white background with a gentle wave tint (very subtle blues)
|
|
304
|
+
const bg = ctx.createLinearGradient(0, 0, w2, h2);
|
|
305
|
+
bg.addColorStop(0, `hsla(205, 45%, 96%, 1)`);
|
|
306
|
+
bg.addColorStop(0.5, `hsla(215, 35%, 98%, 1)`);
|
|
307
|
+
bg.addColorStop(1, `hsla(195, 40%, 95%, 1)`);
|
|
308
|
+
ctx.fillStyle = bg;
|
|
309
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
310
|
+
// soft wave bands
|
|
311
|
+
ctx.globalAlpha = 0.12;
|
|
312
|
+
ctx.lineWidth = 2;
|
|
313
|
+
for (let y = 0; y < h2; y += 42) {
|
|
314
|
+
const hueW = 200 + Math.sin(tt2 * 0.35 + y * 0.02) * 10;
|
|
315
|
+
ctx.strokeStyle = `hsla(${hueW}, 55%, 72%, 1)`;
|
|
316
|
+
ctx.beginPath();
|
|
317
|
+
for (let x = 0; x <= w2; x += 28) {
|
|
318
|
+
const yy = y + Math.sin(tt2 * 0.9 + x * 0.02 + y * 0.03) * 10;
|
|
319
|
+
if (x === 0) ctx.moveTo(x, yy);
|
|
320
|
+
else ctx.lineTo(x, yy);
|
|
321
|
+
}
|
|
322
|
+
ctx.stroke();
|
|
323
|
+
}
|
|
324
|
+
ctx.globalAlpha = 1;
|
|
325
|
+
const ps = Polyhedron.Tokens[id].immersiveParticles || [];
|
|
326
|
+
for (const p of ps) {
|
|
327
|
+
// slow drifting, wave-like
|
|
328
|
+
p.x += (p.vx * 0.55 + Math.sin(tt2 * 0.55 + p.phase) * 0.06) * 60;
|
|
329
|
+
p.y += (p.vy * 0.55 + Math.cos(tt2 * 0.45 + p.phase) * 0.06) * 60;
|
|
330
|
+
if (p.x < -30) p.x = w2 + 30;
|
|
331
|
+
if (p.x > w2 + 30) p.x = -30;
|
|
332
|
+
if (p.y < -30) p.y = h2 + 30;
|
|
333
|
+
if (p.y > h2 + 30) p.y = -30;
|
|
334
|
+
const pulse = 0.35 + 0.65 * Math.max(0, Math.sin(tt2 * 1.5 + p.phase + p.jitter * 2));
|
|
335
|
+
// cool core colors (icy blue -> lavender)
|
|
336
|
+
const hueP = (205 + (p.hueOffset % 40) + Math.sin(tt2 * 0.25 + p.phase) * 8) % 360;
|
|
337
|
+
// outer soft glow
|
|
338
|
+
ctx.beginPath();
|
|
339
|
+
ctx.fillStyle = `hsla(${hueP}, 70%, 75%, ${0.06 + pulse * 0.08})`;
|
|
340
|
+
ctx.arc(p.x, p.y, p.r * 3.0, 0, Math.PI * 2);
|
|
341
|
+
ctx.fill();
|
|
342
|
+
// bright cool core
|
|
343
|
+
ctx.beginPath();
|
|
344
|
+
ctx.fillStyle = `hsla(${hueP}, 65%, 86%, ${0.11 + pulse * 0.14})`;
|
|
345
|
+
ctx.arc(p.x, p.y, Math.max(1.0, p.r * 1.1), 0, Math.PI * 2);
|
|
346
|
+
ctx.fill();
|
|
347
|
+
}
|
|
348
|
+
// very light vignette so white background still has depth
|
|
349
|
+
const vg = ctx.createRadialGradient(
|
|
350
|
+
w2 / 2,
|
|
351
|
+
h2 / 2,
|
|
352
|
+
Math.min(w2, h2) * 0.25,
|
|
353
|
+
w2 / 2,
|
|
354
|
+
h2 / 2,
|
|
355
|
+
Math.min(w2, h2) * 0.95,
|
|
356
|
+
);
|
|
357
|
+
vg.addColorStop(0, 'rgba(255,255,255,0)');
|
|
358
|
+
vg.addColorStop(1, 'rgba(30,40,60,0.16)');
|
|
359
|
+
ctx.fillStyle = vg;
|
|
360
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
361
|
+
const drift = 8;
|
|
362
|
+
Polyhedron.Tokens[id].cr[1] += 0.34;
|
|
363
|
+
Polyhedron.Tokens[id].cr[0] += 0.11;
|
|
364
|
+
Polyhedron.Tokens[id].ct[0] = Math.sin(tt2 * 0.6) * drift;
|
|
365
|
+
Polyhedron.Tokens[id].ct[1] = Math.cos(tt2 * 0.45) * drift;
|
|
366
|
+
Polyhedron.Tokens[id].ct[2] = Math.sin(tt2 * 0.38) * (drift * 0.6);
|
|
367
|
+
} else if (eff === 'noirEmbers') {
|
|
368
|
+
// FULL FIRE (replaces Noir Embers): bright, high-intensity flame field + hot cores + tongues of fire.
|
|
369
|
+
// Goal: unmistakably "on fire" and eye-catching, not a subtle ember drift.
|
|
370
|
+
ctx.fillStyle = 'rgba(0,0,0,1)';
|
|
371
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
372
|
+
// Base flame bed (glowing furnace at the bottom)
|
|
373
|
+
const bed = ctx.createRadialGradient(w2 * 0.5, h2 * 1.05, 0, w2 * 0.5, h2 * 1.05, Math.min(w2, h2) * 1.05);
|
|
374
|
+
bed.addColorStop(0, 'hsla(38, 100%, 55%, 0.85)');
|
|
375
|
+
bed.addColorStop(0.35, 'hsla(18, 100%, 42%, 0.65)');
|
|
376
|
+
bed.addColorStop(0.8, 'hsla(8, 100%, 18%, 0.25)');
|
|
377
|
+
bed.addColorStop(1, 'rgba(0,0,0,0)');
|
|
378
|
+
ctx.globalAlpha = 0.9;
|
|
379
|
+
ctx.fillStyle = bed;
|
|
380
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
381
|
+
ctx.globalAlpha = 1;
|
|
382
|
+
// Heat haze / smoke-lace near the top to add depth (still subtle, fire stays dominant)
|
|
383
|
+
const haze = ctx.createLinearGradient(0, 0, 0, h2);
|
|
384
|
+
haze.addColorStop(0, 'rgba(0,0,0,0.55)');
|
|
385
|
+
haze.addColorStop(0.35, 'rgba(0,0,0,0.18)');
|
|
386
|
+
haze.addColorStop(1, 'rgba(0,0,0,0)');
|
|
387
|
+
ctx.globalAlpha = 0.55;
|
|
388
|
+
ctx.fillStyle = haze;
|
|
389
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
390
|
+
ctx.globalAlpha = 1;
|
|
391
|
+
// Flame tongues + sparks
|
|
392
|
+
const ps = Polyhedron.Tokens[id].immersiveParticles || [];
|
|
393
|
+
for (const p of ps) {
|
|
394
|
+
// life cycles: respawn near bottom with new heat/curl to keep it lively
|
|
395
|
+
p.life += 0.012 + p.flicker * 0.01;
|
|
396
|
+
if (p.life >= 1 || p.y < -80) {
|
|
397
|
+
p.x = random(-20, w2 + 20);
|
|
398
|
+
p.y = random(h2 * 0.45, h2 + 80);
|
|
399
|
+
p.vx = (random(-100, 100) / 100) * 0.16;
|
|
400
|
+
p.vy = (random(-100, 100) / 100) * 0.42;
|
|
401
|
+
p.heat = random(0, 1000) / 1000;
|
|
402
|
+
p.flicker = random(0, 1000) / 1000;
|
|
403
|
+
p.curl = random(0, 1000) / 1000;
|
|
404
|
+
p.life = 0;
|
|
405
|
+
p.stretch = 0.6 + (random(0, 1000) / 1000) * 1.6;
|
|
406
|
+
}
|
|
407
|
+
// Rising motion + turbulence (tongues curl side to side)
|
|
408
|
+
const curl = Math.sin(tt * (1.8 + p.curl * 1.6) + p.phase) * (0.12 + p.curl * 0.18);
|
|
409
|
+
const wag = Math.sin(tt * 6.5 + p.phase + p.flicker * 10) * 0.06;
|
|
410
|
+
p.x += (p.vx + curl + wag) * 60;
|
|
411
|
+
p.y -= (0.25 + Math.abs(p.vy)) * 58;
|
|
412
|
+
if (p.x < -60) p.x = w2 + 60;
|
|
413
|
+
if (p.x > w2 + 60) p.x = -60;
|
|
414
|
+
// Intensity ramps up then tapers (flame tongue shape)
|
|
415
|
+
const ramp = Math.sin(Math.min(1, p.life) * Math.PI); // 0..1..0
|
|
416
|
+
const flick = 0.45 + 0.55 * Math.max(0, Math.sin(tt * (8 + p.flicker * 7) + p.phase));
|
|
417
|
+
const heat = 0.25 + 0.75 * p.heat;
|
|
418
|
+
// Color: deep red -> orange -> yellow-white hot core
|
|
419
|
+
const hueP = 10 + heat * 35; // 10..45
|
|
420
|
+
const lumCore = 70 + heat * 20; // 70..90
|
|
421
|
+
const lumGlow = 45 + heat * 20; // 45..65
|
|
422
|
+
// Tongue body (stretched vertical glow)
|
|
423
|
+
const tongueH = (14 + heat * 34) * p.stretch * (0.5 + ramp);
|
|
424
|
+
const tongueW = (3 + heat * 4) * (0.7 + ramp);
|
|
425
|
+
ctx.globalAlpha = 0.06 + ramp * 0.16;
|
|
426
|
+
ctx.fillStyle = `hsla(${hueP}, 100%, ${lumGlow}%, 1)`;
|
|
427
|
+
ctx.beginPath();
|
|
428
|
+
ctx.ellipse(p.x, p.y, tongueW * 2.2, tongueH * 1.05, 0, 0, Math.PI * 2);
|
|
429
|
+
ctx.fill();
|
|
430
|
+
ctx.globalAlpha = 1;
|
|
431
|
+
// Hot core
|
|
432
|
+
ctx.beginPath();
|
|
433
|
+
ctx.fillStyle = `hsla(${hueP + 8}, 100%, ${lumCore}%, ${0.1 + ramp * 0.22 * flick})`;
|
|
434
|
+
ctx.arc(p.x, p.y, Math.max(1.2, p.r * (1.2 + heat * 0.9)), 0, Math.PI * 2);
|
|
435
|
+
ctx.fill();
|
|
436
|
+
// White-hot sparkles (a few particles become bright sparks)
|
|
437
|
+
const sparkChance = p.i % 9 === 0 ? 1 : 0;
|
|
438
|
+
if (sparkChance) {
|
|
439
|
+
ctx.beginPath();
|
|
440
|
+
ctx.fillStyle = `hsla(55, 100%, 92%, ${0.08 + ramp * 0.22 * flick})`;
|
|
441
|
+
ctx.arc(p.x + curl * 80, p.y - ramp * 18, Math.max(0.8, p.r * 0.75), 0, Math.PI * 2);
|
|
442
|
+
ctx.fill();
|
|
443
|
+
// tiny upward streak
|
|
444
|
+
ctx.globalAlpha = 0.06 + ramp * 0.12;
|
|
445
|
+
ctx.strokeStyle = `hsla(48, 100%, 85%, 1)`;
|
|
446
|
+
ctx.lineWidth = 1;
|
|
447
|
+
ctx.beginPath();
|
|
448
|
+
ctx.moveTo(p.x, p.y);
|
|
449
|
+
ctx.lineTo(p.x + curl * 50, p.y - 22 - heat * 18);
|
|
450
|
+
ctx.stroke();
|
|
451
|
+
ctx.globalAlpha = 1;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
// Stronger vignette to keep fire contrast & "cinematic" intensity
|
|
455
|
+
const vg = ctx.createRadialGradient(
|
|
456
|
+
w2 / 2,
|
|
457
|
+
h2 / 2,
|
|
458
|
+
Math.min(w2, h2) * 0.12,
|
|
459
|
+
w2 / 2,
|
|
460
|
+
h2 / 2,
|
|
461
|
+
Math.min(w2, h2) * 0.92,
|
|
462
|
+
);
|
|
463
|
+
vg.addColorStop(0, 'rgba(0,0,0,0)');
|
|
464
|
+
vg.addColorStop(1, 'rgba(0,0,0,0.78)');
|
|
465
|
+
ctx.fillStyle = vg;
|
|
466
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
467
|
+
// Slightly more energetic polyhedron motion to match the intensity
|
|
468
|
+
const drift = 9;
|
|
469
|
+
Polyhedron.Tokens[id].cr[1] += 0.46;
|
|
470
|
+
Polyhedron.Tokens[id].cr[0] += 0.15;
|
|
471
|
+
Polyhedron.Tokens[id].cr[2] += 0.08;
|
|
472
|
+
Polyhedron.Tokens[id].ct[0] = Math.sin(tt * 0.7) * drift;
|
|
473
|
+
Polyhedron.Tokens[id].ct[1] = Math.cos(tt * 0.5) * drift;
|
|
474
|
+
Polyhedron.Tokens[id].ct[2] = Math.sin(tt * 0.42) * (drift * 0.65);
|
|
475
|
+
} else {
|
|
476
|
+
// Wave light: animated gradient + soft floaty particles (brighter particles)
|
|
477
|
+
const hueA = (tt * 18 + Polyhedron.Tokens[id].immersiveSeed) % 360;
|
|
478
|
+
const hueB = (hueA + 90) % 360;
|
|
479
|
+
const g = ctx.createLinearGradient(0, 0, w2, h2);
|
|
480
|
+
g.addColorStop(0, `hsla(${hueA}, 78%, 12%, 1)`);
|
|
481
|
+
g.addColorStop(1, `hsla(${hueB}, 78%, 12%, 1)`);
|
|
482
|
+
ctx.fillStyle = g;
|
|
483
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
484
|
+
const ps = Polyhedron.Tokens[id].immersiveParticles || [];
|
|
485
|
+
for (const p of ps) {
|
|
486
|
+
p.x += p.vx * 60;
|
|
487
|
+
p.y += p.vy * 60;
|
|
488
|
+
if (p.x < -10) p.x = w2 + 10;
|
|
489
|
+
if (p.x > w2 + 10) p.x = -10;
|
|
490
|
+
if (p.y < -10) p.y = h2 + 10;
|
|
491
|
+
if (p.y > h2 + 10) p.y = -10;
|
|
492
|
+
const alpha = 0.22 + 0.16 * Math.sin(tt * 1.7 + p.phase);
|
|
493
|
+
const hue = (hueA + p.i * 2) % 360;
|
|
494
|
+
// glow
|
|
495
|
+
ctx.beginPath();
|
|
496
|
+
ctx.fillStyle = `hsla(${hue}, 95%, 78%, ${alpha * 0.45})`;
|
|
497
|
+
ctx.arc(p.x, p.y, p.r * 2.4, 0, Math.PI * 2);
|
|
498
|
+
ctx.fill();
|
|
499
|
+
// core
|
|
500
|
+
ctx.beginPath();
|
|
501
|
+
ctx.fillStyle = `hsla(${hue}, 90%, 72%, ${alpha})`;
|
|
502
|
+
ctx.arc(p.x, p.y, p.r, 0, Math.PI * 2);
|
|
503
|
+
ctx.fill();
|
|
504
|
+
}
|
|
505
|
+
const vg = ctx.createRadialGradient(
|
|
506
|
+
w2 / 2,
|
|
507
|
+
h2 / 2,
|
|
508
|
+
Math.min(w2, h2) * 0.15,
|
|
509
|
+
w2 / 2,
|
|
510
|
+
h2 / 2,
|
|
511
|
+
Math.min(w2, h2) * 0.75,
|
|
512
|
+
);
|
|
513
|
+
vg.addColorStop(0, 'rgba(0,0,0,0)');
|
|
514
|
+
vg.addColorStop(1, 'rgba(0,0,0,0.55)');
|
|
515
|
+
ctx.fillStyle = vg;
|
|
516
|
+
ctx.fillRect(0, 0, w2, h2);
|
|
517
|
+
const drift = 8;
|
|
518
|
+
Polyhedron.Tokens[id].cr[1] += 0.35;
|
|
519
|
+
Polyhedron.Tokens[id].cr[0] += 0.12;
|
|
520
|
+
Polyhedron.Tokens[id].ct[0] = Math.sin(tt * 0.6) * drift;
|
|
521
|
+
Polyhedron.Tokens[id].ct[1] = Math.cos(tt * 0.45) * drift;
|
|
522
|
+
Polyhedron.Tokens[id].ct[2] = Math.sin(tt * 0.35) * (drift * 0.6);
|
|
523
|
+
}
|
|
524
|
+
// Keep face backgrounds synced to current face pixel sizing
|
|
525
|
+
// (important when immersive resize happens).
|
|
526
|
+
applyAllFaceBackgrounds();
|
|
527
|
+
// Apply transformation now (outside the 200ms interval) for smooth motion.
|
|
528
|
+
if (s(`.polyhedron-${id}`)) renderTransform();
|
|
529
|
+
Polyhedron.Tokens[id].immersiveRAF = requestAnimationFrame(tick);
|
|
530
|
+
};
|
|
531
|
+
if (Polyhedron.Tokens[id].immersiveRAF) cancelAnimationFrame(Polyhedron.Tokens[id].immersiveRAF);
|
|
532
|
+
Polyhedron.Tokens[id].immersiveRAF = requestAnimationFrame(tick);
|
|
533
|
+
// Resize handler while immersive
|
|
534
|
+
const onResize = () => {
|
|
535
|
+
if (!Polyhedron.Tokens[id].immersive) return;
|
|
536
|
+
resize();
|
|
537
|
+
};
|
|
538
|
+
window.removeEventListener('resize', onResize);
|
|
539
|
+
window.addEventListener('resize', onResize);
|
|
540
|
+
Polyhedron.Tokens[id].immersiveOnResize = onResize;
|
|
541
|
+
// Expose reset so the effect toggle can rebuild particles quickly.
|
|
542
|
+
Polyhedron.Tokens[id]._resetImmersiveParticles = resetParticlesForEffect;
|
|
543
|
+
};
|
|
544
|
+
const stopImmersiveEffects = () => {
|
|
545
|
+
if (Polyhedron.Tokens[id].immersiveRAF) cancelAnimationFrame(Polyhedron.Tokens[id].immersiveRAF);
|
|
546
|
+
Polyhedron.Tokens[id].immersiveRAF = null;
|
|
547
|
+
Polyhedron.Tokens[id].immersiveParticles = null;
|
|
548
|
+
if (Polyhedron.Tokens[id].immersiveOnResize) {
|
|
549
|
+
window.removeEventListener('resize', Polyhedron.Tokens[id].immersiveOnResize);
|
|
550
|
+
Polyhedron.Tokens[id].immersiveOnResize = null;
|
|
551
|
+
}
|
|
552
|
+
// Clear + hide canvas so the last rendered frame is not left visible.
|
|
553
|
+
const canvas = s(`.polyhedron-immersive-canvas-${id}`);
|
|
554
|
+
if (canvas) {
|
|
555
|
+
const ctx = canvas.getContext('2d');
|
|
556
|
+
if (ctx) ctx.clearRect(0, 0, canvas.width || 0, canvas.height || 0);
|
|
557
|
+
canvas.style.display = 'none';
|
|
558
|
+
}
|
|
559
|
+
// Reset drift so manual controls feel normal again
|
|
560
|
+
Polyhedron.Tokens[id].ct = [0, 0, 0];
|
|
561
|
+
};
|
|
562
|
+
const setImmersive = (isImmersive) => {
|
|
563
|
+
Polyhedron.Tokens[id].immersive = !!isImmersive;
|
|
564
|
+
const scene = s(`.scene-${id}`);
|
|
565
|
+
if (!scene) return;
|
|
566
|
+
if (Polyhedron.Tokens[id].immersive) {
|
|
567
|
+
scene.classList.add(`scene-immersive-${id}`);
|
|
568
|
+
startImmersiveEffects();
|
|
569
|
+
} else {
|
|
570
|
+
scene.classList.remove(`scene-immersive-${id}`);
|
|
571
|
+
stopImmersiveEffects();
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
const renderTransform = () => {
|
|
575
|
+
s(`.polyhedron-${id}`).style.transform =
|
|
576
|
+
`rotateX(${Polyhedron.Tokens[id].cr[0]}deg) rotateY(${Polyhedron.Tokens[id].cr[1]}deg) rotateZ(${Polyhedron.Tokens[id].cr[2]}deg)
|
|
577
|
+
translateX(${Polyhedron.Tokens[id].ct[0]}px) translateY(${Polyhedron.Tokens[id].ct[1]}px) translateZ(${Polyhedron.Tokens[id].ct[2]}px)`;
|
|
578
|
+
s(`.polyhedron-${id}`).style.left = `${s(`.scene-${id}`).offsetWidth / 2 - Polyhedron.Tokens[id].dim / 2}px`;
|
|
579
|
+
s(`.polyhedron-${id}`).style.top = `${s(`.scene-${id}`).offsetHeight / 2 - Polyhedron.Tokens[id].dim / 2}px`;
|
|
580
|
+
s(`.polyhedron-${id}`).style.width = `${Polyhedron.Tokens[id].dim}px`;
|
|
581
|
+
s(`.polyhedron-${id}`).style.height = `${Polyhedron.Tokens[id].dim}px`;
|
|
582
|
+
/* rotate Y */
|
|
583
|
+
s(`.face_front-${id}`).style.transform = `rotateY(0deg) translateZ(${Polyhedron.Tokens[id].dim / 2}px)`;
|
|
584
|
+
s(`.face_back-${id}`).style.transform = `rotateY(-180deg) translateZ(${Polyhedron.Tokens[id].dim / 2}px)`;
|
|
585
|
+
s(`.face_left-${id}`).style.transform = `rotateY(90deg) translateZ(${Polyhedron.Tokens[id].dim / 2}px)`;
|
|
586
|
+
s(`.face_right-${id}`).style.transform = `rotateY(-90deg) translateZ(${Polyhedron.Tokens[id].dim / 2}px)`;
|
|
587
|
+
/* rotate X */
|
|
588
|
+
s(`.face_top-${id}`).style.transform = `rotateX(-90deg) translateZ(${Polyhedron.Tokens[id].dim / 2}px)`;
|
|
589
|
+
s(`.face_bottom-${id}`).style.transform = `rotateX(90deg) translateZ(${Polyhedron.Tokens[id].dim / 2}px)`;
|
|
590
|
+
};
|
|
591
|
+
if (Polyhedron.Tokens[id].interval) clearInterval(Polyhedron.Tokens[id].interval);
|
|
592
|
+
Polyhedron.Tokens[id].interval = setInterval(() => {
|
|
593
|
+
if (s(`.polyhedron-${id}`)) renderTransform();
|
|
594
|
+
else return clearInterval(Polyhedron.Tokens[id].interval);
|
|
595
|
+
}, 200);
|
|
596
|
+
setTimeout(() => {
|
|
597
|
+
renderTransform();
|
|
598
|
+
s(`.polyhedron-${id}`).style.transition = `.4s`;
|
|
599
|
+
applyAllFaceBackgrounds();
|
|
600
|
+
applyFaceOpacity();
|
|
601
|
+
setImmersive(Polyhedron.Tokens[id].immersive);
|
|
602
|
+
s(`.btn-polyhedron-rotate-down-${id}`).onclick = () => {
|
|
603
|
+
Polyhedron.Tokens[id].cr[0] += 45;
|
|
604
|
+
};
|
|
605
|
+
s(`.btn-polyhedron-rotate-up-${id}`).onclick = () => {
|
|
606
|
+
Polyhedron.Tokens[id].cr[0] -= 45;
|
|
607
|
+
};
|
|
608
|
+
s(`.btn-polyhedron-rotate-left-${id}`).onclick = () => {
|
|
609
|
+
Polyhedron.Tokens[id].cr[1] += 45;
|
|
610
|
+
};
|
|
611
|
+
s(`.btn-polyhedron-rotate-right-${id}`).onclick = () => {
|
|
612
|
+
Polyhedron.Tokens[id].cr[1] -= 45;
|
|
613
|
+
};
|
|
614
|
+
s(`.btn-polyhedron-add-zoom-${id}`).onclick = () => {
|
|
615
|
+
Polyhedron.Tokens[id].dim += 25;
|
|
616
|
+
};
|
|
617
|
+
s(`.btn-polyhedron-remove-zoom-${id}`).onclick = () => {
|
|
618
|
+
Polyhedron.Tokens[id].dim -= 25;
|
|
619
|
+
};
|
|
620
|
+
const facePicker = s(`.polyhedron-face-picker-${id}`);
|
|
621
|
+
if (facePicker) {
|
|
622
|
+
// Keep UI and state in sync on re-render
|
|
623
|
+
facePicker.value = Polyhedron.Tokens[id].chosenFace || 'front';
|
|
624
|
+
facePicker.onchange = (e) => {
|
|
625
|
+
Polyhedron.Tokens[id].chosenFace = e?.target?.value || 'front';
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
const opacitySlider = s(`.polyhedron-face-opacity-${id}`);
|
|
629
|
+
if (opacitySlider) {
|
|
630
|
+
// Keep UI and state in sync on re-render
|
|
631
|
+
opacitySlider.value = `${Polyhedron.Tokens[id].faceOpacity}`;
|
|
632
|
+
opacitySlider.oninput = (e) => {
|
|
633
|
+
const v = parseFloat(e?.target?.value);
|
|
634
|
+
Polyhedron.Tokens[id].faceOpacity = Number.isFinite(v) ? Math.max(0, Math.min(1, v)) : 1;
|
|
635
|
+
applyFaceOpacity();
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
const fileInput = s(`.polyhedron-face-image-file-${id}`);
|
|
639
|
+
if (fileInput) {
|
|
640
|
+
fileInput.onchange = (e) => {
|
|
641
|
+
const file = e?.target?.files?.[0];
|
|
642
|
+
if (!file) return;
|
|
643
|
+
const url = URL.createObjectURL(file);
|
|
644
|
+
const face = Polyhedron.Tokens[id].chosenFace || 'front';
|
|
645
|
+
if (face === 'all') {
|
|
646
|
+
['front', 'back', 'left', 'right', 'top', 'bottom'].forEach((f) => {
|
|
647
|
+
Polyhedron.Tokens[id].faces[f] = url;
|
|
648
|
+
});
|
|
649
|
+
applyAllFaceBackgrounds();
|
|
650
|
+
} else {
|
|
651
|
+
Polyhedron.Tokens[id].faces[face] = url;
|
|
652
|
+
applyFaceBackground(face);
|
|
653
|
+
}
|
|
654
|
+
fileInput.value = '';
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
const clearFaceBtn = s(`.btn-polyhedron-clear-face-image-${id}`);
|
|
658
|
+
if (clearFaceBtn) {
|
|
659
|
+
clearFaceBtn.onclick = () => {
|
|
660
|
+
const face = Polyhedron.Tokens[id].chosenFace || 'front';
|
|
661
|
+
if (face === 'all') {
|
|
662
|
+
['front', 'back', 'left', 'right', 'top', 'bottom'].forEach((f) => {
|
|
663
|
+
Polyhedron.Tokens[id].faces[f] = null;
|
|
664
|
+
});
|
|
665
|
+
applyAllFaceBackgrounds();
|
|
666
|
+
} else {
|
|
667
|
+
Polyhedron.Tokens[id].faces[face] = null;
|
|
668
|
+
applyFaceBackground(face);
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
const immersiveBtn = s(`.btn-polyhedron-immersive-${id}`);
|
|
673
|
+
if (immersiveBtn) {
|
|
674
|
+
immersiveBtn.onclick = () => setImmersive(!Polyhedron.Tokens[id].immersive);
|
|
675
|
+
}
|
|
676
|
+
const immersiveExitBtn = s(`.btn-polyhedron-immersive-exit-${id}`);
|
|
677
|
+
if (immersiveExitBtn) {
|
|
678
|
+
immersiveExitBtn.onclick = () => setImmersive(false);
|
|
679
|
+
}
|
|
680
|
+
const immersiveEffectBtn = s(`.btn-polyhedron-immersive-effect-${id}`);
|
|
681
|
+
if (immersiveEffectBtn) {
|
|
682
|
+
immersiveEffectBtn.onclick = () => {
|
|
683
|
+
const order = ['waveLight', 'prismBloom', 'darkElectronic', 'noirEmbers'];
|
|
684
|
+
const curr = Polyhedron.Tokens[id].immersiveEffect || 'waveLight';
|
|
685
|
+
const idx = order.indexOf(curr);
|
|
686
|
+
Polyhedron.Tokens[id].immersiveEffect = order[(idx + 1) % order.length] || 'waveLight';
|
|
687
|
+
if (Polyhedron.Tokens[id].immersive && Polyhedron.Tokens[id]._resetImmersiveParticles)
|
|
688
|
+
Polyhedron.Tokens[id]._resetImmersiveParticles();
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
const escHandler = (ev) => {
|
|
692
|
+
if (ev?.key === 'Escape' && Polyhedron.Tokens[id].immersive) setImmersive(false);
|
|
693
|
+
};
|
|
694
|
+
document.removeEventListener('keydown', escHandler);
|
|
695
|
+
document.addEventListener('keydown', escHandler);
|
|
696
|
+
});
|
|
697
|
+
return html`
|
|
698
|
+
<style>
|
|
699
|
+
.scene-${id} {
|
|
700
|
+
background: #c7c7c7;
|
|
701
|
+
overflow: hidden;
|
|
702
|
+
padding-bottom: 400px;
|
|
703
|
+
box-sizing: border-box;
|
|
704
|
+
/* perspective: 10000px; */
|
|
705
|
+
position: relative;
|
|
706
|
+
}
|
|
707
|
+
.polyhedron-${id} {
|
|
708
|
+
transform-style: preserve-3d;
|
|
709
|
+
cursor: pointer;
|
|
710
|
+
}
|
|
711
|
+
.face-${id} {
|
|
712
|
+
width: 100%;
|
|
713
|
+
height: 100%;
|
|
714
|
+
background-position: center center;
|
|
715
|
+
background-repeat: no-repeat;
|
|
716
|
+
/* default; JS may override with exact px sizing to match face dimensions */
|
|
717
|
+
background-size: cover;
|
|
718
|
+
/* avoid “quarter visible” artifacts in some browsers when faces rotate in 3D */
|
|
719
|
+
background-origin: border-box;
|
|
720
|
+
background-clip: border-box;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
@keyframes polyhedronImmersiveIn-${id} {
|
|
724
|
+
0% {
|
|
725
|
+
opacity: 0;
|
|
726
|
+
transform: scale(0.98);
|
|
727
|
+
filter: blur(6px) saturate(1.1);
|
|
728
|
+
}
|
|
729
|
+
100% {
|
|
730
|
+
opacity: 1;
|
|
731
|
+
transform: scale(1);
|
|
732
|
+
filter: blur(0px) saturate(1);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.scene-immersive-${id} {
|
|
737
|
+
position: fixed !important;
|
|
738
|
+
inset: 0 !important;
|
|
739
|
+
width: 100vw !important;
|
|
740
|
+
height: 100vh !important;
|
|
741
|
+
z-index: 100 !important;
|
|
742
|
+
background: #000 !important;
|
|
743
|
+
animation: polyhedronImmersiveIn-${id} 500ms ease both;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/* Hide face labels while immersive */
|
|
747
|
+
.scene-immersive-${id} .center {
|
|
748
|
+
display: none !important;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.polyhedron-immersive-canvas-${id} {
|
|
752
|
+
position: absolute;
|
|
753
|
+
inset: 0;
|
|
754
|
+
width: 100%;
|
|
755
|
+
height: 100%;
|
|
756
|
+
z-index: 0;
|
|
757
|
+
pointer-events: none;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.polyhedron-${id} {
|
|
761
|
+
position: relative;
|
|
762
|
+
z-index: 2;
|
|
763
|
+
will-change: transform;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/* Exit + effect buttons are only visible in immersive mode */
|
|
767
|
+
.scene-immersive-exit-${id} {
|
|
768
|
+
display: none;
|
|
769
|
+
position: absolute;
|
|
770
|
+
right: 12px;
|
|
771
|
+
bottom: 12px;
|
|
772
|
+
z-index: 5;
|
|
773
|
+
padding: 6px 10px;
|
|
774
|
+
border-radius: 999px;
|
|
775
|
+
background: rgba(0, 0, 0, 0.35);
|
|
776
|
+
color: rgba(255, 255, 255, 0.85);
|
|
777
|
+
border: 1px solid rgba(255, 255, 255, 0.18);
|
|
778
|
+
backdrop-filter: blur(6px);
|
|
779
|
+
font-size: 12px;
|
|
780
|
+
line-height: 1;
|
|
781
|
+
cursor: pointer;
|
|
782
|
+
transition: 180ms ease;
|
|
783
|
+
user-select: none;
|
|
784
|
+
}
|
|
785
|
+
.scene-immersive-${id} .scene-immersive-exit-${id} {
|
|
786
|
+
display: inline-flex;
|
|
787
|
+
align-items: center;
|
|
788
|
+
justify-content: center;
|
|
789
|
+
}
|
|
790
|
+
.scene-immersive-exit-${id}:hover {
|
|
791
|
+
background: rgba(0, 0, 0, 0.55);
|
|
792
|
+
border-color: rgba(255, 255, 255, 0.28);
|
|
793
|
+
color: rgba(255, 255, 255, 0.95);
|
|
794
|
+
transform: translateY(-1px);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.scene-immersive-effect-${id} {
|
|
798
|
+
display: none;
|
|
799
|
+
position: absolute;
|
|
800
|
+
right: 74px;
|
|
801
|
+
bottom: 12px;
|
|
802
|
+
z-index: 5;
|
|
803
|
+
width: 34px;
|
|
804
|
+
height: 26px;
|
|
805
|
+
border-radius: 999px;
|
|
806
|
+
background: rgba(0, 0, 0, 0.30);
|
|
807
|
+
color: rgba(255, 255, 255, 0.82);
|
|
808
|
+
border: 1px solid rgba(255, 255, 255, 0.16);
|
|
809
|
+
backdrop-filter: blur(6px);
|
|
810
|
+
font-size: 12px;
|
|
811
|
+
line-height: 1;
|
|
812
|
+
cursor: pointer;
|
|
813
|
+
transition: 180ms ease;
|
|
814
|
+
user-select: none;
|
|
815
|
+
}
|
|
816
|
+
.scene-immersive-${id} .scene-immersive-effect-${id} {
|
|
817
|
+
display: inline-flex;
|
|
818
|
+
align-items: center;
|
|
819
|
+
justify-content: center;
|
|
820
|
+
}
|
|
821
|
+
.scene-immersive-effect-${id}:hover {
|
|
822
|
+
background: rgba(0, 0, 0, 0.52);
|
|
823
|
+
border-color: rgba(255, 255, 255, 0.26);
|
|
824
|
+
color: rgba(255, 255, 255, 0.95);
|
|
825
|
+
transform: translateY(-1px);
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
${options?.style?.face
|
|
829
|
+
? css`
|
|
830
|
+
.face-${id} {
|
|
831
|
+
${Object.keys(options.style.face)
|
|
832
|
+
.map((styleKey) => `${styleKey} : ${options.style.face[styleKey]};`)
|
|
833
|
+
.join('')}
|
|
834
|
+
}
|
|
835
|
+
`
|
|
836
|
+
: css``}
|
|
837
|
+
${options?.style?.scene
|
|
838
|
+
? css`
|
|
839
|
+
.scene-${id} {
|
|
840
|
+
${Object.keys(options.style.scene)
|
|
841
|
+
.map((styleKey) => `${styleKey} : ${options.style.scene[styleKey]};`)
|
|
842
|
+
.join('')}
|
|
843
|
+
}
|
|
844
|
+
`
|
|
845
|
+
: css``}
|
|
846
|
+
</style>
|
|
847
|
+
<!--
|
|
848
|
+
<style class="polyhedron-animation-${id}"></style>
|
|
849
|
+
-->
|
|
850
|
+
|
|
851
|
+
${dynamicCol({ containerSelector: options.idModal, id: `polyhedron-${id}` })}
|
|
852
|
+
<div class="fl">
|
|
853
|
+
<div class="in fll polyhedron-${id}-col-a">
|
|
854
|
+
<div class="in section-mp">
|
|
855
|
+
<div class="in sub-title-modal"><i class="fa-solid fa-arrows-spin"></i> Rotate</div>
|
|
856
|
+
${await BtnIcon.instance({
|
|
857
|
+
class: `inl section-mp btn-custom btn-polyhedron-rotate-up-${id}`,
|
|
858
|
+
label: html`<i class="fa-solid fa-angle-up"></i>`,
|
|
859
|
+
})}
|
|
860
|
+
${await BtnIcon.instance({
|
|
861
|
+
class: `inl section-mp btn-custom btn-polyhedron-rotate-down-${id}`,
|
|
862
|
+
label: html`<i class="fa-solid fa-angle-down"></i>`,
|
|
863
|
+
})}
|
|
864
|
+
${await BtnIcon.instance({
|
|
865
|
+
class: `inl section-mp btn-custom btn-polyhedron-rotate-left-${id}`,
|
|
866
|
+
label: html`<i class="fa-solid fa-angle-left"></i>`,
|
|
867
|
+
})}
|
|
868
|
+
${await BtnIcon.instance({
|
|
869
|
+
class: `inl section-mp btn-custom btn-polyhedron-rotate-right-${id}`,
|
|
870
|
+
label: html`<i class="fa-solid fa-angle-right"></i>`,
|
|
871
|
+
})}
|
|
872
|
+
|
|
873
|
+
<div class="in sub-title-modal"><i class="fa-solid fa-magnifying-glass"></i> Zoom</div>
|
|
874
|
+
${await BtnIcon.instance({
|
|
875
|
+
class: `inl section-mp btn-custom btn-polyhedron-add-zoom-${id}`,
|
|
876
|
+
label: html`<i class="fa-solid fa-plus"></i>`,
|
|
877
|
+
})}
|
|
878
|
+
${await BtnIcon.instance({
|
|
879
|
+
class: `inl section-mp btn-custom btn-polyhedron-remove-zoom-${id}`,
|
|
880
|
+
label: html`<i class="fa-solid fa-minus"></i>`,
|
|
881
|
+
})}
|
|
882
|
+
|
|
883
|
+
<div class="in sub-title-modal"><i class="fa-solid fa-droplet"></i> Face opacity</div>
|
|
884
|
+
<input
|
|
885
|
+
class="in polyhedron-face-opacity-${id}"
|
|
886
|
+
type="range"
|
|
887
|
+
min="0"
|
|
888
|
+
max="1"
|
|
889
|
+
step="0.01"
|
|
890
|
+
value="${Polyhedron.Tokens[id].faceOpacity}"
|
|
891
|
+
title="Face opacity"
|
|
892
|
+
/>
|
|
893
|
+
|
|
894
|
+
<div class="in sub-title-modal"><i class="fa-solid fa-image"></i> Face image</div>
|
|
895
|
+
|
|
896
|
+
<select class="in polyhedron-face-picker-${id}">
|
|
897
|
+
<option value="all">all</option>
|
|
898
|
+
<option value="front">front</option>
|
|
899
|
+
<option value="back">back</option>
|
|
900
|
+
<option value="left">left</option>
|
|
901
|
+
<option value="right">right</option>
|
|
902
|
+
<option value="top">top</option>
|
|
903
|
+
<option value="bottom">bottom</option>
|
|
904
|
+
</select>
|
|
905
|
+
<input class="in polyhedron-face-image-file-${id}" type="file" accept="image/*" />
|
|
906
|
+
${await BtnIcon.instance({
|
|
907
|
+
class: `inl section-mp btn-custom btn-polyhedron-clear-face-image-${id}`,
|
|
908
|
+
label: html`<i class="fa-solid fa-eraser"></i> ${Translate.instance('clear')}`,
|
|
909
|
+
})}
|
|
910
|
+
${await BtnIcon.instance({
|
|
911
|
+
class: `inl section-mp btn-custom btn-polyhedron-immersive-${id}`,
|
|
912
|
+
label: html`<i class="fa-solid fa-expand"></i> Immersive`,
|
|
913
|
+
})}
|
|
914
|
+
</div>
|
|
915
|
+
</div>
|
|
916
|
+
<div class="in fll polyhedron-${id}-col-b">
|
|
917
|
+
<div class="in section-mp">
|
|
918
|
+
<div class="in sub-title-modal"><i class="fa-solid fa-vector-square"></i> instance</div>
|
|
919
|
+
<div class="in scene-${id}">
|
|
920
|
+
<canvas class="polyhedron-immersive-canvas-${id}"></canvas>
|
|
921
|
+
|
|
922
|
+
<div
|
|
923
|
+
class="scene-immersive-effect-${id} btn-polyhedron-immersive-effect-${id}"
|
|
924
|
+
title="Change background effect"
|
|
925
|
+
>
|
|
926
|
+
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
|
927
|
+
</div>
|
|
928
|
+
<div class="scene-immersive-exit-${id} btn-polyhedron-immersive-exit-${id}" title="Exit immersive (Esc)">
|
|
929
|
+
Exit
|
|
930
|
+
</div>
|
|
931
|
+
|
|
932
|
+
<div class="abs polyhedron-${id}">
|
|
933
|
+
<div class="abs face-${id} face_front-${id} ${id}-0"><div class="abs center">1</div></div>
|
|
934
|
+
<div class="abs face-${id} face_bottom-${id} ${id}-1"><div class="abs center">2</div></div>
|
|
935
|
+
<div class="abs face-${id} face_back-${id} ${id}-2"><div class="abs center">3</div></div>
|
|
936
|
+
<div class="abs face-${id} face_top-${id} ${id}-3"><div class="abs center">4</div></div>
|
|
937
|
+
<div class="abs face-${id} face_right-${id} ${id}-4"><div class="abs center">5</div></div>
|
|
938
|
+
<div class="abs face-${id} face_left-${id} ${id}-5"><div class="abs center">6</div></div>
|
|
939
|
+
</div>
|
|
940
|
+
</div>
|
|
941
|
+
</div>
|
|
942
|
+
</div>
|
|
943
|
+
</div>
|
|
944
|
+
`;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
export { Polyhedron };
|