Git Product home page Git Product logo

reveal's Introduction

Cognite logo

Reveal 3D viewer and libraries

Build Status

Documentation with interactive examples for the latest version is available at https://cognitedata.github.io/reveal/docs/


Reveal viewer is a highly performant 3d-viewer for the Web written in a combination of TypeScript and Rust.

This repository contains the source code for the new version of the Cognite Reveal 3D viewer, including its file loading libraries.

All information below is for developers.

Getting started

Install Node and Rust.

To test the viewer, you need to build the viewer and then start the examples.

cd viewer
yarn && yarn run build
cd ../examples
yarn && yarn run start

If you now navigate to localhost:3549, the browser should show a simple 3D model with a UI.

To show a model from your own CDF project, you must first configure Reveal to use your CDF credentials. Follows the steps in the section Credentials Environment.

change the URL to https://localhost:3000/?project=<project>&env=<environment>&modelId=<modelId>&revisionId=<revisionId>.

Here, <project> is the name of the CDF project you want to connect to, <environment> is the name of the environment specified in the .env file (e.g. example_environment), and <modelId> and <revisionId> are the ids of the model you want to visualize. You can find these IDs in Cognite Fusion, in the "Upload 3D models" / "Manage 3D" subapp.

Troubleshooting

Occasionally, and always the first time you login to an environment, you may get a 401 error in the browser, which, after clicking through, resets the browser window to the model with colorful shapes. In this case, there should be a #code=...-segment appended to the URL in the browser. Copy the URL you tried to visit (including the project, environment and IDs), and paste it to the left of the #-sign in the URL, replacing everything that was there before. In other words, your URL should now look like

https://localhost:3000/?project=<project>&env=<environment>&modelId=<modelId>&revisionId=<revisionId>#code=<access token>

Press enter to reload.

This may or may not work on the first try, seemingly depending on the access token expiration or other factors. If it fails at first, you may try this step multiple times, it will usually work by the 5th attempt.

Building on Macbook M1

Building Reveal on Macbook M1 might require some special care.

If you experience issues during the yarn-stage in viewer/, e.g.

   no template named 'remove_cv_t' in namespace 'std'

try forcing GCC to build for C++14:

env CXXFLAGS=-std=c++14 yarn

There also could be an issue with puppeteer in examples/ that is caused by it not finding a correct version of chromium for arm64. To solve it you should follow additional steps:

  1. Install chromium from Homebrew:
brew install chromium
`which chromium`
  1. Inside examples/ add two environment variables to your ~/.zshrc config file:
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=`which chromium`

or create .env file within the same folder and paste them there, then use source:

source .env
  1. Run yarn again and be happy!

Credentials Environment

The examples are configured to run using any environment variables specified in the file examples/.env, which you create yourself. The file examples/.env.example shows the expected JSON format of the value contained in this variable. You must fill in the appropriate values for your environment in this file; The tenant ID, client ID and the cluster of the CDF project you want to use.

Ask your Cognite contact for the tenant ID and client ID if you don't have these available.

The cluster value is the name of the subdomain in which the project resides. To find its value for your project, log in to your project in Cognite Fusion and observe that the URL ends with a string akin to cluster=<cluster>.cognitedata.com. Here, <cluster> is the name you should put in the .env file.

When starting an example, you can add e.g. env=example_environment to use the authentication credential stored in the example_environment environment specified in .env.

Hosting models locally

If you have locally converted 3D models, these can be viewed locally using the "Simple" example by placing the converted model folder under examples/public/, by providing a modelUrl-parameter, e.g. https://localhost:8080/Simple?modelUrl=/primitives.

Use local build with a project that uses reveal

  1. Run viewer build
cd viewer
yarn run build
  1. Use the build from viewer/dist. You can simply use it as a link dependency in the project that uses reveal if the target project uses yarn as its package manager.
  • Replace reveal version with the link on viewer/dist in the project package.json
{
  "dependencies": {
    "@cognite/reveal": "link:<absolute or relative path to viewer/dist"
  }
}
  • After that, run yarn in the target project.
  • Don't forget you must not commit that change to the target project.

