@xeokit/xeokit-sdk 2.3.2 → 2.3.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,9 +1,9 @@
1
1
  {
2
2
  "name": "@xeokit/xeokit-sdk",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "Web Programming Toolkit for 3D/2D BIM and AEC Graphics",
5
- "module": "/dist/xeokit-sdk.es.js",
6
- "main": "/dist/xeokit-sdk.cjs.js",
5
+ "module": "./dist/xeokit-sdk.es.js",
6
+ "main": "./dist/xeokit-sdk.cjs.js",
7
7
  "types": "./types/index.d.ts",
8
8
  "scripts": {
9
9
  "build": "rollup --config rollup.config.js; rollup --config rollup.minified.config.js; cp node_modules/web-ifc/web-ifc.wasm dist/.",
@@ -13,7 +13,7 @@ export declare type FastNavPluginConfiguration = {
13
13
  /** Whether to temporarily hide transparent objects whenever we interact with the Viewer. */
14
14
  hideTransparentObjects?: boolean;
15
15
  /** Whether to temporarily down-scale the canvas resolution whenever we interact with the Viewer. */
16
- scaleCanvasResolution?: number;
16
+ scaleCanvasResolution?: boolean;
17
17
  /** The factor by which we downscale the canvas resolution whenever we interact with the Viewer. */
18
18
  scaleCanvasResolutionFactor?: number;
19
19
  /** Whether to temporarily have a delay before restoring normal rendering after we stop interacting with the Viewer. */
@@ -4,6 +4,7 @@ export * from "./Entity";
4
4
  export * from "./camera";
5
5
  export * from "./CameraControl/CameraControl";
6
6
  export * from "./geometry";
7
+ export * from "./lights";
7
8
  export * from "./marker";
8
9
  export * from "./materials";
9
10
  export * from "./math/math";
@@ -0,0 +1,19 @@
1
+ import { Component } from '../Component';
2
+ import { Light } from './Light';
3
+
4
+ export declare type AmbientLightConfiguration = {
5
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
6
+ id?: string;
7
+ /** The color of this AmbientLight. */
8
+ color?: number[]
9
+ /** The intensity of this AmbientLight, as a factor in range ````[0..1]````. */
10
+ intensity?: number;
11
+ };
12
+
13
+ export declare class AmbientLight extends Light {
14
+ /**
15
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this AmbientLight as well.
16
+ * @param {AmbientLightConfiguration} [cfg] AmbientLight configuration
17
+ */
18
+ constructor(owner: Component, cfg: AmbientLightConfiguration);
19
+ }
@@ -0,0 +1,25 @@
1
+ import { Component } from '../Component';
2
+ import { Light } from './Light';
3
+
4
+ export declare type DirLightConfiguration = {
5
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
6
+ id?: string;
7
+ /** A unit vector indicating the direction that the light is shining, given in either World or View space, depending on the value of the ````space```` parameter. */
8
+ dir?: number[]
9
+ /** The color of this DirLight. */
10
+ color?: number[]
11
+ /** The intensity of this AmbientLight, as a factor in range ````[0..1]````. */
12
+ intensity?: number;
13
+ /** The coordinate system the DirLight is defined in - ````"view"```` or ````"space"````. */
14
+ space?: 'view' | 'space';
15
+ /** Flag which indicates if this DirLight casts a castsShadow. */
16
+ castsShadow?: boolean;
17
+ };
18
+
19
+ export declare class DirLight extends Light {
20
+ /**
21
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this AmbientLight as well.
22
+ * @param {DirLightConfiguration} [cfg] DirLight configuration
23
+ */
24
+ constructor(owner: Component, cfg: DirLightConfiguration);
25
+ }
@@ -0,0 +1,4 @@
1
+ import { Component } from "../Component";
2
+
3
+ export declare class Light extends Component {
4
+ }
@@ -0,0 +1,31 @@
1
+ import { Component } from '../Component';
2
+ import {Light} from './Light';
3
+
4
+ export declare type PointLightConfiguration = {
5
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
6
+ id?: string;
7
+ /** Position, in either World or View space, depending on the value of the **space** parameter. */
8
+ pos?: number[]
9
+ /** The color of this DirLight. */
10
+ color?: number[]
11
+ /** The intensity of this AmbientLight, as a factor in range ````[0..1]````. */
12
+ intensity?: number;
13
+ /** Constant attenuation factor. */
14
+ constantAttenuation?: number;
15
+ /** Linear attenuation factor. */
16
+ linearAttenuation?: number;
17
+ /** Quadratic attenuation factor. */
18
+ quadraticAttenuation?: number;
19
+ /** The coordinate system the PointLight is defined in - ````"view"```` or ````"space"````. */
20
+ space?: 'view' | 'space';
21
+ /** Flag which indicates if this PointLight casts a castsShadow. */
22
+ castsShadow?: boolean;
23
+ };
24
+
25
+ export declare class PointLight extends Light {
26
+ /**
27
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this AmbientLight as well.
28
+ * @param {PointLightConfiguration} [cfg] PointLight configuration
29
+ */
30
+ constructor(owner: Component, cfg: PointLightConfiguration);
31
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./AmbientLight";
2
+ export * from "./DirLight";
3
+ export * from "./PointLight";