Skip to content

Commit

Permalink
Docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Aug 4, 2024
1 parent 53ce756 commit 8c9be92
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 116 deletions.
8 changes: 4 additions & 4 deletions packages/bcf/src/LoadBCFViewpointParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {BCFViewpoint} from "./BCFViewpoint";
import {Data} from "@xeokit/data";

/**
* Options for {@link @xeokit/bcf!loadBCFViewpoint}.
* Options for {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint}.
*
* See {@link "@xeokit/bcf" | @xeokit/bcf} for usage.
*/
Expand All @@ -30,7 +30,7 @@ export interface LoadBCFViewpointParams {
* {@link @xeokit/viewer!ViewObject | ViewObjects} within the given target View, ignoring any
* {@link @xeokit/viewer!ViewLayer | ViewLayers} that those ViewObjects may have been partitioned into.
*
* The {@link @xeokit/bcf!loadBCFViewpoint} function will silently ignore each component state that has no corresponding
* The {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} function will silently ignore each component state that has no corresponding
* ViewObject in the target View.
*/
view: View;
Expand All @@ -44,7 +44,7 @@ export interface LoadBCFViewpointParams {
* Only load BCF viewpoint components if their corresponding {@link @xeokit/viewer!ViewObject | ViewObjects}
* are in {@link @xeokit/viewer!ViewLayer |ViewLayers} that have the given IDs.
*
* The {@link @xeokit/bcf!loadBCFViewpoint} function will silently ignore each component state that has no corresponding
* The {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} function will silently ignore each component state that has no corresponding
* ViewObject in any of these ViewLayers.
*
* Each ViewLayer's occurrence in {@link @xeokit/bcf!LoadBCFViewpointParams.excludeLayerIds | LoadBCFViewpointParams.excludeLayerIds} will override
Expand All @@ -56,7 +56,7 @@ export interface LoadBCFViewpointParams {
* Never load BCF viewpoint components if their corresponding {@link @xeokit/viewer!ViewObject | ViewObjects}
* are in {@link @xeokit/viewer!ViewLayer | ViewLayers} that have the given IDs.
*
* The {@link @xeokit/bcf!loadBCFViewpoint} function will silently ignore each component state that has a corresponding
* The {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} function will silently ignore each component state that has a corresponding
* ViewObject in any of these ViewLayers.
*
* Each ViewLayer's occurrence in this list will override its occurrance
Expand Down
6 changes: 3 additions & 3 deletions packages/bcf/src/SaveBCFViewpointParams.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {View} from "@xeokit/viewer";

/**
* Options for {@link @xeokit/bcf!saveBCFViewpoint}.
* Options for {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint}.
*
* See {@link "@xeokit/bcf" | @xeokit/bcf} for usage.
*/
Expand Down Expand Up @@ -68,7 +68,7 @@ export interface SaveBCFViewpointParams {
* Only save BCF viewpoint components if their corresponding {@link @xeokit/viewer!ViewObject | ViewObjects}
* are in {@link @xeokit/viewer!ViewLayer | ViewLayers} that match these IDs.
*
* The {@link @xeokit/bcf!saveBCFViewpoint} function will silently ignore each component state that has no corresponding
* The {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} function will silently ignore each component state that has no corresponding
* ViewObject in any of these ViewLayers.
*
* Each ViewLayer's occurrence in {@link @xeokit/bcf!SaveBCFViewpointParams.excludeLayerIds | SaveBCFViewpointParams.excludeLayerIds} will override
Expand All @@ -80,7 +80,7 @@ export interface SaveBCFViewpointParams {
* Never save BCF viewpoint components if their corresponding {@link @xeokit/viewer!ViewObject | ViewObjects}
* are in {@link @xeokit/viewer!ViewLayer |ViewLayers} that have the given IDs.
*
* The {@link @xeokit/bcf!saveBCFViewpoint} function will silently ignore each component state that has a corresponding
* The {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} function will silently ignore each component state that has a corresponding
* ViewObject in any of these ViewLayers.
*
* Each ViewLayer's occurrence in this list will override its occurrance
Expand Down
18 changes: 9 additions & 9 deletions packages/bcf/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
* project stakeholders in BIM workflows.
*
* To import a JSON-encoded BCF viewpoint into a {@link @xeokit/viewer!View | View} belonging to a {@link @xeokit/viewer!Viewer | Viewer}, use the
* {@link @xeokit/bcf!loadBCFViewpoint} function. Similarly, to export the state of a View as a JSON-encoded BCF viewpoint, use
* the {@link @xeokit/bcf!saveBCFViewpoint} function.
* {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} function. Similarly, to export the state of a View as a JSON-encoded BCF viewpoint, use
* the {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} function.
*
* Refer to {@link @xeokit/bcf!BCFViewpoint} for information on the BCF viewpoint format.
* Refer to {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint} for information on the BCF viewpoint format.
*
* <br>
*
Expand Down Expand Up @@ -99,7 +99,7 @@
* {@link @xeokit/data!DataModel.onBuilt | DataModel.onBuilt} events.
*
* On the SceneModel.onBuilt event, we'll customize the View by arranging the {@link @xeokit/viewer!Camera} and applying
* 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
* 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
* a BCF viewpoint.
*
* Once the SceneModel and DataModel have been built, we can no longer add anything to them.
Expand All @@ -123,8 +123,8 @@
* });
* ````
*
* Now that we've saved the {@link @xeokit/bcf!BCFViewpoint}, we could now use {@link @xeokit/bcf!loadBCFViewpoint} to load
* the {@link @xeokit/bcf!BCFViewpoint} back into the {@link @xeokit/viewer!View | View}:
* Now that we've saved the {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint}, we could now use {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} to load
* the {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint} back into the {@link @xeokit/viewer!View | View}:
*
* ````javascript
* loadBCFViewpoint({
Expand Down Expand Up @@ -188,8 +188,8 @@
* myOtherSceneModel.build();
* ````
*
* Now we can use {@link @xeokit/bcf!saveBCFViewpoint} to save the states of only the {@link @xeokit/viewer!ViewObject | ViewObjects} in the
* {@link @xeokit/viewer!ViewLayer | ViewLayer} that contains our SceneModel to a {@link @xeokit/bcf!BCFViewpoint}, while ignoring the
* Now we can use {@link @xeokit/bcf!saveBCFViewpoint | saveBCFViewpoint} to save the states of only the {@link @xeokit/viewer!ViewObject | ViewObjects} in the
* {@link @xeokit/viewer!ViewLayer | ViewLayer} that contains our SceneModel to a {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint}, while ignoring the
* other ViewLayer:
*
* ````javascript
Expand All @@ -200,7 +200,7 @@
* });
* ````
*
* Use {@link @xeokit/bcf!loadBCFViewpoint} to load the {@link @xeokit/bcf!BCFViewpoint} back into the {@link @xeokit/viewer!ViewLayer | ViewLayer}:
* Use {@link @xeokit/bcf!loadBCFViewpoint | loadBCFViewpoint} to load the {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint} back into the {@link @xeokit/viewer!ViewLayer | ViewLayer}:
*
* ````javascript
* loadBCFViewpoint({
Expand Down
2 changes: 1 addition & 1 deletion packages/bcf/src/loadBCFViewpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const tempVec3b = createVec3();
const tempVec3c = createVec3();

/**
* Loads a {@link @xeokit/bcf!BCFViewpoint} into a {@link @xeokit/viewer!View | View}.
* Loads a {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint} into a {@link @xeokit/viewer!View | View}.
*
* See {@link "@xeokit/bcf" | @xeokit/bcf} for usage.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/bcf/src/saveBCFViewpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {OrthoProjectionType} from "@xeokit/constants";
import {ViewObject} from "@xeokit/viewer";

/**
* Saves a {@link @xeokit/viewer!View | View} to a {@link @xeokit/bcf!BCFViewpoint}.
* Saves a {@link @xeokit/viewer!View | View} to a {@link @xeokit/bcf!BCFViewpoint | BCFViewpoint}.
*
* See {@link "@xeokit/bcf" | @xeokit/bcf} for usage.
*
Expand Down
8 changes: 4 additions & 4 deletions packages/compression/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* indices for triangle meshes, ignoring normals (as shaders auto-generate them), converting positions to relative-to-center (RTC)
* coordinates, and quantizing positions and UVs as 16-bit unsigned integers.
*
* An example usage includes compressing a SceneGeometryParams into a {@link @xeokit/scene!SceneGeometryCompressedParams} using the
* {@link @xeokit/scene!compressGeometryParams} function.
* An example usage includes compressing a SceneGeometryParams into a {@link @xeokit/scene!SceneGeometryCompressedParams | SceneGeometryCompressedParams} using the
* {@link @xeokit/scene!compressGeometryParams | compressGeometryParams} function.
*
* The resulting SceneGeometryCompressedParams object shows vertex positions relative to the origin
* and quantized to 16-bit integers, duplicate positions removed, and adjusted indices. Additionally, edge indices are
Expand Down Expand Up @@ -52,7 +52,7 @@
*
* ## Usage
*
* In the example below, we'll use {@link @xeokit/scene!compressGeometryParams} to compress
* In the example below, we'll use {@link @xeokit/scene!compressGeometryParams | compressGeometryParams} to compress
* a {@link @xeokit/scene!SceneGeometryParams | SceneGeometryParams} into a
* {@link @xeokit/scene!SceneGeometryCompressedParams | SceneGeometryCompressedParams}.
*
Expand Down Expand Up @@ -120,7 +120,7 @@
* }
* ````
*
* In the next example, we'll again use {@link @xeokit/scene!compressGeometryParams} to compress
* In the next example, we'll again use {@link @xeokit/scene!compressGeometryParams | compressGeometryParams} to compress
* a {@link @xeokit/scene!SceneGeometryParams | SceneGeometryParams} into a
* {@link @xeokit/scene!SceneGeometryCompressedParams | SceneGeometryCompressedParams}, which we'll then use to
* create a compressed geometry within a {@link @xeokit/scene!SceneModel | SceneModel}.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class Component {
#ownedComponents: null | { [key: string]: Component };

/**
* Emits an event when the {@link @xeokit/core!Component} has been destroyed.
* Emits an event when the {@link @xeokit/core!Component | Component} has been destroyed.
*
* @event
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* ## xeokit SDK Core Components
*
* * {@link @xeokit/core!Component} base class
* * {@link @xeokit/core!Component | Component} base class
* * Various interfaces that are implemented throughout the SDK.
*
* ## Installation
Expand Down
41 changes: 23 additions & 18 deletions packages/demos/js/xeokit-demo-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ var Component = class {
#owner;
#ownedComponents;
/**
* Emits an event when the {@link @xeokit/core!Component} has been destroyed.
* Emits an event when the {@link @xeokit/core!Component | Component} has been destroyed.
*
* @event
*/
Expand Down Expand Up @@ -1933,7 +1933,7 @@ var Component = class {
* Logs an error for this component to the JavaScript console.
*
* The console message will have this format: *````[ERROR] [<component type> =<component id>: <message>````*

@param message The error message to log
@protected
*/
Expand Down Expand Up @@ -11151,7 +11151,7 @@ var SceneModel = class extends Component {
* Creates a new {@link @xeokit/scene!SceneGeometry} within this SceneModel, from pre-compressed geometry parameters.
*
* * Stores the new {@link @xeokit/scene!SceneGeometry} in {@link @xeokit/scene!SceneModel.geometries | SceneModel.geometries}.
* * Use {@link @xeokit/scene!compressGeometryParams} to pre-compress {@link @xeokit/scene!SceneGeometryParams | SceneGeometryParams}
* * Use {@link @xeokit/scene!compressGeometryParams | compressGeometryParams} to pre-compress {@link @xeokit/scene!SceneGeometryParams | SceneGeometryParams}
* into {@link @xeokit/scene!SceneGeometryCompressedParams | SceneGeometryCompressedParams}.
*
* ### Usage
Expand Down Expand Up @@ -11314,8 +11314,15 @@ var SceneModel = class extends Component {
} else {
matrix = matrix.slice();
}
const origin2 = createVec3();
const rtcMatrix = createRTCModelMat(matrix, origin2);
let origin2;
let rtcMatrix = matrix;
if (meshParams.origin) {
origin2 = meshParams.origin;
rtcMatrix = matrix;
} else {
origin2 = createVec3();
rtcMatrix = createRTCModelMat(matrix, origin2);
}
const tile = this.scene.getTile(origin2);
if (!this.tiles[tile.id]) {
this.tiles[tile.id] = tile;
Expand Down Expand Up @@ -107459,7 +107466,7 @@ var LASLoader3 = {

// ../las/dist/loadLAS.js
var MAX_VERTICES = 5e5;
function loadLAS(params2) {
function loadLAS(params2, options = {}) {
return new Promise(function(resolve2, reject) {
const dataModel = params2.dataModel;
const sceneModel = params2.sceneModel;
Expand All @@ -107475,16 +107482,16 @@ function loadLAS(params2) {
if (dataModel?.built) {
throw new SDKError("DataModel already built");
}
const skip = params2.skip || 1;
const skip = options.skip || 1;
const log2 = (msg) => {
if (params2.log) {
params2.log(msg);
}
};
parse(params2.fileData, LASLoader3, {
las: {
colorDepth: params2.colorDepth || "auto",
fp64: params2.fp64 !== void 0 ? params2.fp64 : false
colorDepth: options.colorDepth || "auto",
fp64: options.fp64 !== void 0 ? options.fp64 : false
}
}).then((parsedData) => {
const attributes = parsedData.attributes;
Expand Down Expand Up @@ -107579,7 +107586,7 @@ function loadLAS(params2) {
});
function readPositions(positionsValue) {
if (positionsValue) {
if (params2.center) {
if (options.center) {
const centerPos = createVec3();
const numPoints = positionsValue.length;
for (let i2 = 0, len = positionsValue.length; i2 < len; i2 += 3) {
Expand All @@ -107596,8 +107603,8 @@ function loadLAS(params2) {
positionsValue[i2 + 2] -= centerPos[2];
}
}
if (params2.transform) {
const mat = createMat4(params2.transform);
if (options.transform) {
const mat = createMat4(options.transform);
const pos = createVec3();
for (let i2 = 0, len = positionsValue.length; i2 < len; i2 += 3) {
pos[0] = positionsValue[i2 + 0];
Expand Down Expand Up @@ -114327,10 +114334,8 @@ function xktToModel(params2) {
id: meshId,
geometryId,
textureSetId,
// origin: tileCenter,
origin: tileCenter,
color: meshColor,
metallic: meshMetallic,
roughness: meshRoughness,
opacity: meshOpacity
});
meshIds.push(meshId);
Expand Down Expand Up @@ -118364,7 +118369,7 @@ var Camera = class extends Component {
}
/**
* 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").

* @param angleInc Angle of rotation in degrees
*/
pitch(angleInc) {
Expand Down Expand Up @@ -118711,7 +118716,7 @@ var CameraFlightAnimation = class _CameraFlightAnimation extends Component {
* * 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.
* * 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.
*
* @param {Object|Component} [params=Scene] Either a parameters object or a {@link @xeokit/core!Component} subtype that has
* @param {Object|Component} [params=Scene] Either a parameters object or a {@link @xeokit/core!Component | Component} subtype that has
* an AABB. Defaults to the {@link @xeokit/scene!Scene | Scene}, which causes the {@link @xeokit/viewer!Camera} to fit the Scene in view.
* @param [params.arc=0] Factor in range ````[0..1]```` indicating how much the {@link @xeokit/viewer!Camera.eye | Camera.eye} position
* will swing away from its {@link @xeokit/viewer!Camera.look | Camera.look} position as it flies to the target.
Expand Down Expand Up @@ -118842,7 +118847,7 @@ var CameraFlightAnimation = class _CameraFlightAnimation extends Component {
* * When the target is a boundary, this CameraFlightAnimation will position the {@link @xeokit/viewer!Camera} at where the target fills most of the canvas.
* * 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.
*
* @param {*|Component} params Either a parameters object or a {@link @xeokit/core!Component} subtype that has a World-space AABB.
* @param {*|Component} params Either a parameters object or a {@link @xeokit/core!Component | Component} subtype that has a World-space AABB.
* @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.
* @param {Number|String|Component} [params.component] ID or instance of a component to fly to.
* @param [params.aabb] World-space axis-aligned bounding box (AABB) target to fly to.
Expand Down
4 changes: 2 additions & 2 deletions packages/demos/js/xeokit-demo-bundle.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 8c9be92

Please sign in to comment.