If you don't want to change package.json, you can use CLI utility npm link or yarn link. To do that:

  1. Create a link
cd viewer/dist
npm link
  1. Use the link in your target project
cd your-project-path
npm link @cognite/reveal

Now reveal should be replaced with the local build.

When you don't need it linked in the target project anymore, run:

npm unlink @cognite/reveal

To unregister the link from your local environment:

cd viewer/dist
npm unlink

Releasing Reveal

See RELEASING.md for details on how to releasing NPM packages and update documentation on release.

reveal's People

Contributors

anders-hopland avatar aslettemark avatar astrid-kg avatar christjt avatar cognite-bulldozer[bot] avatar danpriori avatar dependabot-preview[bot] avatar dependabot[bot] avatar dragly avatar edel-cognite avatar eiriklegernaes avatar greenbech avatar haakonflatval-cognite avatar hkot1991 avatar hugolafis avatar j-bjorne avatar jhutchings1 avatar joao-mbn avatar larsmoa avatar maksnester avatar mattman22 avatar miladcognite avatar msusag avatar nabati avatar nilscognite avatar pramodcog avatar renovate[bot] avatar savokr avatar sigridkschaanning avatar strepto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reveal's Issues

Mobile performance

Im wondering if there has been much testing on you side on mobile devices. Has there?

The reason why I'm asking is because there is an requirement for our application that it should be able to run on ios mobile devices,
however we are experiencing some crashes when running the viewer with our models. So I'm wondering if maybe you have had some issues with this aswell.

And also are there any optimalisation work in your roadmap for performance?

Mechanism behind prioritization of sectors

Hi,

I am trying to understand how sectors are prioritized and loaded in/out using OrderSectorsByVisibilityCoverage.
Currently, looking at OrderSectorsByVisibilityCoverage::orderSectorsByVisibility -> OrderSectorsByVisibilityCoverage::renderSectors, which creates the priority list of sectors. The rendering of sector ids into a texture target, unpacking and reducing is all clear. However, I think I am not getting how a subset of the sectors are being rendered into the target at all.

I think it boils down to this step and which geometry is exactly rendered in step 2 vs step 3?:

 // 2. Render already loaded geometry to offscreen buffer
 this._alreadyLoadedProvider.renderOccludingGeometry(renderTarget, camera);
 // 3. Render to offscreen buffer
 this._renderer.render(this.scene, camera);

When I dive into step 2, I end in EffectRenderManager::renderDetailedToDepthOnly, where nodes are moved from _originalScene to _cadScene and later restored back to _originalScene.
What is the functionality of _cadScene and _originalScene. How are they different?

In ByVisibilitySectorCuller::update, sectors near to the camera should be put together with the priority list of sectors:
const prioritized = coverageUtil.orderSectorsByVisibility(camera);
The length of the priority list prioritized.length is greater than the number of nodes (SectorNodes with LOD=detailed) that are moved to _cadScene in renderDetailedToDepthOnly.

That means more sectors come in through the _renderer.render(this.scene, camera). Is it possible to explain how? How does _cadScene and _originalScene of the EffectRenderManager compare the scene of the GpuOrderSectorsByVisibilityCoverage ?

Maybe you @larsmoa as it seems that you wrote the code?
Thanks a lot in advance.

-veronika

Render size is possibly set wrong in Cognite3DViewer resizeIfNecessary

I was looking into your resizeIfNecessary method in Cognite3DViewer and I think I found a bug.
According to threejs render documentation the renderers setSize method already handles the device pixel ratio:
image

So the width and height passed to setSize in resizeIfNecessary will be multipled AGAIN with the device ratio inside setSize.
Making the render size way higher than it needs to be for cases where the device ratio is not 1.

Looks to me like a bug, but please let me know if I'm wrong ๐Ÿ™

Failed to load sector

Hi,
I have downloaded and configured Reveal and hosted as local. https://localhost:3000/

The Viewer is loading examples which provided in github "sector_0.i3d" but when exported from blender those i3d files could not able to view in Viewer.
Getting "Failed to load sector" error.

