@zephyr3d/editor 0.3.4 → 0.3.5

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.
Files changed (64) hide show
  1. package/dist/assets/{index-DzQzWsCG.js → index-DlnbO59X.js} +2 -2
  2. package/dist/assistant/zephyr-types-index.json +9 -10
  3. package/dist/index.html +1 -1
  4. package/dist/modules/zephyr3d_backend-webgpu.js +13 -12
  5. package/dist/modules/zephyr3d_backend-webgpu.js.map +1 -1
  6. package/dist/modules/zephyr3d_base.js +152 -152
  7. package/dist/modules/zephyr3d_base.js.map +1 -1
  8. package/dist/modules/zephyr3d_device.js +15 -15
  9. package/dist/modules/zephyr3d_device.js.map +1 -1
  10. package/dist/modules/zephyr3d_loaders.js +6 -6
  11. package/dist/modules/zephyr3d_loaders.js.map +1 -1
  12. package/dist/modules/zephyr3d_scene.js +1382 -1385
  13. package/dist/modules/zephyr3d_scene.js.map +1 -1
  14. package/dist/vendor/zephyr3d/backend-webgpu/dist/capabilities_webgpu.js +7 -6
  15. package/dist/vendor/zephyr3d/backend-webgpu/dist/capabilities_webgpu.js.map +1 -1
  16. package/dist/vendor/zephyr3d/backend-webgpu/dist/renderpass_webgpu.js +6 -6
  17. package/dist/vendor/zephyr3d/backend-webgpu/dist/renderpass_webgpu.js.map +1 -1
  18. package/dist/vendor/zephyr3d/base/dist/vfs/common.js +152 -152
  19. package/dist/vendor/zephyr3d/base/dist/vfs/common.js.map +1 -1
  20. package/dist/vendor/zephyr3d/device/dist/device.js +15 -15
  21. package/dist/vendor/zephyr3d/device/dist/device.js.map +1 -1
  22. package/dist/vendor/zephyr3d/loaders/dist/gltf/gltf_importer.js +6 -6
  23. package/dist/vendor/zephyr3d/loaders/dist/gltf/gltf_importer.js.map +1 -1
  24. package/dist/vendor/zephyr3d/scene/dist/animation/animationset.js +191 -194
  25. package/dist/vendor/zephyr3d/scene/dist/animation/animationset.js.map +1 -1
  26. package/dist/vendor/zephyr3d/scene/dist/animation/joint_dynamics_modifier.js +19 -19
  27. package/dist/vendor/zephyr3d/scene/dist/animation/joint_dynamics_modifier.js.map +1 -1
  28. package/dist/vendor/zephyr3d/scene/dist/app/engine.js +131 -131
  29. package/dist/vendor/zephyr3d/scene/dist/app/engine.js.map +1 -1
  30. package/dist/vendor/zephyr3d/scene/dist/app/scriptregistry.js +119 -119
  31. package/dist/vendor/zephyr3d/scene/dist/app/scriptregistry.js.map +1 -1
  32. package/dist/vendor/zephyr3d/scene/dist/asset/model.js +62 -62
  33. package/dist/vendor/zephyr3d/scene/dist/asset/model.js.map +1 -1
  34. package/dist/vendor/zephyr3d/scene/dist/avatar/wardrobe.js +13 -13
  35. package/dist/vendor/zephyr3d/scene/dist/avatar/wardrobe.js.map +1 -1
  36. package/dist/vendor/zephyr3d/scene/dist/camera/camera.js +201 -201
  37. package/dist/vendor/zephyr3d/scene/dist/camera/camera.js.map +1 -1
  38. package/dist/vendor/zephyr3d/scene/dist/index.d.ts +1 -1
  39. package/dist/vendor/zephyr3d/scene/dist/material/mixins/lightmodel/pbrmetallicroughness.js +5 -5
  40. package/dist/vendor/zephyr3d/scene/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
  41. package/dist/vendor/zephyr3d/scene/dist/material/mtoon.js +4 -4
  42. package/dist/vendor/zephyr3d/scene/dist/material/mtoon.js.map +1 -1
  43. package/dist/vendor/zephyr3d/scene/dist/material/pbrblueprint.js +11 -11
  44. package/dist/vendor/zephyr3d/scene/dist/material/pbrblueprint.js.map +1 -1
  45. package/dist/vendor/zephyr3d/scene/dist/material/shader/helper.js +284 -284
  46. package/dist/vendor/zephyr3d/scene/dist/material/shader/helper.js.map +1 -1
  47. package/dist/vendor/zephyr3d/scene/dist/posteffect/ssr.js +9 -9
  48. package/dist/vendor/zephyr3d/scene/dist/posteffect/ssr.js.map +1 -1
  49. package/dist/vendor/zephyr3d/scene/dist/render/lightpass.js +5 -5
  50. package/dist/vendor/zephyr3d/scene/dist/render/lightpass.js.map +1 -1
  51. package/dist/vendor/zephyr3d/scene/dist/render/renderer.js +7 -7
  52. package/dist/vendor/zephyr3d/scene/dist/render/renderer.js.map +1 -1
  53. package/dist/vendor/zephyr3d/scene/dist/shadow/esm.js +1 -1
  54. package/dist/vendor/zephyr3d/scene/dist/shadow/esm.js.map +1 -1
  55. package/dist/vendor/zephyr3d/scene/dist/shadow/shadow_region.js +45 -45
  56. package/dist/vendor/zephyr3d/scene/dist/shadow/shadow_region.js.map +1 -1
  57. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/manager.js +275 -275
  58. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/manager.js.map +1 -1
  59. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/camera.js.map +1 -1
  60. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/mesh.js.map +1 -1
  61. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/sprite.js.map +1 -1
  62. package/package.json +3 -3
  63. package/dist/vendor/zephyr3d/scene/dist/animation/joint_dynamics/convex_collider.js +0 -320
  64. package/dist/vendor/zephyr3d/scene/dist/animation/joint_dynamics/convex_collider.js.map +0 -1
