@adatechnology/game-characters-three 0.3.1 → 0.4.1
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/dist/index.d.ts +4 -1
- package/dist/index.global.js +16 -3
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -648,6 +648,7 @@ var createRigAnimator = (options = {}) => {
|
|
|
648
648
|
};
|
|
649
649
|
|
|
650
650
|
// src/rich/best-builder.ts
|
|
651
|
+
import { markKitOrigin } from "@adatechnology/game-contracts";
|
|
651
652
|
import { shapeGeometries as shapeGeometries4 } from "@adatechnology/game-shapes-three";
|
|
652
653
|
import { createBloodStream, createRng, drawAppearance } from "@adatechnology/game-characters";
|
|
653
654
|
var createBestBuilder = (host, { types, random = Math.random }) => {
|
|
@@ -1209,13 +1210,15 @@ var createBestBuilder = (host, { types, random = Math.random }) => {
|
|
|
1209
1210
|
root.userData.rig = rig;
|
|
1210
1211
|
return root;
|
|
1211
1212
|
}
|
|
1212
|
-
|
|
1213
|
+
const marked = (...args) => markKitOrigin(build(...args), { owner: "game-characters-three", kind: "person" });
|
|
1214
|
+
return { build: marked, TYPES, setLOD(k) {
|
|
1213
1215
|
LK = k;
|
|
1214
1216
|
SEG = Math.max(5, Math.round(16 * k));
|
|
1215
1217
|
}, topM: () => topM_ref };
|
|
1216
1218
|
};
|
|
1217
1219
|
|
|
1218
1220
|
// src/rich/person-builder.ts
|
|
1221
|
+
import { markKitOrigin as markKitOrigin2 } from "@adatechnology/game-contracts";
|
|
1219
1222
|
import { shapeGeometries as shapeGeometries6 } from "@adatechnology/game-shapes-three";
|
|
1220
1223
|
import { MOVES, createRng as createRng2 } from "@adatechnology/game-characters";
|
|
1221
1224
|
|
|
@@ -2440,7 +2443,11 @@ var createPersonBuilder = (host, options = {}) => {
|
|
|
2440
2443
|
chars.forEach((c) => pose(c, c.z, 0, 0));
|
|
2441
2444
|
return { root, chars };
|
|
2442
2445
|
}
|
|
2443
|
-
|
|
2446
|
+
const mark = (c) => {
|
|
2447
|
+
markKitOrigin2(c.root, { owner: "game-characters-three", kind: "person" });
|
|
2448
|
+
return c;
|
|
2449
|
+
};
|
|
2450
|
+
return { build: (sp, idx) => mark(build(sp, idx)), pose, zombify, buildPerson: (p2, zed) => mark(buildPerson(p2, zed)) };
|
|
2444
2451
|
};
|
|
2445
2452
|
|
|
2446
2453
|
// src/eyes.ts
|
|
@@ -4608,6 +4615,7 @@ import { mirrorPoseClip } from "@adatechnology/game-characters";
|
|
|
4608
4615
|
|
|
4609
4616
|
// src/first-person/arms.ts
|
|
4610
4617
|
import { clipEventsBetween as clipEventsBetween2, sampleFirstPersonClip } from "@adatechnology/game-characters";
|
|
4618
|
+
import { markKitOrigin as markKitOrigin3 } from "@adatechnology/game-contracts";
|
|
4611
4619
|
|
|
4612
4620
|
// src/presets/first-person-arms.json
|
|
4613
4621
|
var first_person_arms_default = {
|
|
@@ -4838,7 +4846,7 @@ function createFirstPersonArms(THREE, options = {}) {
|
|
|
4838
4846
|
const bob = { ...FIRST_PERSON_BOB, ...options.bob };
|
|
4839
4847
|
const blendSeconds = options.blend ?? DEFAULT_BLEND;
|
|
4840
4848
|
const clips = new Map((options.clips ?? []).map((clip) => [clip.id, clip]));
|
|
4841
|
-
const root = new THREE.Group();
|
|
4849
|
+
const root = markKitOrigin3(new THREE.Group(), { owner: "game-characters-three", kind: "person", id: "first-person-arms" });
|
|
4842
4850
|
root.name = "first-person-arms";
|
|
4843
4851
|
root.userData.viewmodel = true;
|
|
4844
4852
|
const lit = (color) => new THREE.MeshLambertMaterial({ color, emissive: scaleHex(color, FILL) });
|
|
@@ -5430,6 +5438,7 @@ export {
|
|
|
5430
5438
|
lodAt,
|
|
5431
5439
|
makeCut,
|
|
5432
5440
|
makeStump,
|
|
5441
|
+
personSpecOf,
|
|
5433
5442
|
registerBodyMaterial,
|
|
5434
5443
|
ringWound,
|
|
5435
5444
|
solveTwoBone,
|