Could you please help me that how to create Reveal supportable .i3d file to view in Viewer.

Thank you
Failedtoloadsector

Problems with ClosedGeneralCylinder

We have some problems using the ClosedGeneralCylinder and i3df, and are experiencing some graphical issues. The bends in the pipes consists of multiple cylinders with cuts or slopes, but it seems like something is going wrong somewhere when rendering. We have tested the code on our side, and think we're doing everything correctly (even though it is hard to be sure). Have you experienced any problems with the ClosedGeneralCylinder?

The model in this screenshots is Huldra, which is available to the public:
https://data.equinor.com/dataset/Huldra

HVACBendsGlitch

The goal we want to achieve:
target

One extra observation is that it seems like cylinders with radius set to 1 meter is rendered correctly. Correctly in the sense that it is rendering cylinders with 1 meter radius, not the cylinders we ultimately want to render:
HVACBendsWIthRadius1

Refresh token for sector loading when token has expired

It seems like there is no refresh of token for sector loading.

Recreated using the cad basic example in your documentation
Navigate inwards on the platform, see that sectors are loaded without a problem.
Leave browser window open for more than 1 hour, then try to navigate around the model.
When sectors are loaded now we will get a 401 response since the token is expired in the js console:
image
Followed by these errors:
image

But no visual indication to the user that something went wrong (other that that the sectors will not be displayed)

Is there any plan to handle this case of refreshing tokens? Or some possiblity to detect this error in the code? ๐Ÿ˜„

logMetrics = false doesnt actually disable usage statistics in Cognite3dViewer

We are using the Cognite3dViwer an passing the argument logMetric = false to the viewer, however the code will still log usage statistics. Documented code says: "Might be used to disable usage statistics."
But logMetrics seems to be dropped when createRevealManagerOptions is called

Is there anyway to actually disable usage statistics today? If not can this be something we can expect in a next release?

Error in example-threejs-simple-pointcloud

Web view rendering fails with following error.

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

Apparently

reveal_threejs.createThreeJsPointCloudNode(pointCloudModel)

method is returning an invalid JSON.

Rendering issues after upgrade to iOS 15.4

We are experiencing some issues with some model objects not being rendered correctly.

The first one is this pipe that has wrong position, the problem occures even if WebGL via Metal is disabled:
image

The other one is a large spike being visable ( only visible when webGL via Metal is enabled). Last image is how it looks when WebGl via Metal is disabled:
image
image

Problems with sector selection

We are having some problem with sector selection after changing to V9. Sectors are popping in and out at times when we would expect otherwise. We are studying the weight functions and have a couple questions/observations in that regard.

From the weighting based on frustum depth, it seems that the first 5% of "NearFarRange" is given a low weight. We might have far planes at a few hundres meters and near planes at ~0, which means that the first tens of meters are weighted low. The importance is set quite low, but it still seems to create some problems for us.

From the weighting based on level it might seem that your sector structure is quite flat?
We currently have multiple levels, so the weighting will just make sure level 1 is prioritized highly, and not make level 2 be prioritized above level 3.

It is also important for us to have a way to guarantee that everything inside a given distance is correct and fully rendered. Similar to how it was done with "highDetailProximityThreshold" in V8.

Do you have any tips or suggestions for how we can improve our sector selection? Is it a possibility to expose the weight handling so we can create our own weighting functions, for instance?

We can also set up a meeting to discuss this, if that is of interest to you.

Is there a 'true' first person camera controller, a la PointerLockControls from three?

Hi there,

We need to implement a first person camera controller, typical of FPS games where the user can navigate through the scene via WASD/Arrow keys and use the mouse to look around. Three provides this via its PointerLockControls, which doesn't play nicely with reveal out of the box (seems to fight with the reveal camera).

Just thought to ask here if reveal provides something like this out of the box. If not, what would be the recommended approach to implementing this? Custom CameraManager perhaps?

