Alexandru Popovici f3974dd9d0 Alex/text updates (#5012)
* feat(viewer-lib): Text updates:
- Update to latest troika-three-text version
- Started working on the new TextBatch whoich will actually batch texts
- Augmented BatchedText type from troika
- Renamed old SpeckleText to TextLabel

* feat)viewer-lib): Copied over the batched version for the speckle text into our text material since troika won't export it

* feat(viewer-lib): First draft on text batching

* feat(viewer-lib): WIP on TextBatch and SpeckleText

* feat(viewer-lib): SpeckleText batch now has working TAS and BAS. Overloaded getBatches to also take an array of geometry types and added GeometryType.TEXT in places where required alongisde MESH

* feat(viewer-lib): Text batch has correctly transformed texts

* feat(viewer-lib): Patched troika BatchedText to allow per text opacity. Draw ranges for text batches are now functional

* feat(viewer-lib): Fixed an issue with the BAS not correctly reporting bounds. Had to override two methods completely in our SpeckleText extension of the BatchedText just so that we don't do stupid things and still get good performance when dealing with a huge number of texts

* feat(viewer-lib): Added text batch object count limit. Default is 5k. Implemented proper material caching and cloning inside SpeckleText. Overriden the default updateBounds function so that we don't waste tens of millisecons per frame!!! pointlessly

* feat(viewer-lib): Implemented TextBatchObject along with individual text batch object transform manipulation at batch level.

* chore(viewer-lib): Updated the pipelines to not render text geometries twice

* feat(viewer-lib): Implemented RTE for batched text rendering. As with the rest of the geometry types, RTE is automaic and will only be used when needed

* feat(viewer-lib): Integrated remaining text v3 features: alignments and maxWidth

* feat(viwer-lib): Implemented billboarding and RTE billboarding for text.

* feat(viewer-lib): Text batches now report correct object materials and can be filtered properly

* fix(viewer-lib): Some Fixes:
- The need for text RTE is now correctly being computed on the right text dimensions
- Sequential update ranges now correctly apply materials to all of them

* fix(viewer-lib): RTE text box is now correctly transformed. The text batch object only uses the TAS for intersecting since it's BAS is redundant.

* feat(viewer-lib): Text batches now correctly use gradient/ramp textures along with sample indices for colored filtering.

* feat(viewer-lib): Implemented raycasting for billboarded text batches in the most simple and robust way I was capable of. Lacks TAS speedup but it's a compromise we have to make and one which we probably will never regret

* feat(viewer-lib): Good progress on reworking TextLabel, which replaces the old multi purpose SpeckleText, which we use internally for measurements. More precise rendering, no more rogue margins between text and background. Regular billboarding now also works, along with non-billboarded rendering

* feat(viewer-lib): Finally a unified billboarding solution in SpeckleBasicMaterial. Supporting both world and screen billboarding; SpeckleTextMaterial now extends SpeckleBasicMaterial; TextLabel now has proper control over size and margins. No more weird offsets. Added background margins to the text params which work in both world and screen space.

* feat(viewer-lib): Implemented raycasting for all billboarding types. Spent quite some time on the screen billboarding one because of a stupid mistake

* chore(viewer-lib): Added (vibed) type declaration file for troika's Text class and fixed compiler errors for TextLabel

* chore(viewer-lib): Renamed SpeckleText to SpeckleBatchedText and fixed all compiler errors. Updated type definition file

* feat(viewer-lib): Integrated TextLabel with measurements. Simplified a lot of code

* fix(viewer-lib): Some updates and fixes to text and measurements integration
- Screen space billboarding now also takes an NDC offset alongside the size.
- Added auto margin calculation for TextLabel background so it's always centered regardless of anchor-ing
- DPR is automatically factored in for TextLabel
- Some changes to sizes and margins for measurements

* fix(viewer-lib): Bunch of fixes and tweaks

* fix(viewer-lib): Area measurement's area plane no longer overdraws on top of the area value text label via simple stenciling

* fix(viewer-lib): Fixed CI build

* fix(viewer-lib): Fixed CI build