@@ -23,21 +23,21 @@ import { PBRSpecularGlossinessMaterial } from '../material/pbrsg.js';
23
23
  import { PBRMetallicRoughnessMaterial } from '../material/pbrmr.js';
24
24
  import { MToonMaterial } from '../material/mtoon.js';
25
25
 
26
- /**
27
- * Named object interface for model loading
28
- * @public
26
+ /**
27
+ * Named object interface for model loading
28
+ * @public
29
29
  */ class NamedObject {
30
30
  name;
31
- /**
32
- * Creates an instance of NamedObject
33
- * @param name - Name of the object
31
+ /**
32
+ * Creates an instance of NamedObject
33
+ * @param name - Name of the object
34
34
  */ constructor(name){
35
35
  this.name = name;
36
36
  }
37
37
  }
38
- /**
39
- * Heirarchical node interface for model loading
40
- * @public
38
+ /**
39
+ * Heirarchical node interface for model loading
40
+ * @public
41
41
  */ class AssetHierarchyNode extends NamedObject {
42
42
  _parent;
43
43
  _position;
@@ -51,10 +51,10 @@ import { MToonMaterial } from '../material/mtoon.js';
51
51
  _weights;
52
52
  _children;
53
53
  _instances;
54
- /**
55
- * Creates an instance of AssetHierarchyNode
56
- * @param name - Name of the node
57
- * @param parent - Parent of the node
54
+ /**
55
+ * Creates an instance of AssetHierarchyNode
56
+ * @param name - Name of the node
57
+ * @param parent - Parent of the node
58
58
  */ constructor(name, model, parent){
59
59
  super(name);
60
60
  model.nodes.push(this);
@@ -142,9 +142,9 @@ import { MToonMaterial } from '../material/mtoon.js';
142
142
  child.computeTransforms(this._worldMatrix);
143
143
  }
144
144
  }