Edits: I've been trying to implement a custom CameraManager for now. I see we're using reveal v3, but:

  • there's no cameraManager option in the 3d viewer constructor options interface - where is it?
  • @cognite/reveal does not export CameraManagerHelper - where is it?
    I suspect I'm missing something fundamental here, appreciate any help in those areas too!

Thanks for your help,

Matt

3.1.0 defaults to using Medium SSAO on mobile devices

case 'disabled':
case undefined:
return ssaoQualityHint;

There is a bug here where the default fallthrough of restrictSsaoOptionBasedOnDevice is the input value, and the input value might be undefined. This makes the switch here

const ssaoParameters = { ...defaultRenderOptions.ssaoRenderParameters };
switch (quality) {
case undefined:
break;

just use the default value, which is "SSAO medium", and this makes performance on mobile unusable. Its easy to work around in the client by specifying the quality to 'disabled, but it might be nice for new users fo the library to not have to specify the ssaoQualityHint.

(Remark: i have looked at this for about 10 minutes and did not actually verify this is a fix)

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: packageRules[0]: packageRules cannot combine both matchUpdateTypes and rangeStrategy. Rule: {"groupName":"all non-major dependencies","groupSlug":"all-minor-patch","matchPackagePatterns":["*"],"excludePackagePatterns":["three","@types/three"],"rangeStrategy":"bump","automerge":true,"minimumReleaseAge":"3 days","internalChecksFilter":"strict","matchUpdateTypes":["minor","patch","pin","digest"],"enabled":true}

More options for styling of highlighted parts

Is there any possibility for changing the stroke width for a highlighted part?
Also is there a possibility for setting the color used to indicate that a highlighted is behind a non highlighted part?
Thinking of the light purple/redish color here:
image

If its not possible now, then is it something that is coming or we can possibly add ourself?

Consider memoizing the output of setModelRenderLayers to save performance

As discussed a few weeks ago the linked path is potentially performance intensive, and is invoked every render.

The output should never change given that no IndexSet is updated in the meantime. Consider if its worth looking into optimizing this

function setModelRenderLayers(
cadModels: {
cadNode: THREE.Object3D;
modelIdentifier: string;
},
materialManager: CadMaterialManager
) {
const { cadNode: model, modelIdentifier } = cadModels;
const backSet = materialManager.getModelBackTreeIndices(modelIdentifier);
const ghostSet = materialManager.getModelGhostedTreeIndices(modelIdentifier);
const inFrontSet = materialManager.getModelInFrontTreeIndices(modelIdentifier);
model.traverse(node => {
node.layers.disableAll();
const objectTreeIndices = node.userData?.treeIndices as Map<number, number> | undefined;
if (objectTreeIndices === undefined) {
return;
}
if (backSet.hasIntersectionWith(objectTreeIndices)) {
node.layers.enable(RenderLayer.Back);
}
if (ghostSet.hasIntersectionWith(objectTreeIndices)) {
node.layers.enable(RenderLayer.Ghost);
}
if (inFrontSet.hasIntersectionWith(objectTreeIndices)) {
node.layers.enable(RenderLayer.InFront);
}
});
}

The performance issue here is bigger on large models, so it might be worth investigating.

In a random frame in the chrome debugger, on a model with normal three-indexes this uses 50% of the java-script time (across a 2 second timespan when moving camera). Sampled on a high-end computer.
image

Fragment Interpolation causes wrong TreeIndex lookup on some GPUs

The title is a hypothesis, but the fix seems to work. The issue does NOT occur on certain Intel GPUs, but its reproducible on Nvidia, Mac, and iOS GPUs.

This may also have been the cause of #2176

It seems to be a problem with fragment interpolation on some (most) GPUs that cause issues when TreeIndexes are high (+2 million), and that will introduce noise in the 3D model when filters are applied, AND when Picking based on TreeIndex.

The effect looks like this, when for instance highlighting is applied:

image

Importantly this also affects picking, which may get the wrong TreeIndex (often off by 1 or up to 2) for a meshpart due to this issue.

The issue occurs frequently on TreeIndexes over approx 2_000_000 , and gets worse with higher numbers.

Our hypothesis is that the fragment interpolation causes an inaccuracy that makes the interpolation operation roundtrip give significant variance in the output fragment treeIndex. See a description of the possible algorithm here: https://stackoverflow.com/questions/24441631/how-exactly-does-opengl-do-perspectively-correct-linear-interpolation

The fix seems to be to apply flat to the fragment shader. See: https://www.khronos.org/opengl/wiki/Type_Qualifier_(GLSL)#Interpolation_qualifiers

Unable to use the latest v3.0

Tried to install your latest v3.0, however I'm getting some errors on build

The first error is this:

../node_modules/@cognite/reveal/packages/model-base/index.d.ts:7:10 - error TS2305: Module '"./src/NodeIdAndTreeIndexMaps"' has no exported member 'NodeIdAndTreeIndexMaps'.

export { NodeIdAndTreeIndexMaps } from './src/NodeIdAndTreeIndexMaps';

It seems to happen because 'NodeIdAndTreeIndexMaps' is marked as internal in the code but it still exported via the model-base/index.ts file, and on bundle its not included possably because of the '"stripInternal": true,' in the tsconfig file

The second (and last) error I'm getting is this:

../node_modules/@cognite/reveal/packages/pointclouds/src/PotreeNodeWrapper.d.ts:4:25 - error TS7016: Could not find a declaration file for module '@cognite/potree-core'. './node_modules/@cognite/potree-core/dist/bundle.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/cognite__potree-core` if it exists or add a new declaration (.d.ts) file containing `declare module '@cognite/potree-core';`
import * as Potree from '@cognite/potree-core';

If I add a '.d.ts' file to my project to try and resolve the issue then I get these error:

../node_modules/@cognite/reveal/packages/pointclouds/src/PotreeNodeWrapper.d.ts:19:30 - error TS2694: Namespace '"@cognite/potree-core"' has no exported member 'PointCloudOctreeNode'.

19     readonly octtree: Potree.PointCloudOctreeNode;
                                ~~~~~~~~~~~~~~~~~~~~

../node_modules/@cognite/reveal/packages/pointclouds/src/PotreeNodeWrapper.d.ts:22:33 - error TS2694: Namespace '"@cognite/potree-core"' has no exported member 'PointCloudOctreeNode'.

22     constructor(octtree: Potree.PointCloudOctreeNode);

Also if I update the sdk from 5.0.0 to 7.0.0 I get this error:

../node_modules/@cognite/sdk/dist/src/api/geospatial/types.d.ts:2:35 - error TS2307: Cannot find module 'geojson' or its corresponding type declarations.

2 import { Geometry, GeoJSON } from 'geojson';

Might be something wrong with the dependencies or something?

Problems with setPixelRatio since "new render pipeline system" update

Hi,
I have recently tested with an updated version, and noticed some strange scaling of the viewport (covers on 0.4 of the viewport in each dimension) and traced this change of behavior to the update " feat: new render pipeline system (#1982)" by @christjt . I noticed, that when I comment out setPixelRatio (or use the default 1.0, even though I have and had factor 2.5), the entire viewport is covered -- although it seems that the renderer is not rendering at full possible resolution.
I have run the "simple" example page, where setPixelRatio is also used (with factor 2.5 as well btw), and it works. Do you know what might be causing this? Are some updates needed in our code to make it work again after this update? The update was quite large, so it is a bit hard to find the cause and fix it, so maybe you have a hunch?
Thanks a lot.

Loading problems while switching models

Hi!

We have encountered some problems when trying to switching to a different model before the current model has finished loading. The error messages point to the material manager. It seems that the loaders thinks the materials are loaded and tries to fetch the material for the new model, however, they are not yet there.

We have have discovered this issue with version 3.1.0, but tested also the latest master to see if it there also, since there were some changes with the load state -- and it is still there.

Is there a way we can go around this error? :)
Thank you
-veronika

