@a2f0/skyline 0.2.1 → 0.2.2
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/skyline-three.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AmbientLight, BoxGeometry, BufferGeometry, Color, DataTexture, DirectionalLight, EdgesGeometry, Float32BufferAttribute, Group, LineBasicMaterial, LineSegments, Mesh, MeshBasicMaterial, MeshToonMaterial, NearestFilter, PCFSoftShadowMap, OrthographicCamera, PerspectiveCamera, Raycaster, RedFormat, Scene, Vector2, Vector3, WebGLRenderer, } from "three";
|
|
1
|
+
export { AmbientLight, BoxGeometry, BufferGeometry, Color, DataTexture, DirectionalLight, EdgesGeometry, Float32BufferAttribute, Group, LineBasicMaterial, LineSegments, Mesh, MeshBasicMaterial, MeshToonMaterial, NearestFilter, PCFShadowMap, PCFSoftShadowMap, OrthographicCamera, PerspectiveCamera, Raycaster, RedFormat, Scene, Vector2, Vector3, WebGLRenderer, } from "three";
|
|
2
2
|
export { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
package/lib/skyline-three.js
CHANGED
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
// module, or a dynamic import of it, so the viewer shares the host's engine:
|
|
4
4
|
//
|
|
5
5
|
// mountSkyline(container, { assetsUrl, three: import("@a2f0/skyline/three") });
|
|
6
|
-
|
|
6
|
+
//
|
|
7
|
+
// PCFSoftShadowMap, which r186 removed, is deprecated here: the viewer shadows with
|
|
8
|
+
// PCFShadowMap, and the old name stays exported so hosts that import it keep building.
|
|
9
|
+
export { AmbientLight, BoxGeometry, BufferGeometry, Color, DataTexture, DirectionalLight, EdgesGeometry, Float32BufferAttribute, Group, LineBasicMaterial, LineSegments, Mesh, MeshBasicMaterial, MeshToonMaterial, NearestFilter, PCFShadowMap, PCFSoftShadowMap, OrthographicCamera, PerspectiveCamera, Raycaster, RedFormat, Scene, Vector2, Vector3, WebGLRenderer, } from "three";
|
|
7
10
|
export { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
package/lib/three-engine.d.ts
CHANGED
|
@@ -3,8 +3,10 @@ import type { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The part of Three.js the viewer uses: `@a2f0/skyline/three` exports exactly this from the
|
|
5
5
|
* host's `three`, so a host's bundler keeps no more of its engine than the viewer needs.
|
|
6
|
+
* The viewer shadows with `PCFShadowMap`; `PCFSoftShadowMap`, which r186 removed, stays
|
|
7
|
+
* listed only because earlier releases exported it.
|
|
6
8
|
*/
|
|
7
|
-
export type SkylineThree = Pick<typeof THREE, "AmbientLight" | "BoxGeometry" | "BufferGeometry" | "Color" | "DataTexture" | "DirectionalLight" | "EdgesGeometry" | "Float32BufferAttribute" | "Group" | "LineBasicMaterial" | "LineSegments" | "Mesh" | "MeshBasicMaterial" | "MeshToonMaterial" | "NearestFilter" | "PCFSoftShadowMap" | "OrthographicCamera" | "PerspectiveCamera" | "Raycaster" | "RedFormat" | "Scene" | "Vector2" | "Vector3" | "WebGLRenderer"> & {
|
|
9
|
+
export type SkylineThree = Pick<typeof THREE, "AmbientLight" | "BoxGeometry" | "BufferGeometry" | "Color" | "DataTexture" | "DirectionalLight" | "EdgesGeometry" | "Float32BufferAttribute" | "Group" | "LineBasicMaterial" | "LineSegments" | "Mesh" | "MeshBasicMaterial" | "MeshToonMaterial" | "NearestFilter" | "PCFShadowMap" | "PCFSoftShadowMap" | "OrthographicCamera" | "PerspectiveCamera" | "Raycaster" | "RedFormat" | "Scene" | "Vector2" | "Vector3" | "WebGLRenderer"> & {
|
|
8
10
|
readonly OrbitControls: typeof OrbitControls;
|
|
9
11
|
};
|
|
10
12
|
/**
|
package/package.json
CHANGED
package/site/study-viewer.js
CHANGED
|
@@ -50,7 +50,9 @@ export function createBuildingStudy({ models, defaultView = "quarter", views = {
|
|
|
50
50
|
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
|
|
51
51
|
renderer.setPixelRatio(Math.min(devicePixelRatio || 1, 2));
|
|
52
52
|
renderer.shadowMap.enabled = true;
|
|
53
|
-
|
|
53
|
+
// r186 removed PCFSoftShadowMap and renders it as PCFShadowMap, with a console warning;
|
|
54
|
+
// PCFShadowMap draws the same shadows without the warning.
|
|
55
|
+
renderer.shadowMap.type = THREE.PCFShadowMap;
|
|
54
56
|
const scene = new THREE.Scene();
|
|
55
57
|
const labelLayer = document.createElement("div");
|
|
56
58
|
labelLayer.className = "study-annotations";
|