@playdrop/playdrop-cli 0.16.16 → 0.17.0
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/config/client-meta.json +4 -4
- package/dist/apiClient.d.ts +1 -2
- package/dist/apiClient.js +1 -16
- package/dist/appUrls.js +4 -0
- package/dist/apps/build.d.ts +12 -4
- package/dist/apps/build.js +55 -22
- package/dist/apps/index.d.ts +2 -1
- package/dist/apps/index.js +4 -1
- package/dist/apps/loadCheck.d.ts +5 -1
- package/dist/apps/loadCheck.js +52 -18
- package/dist/apps/serverBuild.d.ts +17 -0
- package/dist/apps/serverBuild.js +155 -0
- package/dist/apps/staticHtml.d.ts +1 -0
- package/dist/apps/staticHtml.js +19 -10
- package/dist/apps/upload.d.ts +12 -2
- package/dist/apps/upload.js +127 -46
- package/dist/catalogue.d.ts +23 -1
- package/dist/catalogue.js +126 -100
- package/dist/commandContext.d.ts +6 -3
- package/dist/commandContext.js +108 -18
- package/dist/commands/build.js +0 -7
- package/dist/commands/captureListing.d.ts +3 -0
- package/dist/commands/captureListing.js +48 -4
- package/dist/commands/chat.d.ts +4 -0
- package/dist/commands/chat.js +133 -8
- package/dist/commands/check.js +34 -1
- package/dist/commands/create.js +30 -263
- package/dist/commands/dev.js +37 -3
- package/dist/commands/devBrowser.js +2 -2
- package/dist/commands/devGameServer.d.ts +16 -0
- package/dist/commands/devGameServer.js +237 -0
- package/dist/commands/devRuntimeAssets.d.ts +1 -0
- package/dist/commands/devRuntimeAssets.js +2 -0
- package/dist/commands/devServer.d.ts +3 -0
- package/dist/commands/devServer.js +111 -5
- package/dist/commands/generation.d.ts +33 -4
- package/dist/commands/generation.js +304 -115
- package/dist/commands/login.js +23 -7
- package/dist/commands/review.d.ts +1 -1
- package/dist/commands/review.js +68 -95
- package/dist/commands/source.d.ts +19 -0
- package/dist/commands/source.js +142 -0
- package/dist/commands/tweaks.js +5 -11
- package/dist/commands/upload-content.d.ts +1 -1
- package/dist/commands/upload-content.js +16 -12
- package/dist/commands/upload.d.ts +17 -1
- package/dist/commands/upload.js +47 -10
- package/dist/commands/worker/archive-staging.d.ts +1 -0
- package/dist/commands/worker/archive-staging.js +13 -2
- package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
- package/dist/commands/worker/e2e-fixtures.js +466 -0
- package/dist/commands/worker/game-server-infra.d.ts +80 -0
- package/dist/commands/worker/game-server-infra.js +595 -0
- package/dist/commands/worker/game-source-git.d.ts +126 -0
- package/dist/commands/worker/game-source-git.js +780 -0
- package/dist/commands/worker/generation.d.ts +94 -0
- package/dist/commands/worker/generation.js +1458 -0
- package/dist/commands/worker/runtime.d.ts +8 -10
- package/dist/commands/worker/runtime.js +51 -45
- package/dist/commands/worker.d.ts +79 -19
- package/dist/commands/worker.js +1796 -419
- package/dist/config.d.ts +2 -0
- package/dist/config.js +16 -3
- package/dist/environment.d.ts +0 -1
- package/dist/environment.js +0 -8
- package/dist/index.js +92 -13
- package/dist/workerAppProject.d.ts +1 -1
- package/dist/workerAppProject.js +15 -2
- package/node_modules/@playdrop/api-client/dist/client.d.ts +72 -25
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +33 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
- package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +338 -41
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
- package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
- package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +35 -3
- package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/chat.js +89 -7
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
- package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
- package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
- package/node_modules/@playdrop/api-client/dist/index.d.ts +80 -29
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +217 -56
- package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
- package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
- package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
- package/node_modules/@playdrop/api-client/package.json +7 -0
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
- package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
- package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
- package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
- package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
- package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/config/package.json +6 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
- package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
- package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
- package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
- package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
- package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
- package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
- package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
- package/node_modules/@playdrop/game-source-git/package.json +28 -0
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
- package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/agent-task-terminal.js +15 -9
- package/node_modules/@playdrop/types/dist/api.d.ts +728 -164
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +60 -11
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
- package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
- package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/asset.js +26 -26
- package/node_modules/@playdrop/types/dist/chat.d.ts +107 -3
- package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/chat.js +33 -4
- package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
- package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/index.js +7 -1
- package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
- package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
- package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
- package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
- package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
- package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
- package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
- package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
- package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/version.js +111 -0
- package/node_modules/@playdrop/types/package.json +14 -0
- package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
- package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
- package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
- package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
- package/node_modules/@playdrop/vox-three/package.json +8 -4
- package/package.json +9 -11
- package/dist/assets/model-artifacts.d.ts +0 -8
- package/dist/assets/model-artifacts.js +0 -382
- package/dist/assets/model-worker.d.ts +0 -22
- package/dist/assets/model-worker.js +0 -123
- package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
- package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
- package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
- package/node_modules/@playdrop/ai-client/package.json +0 -22
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
- package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
- package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
- package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
- package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
- package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
- package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
- package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
- package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
- package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
- package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
- package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
- package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
- package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
- package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
- package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/package.json +0 -19
- package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
- package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
- package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
- package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
- package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
- package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
- package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
- package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
- package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
- package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
- package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
- package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
- package/node_modules/@playdrop/boxel-three/package.json +0 -28
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from))
|
|
10
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
}
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
-
mod
|
|
22
|
-
));
|
|
23
|
-
var THREE = __toESM(require("three"));
|
|
24
|
-
var import_GLTFExporter = require("three/examples/jsm/exporters/GLTFExporter.js");
|
|
25
|
-
var import_src = require("../../src/index.js");
|
|
26
|
-
var import_boxel_core = require("@playdrop/boxel-core");
|
|
27
|
-
function arrayBufferToBase64(buffer) {
|
|
28
|
-
const bytes = new Uint8Array(buffer);
|
|
29
|
-
const chunkSize = 32768;
|
|
30
|
-
let binary = "";
|
|
31
|
-
for (let index = 0; index < bytes.length; index += chunkSize) {
|
|
32
|
-
const chunk = bytes.subarray(index, index + chunkSize);
|
|
33
|
-
binary += String.fromCharCode(...chunk);
|
|
34
|
-
}
|
|
35
|
-
return btoa(binary);
|
|
36
|
-
}
|
|
37
|
-
let cachedRenderer = null;
|
|
38
|
-
function getRenderer() {
|
|
39
|
-
if (cachedRenderer) {
|
|
40
|
-
return cachedRenderer;
|
|
41
|
-
}
|
|
42
|
-
const canvas = document.getElementById("viewport");
|
|
43
|
-
if (!canvas) {
|
|
44
|
-
throw new Error("render_canvas_unavailable");
|
|
45
|
-
}
|
|
46
|
-
cachedRenderer = new THREE.WebGLRenderer({
|
|
47
|
-
canvas,
|
|
48
|
-
antialias: true,
|
|
49
|
-
preserveDrawingBuffer: true,
|
|
50
|
-
alpha: true
|
|
51
|
-
});
|
|
52
|
-
return cachedRenderer;
|
|
53
|
-
}
|
|
54
|
-
async function exportBoxel(modelJson, options) {
|
|
55
|
-
const model = (0, import_boxel_core.parseBoxel)(modelJson);
|
|
56
|
-
const blob = await (0, import_src.exportModelToGLB)({
|
|
57
|
-
THREE,
|
|
58
|
-
GLTFExporterCtor: import_GLTFExporter.GLTFExporter,
|
|
59
|
-
model,
|
|
60
|
-
mode: options?.mode,
|
|
61
|
-
animationIds: options?.animationIds
|
|
62
|
-
});
|
|
63
|
-
const arrayBuffer = await blob.arrayBuffer();
|
|
64
|
-
return arrayBufferToBase64(arrayBuffer);
|
|
65
|
-
}
|
|
66
|
-
async function renderBoxel(modelJson, options) {
|
|
67
|
-
const model = (0, import_boxel_core.parseBoxel)(modelJson);
|
|
68
|
-
const renderer = getRenderer();
|
|
69
|
-
renderer.setPixelRatio(1);
|
|
70
|
-
return (0, import_src.renderBoxelToDataURL)({
|
|
71
|
-
THREE,
|
|
72
|
-
renderer,
|
|
73
|
-
entity: model,
|
|
74
|
-
mode: options?.mode ?? "hierarchical",
|
|
75
|
-
animationIds: options?.animationIds,
|
|
76
|
-
width: options?.width,
|
|
77
|
-
height: options?.height,
|
|
78
|
-
direction: options?.direction,
|
|
79
|
-
background: options?.background ?? null
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
window.boxelExport = {
|
|
83
|
-
exportBoxel,
|
|
84
|
-
renderBoxel
|
|
85
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var import_node_test = __toESM(require("node:test"));
|
|
25
|
-
var import_strict = __toESM(require("node:assert/strict"));
|
|
26
|
-
var THREE = __toESM(require("three"));
|
|
27
|
-
var import_node_path = __toESM(require("node:path"));
|
|
28
|
-
var import_node_url = require("node:url");
|
|
29
|
-
var import_promises = require("node:fs/promises");
|
|
30
|
-
var import_boxel_core = require("@playdrop/boxel-core");
|
|
31
|
-
var import_GLTFExporter = require("three/examples/jsm/exporters/GLTFExporter.js");
|
|
32
|
-
var import_glb = require("../src/exporters/glb.js");
|
|
33
|
-
const import_meta = {};
|
|
34
|
-
const HERE = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
35
|
-
const fixture = (...segments) => import_node_path.default.resolve(HERE, "./fixtures", ...segments);
|
|
36
|
-
if (typeof globalThis.FileReader === "undefined") {
|
|
37
|
-
class NodeFileReader {
|
|
38
|
-
constructor() {
|
|
39
|
-
this.onload = null;
|
|
40
|
-
this.onloadend = null;
|
|
41
|
-
this.onerror = null;
|
|
42
|
-
this.onabort = null;
|
|
43
|
-
this.result = null;
|
|
44
|
-
}
|
|
45
|
-
readAsDataURL(blob) {
|
|
46
|
-
blob.arrayBuffer().then((buffer) => {
|
|
47
|
-
const mime = blob.type || "application/octet-stream";
|
|
48
|
-
const base64 = Buffer.from(buffer).toString("base64");
|
|
49
|
-
this.result = `data:${mime};base64,${base64}`;
|
|
50
|
-
const event = { target: { result: this.result } };
|
|
51
|
-
this.onload?.(event);
|
|
52
|
-
this.onloadend?.(event);
|
|
53
|
-
}).catch((error) => {
|
|
54
|
-
this.onerror?.(error);
|
|
55
|
-
this.onloadend?.({ target: { result: null } });
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
readAsArrayBuffer(blob) {
|
|
59
|
-
blob.arrayBuffer().then((buffer) => {
|
|
60
|
-
this.result = buffer;
|
|
61
|
-
const event = { target: { result: this.result } };
|
|
62
|
-
this.onload?.(event);
|
|
63
|
-
this.onloadend?.(event);
|
|
64
|
-
}).catch((error) => {
|
|
65
|
-
this.onerror?.(error);
|
|
66
|
-
this.onloadend?.({ target: { result: null } });
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
abort() {
|
|
70
|
-
this.onabort?.(new Error("filereader_abort_not_supported"));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
globalThis.FileReader = NodeFileReader;
|
|
74
|
-
}
|
|
75
|
-
async function loadEntity(relativePath) {
|
|
76
|
-
const raw = await (0, import_promises.readFile)(fixture(relativePath), "utf-8");
|
|
77
|
-
return (0, import_boxel_core.parseBoxel)(JSON.parse(raw));
|
|
78
|
-
}
|
|
79
|
-
(0, import_node_test.default)("createBoxelSceneGraph skinned mode exposes skinned mesh and bones", async () => {
|
|
80
|
-
const entity = await loadEntity("entity-connect.json");
|
|
81
|
-
const graph = (0, import_glb.createBoxelSceneGraph)({ THREE, model: entity, mode: "skinned" });
|
|
82
|
-
try {
|
|
83
|
-
import_strict.default.ok(graph.root instanceof THREE.Object3D, "root should be Object3D");
|
|
84
|
-
const skinnedMesh = graph.root.children.find((child) => child instanceof THREE.SkinnedMesh);
|
|
85
|
-
import_strict.default.ok(skinnedMesh, "skinned mesh missing from scene graph");
|
|
86
|
-
const boneIds = Array.from(graph.nodeLookup.keys());
|
|
87
|
-
import_strict.default.ok(boneIds.length > 0, "expected bones in lookup");
|
|
88
|
-
import_strict.default.ok(boneIds.some((id) => id.toLowerCase().includes("chest")), "expected Chest bone in lookup");
|
|
89
|
-
import_strict.default.ok(graph.animations.every((entry) => entry.clip instanceof THREE.AnimationClip), "clips missing");
|
|
90
|
-
} finally {
|
|
91
|
-
graph.dispose();
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
(0, import_node_test.default)("exportModelToGLB supports skinned mode", async () => {
|
|
95
|
-
const entity = await loadEntity("entity-connect.json");
|
|
96
|
-
const blob = await (0, import_glb.exportModelToGLB)({
|
|
97
|
-
THREE,
|
|
98
|
-
GLTFExporterCtor: import_GLTFExporter.GLTFExporter,
|
|
99
|
-
model: entity,
|
|
100
|
-
mode: "skinned"
|
|
101
|
-
});
|
|
102
|
-
const buffer = Buffer.from(await blob.arrayBuffer());
|
|
103
|
-
import_strict.default.ok(buffer.length > 0, "skinned export should produce non-empty binary");
|
|
104
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from))
|
|
10
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
}
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
-
mod
|
|
22
|
-
));
|
|
23
|
-
var import_node_test = __toESM(require("node:test"));
|
|
24
|
-
var import_strict = __toESM(require("node:assert/strict"));
|
|
25
|
-
var import_src = require("../src/index.js");
|
|
26
|
-
(0, import_node_test.default)("boxel-three exposes renderer entry points", () => {
|
|
27
|
-
import_strict.default.equal(typeof import_src.createBoxelScene, "function");
|
|
28
|
-
import_strict.default.equal(typeof import_src.createBoxelNodeScene, "function");
|
|
29
|
-
import_strict.default.equal(typeof import_src.attachBoxelOverlays, "function");
|
|
30
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var import_node_test = __toESM(require("node:test"));
|
|
25
|
-
var import_strict = __toESM(require("node:assert/strict"));
|
|
26
|
-
var THREE = __toESM(require("three"));
|
|
27
|
-
var import_node_path = __toESM(require("node:path"));
|
|
28
|
-
var import_node_url = require("node:url");
|
|
29
|
-
var import_promises = require("node:fs/promises");
|
|
30
|
-
var import_boxel_core = require("@playdrop/boxel-core");
|
|
31
|
-
var import_instantiate = require("../src/instantiate.js");
|
|
32
|
-
const import_meta = {};
|
|
33
|
-
const HERE = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
34
|
-
const fixture = (...segments) => import_node_path.default.resolve(HERE, "./fixtures", ...segments);
|
|
35
|
-
async function loadEntity(relativePath) {
|
|
36
|
-
const raw = await (0, import_promises.readFile)(fixture(relativePath), "utf-8");
|
|
37
|
-
return (0, import_boxel_core.parseBoxel)(JSON.parse(raw));
|
|
38
|
-
}
|
|
39
|
-
function dispose(result) {
|
|
40
|
-
result.dispose();
|
|
41
|
-
}
|
|
42
|
-
(0, import_node_test.default)("instantiateEntityObject3D hierarchy mode exposes group and node helpers", async () => {
|
|
43
|
-
const entity = await loadEntity("entity-connect.json");
|
|
44
|
-
const result = (0, import_instantiate.instantiateEntityObject3D)({ THREE, entity, mode: "hierarchy" });
|
|
45
|
-
try {
|
|
46
|
-
import_strict.default.equal(result.mode, "hierarchy");
|
|
47
|
-
import_strict.default.ok(result.object instanceof THREE.Group, "hierarchy returns group");
|
|
48
|
-
import_strict.default.ok(result.scene.root === result.object, "group matches scene root");
|
|
49
|
-
import_strict.default.ok(typeof result.findNode === "function", "findNode helper available");
|
|
50
|
-
import_strict.default.ok(result.findNode(entity.geometry.root.id), "root node resolves");
|
|
51
|
-
let counted = 0;
|
|
52
|
-
result.forEachNode(() => {
|
|
53
|
-
counted += 1;
|
|
54
|
-
});
|
|
55
|
-
import_strict.default.equal(counted > 0, true, "forEachNode iterates nodes");
|
|
56
|
-
import_strict.default.ok(Array.isArray(result.clips), "clips array present");
|
|
57
|
-
} finally {
|
|
58
|
-
dispose(result);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
(0, import_node_test.default)("instantiateEntityObject3D merged mode returns a reusable group", async () => {
|
|
62
|
-
const entity = await loadEntity("entity-connect.json");
|
|
63
|
-
const result = (0, import_instantiate.instantiateEntityObject3D)({ THREE, entity, mode: "merged" });
|
|
64
|
-
try {
|
|
65
|
-
import_strict.default.equal(result.mode, "merged");
|
|
66
|
-
import_strict.default.ok(result.object instanceof THREE.Object3D, "merged returns object3D");
|
|
67
|
-
} finally {
|
|
68
|
-
dispose(result);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
(0, import_node_test.default)("instantiateEntityObject3D skinned mode returns skinned mesh and bone helpers", async () => {
|
|
72
|
-
const entity = await loadEntity("entity-connect.json");
|
|
73
|
-
const result = (0, import_instantiate.instantiateEntityObject3D)({ THREE, entity, mode: "skinned" });
|
|
74
|
-
try {
|
|
75
|
-
import_strict.default.equal(result.mode, "skinned");
|
|
76
|
-
import_strict.default.ok(result.object instanceof THREE.SkinnedMesh, "skinned returns SkinnedMesh");
|
|
77
|
-
import_strict.default.ok(result.skeleton instanceof THREE.Skeleton, "skeleton available");
|
|
78
|
-
import_strict.default.ok(result.findBone(entity.geometry.root.id), "findBone resolves root");
|
|
79
|
-
let boneCount = 0;
|
|
80
|
-
result.forEachBone(() => {
|
|
81
|
-
boneCount += 1;
|
|
82
|
-
});
|
|
83
|
-
import_strict.default.equal(boneCount > 0, true, "forEachBone iterates bones");
|
|
84
|
-
import_strict.default.ok(Array.isArray(result.clips), "clips array present");
|
|
85
|
-
} finally {
|
|
86
|
-
dispose(result);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from))
|
|
10
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
}
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
-
mod
|
|
22
|
-
));
|
|
23
|
-
var import_node_test = __toESM(require("node:test"));
|
|
24
|
-
var import_strict = __toESM(require("node:assert/strict"));
|
|
25
|
-
var THREE = __toESM(require("three"));
|
|
26
|
-
var import_src = require("../src/index.js");
|
|
27
|
-
(0, import_node_test.default)("attachBoxelOverlays adds helpers and disposes cleanly", () => {
|
|
28
|
-
const THREERef = THREE;
|
|
29
|
-
const target = new THREERef.Object3D();
|
|
30
|
-
target.userData.size = [1, 2, 3];
|
|
31
|
-
target.userData.sockets = [
|
|
32
|
-
[0.5, 1, 0],
|
|
33
|
-
[-0.5, 0, 0]
|
|
34
|
-
];
|
|
35
|
-
const handles = (0, import_src.attachBoxelOverlays)({ THREE: THREERef, target }, { origin: true, bounds: true, sockets: true, color: 16711935, opacity: 0.5 });
|
|
36
|
-
import_strict.default.ok(handles.origin, "origin helper not attached");
|
|
37
|
-
import_strict.default.ok(handles.bounds && handles.bounds.length === 1, "bounds helper missing");
|
|
38
|
-
import_strict.default.ok(handles.sockets && handles.sockets.length === 2, "socket helpers missing");
|
|
39
|
-
import_strict.default.strictEqual(target.children.includes(handles.origin), true);
|
|
40
|
-
handles.dispose();
|
|
41
|
-
import_strict.default.strictEqual(target.children.length, 0, "helpers should be removed after dispose");
|
|
42
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from))
|
|
10
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
}
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
-
mod
|
|
22
|
-
));
|
|
23
|
-
var import_node_test = __toESM(require("node:test"));
|
|
24
|
-
var import_strict = __toESM(require("node:assert/strict"));
|
|
25
|
-
var THREE = __toESM(require("three"));
|
|
26
|
-
var import_src = require("../src/index.js");
|
|
27
|
-
(0, import_node_test.default)("createBoxelScene respects node filters and exposes reusable clips", () => {
|
|
28
|
-
const entity = {
|
|
29
|
-
id: "filter-test",
|
|
30
|
-
geometry: {
|
|
31
|
-
id: "geom",
|
|
32
|
-
root: {
|
|
33
|
-
id: "Root",
|
|
34
|
-
position: [0, 0, 0],
|
|
35
|
-
children: [
|
|
36
|
-
{
|
|
37
|
-
id: "Arm",
|
|
38
|
-
position: [2, 0, 0],
|
|
39
|
-
mesh: "arm",
|
|
40
|
-
children: []
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: "Leg",
|
|
44
|
-
position: [-2, 0, 0],
|
|
45
|
-
mesh: "leg",
|
|
46
|
-
children: []
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
primitives: [
|
|
52
|
-
{ id: "arm", kind: "plain_box", size: [1, 1, 1], material: "mat" },
|
|
53
|
-
{ id: "leg", kind: "plain_box", size: [1, 1, 1], material: "mat" }
|
|
54
|
-
],
|
|
55
|
-
materials: [{ id: "mat", baseColor: [255, 100, 100] }],
|
|
56
|
-
textures: [],
|
|
57
|
-
patterns: [],
|
|
58
|
-
animations: []
|
|
59
|
-
};
|
|
60
|
-
const full = (0, import_src.createBoxelScene)({ THREE, entity });
|
|
61
|
-
import_strict.default.ok(full.nodes.has("Arm"));
|
|
62
|
-
import_strict.default.ok(full.nodes.has("Leg"));
|
|
63
|
-
const filtered = (0, import_src.createBoxelScene)({ THREE, entity }, { nodes: "Arm" });
|
|
64
|
-
import_strict.default.strictEqual(filtered.root.children.length, 1, "filtered scene should include one limb");
|
|
65
|
-
import_strict.default.ok(filtered.nodes.has("Arm"));
|
|
66
|
-
import_strict.default.ok(!filtered.nodes.has("Leg"));
|
|
67
|
-
const nodeScene = (0, import_src.createBoxelNodeScene)({ THREE, entity }, "Leg");
|
|
68
|
-
import_strict.default.strictEqual(nodeScene.nodes.size, 1, "node scene should only contain requested limb");
|
|
69
|
-
import_strict.default.ok(nodeScene.nodes.has("Leg"));
|
|
70
|
-
full.dispose();
|
|
71
|
-
filtered.dispose();
|
|
72
|
-
nodeScene.dispose();
|
|
73
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from))
|
|
10
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
}
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
-
mod
|
|
22
|
-
));
|
|
23
|
-
var import_node_test = __toESM(require("node:test"));
|
|
24
|
-
var import_strict = __toESM(require("node:assert/strict"));
|
|
25
|
-
var THREE = __toESM(require("three"));
|
|
26
|
-
var import_src = require("../src/index.js");
|
|
27
|
-
(0, import_node_test.default)("createBoxelScene exposes node metadata and animations for editor tooling", () => {
|
|
28
|
-
const entity = {
|
|
29
|
-
id: "scene-smoke",
|
|
30
|
-
geometry: {
|
|
31
|
-
id: "geom",
|
|
32
|
-
root: {
|
|
33
|
-
id: "Root",
|
|
34
|
-
position: [0, 0, 0],
|
|
35
|
-
children: [
|
|
36
|
-
{
|
|
37
|
-
id: "Child",
|
|
38
|
-
position: [1, 0, 0],
|
|
39
|
-
mesh: "box",
|
|
40
|
-
children: []
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
primitives: [
|
|
46
|
-
{
|
|
47
|
-
id: "box",
|
|
48
|
-
kind: "plain_box",
|
|
49
|
-
size: [1, 1, 1],
|
|
50
|
-
material: "mat"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
materials: [{ id: "mat", baseColor: [200, 120, 60] }],
|
|
54
|
-
textures: [],
|
|
55
|
-
patterns: [],
|
|
56
|
-
animations: [
|
|
57
|
-
{
|
|
58
|
-
id: "wiggle",
|
|
59
|
-
duration: 2,
|
|
60
|
-
channels: [
|
|
61
|
-
{
|
|
62
|
-
node: "Child",
|
|
63
|
-
property: "position",
|
|
64
|
-
keyframes: [
|
|
65
|
-
{ time: 0, value: [1, 0, 0] },
|
|
66
|
-
{ time: 1, value: [1, 0.5, 0] },
|
|
67
|
-
{ time: 2, value: [1, 0, 0] }
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
};
|
|
74
|
-
const result = (0, import_src.createBoxelScene)({ THREE, entity });
|
|
75
|
-
import_strict.default.ok(result.root.children.length >= 1, "scene root should contain children");
|
|
76
|
-
const childMeta = result.nodes.get("Child");
|
|
77
|
-
import_strict.default.ok(childMeta, "child node metadata should exist");
|
|
78
|
-
import_strict.default.strictEqual(childMeta.object.userData?.nodeId, "Child");
|
|
79
|
-
import_strict.default.strictEqual(childMeta.object.parent?.userData?.nodeId, "Root");
|
|
80
|
-
import_strict.default.ok(result.animations.length >= 1, "expected animation metadata");
|
|
81
|
-
const clip = result.animations[0]?.clip;
|
|
82
|
-
import_strict.default.ok(clip, "animation clip missing");
|
|
83
|
-
import_strict.default.ok(clip.duration >= 2, "clip duration should cover keyframes");
|
|
84
|
-
result.dispose();
|
|
85
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var import_node_test = __toESM(require("node:test"));
|
|
25
|
-
var import_strict = __toESM(require("node:assert/strict"));
|
|
26
|
-
var THREE = __toESM(require("three"));
|
|
27
|
-
var import_promises = require("node:fs/promises");
|
|
28
|
-
var import_node_path = __toESM(require("node:path"));
|
|
29
|
-
var import_node_url = require("node:url");
|
|
30
|
-
var import_boxel_core = require("@playdrop/boxel-core");
|
|
31
|
-
var import_skinned_mesh = require("../src/skinned-mesh.js");
|
|
32
|
-
const import_meta = {};
|
|
33
|
-
const HERE = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
34
|
-
const fixture = (...segments) => import_node_path.default.resolve(HERE, "./fixtures", ...segments);
|
|
35
|
-
(0, import_node_test.default)("buildEntitySkinnedMesh exposes atlas and connect stats", async () => {
|
|
36
|
-
const entityRaw = await (0, import_promises.readFile)(fixture("entity-connect.json"), "utf-8");
|
|
37
|
-
const entity = (0, import_boxel_core.parseBoxel)(JSON.parse(entityRaw));
|
|
38
|
-
const result = (0, import_skinned_mesh.buildEntitySkinnedMesh)({ THREE, entity });
|
|
39
|
-
try {
|
|
40
|
-
const { mesh, stats } = result;
|
|
41
|
-
import_strict.default.ok(mesh instanceof THREE.SkinnedMesh, "skinned mesh returned");
|
|
42
|
-
import_strict.default.ok(!Array.isArray(mesh.material), "single material used");
|
|
43
|
-
const material = mesh.material;
|
|
44
|
-
import_strict.default.strictEqual(material.skinning, true);
|
|
45
|
-
import_strict.default.ok(stats.atlas === null || typeof stats.atlas === "object", "atlas info present (or null)");
|
|
46
|
-
const breakdown = stats.connectBreakdown;
|
|
47
|
-
import_strict.default.deepEqual(Object.keys(breakdown).sort(), ["Chest"], "connect breakdown captured child node");
|
|
48
|
-
import_strict.default.ok(breakdown.Chest.childVertices > 0, "child vertices blended");
|
|
49
|
-
import_strict.default.ok(breakdown.Chest.parentVertices > 0, "parent vertices blended");
|
|
50
|
-
const geometry = mesh.geometry;
|
|
51
|
-
const connectStrength = geometry.getAttribute("connectStrength");
|
|
52
|
-
import_strict.default.ok(connectStrength, "connect strength attribute exists");
|
|
53
|
-
let sawHalf = false;
|
|
54
|
-
let sawFull = false;
|
|
55
|
-
for (let i = 0; i < connectStrength.count; i += 1) {
|
|
56
|
-
const value = connectStrength.getX(i);
|
|
57
|
-
if (Math.abs(value - 0.5) < 1e-3)
|
|
58
|
-
sawHalf = true;
|
|
59
|
-
if (Math.abs(value - 1) < 1e-3)
|
|
60
|
-
sawFull = true;
|
|
61
|
-
}
|
|
62
|
-
import_strict.default.ok(sawHalf, "detected vertices blending 50/50");
|
|
63
|
-
import_strict.default.ok(sawFull || !breakdown.Chest.childVertices || sawHalf, "detected vertices fully or partially reassigned when expected");
|
|
64
|
-
const skinWeights = geometry.getAttribute("skinWeight");
|
|
65
|
-
import_strict.default.ok(skinWeights, "skin weights present");
|
|
66
|
-
for (let i = 0; i < skinWeights.count; i += 1) {
|
|
67
|
-
const sum = skinWeights.getX(i) + skinWeights.getY(i) + skinWeights.getZ(i) + skinWeights.getW(i);
|
|
68
|
-
import_strict.default.ok(Math.abs(sum - 1) < 1e-3, "weights normalised per vertex");
|
|
69
|
-
}
|
|
70
|
-
} finally {
|
|
71
|
-
result.dispose();
|
|
72
|
-
}
|
|
73
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|