Is it possible to order html overlays by distance

Is it possible to order html overlay by distance? So that e.g. the element with html overlay closes to the camera is displayed on top of the other html overlays?
Now it seems to be ordered in the order it was added

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Package lookup failures

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/tween.js Unavailable

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.


Warning

Renovate failed to look up the following dependencies: Failed to look up npm package @cognite/cdf-i18n-utils, Failed to look up npm package @cognite/cdf-utilities, Failed to look up npm package @cognite/cogs.js.

Files affected: react-components/package.json


Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • chore(deps): update mcr.microsoft.com/vscode/devcontainers/typescript-node docker tag to v1

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
viewer/packages/pointclouds/wasm/Cargo.toml
  • wasm-bindgen 0.2.92
  • web-sys 0.3.69
  • serde 1.0.200
  • serde-wasm-bindgen 0.6.5
  • js-sys 0.3.69
  • nalgebra 0.33.0
  • nalgebra-glm 0.19.0
  • wasm-bindgen-test 0.3.42
  • console_error_panic_hook 0.1.7
  • wasm-bindgen-test 0.3.42
  • futures 0.3.30
  • wasm-bindgen-futures 0.4.42
  • rand 0.8.5
  • rand_chacha 0.3.1
  • getrandom 0.2.14
dockerfile
.devcontainer/Dockerfile
  • mcr.microsoft.com/vscode/devcontainers/typescript-node 0-16-bullseye
