Skip to content

Commit 8c9be92

Browse files
committed
Docs tweaks
1 parent 53ce756 commit 8c9be92

23 files changed

+110
-116
lines changed

packages/bcf/src/LoadBCFViewpointParams.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {BCFViewpoint} from "./BCFViewpoint";
33
import {Data} from "@xeokit/data";
44

55
/**
6-
* Options for {@link @xeokit/bcf!loadBCFViewpoint}.
6+
* Options for {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint}.
77
*
88
* See {@link "@xeokit/bcf" | @xeokit/bcf} for usage.
99
*/
@@ -30,7 +30,7 @@ export interface LoadBCFViewpointParams {
3030
* {@link @xeokit/viewer!ViewObject | ViewObjects} within the given target View, ignoring any
3131
* {@link @xeokit/viewer!ViewLayer | ViewLayers} that those ViewObjects may have been partitioned into.
3232
*
33-
* The {@link @xeokit/bcf!loadBCFViewpoint} function will silently ignore each component state that has no corresponding
33+
* The {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} function will silently ignore each component state that has no corresponding
3434
* ViewObject in the target View.
3535
*/
3636
view: View;
@@ -44,7 +44,7 @@ export interface LoadBCFViewpointParams {
4444
* Only load BCF viewpoint components if their corresponding {@link @xeokit/viewer!ViewObject | ViewObjects}
4545
* are in {@link @xeokit/viewer!ViewLayer |ViewLayers} that have the given IDs.
4646
*
47-
* The {@link @xeokit/bcf!loadBCFViewpoint} function will silently ignore each component state that has no corresponding
47+
* The {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} function will silently ignore each component state that has no corresponding
4848
* ViewObject in any of these ViewLayers.
4949
*
5050
* Each ViewLayer's occurrence in {@link @xeokit/bcf!LoadBCFViewpointParams.excludeLayerIds | LoadBCFViewpointParams.excludeLayerIds} will override
@@ -56,7 +56,7 @@ export interface LoadBCFViewpointParams {
5656
* Never load BCF viewpoint components if their corresponding {@link @xeokit/viewer!ViewObject | ViewObjects}
5757
* are in {@link @xeokit/viewer!ViewLayer | ViewLayers} that have the given IDs.
5858
*
59-
* The {@link @xeokit/bcf!loadBCFViewpoint} function will silently ignore each component state that has a corresponding
59+
* The {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} function will silently ignore each component state that has a corresponding
6060
* ViewObject in any of these ViewLayers.
6161
*
6262
* Each ViewLayer's occurrence in this list will override its occurrance

packages/bcf/src/SaveBCFViewpointParams.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type {View} from "@xeokit/viewer";
22

33
/**
4-
* Options for {@link @xeokit/bcf!saveBCFViewpoint}.
4+
* Options for {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint}.
55
*
66
* See {@link "@xeokit/bcf" | @xeokit/bcf} for usage.
77
*/
@@ -68,7 +68,7 @@ export interface SaveBCFViewpointParams {
6868
* Only save BCF viewpoint components if their corresponding {@link @xeokit/viewer!ViewObject | ViewObjects}
6969
* are in {@link @xeokit/viewer!ViewLayer | ViewLayers} that match these IDs.
7070
*
71-
* The {@link @xeokit/bcf!saveBCFViewpoint} function will silently ignore each component state that has no corresponding
71+
* The {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} function will silently ignore each component state that has no corresponding
7272
* ViewObject in any of these ViewLayers.
7373
*
7474
* Each ViewLayer's occurrence in {@link @xeokit/bcf!SaveBCFViewpointParams.excludeLayerIds | SaveBCFViewpointParams.excludeLayerIds} will override
@@ -80,7 +80,7 @@ export interface SaveBCFViewpointParams {
8080
* Never save BCF viewpoint components if their corresponding {@link @xeokit/viewer!ViewObject | ViewObjects}
8181
* are in {@link @xeokit/viewer!ViewLayer |ViewLayers} that have the given IDs.
8282
*
83-
* The {@link @xeokit/bcf!saveBCFViewpoint} function will silently ignore each component state that has a corresponding
83+
* The {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} function will silently ignore each component state that has a corresponding
8484
* ViewObject in any of these ViewLayers.
8585
*
8686
* Each ViewLayer's occurrence in this list will override its occurrance

packages/bcf/src/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
* project stakeholders in BIM workflows.
2020
*
2121
* To import a JSON-encoded BCF viewpoint into a {@link @xeokit/viewer!View | View} belonging to a {@link @xeokit/viewer!Viewer | Viewer}, use the
22-
* {@link @xeokit/bcf!loadBCFViewpoint} function. Similarly, to export the state of a View as a JSON-encoded BCF viewpoint, use
23-
* the {@link @xeokit/bcf!saveBCFViewpoint} function.
22+
* {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} function. Similarly, to export the state of a View as a JSON-encoded BCF viewpoint, use
23+
* the {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} function.
2424
*
25-
* Refer to {@link @xeokit/bcf!BCFViewpoint} for information on the BCF viewpoint format.
25+
* Refer to {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint} for information on the BCF viewpoint format.
2626
*
2727
* <br>
2828
*
@@ -99,7 +99,7 @@
9999
* {@link @xeokit/data!DataModel.onBuilt | DataModel.onBuilt} events.
100100
*
101101
* On the SceneModel.onBuilt event, we'll customize the View by arranging the {@link @xeokit/viewer!Camera} and applying
102-
* an X-ray effect tp a couple of objects, then we'll use {@link @xeokit/bcf!saveBCFViewpoint} to save the state of the View to
102+
* an X-ray effect tp a couple of objects, then we'll use {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} to save the state of the View to
103103
* a BCF viewpoint.
104104
*
105105
* Once the SceneModel and DataModel have been built, we can no longer add anything to them.
@@ -123,8 +123,8 @@
123123
* });
124124
* ````
125125
*
126-
* Now that we've saved the {@link @xeokit/bcf!BCFViewpoint}, we could now use {@link @xeokit/bcf!loadBCFViewpoint} to load
127-
* the {@link @xeokit/bcf!BCFViewpoint} back into the {@link @xeokit/viewer!View | View}:
126+
* Now that we've saved the {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint}, we could now use {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} to load
127+
* the {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint} back into the {@link @xeokit/viewer!View | View}:
128128
*
129129
* ````javascript
130130
* loadBCFViewpoint({
@@ -188,8 +188,8 @@
188188
* myOtherSceneModel.build();
189189
* ````
190190
*
191-
* Now we can use {@link @xeokit/bcf!saveBCFViewpoint} to save the states of only the {@link @xeokit/viewer!ViewObject | ViewObjects} in the
192-
* {@link @xeokit/viewer!ViewLayer | ViewLayer} that contains our SceneModel to a {@link @xeokit/bcf!BCFViewpoint}, while ignoring the
191+
* Now we can use {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} to save the states of only the {@link @xeokit/viewer!ViewObject | ViewObjects} in the
192+
* {@link @xeokit/viewer!ViewLayer | ViewLayer} that contains our SceneModel to a {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint}, while ignoring the
193193
* other ViewLayer:
194194
*
195195
* ````javascript
@@ -200,7 +200,7 @@
200200
* });
201201
* ````
202202
*
203-
* Use {@link @xeokit/bcf!loadBCFViewpoint} to load the {@link @xeokit/bcf!BCFViewpoint} back into the {@link @xeokit/viewer!ViewLayer | ViewLayer}:
203+
* Use {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} to load the {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint} back into the {@link @xeokit/viewer!ViewLayer | ViewLayer}:
204204
*
205205
* ````javascript
206206
* loadBCFViewpoint({

packages/bcf/src/loadBCFViewpoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const tempVec3b = createVec3();
1414
const tempVec3c = createVec3();
1515

1616
/**
17-
* Loads a {@link @xeokit/bcf!BCFViewpoint} into a {@link @xeokit/viewer!View | View}.
17+
* Loads a {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint} into a {@link @xeokit/viewer!View | View}.
1818
*
1919
* See {@link "@xeokit/bcf" | @xeokit/bcf} for usage.
2020
*

packages/bcf/src/saveBCFViewpoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {OrthoProjectionType} from "@xeokit/constants";
66
import {ViewObject} from "@xeokit/viewer";
77

88
/**
9-
* Saves a {@link @xeokit/viewer!View | View} to a {@link @xeokit/bcf!BCFViewpoint}.
9+
* Saves a {@link @xeokit/viewer!View | View} to a {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint}.
1010
*
1111
* See {@link "@xeokit/bcf" | @xeokit/bcf} for usage.
1212
*

packages/compression/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
* indices for triangle meshes, ignoring normals (as shaders auto-generate them), converting positions to relative-to-center (RTC)
2323
* coordinates, and quantizing positions and UVs as 16-bit unsigned integers.
2424
*
25-
* An example usage includes compressing a SceneGeometryParams into a {@link @xeokit/scene!SceneGeometryCompressedParams} using the
26-
* {@link @xeokit/scene!compressGeometryParams} function.
25+
* An example usage includes compressing a SceneGeometryParams into a {@link @xeokit/scene!SceneGeometryCompressedParams | SceneGeometryCompressedParams} using the
26+
* {@link @xeokit/scene!compressGeometryParams | compressGeometryParams} function.
2727
*
2828
* The resulting SceneGeometryCompressedParams object shows vertex positions relative to the origin
2929
* and quantized to 16-bit integers, duplicate positions removed, and adjusted indices. Additionally, edge indices are
@@ -52,7 +52,7 @@
5252
*
5353
* ## Usage
5454
*
55-
* In the example below, we'll use {@link @xeokit/scene!compressGeometryParams} to compress
55+
* In the example below, we'll use {@link @xeokit/scene!compressGeometryParams | compressGeometryParams} to compress
5656
* a {@link @xeokit/scene!SceneGeometryParams | SceneGeometryParams} into a
5757
* {@link @xeokit/scene!SceneGeometryCompressedParams | SceneGeometryCompressedParams}.
5858
*
@@ -120,7 +120,7 @@
120120
* }
121121
* ````
122122
*
123-
* In the next example, we'll again use {@link @xeokit/scene!compressGeometryParams} to compress
123+
* In the next example, we'll again use {@link @xeokit/scene!compressGeometryParams | compressGeometryParams} to compress
124124
* a {@link @xeokit/scene!SceneGeometryParams | SceneGeometryParams} into a
125125
* {@link @xeokit/scene!SceneGeometryCompressedParams | SceneGeometryCompressedParams}, which we'll then use to
126126
* create a compressed geometry within a {@link @xeokit/scene!SceneModel | SceneModel}.

packages/core/src/Component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class Component {
4545
#ownedComponents: null | { [key: string]: Component };
4646

4747
/**
48-
* Emits an event when the {@link @xeokit/core!Component} has been destroyed.
48+
* Emits an event when the {@link @xeokit/core!Component | Component} has been destroyed.
4949
*
5050
* @event
5151
*/

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* ## xeokit SDK Core Components
88
*
9-
* * {@link @xeokit/core!Component} base class
9+
* * {@link @xeokit/core!Component | Component} base class
1010
* * Various interfaces that are implemented throughout the SDK.
1111
*
1212
* ## Installation

packages/demos/js/xeokit-demo-bundle.js

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,7 +1888,7 @@ var Component = class {
18881888
#owner;
18891889
#ownedComponents;
18901890
/**
1891-
* Emits an event when the {@link @xeokit/core!Component} has been destroyed.
1891+
* Emits an event when the {@link @xeokit/core!Component | Component} has been destroyed.
18921892
*
18931893
* @event
18941894
*/
@@ -1933,7 +1933,7 @@ var Component = class {
19331933
* Logs an error for this component to the JavaScript console.
19341934
*
19351935
* The console message will have this format: *````[ERROR] [<component type> =<component id>: <message>````*
1936-
1936+
19371937
@param message The error message to log
19381938
@protected
19391939
*/
@@ -11151,7 +11151,7 @@ var SceneModel = class extends Component {
1115111151
* Creates a new {@link @xeokit/scene!SceneGeometry} within this SceneModel, from pre-compressed geometry parameters.
1115211152
*
1115311153
* * Stores the new {@link @xeokit/scene!SceneGeometry} in {@link @xeokit/scene!SceneModel.geometries | SceneModel.geometries}.
11154-
* * Use {@link @xeokit/scene!compressGeometryParams} to pre-compress {@link @xeokit/scene!SceneGeometryParams | SceneGeometryParams}
11154+
* * Use {@link @xeokit/scene!compressGeometryParams | compressGeometryParams} to pre-compress {@link @xeokit/scene!SceneGeometryParams | SceneGeometryParams}
1115511155
* into {@link @xeokit/scene!SceneGeometryCompressedParams | SceneGeometryCompressedParams}.
1115611156
*
1115711157
* ### Usage
@@ -11314,8 +11314,15 @@ var SceneModel = class extends Component {
1131411314
} else {
1131511315
matrix = matrix.slice();
1131611316
}
11317-
const origin2 = createVec3();
11318-
const rtcMatrix = createRTCModelMat(matrix, origin2);
11317+
let origin2;
11318+
let rtcMatrix = matrix;
11319+
if (meshParams.origin) {
11320+
origin2 = meshParams.origin;
11321+
rtcMatrix = matrix;
11322+
} else {
11323+
origin2 = createVec3();
11324+
rtcMatrix = createRTCModelMat(matrix, origin2);
11325+
}
1131911326
const tile = this.scene.getTile(origin2);
1132011327
if (!this.tiles[tile.id]) {
1132111328
this.tiles[tile.id] = tile;
@@ -107459,7 +107466,7 @@ var LASLoader3 = {
107459107466

107460107467
// ../las/dist/loadLAS.js
107461107468
var MAX_VERTICES = 5e5;
107462-
function loadLAS(params2) {
107469+
function loadLAS(params2, options = {}) {
107463107470
return new Promise(function(resolve2, reject) {
107464107471
const dataModel = params2.dataModel;
107465107472
const sceneModel = params2.sceneModel;
@@ -107475,16 +107482,16 @@ function loadLAS(params2) {
107475107482
if (dataModel?.built) {
107476107483
throw new SDKError("DataModel already built");
107477107484
}
107478-
const skip = params2.skip || 1;
107485+
const skip = options.skip || 1;
107479107486
const log2 = (msg) => {
107480107487
if (params2.log) {
107481107488
params2.log(msg);
107482107489
}
107483107490
};
107484107491
parse(params2.fileData, LASLoader3, {
107485107492
las: {
107486-
colorDepth: params2.colorDepth || "auto",
107487-
fp64: params2.fp64 !== void 0 ? params2.fp64 : false
107493+
colorDepth: options.colorDepth || "auto",
107494+
fp64: options.fp64 !== void 0 ? options.fp64 : false
107488107495
}
107489107496
}).then((parsedData) => {
107490107497
const attributes = parsedData.attributes;
@@ -107579,7 +107586,7 @@ function loadLAS(params2) {
107579107586
});
107580107587
function readPositions(positionsValue) {
107581107588
if (positionsValue) {
107582-
if (params2.center) {
107589+
if (options.center) {
107583107590
const centerPos = createVec3();
107584107591
const numPoints = positionsValue.length;
107585107592
for (let i2 = 0, len = positionsValue.length; i2 < len; i2 += 3) {
@@ -107596,8 +107603,8 @@ function loadLAS(params2) {
107596107603
positionsValue[i2 + 2] -= centerPos[2];
107597107604
}
107598107605
}
107599-
if (params2.transform) {
107600-
const mat = createMat4(params2.transform);
107606+
if (options.transform) {
107607+
const mat = createMat4(options.transform);
107601107608
const pos = createVec3();
107602107609
for (let i2 = 0, len = positionsValue.length; i2 < len; i2 += 3) {
107603107610
pos[0] = positionsValue[i2 + 0];
@@ -114327,10 +114334,8 @@ function xktToModel(params2) {
114327114334
id: meshId,
114328114335
geometryId,
114329114336
textureSetId,
114330-
// origin: tileCenter,
114337+
origin: tileCenter,
114331114338
color: meshColor,
114332-
metallic: meshMetallic,
114333-
roughness: meshRoughness,
114334114339
opacity: meshOpacity
114335114340
});
114336114341
meshIds.push(meshId);
@@ -118364,7 +118369,7 @@ var Camera = class extends Component {
118364118369
}
118365118370
/**
118366118371
* Rotates {@link @xeokit/viewer!Camera.look | Camera.look} about {@link @xeokit/viewer!Camera.eye | Camera.eye}, around the right axis (orthogonal to {@link @xeokit/viewer!Camera.up | Camera.up} and "look").
118367-
118372+
118368118373
* @param angleInc Angle of rotation in degrees
118369118374
*/
118370118375
pitch(angleInc) {
@@ -118711,7 +118716,7 @@ var CameraFlightAnimation = class _CameraFlightAnimation extends Component {
118711118716
* * When the target is a boundary, the {@link @xeokit/viewer!Camera} will fly towards the target and stop when the target fills most of the canvas.
118712118717
* * When the target is an explicit {@link @xeokit/viewer!Camera} position, given as ````eye````, ````look```` and ````up````, then CameraFlightAnimation will interpolate the {@link @xeokit/viewer!Camera} to that target and stop there.
118713118718
*
118714-
* @param {Object|Component} [params=Scene] Either a parameters object or a {@link @xeokit/core!Component} subtype that has
118719+
* @param {Object|Component} [params=Scene] Either a parameters object or a {@link @xeokit/core!Component | Component} subtype that has
118715118720
* an AABB. Defaults to the {@link @xeokit/scene!Scene | Scene}, which causes the {@link @xeokit/viewer!Camera} to fit the Scene in view.
118716118721
* @param [params.arc=0] Factor in range ````[0..1]```` indicating how much the {@link @xeokit/viewer!Camera.eye | Camera.eye} position
118717118722
* will swing away from its {@link @xeokit/viewer!Camera.look | Camera.look} position as it flies to the target.
@@ -118842,7 +118847,7 @@ var CameraFlightAnimation = class _CameraFlightAnimation extends Component {
118842118847
* * When the target is a boundary, this CameraFlightAnimation will position the {@link @xeokit/viewer!Camera} at where the target fills most of the canvas.
118843118848
* * When the target is an explicit {@link @xeokit/viewer!Camera} position, given as ````eye````, ````look```` and ````up```` vectors, then this CameraFlightAnimation will jump the {@link @xeokit/viewer!Camera} to that target.
118844118849
*
118845-
* @param {*|Component} params Either a parameters object or a {@link @xeokit/core!Component} subtype that has a World-space AABB.
118850+
* @param {*|Component} params Either a parameters object or a {@link @xeokit/core!Component | Component} subtype that has a World-space AABB.
118846118851
* @param [params.arc=0] Factor in range [0..1] indicating how much the {@link @xeokit/viewer!Camera.eye | Camera.eye} will swing away from its {@link @xeokit/viewer!Camera.look | Camera.look} as it flies to the target.
118847118852
* @param {Number|String|Component} [params.component] ID or instance of a component to fly to.
118848118853
* @param [params.aabb] World-space axis-aligned bounding box (AABB) target to fly to.

packages/demos/js/xeokit-demo-bundle.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)