hilo3d 1.16.1 → 1.16.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hilo3d",
3
- "version": "1.16.1",
3
+ "version": "1.16.3",
4
4
  "description": "Hilo3d, a WebGL 3d engine.",
5
5
  "main": "build/Hilo3d.js",
6
6
  "types": "types/index.d.ts",
package/types/index.d.ts CHANGED
@@ -490,17 +490,27 @@ interface EventObject {
490
490
  }
491
491
 
492
492
  /**
493
- * @param [e] - 事件对象
493
+ * @param e - 事件对象
494
494
  * @param e.type - 事件类型
495
495
  * @param e.detail - 事件数据
496
496
  * @param e.target - 事件触发对象
497
497
  * @param e.timeStamp - 时间戳
498
+ * @param e.stageX - 鼠标相对 stage 的 x 偏移 ( 仅鼠标事件有效 )
499
+ * @param e.stageY - 鼠标相对 stage 的 y 偏移 ( 仅鼠标事件有效 )
500
+ * @param e.eventTarget - 触发鼠标事件的对象 ( 仅鼠标事件有效 )
501
+ * @param e.eventCurrentTarget - 监听鼠标事件的对象 ( 仅鼠标事件有效 )
502
+ * @param e.hitPoint - 鼠标碰撞点 ( 仅鼠标事件有效 )
498
503
  */
499
- type EventMixinCallback = (e?: {
504
+ type EventMixinCallback = (e: {
500
505
  type: string;
501
506
  detail: any;
502
507
  target: any;
503
- timeStamp: Date;
508
+ timeStamp: number;
509
+ stageX: number;
510
+ stageY: number;
511
+ eventTarget: Node;
512
+ eventCurrentTarget: Node;
513
+ hitPoint: Vector3;
504
514
  }) => void;
505
515
 
506
516
  /**
@@ -638,6 +648,13 @@ type GeometryDataTraverseCallback = (attribute: number | Vector2 | Vector3 | Vec
638
648
  */
639
649
  type GeometryDataTraverseByComponentCallback = (component: number, index: number, offset: number) => void;
640
650
 
651
+ /**
652
+ * 更新自定义灯光回调
653
+ * @param lightManager
654
+ * @param camera
655
+ */
656
+ type updateCustomInfoCallback = (lightManager: LightManager, camera: Camera) => void;
657
+
641
658
  /**
642
659
  * GLTFExtension Handler 接口
643
660
  */
@@ -4078,6 +4095,10 @@ class Quaternion implements EventMixin {
4078
4095
  */
4079
4096
  className: string;
4080
4097
  isQuaternion: boolean;
4098
+ /**
4099
+ * 数据
4100
+ */
4101
+ elements: Float32Array;
4081
4102
  /**
4082
4103
  * Copy the values from one quat to this
4083
4104
  * @param q
@@ -4360,6 +4381,14 @@ class Plane {
4360
4381
  */
4361
4382
  className: string;
4362
4383
  isPlane: boolean;
4384
+ /**
4385
+ * 法线向量
4386
+ */
4387
+ normal: Vector3;
4388
+ /**
4389
+ * 距离
4390
+ */
4391
+ distance: number;
4363
4392
  /**
4364
4393
  * Copy the values from one plane to this
4365
4394
  * @param m - the source plane
@@ -4615,10 +4644,10 @@ class Matrix4 {
4615
4644
  * of a transformation matrix. If a matrix is built with
4616
4645
  * fromRotationTranslation, the returned quaternion will be the
4617
4646
  * same as the quaternion originally supplied.
4618
- * @param out - Quaternion to receive the rotation component
4647
+ * @param [out = new Quaternion] - Quaternion to receive the rotation component
4619
4648
  * @returns out
4620
4649
  */
4621
- getRotation(out: Quaternion): Quaternion;
4650
+ getRotation(out?: Quaternion): Quaternion;
4622
4651
  /**
4623
4652
  * Creates a matrix from a quaternion rotation, vector translation and vector scale
4624
4653
  * @param q - Rotation quaternion
@@ -5042,6 +5071,10 @@ class Euler {
5042
5071
  * 旋转顺序,默认为 ZYX
5043
5072
  */
5044
5073
  order: string;
5074
+ /**
5075
+ * 数据
5076
+ */
5077
+ elements: Float32Array;
5045
5078
  /**
5046
5079
  * 克隆
5047
5080
  */
@@ -6339,6 +6372,11 @@ class LightManager {
6339
6372
  constructor(params?: any);
6340
6373
  isLightManager: boolean;
6341
6374
  className: string;
6375
+ ambientLights: AmbientLight[];
6376
+ directionalLights: DirectionalLight[];
6377
+ pointLights: PointLight[];
6378
+ spotLights: SpotLight[];
6379
+ areaLights: AreaLight[];
6342
6380
  /**
6343
6381
  * 增加光
6344
6382
  * @param light - 光源
@@ -6374,6 +6412,10 @@ class LightManager {
6374
6412
  * @param camera - 摄像机
6375
6413
  */
6376
6414
  updateInfo(camera: Camera): void;
6415
+ /**
6416
+ * 更新自定义灯光信息
6417
+ */
6418
+ updateCustomInfo: updateCustomInfoCallback;
6377
6419
  /**
6378
6420
  * 获取光源信息
6379
6421
  */
@@ -7712,15 +7754,15 @@ class Node implements EventMixin {
7712
7754
  /**
7713
7755
  * traverse callback 返回值,执行后不暂停 traverse
7714
7756
  */
7715
- static TRAVERSE_STOP_NONE: any;
7757
+ static TRAVERSE_STOP_NONE: number;
7716
7758
  /**
7717
7759
  * traverse callback 返回值,执行后暂停子元素 traverse
7718
7760
  */
7719
- static TRAVERSE_STOP_CHILDREN: any;
7761
+ static TRAVERSE_STOP_CHILDREN: number;
7720
7762
  /**
7721
7763
  * traverse callback 返回值,执行后暂停所有 traverse
7722
7764
  */
7723
- static TRAVERSE_STOP_ALL: any;
7765
+ static TRAVERSE_STOP_ALL: number;
7724
7766
  isNode: boolean;
7725
7767
  className: string;
7726
7768
  /**
Binary file