github-actions
.github/workflows/ci-cleanup-on-close.yml
  • peaceiris/actions-gh-pages v4
.github/workflows/ci.yml
  • dorny/paths-filter v3
  • actions/checkout v4
  • actions/cache v4
  • actions/cache v4
  • actions/checkout v4
  • actions/cache v4
  • actions/cache v4
  • actions/upload-artifact v4
  • actions/checkout v4
  • actions/cache v4
  • actions/cache v4
  • codecov/codecov-action v4
  • actions/checkout v4
  • actions/cache v4
  • actions/cache v4
  • savokr/comment-on-pr v1.3.2
  • actions/upload-artifact v4
  • actions/checkout v4
  • actions/download-artifact v4
  • actions/cache v4
  • actions/cache v4
  • actions/checkout v4
  • actions/cache v4
  • actions/cache v4
  • jacobtomlinson/gha-find-replace v3
  • jacobtomlinson/gha-find-replace v3
  • actions/upload-artifact v4
  • actions/download-artifact v4
  • peaceiris/actions-gh-pages v4
  • savokr/comment-on-pr v1.3.2
  • geekyeggo/delete-artifact v5
.github/workflows/codeql.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
.github/workflows/github-pages.yml
  • actions/checkout v4
  • peaceiris/actions-gh-pages v4
.github/workflows/locize-sync.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/nightly-publish-to-npm.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/publish-react-component-to-npm-on-demand.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/publish-to-npm-on-release.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/react-components-ci.yml
  • dorny/paths-filter v3
  • actions/checkout v4
  • actions/upload-artifact v4
npm
documentation/docs/package.json
documentation/package.json
  • @azure/msal-browser 3.17.0
  • @codemirror/lang-javascript 6.2.2
  • @docusaurus/core 2.4.3
  • @docusaurus/preset-classic 2.4.3
  • @docusaurus/remark-plugin-npm2yarn 2.4.3
  • @uiw/codemirror-theme-material 4.22.2
  • @uiw/react-codemirror 4.22.2
  • clsx 2.1.1
  • cross-env 7.0.3
  • ieee754 1.2.1
  • react 18.3.1
  • react-dom 18.3.1
  • styled-components 6.1.11
  • @types/react 18.3.3
  • copyfiles 2.4.1
  • docusaurus-plugin-typedoc 0.22.0
  • replace 1.2.2
  • rimraf 5.0.7
  • typedoc 0.25.13
  • typedoc-plugin-markdown 3.17.1
  • typedoc-plugin-no-inherit 1.4.0
  • typescript 5.5.2
