@openglobus/og 0.25.2 → 0.25.4

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/lib/Object3d.d.ts CHANGED
@@ -19,6 +19,7 @@ interface IObject3dParams {
19
19
  normalTexture?: string;
20
20
  metallicRoughnessTexture?: string;
21
21
  }
22
+ type MaterialParams = Pick<IObject3dParams, 'ambient' | 'diffuse' | 'specular' | 'shininess'>;
22
23
  declare class Object3d {
23
24
  protected _name: string;
24
25
  protected _vertices: number[];
@@ -38,6 +39,16 @@ declare class Object3d {
38
39
  constructor(data?: IObject3dParams);
39
40
  static getCenter(verts: number[]): Vec3;
40
41
  static centering(verts: number[]): void;
42
+ /**
43
+ * Sets the material properties for the 3D object.
44
+ *
45
+ * @param {MaterialParams} data - An object containing material properties.
46
+ * @param {string | NumberArray3} [data.ambient] - Ambient color of the material, as a hex string (e.g., "#ffffff") or an array of three numbers [r, g, b].
47
+ * @param {string | NumberArray3} [data.diffuse] - Diffuse color of the material.
48
+ * @param {string | NumberArray3} [data.specular] - Specular color of the material.
49
+ * @param {number} [data.shininess=100] - Shininess coefficient of the material, controlling specular highlight size.
50
+ */
51
+ setMaterial(data: MaterialParams): this;
41
52
  centering(): this;
42
53
  applyMat4(m: Mat4): this;
43
54
  scale(s: Vec3): this;
@@ -74,6 +74,7 @@ declare class GeoObjectEditorScene extends RenderNode {
74
74
  protected _ops: Record<string, (mouseState: IMouseState) => void>;
75
75
  protected _axisTrackVisibility: boolean;
76
76
  constructor(options?: IGeoObjectEditorSceneParams);
77
+ get ellipsoid(): Ellipsoid | undefined;
77
78
  get planet(): Planet | null;
78
79
  bindPlanet(planet: Planet): void;
79
80
  init(): void;