@playdrop/playdrop-cli 0.7.15 → 0.7.17
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 +1 -1
- package/node_modules/@playdrop/ai-client/dist/index.js +461 -444
- package/node_modules/@playdrop/ai-client/package.json +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +903 -882
- package/node_modules/@playdrop/api-client/dist/core/errors.js +69 -45
- package/node_modules/@playdrop/api-client/dist/core/request.js +188 -159
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +516 -491
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +40 -14
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +480 -462
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +439 -419
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +696 -676
- package/node_modules/@playdrop/api-client/dist/domains/auth.js +346 -320
- package/node_modules/@playdrop/api-client/dist/domains/comments.js +124 -98
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.js +91 -65
- package/node_modules/@playdrop/api-client/dist/domains/me.js +71 -45
- package/node_modules/@playdrop/api-client/dist/domains/payments.js +407 -386
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +144 -118
- package/node_modules/@playdrop/api-client/dist/domains/search.js +117 -104
- package/node_modules/@playdrop/api-client/dist/domains/tags.js +188 -162
- package/node_modules/@playdrop/api-client/dist/index.js +993 -552
- package/node_modules/@playdrop/api-client/package.json +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.js +84 -62
- package/node_modules/@playdrop/boxel-three/dist/src/builders.js +341 -308
- package/node_modules/@playdrop/boxel-three/dist/src/context.js +55 -29
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +856 -858
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +267 -261
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +64 -15
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +89 -63
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +81 -56
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +112 -86
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +45 -17
- package/node_modules/@playdrop/boxel-three/dist/src/scene.js +160 -136
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +582 -584
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +123 -97
- package/node_modules/@playdrop/boxel-three/dist/src/textures.js +207 -182
- package/node_modules/@playdrop/boxel-three/dist/src/types.js +15 -1
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +451 -425
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +109 -84
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +127 -106
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +73 -51
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +97 -79
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +29 -7
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +80 -60
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +41 -19
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +72 -50
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +84 -62
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +69 -47
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +129 -109
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +40 -18
- package/node_modules/@playdrop/boxel-three/package.json +1 -1
- package/node_modules/@playdrop/config/client-meta.json +1 -1
- package/node_modules/@playdrop/types/dist/api.js +289 -203
- package/node_modules/@playdrop/types/dist/app-capability-filters.js +112 -62
- package/node_modules/@playdrop/types/dist/app.js +91 -45
- package/node_modules/@playdrop/types/dist/asset-pack.js +37 -5
- package/node_modules/@playdrop/types/dist/asset-spec.js +170 -90
- package/node_modules/@playdrop/types/dist/asset.js +186 -108
- package/node_modules/@playdrop/types/dist/content-license.js +49 -15
- package/node_modules/@playdrop/types/dist/creator-public-image.js +60 -32
- package/node_modules/@playdrop/types/dist/ecs.js +102 -82
- package/node_modules/@playdrop/types/dist/engine-builtins.js +603 -573
- package/node_modules/@playdrop/types/dist/entity.js +63 -53
- package/node_modules/@playdrop/types/dist/graph.js +116 -80
- package/node_modules/@playdrop/types/dist/index.js +47 -20
- package/node_modules/@playdrop/types/dist/owned-assets.js +55 -33
- package/node_modules/@playdrop/types/dist/player-meta.js +151 -100
- package/node_modules/@playdrop/types/dist/realtime.js +27 -7
- package/node_modules/@playdrop/types/dist/version.js +182 -124
- package/node_modules/@playdrop/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,70 +1,92 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var animations_exports = {};
|
|
19
|
+
__export(animations_exports, {
|
|
20
|
+
buildAnimations: () => buildAnimations
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(animations_exports);
|
|
1
23
|
function createKeyframeTrack(THREE, channel, nodeLookup) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
24
|
+
const object = nodeLookup.get(channel.node);
|
|
25
|
+
if (!object) {
|
|
26
|
+
console.warn("[boxel-three] animation channel references missing node", channel.node);
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const times = channel.keyframes.map((keyframe) => keyframe.time);
|
|
30
|
+
const targetName = object.name && object.name.length > 0 ? object.name : object.uuid;
|
|
31
|
+
switch (channel.property) {
|
|
32
|
+
case "position": {
|
|
33
|
+
const values = channel.keyframes.flatMap((keyframe) => keyframe.value);
|
|
34
|
+
return new THREE.VectorKeyframeTrack(`${targetName}.position`, times, values);
|
|
6
35
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const radX = THREE.MathUtils.degToRad(keyframe.value[0]);
|
|
18
|
-
const radY = THREE.MathUtils.degToRad(keyframe.value[1]);
|
|
19
|
-
const radZ = THREE.MathUtils.degToRad(keyframe.value[2]);
|
|
20
|
-
const quaternion = new THREE.Quaternion().setFromEuler(new THREE.Euler(radX, radY, radZ));
|
|
21
|
-
values.push(quaternion.x, quaternion.y, quaternion.z, quaternion.w);
|
|
22
|
-
});
|
|
23
|
-
return new THREE.QuaternionKeyframeTrack(`${targetName}.quaternion`, times, values);
|
|
24
|
-
}
|
|
25
|
-
case 'scale': {
|
|
26
|
-
const values = channel.keyframes.flatMap(keyframe => keyframe.value);
|
|
27
|
-
return new THREE.VectorKeyframeTrack(`${targetName}.scale`, times, values);
|
|
28
|
-
}
|
|
29
|
-
default:
|
|
30
|
-
return null;
|
|
36
|
+
case "rotation": {
|
|
37
|
+
const values = [];
|
|
38
|
+
channel.keyframes.forEach((keyframe) => {
|
|
39
|
+
const radX = THREE.MathUtils.degToRad(keyframe.value[0]);
|
|
40
|
+
const radY = THREE.MathUtils.degToRad(keyframe.value[1]);
|
|
41
|
+
const radZ = THREE.MathUtils.degToRad(keyframe.value[2]);
|
|
42
|
+
const quaternion = new THREE.Quaternion().setFromEuler(new THREE.Euler(radX, radY, radZ));
|
|
43
|
+
values.push(quaternion.x, quaternion.y, quaternion.z, quaternion.w);
|
|
44
|
+
});
|
|
45
|
+
return new THREE.QuaternionKeyframeTrack(`${targetName}.quaternion`, times, values);
|
|
31
46
|
}
|
|
47
|
+
case "scale": {
|
|
48
|
+
const values = channel.keyframes.flatMap((keyframe) => keyframe.value);
|
|
49
|
+
return new THREE.VectorKeyframeTrack(`${targetName}.scale`, times, values);
|
|
50
|
+
}
|
|
51
|
+
default:
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
32
54
|
}
|
|
33
55
|
function buildAnimation(THREE, animation, nodeLookup) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
56
|
+
const tracks = [];
|
|
57
|
+
animation.channels.forEach((channel) => {
|
|
58
|
+
const track = createKeyframeTrack(THREE, channel, nodeLookup);
|
|
59
|
+
if (!track)
|
|
60
|
+
return;
|
|
61
|
+
tracks.push({
|
|
62
|
+
nodeId: channel.node,
|
|
63
|
+
property: channel.property,
|
|
64
|
+
track
|
|
44
65
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
66
|
+
});
|
|
67
|
+
if (tracks.length === 0) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const threeTracks = tracks.map((channel) => channel.track);
|
|
71
|
+
const inferredDuration = threeTracks.reduce((max, track) => {
|
|
72
|
+
const times = track.times;
|
|
73
|
+
if (!times || times.length === 0)
|
|
74
|
+
return max;
|
|
75
|
+
return Math.max(max, times[times.length - 1]);
|
|
76
|
+
}, 0);
|
|
77
|
+
const duration = typeof animation.duration === "number" && animation.duration > 0 ? animation.duration : inferredDuration;
|
|
78
|
+
const clip = new THREE.AnimationClip(animation.id, duration, threeTracks);
|
|
79
|
+
return {
|
|
80
|
+
id: animation.id,
|
|
81
|
+
duration,
|
|
82
|
+
channels: tracks,
|
|
83
|
+
clip
|
|
84
|
+
};
|
|
65
85
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.map(animation => buildAnimation(THREE, animation, nodeLookup))
|
|
69
|
-
.filter((value) => Boolean(value));
|
|
86
|
+
function buildAnimations(THREE, entity, nodeLookup) {
|
|
87
|
+
return (entity.animations ?? []).map((animation) => buildAnimation(THREE, animation, nodeLookup)).filter((value) => Boolean(value));
|
|
70
88
|
}
|
|
89
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
+
0 && (module.exports = {
|
|
91
|
+
buildAnimations
|
|
92
|
+
});
|