documentation/versioned_docs/version-2.x/package.json
documentation/versioned_docs/version-3.x/package.json
documentation/versioned_docs/version-4.x/package.json
examples/package.json
  • @azure/msal-browser ^3.0.0
  • dat.gui ^0.7.7
  • buffer ^6.0.3
  • lodash ^4.17.21
  • react 18.3.1
  • react-dom 18.3.1
  • stats.js 0.17.0
  • styled-components 6.1.11
  • @types/dat.gui ^0.7.5
  • @types/lodash ^4.14.190
  • @types/react 18.3.3
  • @types/react-dom 18.3.0
  • @types/stats.js ^0.17.0
  • @types/three ^0.165.0
  • css-loader ^7.0.0
  • dotenv-webpack ^8.0.0
  • html-webpack-plugin ^5.5.0
  • prettier ^3.0.0
  • three 0.165.0
  • ts-loader 9.5.1
  • typescript ^5.0.4
  • webpack ^5.76.0
  • webpack-cli ^5.0.0
  • webpack-dev-server ^5.0.0
  • webpack-log ^3.0.2
react-components/package.json
  • @tanstack/react-query ^5.32.0
  • assert ^2.1.0
  • lodash ^4.17.21
  • @cognite/cdf-i18n-utils ^0.7.5
  • @cognite/cdf-utilities ^3.6.0
  • @cognite/cogs.js ^9.84.3
  • @playwright/test ^1.43.1
  • @storybook/addon-essentials ^8.0.9
  • @storybook/addon-interactions ^8.0.9
  • @storybook/addon-links ^8.0.9
  • @storybook/blocks ^8.0.9
  • @storybook/react ^8.0.9
  • @storybook/react-vite ^8.0.9
  • @storybook/test 8.1.10
  • @tanstack/react-query-devtools ^5.32.0
  • @testing-library/react ^16.0.0
  • @types/lodash ^4.17.0
  • @types/node ^20.12.7
  • @types/react ^18.3.1
  • @types/react-dom ^18.3.0
  • @types/react-resizable ^3.0.7
  • @typescript-eslint/eslint-plugin ^7.8.0
  • @vitejs/plugin-react ^4.2.1
  • eslint ^8.57.0
  • eslint-config-love 47.0.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-header ^3.1.1
  • eslint-plugin-import ^2.29.1
  • eslint-plugin-n ^17.4.0
  • eslint-plugin-prettier ^5.1.3
  • eslint-plugin-promise ^6.1.1
  • eslint-plugin-react ^7.34.1
  • happy-dom ^14.7.1
  • locize-cli ^8.0.1
  • moq.ts 10.0.8
  • playwright ^1.43.1
  • prettier ^3.2.5
  • prop-types ^15.8.1
  • react ^18.3.1
  • react-dom ^18.3.1
  • react-draggable ^4.4.6
  • react-resizable ^3.0.5
  • react-router-dom ^6.23.0
  • storybook ^8.0.9
  • style-loader ^4.0.0
  • styled-components ^6.1.10
  • ts-loader ^9.5.1
  • typescript ^5.4.5
  • vite ^5.2.10
  • vite-plugin-dts ^3.9.0
  • vite-plugin-externalize-deps ^0.8.0
  • vitest ^1.5.3
  • yarn 4.3.0