* feat(viewer-lib): Slightly reduces the size and h margin of text gizmos for measurements

* fix(viewer-lib): Fixed incorrect text transformation when neither RTE nor billboarded

* chore(viewer-lib): Added review suggestions
2025-07-15 14:48:13 +03:00
2025-07-15 14:48:13 +03:00
2024-11-08 10:45:39 +01:00
2021-07-22 09:23:21 -04:00
2024-08-13 11:04:40 +02:00
2025-07-15 14:48:13 +03:00


Speckle | Server

Twitter Follow Community forum users website docs

Speckle is the first AEC data hub that connects with your favorite AEC tools. Speckle exists to overcome the challenges of working in a fragmented industry where communication, creative workflows, and the exchange of data are often hindered by siloed software and processes. It is here to make the industry better.

Server and Web packages

codecov CircleCI

Repo structure

This monorepo is the home of the Speckle v2 web packages:

Other repos

Make sure to also check and these other Speckle repositories:

Developing and Debugging

Have you checked our dev docs?

We have a detailed section on deploying a Speckle server. To get started developing locally, you can see the Local development environment page.

TL;DR;

We're using yarn and its workspaces functionalities to manage the monorepo. Make sure you are using Node version 22. To get started, run:

  1. corepack enable
  2. yarn
  3. yarn build:public
  4. yarn build

After this, you can use the scripts in the individual packages or run them all in dev mode:

  • yarn dev

For development you'll also want to run yarn dev:docker:up which will start up the docker containers you will need to be able to run the apps on your machine.

IDE

The suggested IDE for working in this repo is VSCode, because the repo has special configs to improve the DX there (auto-format & auto-lint, recommended extensions etc.).

This repository relies on VSCode multi-root workspaces, so for the best DX and proper formatting/linting make sure you open the project using the workspace.code-workspace file instead of just opening the folder in VSCode.

Proper TypeScript support

To get proper TS support in standard TS files as well as Vue files, we rely on the Volar VSCode extension - not Vetur! When you open the workspace for the very first time, VSCode should already prompt you to install this extension. The default Volar setup can be quite resource intensive, however, because there end up being standard TS Language Server instances running as well as Vue TS Language server instances. To resolve this issue we rely on Volar's Take Over Mode.

Essentially, ensure you have Volar enabled, and the built in TypeScript and JavaScript Language Features extension disabled (for this workspace)!

Useful containers

Maildev

We have a Maildev container available that you can use to see all e-mails sent out from the app. Make sure your server .env file is configured properly to use it:

EMAIL=true
EMAIL_FROM="no-reply@example.org"
EMAIL_HOST="localhost"
EMAIL_PORT="1025"

The web portal is available at localhost:1080 and it's listening for mail on port 1025.

Minio (S3 storage)

Default credentials are: minioadmin:minioadmin Main storage Web UI: http://localhost:9001/ Region1 storage Web UI: http://localhost:9021/

You can use the web UI to validate uploaded blobs

Contributing

Please make sure you read the contribution guidelines for an overview of the best practices we try to follow.

When pushing commits to this repo, please follow the following guidelines:

  • When ready to commit, run $ yarn cz & follow the prompts.

When committing to git, an automated script will run. This will check that your commit conforms to Speckle's guidelines.

  • To enable additional checks, you may wish to optionally install the following:

  • Please note that these additional checks will be run by Speckle's automated CI environment and non-conformances, if any, may prevent your Pull Request from being merged.

  • Please use the name of the package as the scope of your commit.

  • Note that ggshield requires you to register an account and then authorise with GitGuardian before it can be used: ggshield auth login

  • Then run to enable pre-commit. This will run on every commit you make:

    pre-commit install
    

Security

For any security vulnerabilities or concerns, please contact us directly at security[at]speckle.systems.

License

Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via email.

S
Description
Speckle Server with custom IFC Converter
Readme Apache-2.0 1.1 GiB
Languages
HTML 44.2%
TypeScript 20.7%
C++ 20.7%
C 6.9%
Vue 3.7%
Other 3.6%