145
- /**
146
- * Adds a child to this node
147
- * @param child - The child node to be added
145
+ /**
146
+ * Adds a child to this node
147
+ * @param child - The child node to be added
148
148
  */ addChild(child) {
149
149
  if (!child || child.parent) {
150
150
  throw new Error('AssetHierarchyNode.addChild(): invalid child node');
@@ -152,9 +152,9 @@ import { MToonMaterial } from '../material/mtoon.js';
152
152
  this._children.push(child);
153
153
  child._parent = this;
154
154
  }
155
- /**
156
- * Removes a child of this node
157
- * @param child - The child node to be removed
155
+ /**
156
+ * Removes a child of this node
157
+ * @param child - The child node to be removed
158
158
  */ removeChild(child) {
159
159
  const index = this._children.indexOf(child);
160
160
  if (index < 0) {
@@ -163,10 +163,10 @@ import { MToonMaterial } from '../material/mtoon.js';
163
163
  this._children[index]._parent = null;
164
164
  this._children.splice(index, 1);
165
165
  }
166
- /**
167
- * Attach this node to a skeleton
168
- * @param skeleton - The skeleton to which to node will attach
169
- * @param index - The joint index
166
+ /**
167
+ * Attach this node to a skeleton
168
+ * @param skeleton - The skeleton to which to node will attach
169
+ * @param index - The joint index
170
170
  */ attachToSkeleton(skeleton) {
171
171
  if (!this._attachToSkeleton) {
172
172
  this._attachToSkeleton = new Set();
@@ -174,18 +174,18 @@ import { MToonMaterial } from '../material/mtoon.js';
174
174
  this._attachToSkeleton.add(skeleton);
175
175
  }
176
176
  }
177
- /**
178
- * Skeleton information for model loading
179
- * @public
177
+ /**
178
+ * Skeleton information for model loading
179
+ * @public
180
180
  */ class AssetSkeleton extends NamedObject {
181
181
  /** The pivot node */ pivot;
182
182
  /** Joints of the skeleton */ joints;
183
183
  /** Inverse of the binding matrices of the joints */ inverseBindMatrices;
184
184
  /** Binding pose matrices of the joints */ bindPose;
185
185
  /** Explicit humanoid joint mapping, when supplied by the source asset. */ humanoidJointMapping;
186
- /**
187
- * Creates an instance of AssetSkeleton
188
- * @param name - Name of the skeleton
186
+ /**
187
+ * Creates an instance of AssetSkeleton
188
+ * @param name - Name of the skeleton
189
189
  */ constructor(name){
190
190
  super(name);
191
191
  this.name = name;
@@ -195,10 +195,10 @@ import { MToonMaterial } from '../material/mtoon.js';
195
195
  this.bindPose = [];
196
196
  this.humanoidJointMapping = null;
197
197
  }
198
- /**
199
- * Adds a joint to the skeleton
200
- * @param joint - The joint node
201
- * @param inverseBindMatrix - Inverse binding matrix of the joint
198
+ /**
199
+ * Adds a joint to the skeleton
200
+ * @param joint - The joint node
201
+ * @param inverseBindMatrix - Inverse binding matrix of the joint
202
202
  */ addJoint(joint, inverseBindMatrix) {
203
203
  joint.attachToSkeleton(this);
204
204
  this.joints.push(joint);
@@ -222,22 +222,22 @@ import { MToonMaterial } from '../material/mtoon.js';
222
222
  return root;
223
223
  }
224
224
  }
225
- /**
226
- * Scene for model loading
227
- * @public
225
+ /**
226
+ * Scene for model loading
227
+ * @public
228
228
  */ class AssetScene extends NamedObject {
229
229
  /** Root nodes of the scene */ rootNodes;
230
- /**
231
- * Creates an instance of AssetScene
232
- * @param name - Name of the scene
230
+ /**
231
+ * Creates an instance of AssetScene
232
+ * @param name - Name of the scene
233
233
  */ constructor(name){
234
234
  super(name);
235
235
  this.rootNodes = [];
236
236
  }
237
237
  }
238
- /**
239
- * Model information that can be shared by multiple model nodes
240
- * @public
238
+ /**
239
+ * Model information that can be shared by multiple model nodes
240
+ * @public
241
241
  */ class SharedModel extends Disposable {
242
242
  /** @internal */ _nodes;
243
243
  /** @internal */ _skeletons;
@@ -255,8 +255,8 @@ import { MToonMaterial } from '../material/mtoon.js';
255
255
  /** @internal */ _morphTargetGroups;
256
256
  /** @internal */ _textureMap;
257
257
  /** @internal */ _primitiveMap;
258
- /**
259
- * Creates an instance of SharedModel
258
+ /**
259
+ * Creates an instance of SharedModel
260
260
  */ constructor(){
261
261
  super();
262
262
  this._nodes = [];
@@ -526,29 +526,29 @@ import { MToonMaterial } from '../material/mtoon.js';
526
526
  getPrimitiveBaseName(info, index, fallback) {
527
527
  return info?.name?.trim() || `${fallback}_mesh_${index}`;
528
528
  }
529
- /**
530
- * Adds a model-level morph target group.
531
- * @param group - Morph target group to add
529
+ /**
530
+ * Adds a model-level morph target group.
531
+ * @param group - Morph target group to add
532
532
  */ addMorphTargetGroup(group) {
533
533
  if (group?.name && group.bindings?.length > 0) {
534
534
  this._morphTargetGroups.push(group);
535
535
  }
536
536
  }
537
- /**
538
- * Removes all model-level morph target groups.
537
+ /**
538
+ * Removes all model-level morph target groups.
539
539
  */ clearMorphTargetGroups() {
540
540
  this._morphTargetGroups = [];
541
541
  }
542
- /**
543
- * Finds a model-level morph target group by name.
544
- * @param name - Group name
545
- * @returns The matching group, or null if not found
542
+ /**
543
+ * Finds a model-level morph target group by name.
544
+ * @param name - Group name
545
+ * @returns The matching group, or null if not found
546
546
  */ getMorphTargetGroup(name) {
547
547
  return this._morphTargetGroups.find((group)=>group.name === name) ?? null;
548
548
  }
549
- /**
550
- * Builds morph target groups by collecting morph target names from every mesh.
551
- * @returns Generated morph target groups
549
+ /**
550
+ * Builds morph target groups by collecting morph target names from every mesh.
551
+ * @returns Generated morph target groups
552
552
  */ buildMorphTargetGroupsByName() {
553
553
  this.clearMorphTargetGroups();
554
554
  const groups = new Map();
@@ -581,15 +581,15 @@ import { MToonMaterial } from '../material/mtoon.js';
581
581
  this._morphTargetGroups = Array.from(groups.values());
582
582
  return this._morphTargetGroups;
583
583
  }
584
- /**
585
- * Adds a skeleton to the scene
586
- * @param skeleton - The skeleton to be added
584
+ /**
585
+ * Adds a skeleton to the scene
586
+ * @param skeleton - The skeleton to be added
587
587
  */ addSkeleton(skeleton) {
588
588
  this._skeletons.push(skeleton);
589
589
  }
590
- /**
591
- * Adds an animation to the scene
592
- * @param animation - The animation to be added
590
+ /**
591
+ * Adds an animation to the scene
592
+ * @param animation - The animation to be added
593
593
  */ addAnimation(animation) {
594
594
  this._animations.push(animation);
595
595
  }