viewer/package.json
  • @rajesh896/broprint.js ^2.1.1
  • @tweenjs/tween.js ^23.1.1
  • assert ^2.1.0
  • async-mutex ^0.5.0
  • glslify ^7.1.1
  • glslify-import ^3.1.0
  • html2canvas ^1.4.1
  • lodash ^4.17.21
  • loglevel ^1.9.1
  • mixpanel-browser ^2.49.0
  • path-browserify ^1.0.1
  • random-seed ^0.3.0
  • rxjs ^7.8.1
  • skmeans ^0.11.3
  • sparse-octree ^7.1.8
  • @azure/msal-browser ^3.13.0
  • @cognite/sdk ^9.12.0
  • @microsoft/api-extractor ^7.43.1
  • @types/dat.gui ^0.7.13
  • @types/gl ^6.0.5
  • @types/glob ^8.1.0
  • @types/jest ^29.5.12
  • @types/jest-environment-puppeteer ^5.0.6
  • @types/jest-image-snapshot ^6.4.0
  • @types/jsdom ^21.1.6
  • @types/lodash ^4.17.0
  • @types/mixpanel-browser ^2.49.0
  • @types/node ^20.12.7
  • @types/random-seed ^0.3.5
  • @types/skmeans ^0.11.7
  • @types/stats ^0.16.30
  • @types/three ^0.165.0
  • @types/tween.js ^18.6.1
  • @typescript-eslint/eslint-plugin ^7.7.1
  • @typescript-eslint/parser ^7.7.1
  • concurrently ^8.2.2
  • cross-env ^7.0.3
  • dat.gui ^0.7.9
  • eslint ^8.57.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-header ^3.1.1
  • eslint-plugin-jsdoc ^48.2.3
  • eslint-plugin-lodash ^8.0.0
  • eslint-plugin-prettier ^5.1.3
  • eslint-plugin-unused-imports ^3.1.0
  • file-loader ^6.2.0
  • glob ^10.3.12
  • glslify-loader ^2.0.0
  • html-webpack-plugin ^5.6.0
  • jest ^29.7.0
  • jest-canvas-mock ^2.5.2
  • jest-environment-jsdom ^29.7.0
  • jest-extended ^4.0.2
  • jest-image-snapshot ^6.4.0
  • jest-puppeteer ^10.0.1
  • jsdom ^24.0.0
  • moq.ts 10.0.8
  • nock ^13.5.4
  • prettier ^3.2.5
  • process ^0.11.10
  • puppeteer ^22.7.1
  • random-seed ^0.3.0
  • raw-loader ^4.0.2
  • remove-files-webpack-plugin ^1.5.0
  • resize-observer-polyfill ^1.5.1
  • shx ^0.3.4
  • stats.js ^0.17.0
  • three 0.165.0
  • ts-jest ^29.1.2
  • ts-loader ^9.5.1
  • tsc-alias ^1.8.8
  • typescript ^5.4.5
  • wasm-pack ^0.12.1
  • webpack ^5.91.0
  • webpack-cli ^5.1.4
  • webpack-dev-server ^5.0.4
  • webpack-node-externals ^3.0.0
  • whatwg-fetch ^3.6.20
  • workerize-loader ^2.0.2
  • three 0.165.0
  • yarn 4.3.0
viewer/packages/360-images/package.json
viewer/packages/3d-overlays/package.json
viewer/packages/api/package.json
viewer/packages/cad-geometry-loaders/package.json
viewer/packages/cad-model/package.json
viewer/packages/cad-parsers/package.json
viewer/packages/cad-styling/package.json
viewer/packages/camera-manager/package.json
viewer/packages/data-providers/package.json
viewer/packages/data-source/package.json
viewer/packages/logger/package.json
viewer/packages/metrics/package.json
viewer/packages/model-base/package.json
viewer/packages/nodes-api/package.json
viewer/packages/pointcloud-styling/package.json
viewer/packages/pointclouds/package.json
viewer/packages/rendering/package.json
viewer/packages/sector-loader/package.json
viewer/packages/sector-parser/package.json
viewer/packages/tools/package.json
viewer/packages/utilities/package.json

  • Check this box to trigger a request for Renovate to run again on this repository

Custom sector weighting in V9 ByScreenSizeSectorCuller

We would like the opportunity to create a custom sector weighting in the V9 ByScreenSizeSectorCuller , to make it work with our sector splitting. This means that we would not use the functions in WeightFunctionsHelper , but rather create new ones for our specific use. The determineSectorPriority function would also have to be different.

Having a custom determineSectorPriority function could solve a lot of our problems. We would need some more data available to the function, though. We need to have access to the camera (specifically camera position), to calculate the distance to each sector, and maxSectorDistance/minSectorDistance for normalized distance.

An idea is to:

  • Make V9 ByScreenSizeSectorCuller public
  • Extend the constructor with a new optional function: determineSectorPriority (similar to the already implemented determineSectorCost )
  • Make the determineSectorPriority signature equal to the internal one.
  • Make Camera, and min/max distance in WeightFunctionsHelper public so it can be extracted and used in a "non-preexisting" weight system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.