@configura/babylon-view 2.2.0-alpha.2 → 2.2.0
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/animation/index.d.ts +5 -0
- package/dist/animation/index.js +4 -0
- package/dist/camera/index.d.ts +6 -0
- package/dist/camera/index.js +5 -0
- package/dist/engine/index.d.ts +2 -0
- package/dist/engine/index.js +1 -0
- package/dist/index.d.ts +8 -17
- package/dist/index.js +8 -17
- package/dist/io/index.d.ts +4 -0
- package/dist/io/index.js +3 -0
- package/dist/light/DefaultLightRig.d.ts +11 -7
- package/dist/light/DefaultLightRig.js +16 -11
- package/dist/light/index.d.ts +6 -0
- package/dist/light/index.js +5 -0
- package/dist/scene/index.d.ts +2 -0
- package/dist/scene/index.js +1 -0
- package/dist/utilities/index.d.ts +4 -0
- package/dist/utilities/index.js +3 -0
- package/dist/view/index.d.ts +8 -0
- package/dist/view/index.js +7 -0
- package/package.json +5 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./coordinator/CoordinatorDropAndSpin.js";
|
|
2
|
+
export * from "./coordinator/CoordinatorPulseBounce.js";
|
|
3
|
+
export * from "./coordinator/CoordinatorPulseHighlight.js";
|
|
4
|
+
export * from "./coordinator/CoordinatorPulseInflate.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./EngineCreator.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
export * from "./animation/
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./io/CfgWindowMessageToCameraConfConnector.js";
|
|
10
|
-
export * from "./utilities/utilities3D.js";
|
|
11
|
-
export * from "./view/BaseView.js";
|
|
12
|
-
export * from "./view/BaseViewConfiguration.js";
|
|
13
|
-
export * from "./view/RenderEnv.js";
|
|
14
|
-
export * from "./view/SingleProductDefaultCameraView.js";
|
|
15
|
-
export * from "./view/SingleProductDefaultCameraViewConfiguration.js";
|
|
16
|
-
export * from "./view/SingleProductView.js";
|
|
17
|
-
export * from "./view/SingleProductViewConfiguration.js";
|
|
1
|
+
export * from "./animation/index.js";
|
|
2
|
+
export * from "./camera/index.js";
|
|
3
|
+
export * from "./engine/index.js";
|
|
4
|
+
export * from "./io/index.js";
|
|
5
|
+
export * from "./light/index.js";
|
|
6
|
+
export * from "./scene/index.js";
|
|
7
|
+
export * from "./utilities/index.js";
|
|
8
|
+
export * from "./view/index.js";
|
|
18
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
export * from "./animation/
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./io/CfgWindowMessageToCameraConfConnector.js";
|
|
10
|
-
export * from "./utilities/utilities3D.js";
|
|
11
|
-
export * from "./view/BaseView.js";
|
|
12
|
-
export * from "./view/BaseViewConfiguration.js";
|
|
13
|
-
export * from "./view/RenderEnv.js";
|
|
14
|
-
export * from "./view/SingleProductDefaultCameraView.js";
|
|
15
|
-
export * from "./view/SingleProductDefaultCameraViewConfiguration.js";
|
|
16
|
-
export * from "./view/SingleProductView.js";
|
|
17
|
-
export * from "./view/SingleProductViewConfiguration.js";
|
|
1
|
+
export * from "./animation/index.js";
|
|
2
|
+
export * from "./camera/index.js";
|
|
3
|
+
export * from "./engine/index.js";
|
|
4
|
+
export * from "./io/index.js";
|
|
5
|
+
export * from "./light/index.js";
|
|
6
|
+
export * from "./scene/index.js";
|
|
7
|
+
export * from "./utilities/index.js";
|
|
8
|
+
export * from "./view/index.js";
|
package/dist/io/index.js
ADDED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
+
import { Light } from "@babylonjs/core/Lights/light.js";
|
|
1
2
|
import { Node } from "@babylonjs/core/node.js";
|
|
2
3
|
import { Scene } from "@babylonjs/core/scene.js";
|
|
4
|
+
import { CfgPointLight } from "./CfgPointLight.js";
|
|
3
5
|
import { LightRig, LightRigCreator } from "./LightRigCreator.js";
|
|
4
6
|
export declare const getDefaultLightRigCreator: (relativeToCamera: boolean) => LightRigCreator;
|
|
5
7
|
export declare class DefaultLightRig extends LightRig {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
protected readonly scene: Scene;
|
|
9
|
+
protected _allLights: Light[];
|
|
10
|
+
protected _allPointLights: CfgPointLight[];
|
|
11
|
+
protected _defaultIntensities: number[];
|
|
12
|
+
protected _dimLevel: number;
|
|
10
13
|
get dimLevel(): number;
|
|
11
14
|
set dimLevel(v: number);
|
|
12
|
-
|
|
15
|
+
protected _scale: number;
|
|
13
16
|
get scale(): number;
|
|
14
17
|
set scale(v: number);
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
protected applyDimLevel(): void;
|
|
19
|
+
protected applyScale(): void;
|
|
17
20
|
constructor(scene: Scene, target: Node | undefined);
|
|
21
|
+
protected addLights(): void;
|
|
18
22
|
get lightCount(): number;
|
|
19
23
|
}
|
|
20
24
|
//# sourceMappingURL=DefaultLightRig.d.ts.map
|
|
@@ -14,6 +14,7 @@ export const getDefaultLightRigCreator = (relativeToCamera) => (scene, target) =
|
|
|
14
14
|
export class DefaultLightRig extends LightRig {
|
|
15
15
|
constructor(scene, target) {
|
|
16
16
|
super("Light Rig");
|
|
17
|
+
this.scene = scene;
|
|
17
18
|
this._allLights = [];
|
|
18
19
|
this._allPointLights = [];
|
|
19
20
|
this._defaultIntensities = [];
|
|
@@ -28,17 +29,7 @@ export class DefaultLightRig extends LightRig {
|
|
|
28
29
|
this.position.setAll(0);
|
|
29
30
|
this.scaling.setAll(1);
|
|
30
31
|
this.rotation.setAll(0);
|
|
31
|
-
|
|
32
|
-
// The light rig is by default attached to a CfgOrbitalCamera and thus rotates around the
|
|
33
|
-
// current product, as well being scaled to fit around the product. The names of the lights
|
|
34
|
-
// below are relative to what the camera looks at in this default configuration. In other
|
|
35
|
-
// words, "behind" means the light is on the far side of the product relative to the camera.
|
|
36
|
-
this._allLights.push(new CfgDirectionalLight("directional", scene, this, new Vector3(-35, -25, -10), lightColor, 1.2 * BASE_NO_DECAY_LIGHT_POWER));
|
|
37
|
-
this._allPointLights.push(new CfgPointLight("rightUpBehind", scene, this, new Vector3(10, 10, -5).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 0.8 * BASE_DECAY_LIGHT_POWER));
|
|
38
|
-
this._allPointLights.push(new CfgPointLight("below", scene, this, new Vector3(0, -10, 0).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 1.5 * BASE_DECAY_LIGHT_POWER));
|
|
39
|
-
this._allPointLights.push(new CfgPointLight("leftFront", scene, this, new Vector3(-10, 0, 10).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 1.2 * BASE_DECAY_LIGHT_POWER));
|
|
40
|
-
this._allPointLights.push(new CfgPointLight("rightUpFront", scene, this, new Vector3(10, 10, 5).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 0.8 * BASE_DECAY_LIGHT_POWER));
|
|
41
|
-
this._allPointLights.push(new CfgPointLight("rightUp", scene, this, new Vector3(1, 15, 0).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 0.8 * BASE_DECAY_LIGHT_POWER));
|
|
32
|
+
this.addLights();
|
|
42
33
|
this._allLights.push(...this._allPointLights);
|
|
43
34
|
this._allLights.forEach((light, index) => {
|
|
44
35
|
this._defaultIntensities[index] = light.intensity;
|
|
@@ -71,6 +62,20 @@ export class DefaultLightRig extends LightRig {
|
|
|
71
62
|
applyScale() {
|
|
72
63
|
this.scaling = new Vector3(this.scale, this.scale, this.scale);
|
|
73
64
|
}
|
|
65
|
+
addLights() {
|
|
66
|
+
const { scene } = this;
|
|
67
|
+
const lightColor = 0xffffff;
|
|
68
|
+
// The light rig is by default attached to a CfgOrbitalCamera and thus rotates around the
|
|
69
|
+
// current product, as well being scaled to fit around the product. The names of the lights
|
|
70
|
+
// below are relative to what the camera looks at in this default configuration. In other
|
|
71
|
+
// words, "behind" means the light is on the far side of the product relative to the camera.
|
|
72
|
+
this._allLights.push(new CfgDirectionalLight("directional", scene, this, new Vector3(-35, -25, -10), lightColor, 1.2 * BASE_NO_DECAY_LIGHT_POWER));
|
|
73
|
+
this._allPointLights.push(new CfgPointLight("rightUpBehind", scene, this, new Vector3(10, 10, -5).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 0.8 * BASE_DECAY_LIGHT_POWER));
|
|
74
|
+
this._allPointLights.push(new CfgPointLight("below", scene, this, new Vector3(0, -10, 0).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 1.5 * BASE_DECAY_LIGHT_POWER));
|
|
75
|
+
this._allPointLights.push(new CfgPointLight("leftFront", scene, this, new Vector3(-10, 0, 10).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 1.2 * BASE_DECAY_LIGHT_POWER));
|
|
76
|
+
this._allPointLights.push(new CfgPointLight("rightUpFront", scene, this, new Vector3(10, 10, 5).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 0.8 * BASE_DECAY_LIGHT_POWER));
|
|
77
|
+
this._allPointLights.push(new CfgPointLight("rightUp", scene, this, new Vector3(1, 15, 0).scaleInPlace(BASE_LIGHT_SCALE), lightColor, 0.8 * BASE_DECAY_LIGHT_POWER));
|
|
78
|
+
}
|
|
74
79
|
get lightCount() {
|
|
75
80
|
return this._allLights.length;
|
|
76
81
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SceneCreator.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./BaseView.js";
|
|
2
|
+
export * from "./BaseViewConfiguration.js";
|
|
3
|
+
export * from "./RenderEnv.js";
|
|
4
|
+
export * from "./SingleProductDefaultCameraView.js";
|
|
5
|
+
export * from "./SingleProductDefaultCameraViewConfiguration.js";
|
|
6
|
+
export * from "./SingleProductView.js";
|
|
7
|
+
export * from "./SingleProductViewConfiguration.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./BaseView.js";
|
|
2
|
+
export * from "./BaseViewConfiguration.js";
|
|
3
|
+
export * from "./RenderEnv.js";
|
|
4
|
+
export * from "./SingleProductDefaultCameraView.js";
|
|
5
|
+
export * from "./SingleProductDefaultCameraViewConfiguration.js";
|
|
6
|
+
export * from "./SingleProductView.js";
|
|
7
|
+
export * from "./SingleProductViewConfiguration.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/babylon-view",
|
|
3
|
-
"version": "2.2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"@babylonjs/loaders": "5.52.0",
|
|
23
23
|
"@babylonjs/materials": "5.52.0",
|
|
24
24
|
"@babylonjs/serializers": "5.52.0",
|
|
25
|
-
"@configura/web-core": "2.2.0
|
|
26
|
-
"@configura/web-utilities": "2.2.0
|
|
25
|
+
"@configura/web-core": "2.2.0",
|
|
26
|
+
"@configura/web-utilities": "2.2.0",
|
|
27
27
|
"babylonjs-gltf2interface": "5.22.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@configura/web-api": "2.2.0
|
|
30
|
+
"@configura/web-api": "2.2.0",
|
|
31
31
|
"@types/react": "17.0.9",
|
|
32
32
|
"@types/react-dom": "17.0.6",
|
|
33
33
|
"del-cli": "^3.0.0",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "4b0f18c99803bda6c74eb89c00d1cf6f29139be1"
|
|
40
40
|
}
|