chore(domains): update speckle.xyz to app.speckle.systems (#238)

* chore(domains): update speckle.xyz to app.speckle.systems

* Switched to new URLs in documentation and also in sandboxes

---------

Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
This commit is contained in:
Iain Sproat 2024-07-18 15:13:11 +01:00 коммит произвёл GitHub
Родитель f708d1f8f2
Коммит 8505f39895
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
9 изменённых файлов: 99 добавлений и 66 удалений

Просмотреть файл

@ -86,14 +86,14 @@ using Speckle.Core.Models;
// Note: some boilerplate code removed.
// Receive a revit commit (note: you will need a local account on app.speckle.systems for this to work!)
var data = Helpers.Receive("https://speckle.xyz/streams/0d3cb7cb52/commits/681cdd572c").Result;
var data = Helpers.Receive("https://app.speckle.systems/streams/0d3cb7cb52/commits/681cdd572c").Result;
var flatData = data.Flatten().ToList();
var timberWalls = flatData.FindAll(obj => obj is Objects.BuiltElements.Revit.RevitWall wall && wall.type == "Wall - Timber Clad");
```
Check out the [actual filtered timber walls here, in 3D](https://speckle.xyz/streams/0d3cb7cb52/commits/681cdd572c?filter=%7B%22ghostOthers%22%3Atrue,%22filterBy%22%3A%7B%22type%22%3A%5B%22Wall%20-%20Timber%20Clad%22%5D%7D,%22colorBy%22%3Anull%7D&c=%5B8.38909,-14.62227,21.72508,19.02341,-4.21317,7.28914,0,1%5D)!
Check out the [actual filtered timber walls here, in 3D](https://app.speckle.systems/streams/0d3cb7cb52/commits/681cdd572c?filter=%7B%22ghostOthers%22%3Atrue,%22filterBy%22%3A%7B%22type%22%3A%5B%22Wall%20-%20Timber%20Clad%22%5D%7D,%22colorBy%22%3Anull%7D&c=%5B8.38909,-14.62227,21.72508,19.02341,-4.21317,7.28914,0,1%5D)!
Having fun? Let's try a couple more examples! Here's a query that will return all the **windows**:
@ -103,9 +103,9 @@ var windows = flatData.FindAll(obj => (string)obj["category"] == "Windows");
```
Here are [the actual elements in our 3D viewer](https://speckle.xyz/streams/0d3cb7cb52/commits/681cdd572c?filter=%7B%22ghostOthers%22%3Atrue,%22filterBy%22%3A%7B%22category%22%3A%5B%22Windows%22%5D%7D,%22colorBy%22%3A%7B%22type%22%3A%22category%22,%22property%22%3A%22category%22%7D%7D&c=%5B-5.7784,-18.86637,18.78367,16.556,-1.104,4.3014,0,1%5D).
Here are [the actual elements in our 3D viewer](https://app.speckle.systems/streams/0d3cb7cb52/commits/681cdd572c?filter=%7B%22ghostOthers%22%3Atrue,%22filterBy%22%3A%7B%22category%22%3A%5B%22Windows%22%5D%7D,%22colorBy%22%3A%7B%22type%22%3A%22category%22,%22property%22%3A%22category%22%7D%7D&c=%5B-5.7784,-18.86637,18.78367,16.556,-1.104,4.3014,0,1%5D).
For extra fun, let's extract all the [**rooms**](https://speckle.xyz/streams/0d3cb7cb52/commits/681cdd572c?filter=%7B%22ghostOthers%22%3Atrue,%22filterBy%22%3A%7B%22speckle_type%22%3A%5B%22Objects.BuiltElements.Room%22%5D%7D,%22colorBy%22%3Anull%7D&c=%5B-3.83025,-15.78239,24.12586,16.556,-1.104,4.3014,0,1%5D
For extra fun, let's extract all the [**rooms**](https://app.speckle.systems/streams/0d3cb7cb52/commits/681cdd572c?filter=%7B%22ghostOthers%22%3Atrue,%22filterBy%22%3A%7B%22speckle_type%22%3A%5B%22Objects.BuiltElements.Room%22%5D%7D,%22colorBy%22%3Anull%7D&c=%5B-3.83025,-15.78239,24.12586,16.556,-1.104,4.3014,0,1%5D
):
```csharp

Просмотреть файл

@ -27,7 +27,7 @@ Syntax and examples for supported API methods. The examples assume a Viewer inst
### Load/Unload an Object
`v.loadObject( objectUrl )` / `v.unloadObject( objectUrl )`
Example: `v.loadObject( 'https://speckle.xyz/streams/3073b96e86/objects/e05c5834368931c9d9a4e2087b4da670' )`
Example: `v.loadObject( 'https://app.speckle.systems/streams/3073b96e86/objects/e05c5834368931c9d9a4e2087b4da670' )`
### Get Properties of Loaded Objects
`v.getObjectsProperties()`

Просмотреть файл

@ -99,7 +99,7 @@ The `StreamWrapper` can parse any URL pointing to a stream, branch, commit, obje
from specklepy.api.wrapper import StreamWrapper
# provide any stream, branch, commit, object, or globals url
wrapper = StreamWrapper("https://speckle.xyz/streams/3073b96e86/commits/604bea8cc6")
wrapper = StreamWrapper("https://app.speckle.systems/streams/3073b96e86/commits/604bea8cc6")
# get an authenticated SpeckleClient if you have a local account for the server
client = wrapper.get_client()

Просмотреть файл

@ -41,10 +41,10 @@ We've also built a few nodes for more advanced use cases, as well as some handy
Speckle Streams are identified by their URLs.
Across our Dynamo and Grasshopper connectors you'll see URLs in 3 different formats:
- `https://speckle.xyz/streams/3073b96e86` points to the `main` branch on Stream `3073b96e86`
- `https://speckle.xyz/streams/3073b96e86/branches/dev` points to a branch named `dev` on Stream `3073b96e86`
- `https://speckle.xyz/streams/3073b96e86/commits/604bea8cc6` points to a specific commit `604bea8cc6` on Stream `3073b96e86`
- `https://speckle.xyz/streams/3073b96e86/objects/df7b8bafccefa791d82939dd36541189` points to a specific object `df7b8bafccefa791d82939dd36541189` on Stream `3073b96e86`
- `https://app.speckle.systems/streams/3073b96e86` points to the `main` branch on Stream `3073b96e86`
- `https://app.speckle.systems/streams/3073b96e86/branches/dev` points to a branch named `dev` on Stream `3073b96e86`
- `https://app.speckle.systems/streams/3073b96e86/commits/604bea8cc6` points to a specific commit `604bea8cc6` on Stream `3073b96e86`
- `https://app.speckle.systems/streams/3073b96e86/objects/df7b8bafccefa791d82939dd36541189` points to a specific object `df7b8bafccefa791d82939dd36541189` on Stream `3073b96e86`
::: tip
Unsure about what _commits_ and _branches_ are? No worries, you don't need to know what they are to use Speckle! But if you're curious, you can read about them in [Core Concepts](/user/concepts).
@ -97,7 +97,7 @@ To view the sent stream online you can just right click on the sender node:
When using a stream URL, by default, the `main` branch is used to send and receive data.
To send to a specific branch, simply use the branch URL, such as: `https://speckle.xyz/streams/3073b96e86/branches/dev`.
To send to a specific branch, simply use the branch URL, such as: `https://app.speckle.systems/streams/3073b96e86/branches/dev`.
## Receiving Data
@ -115,11 +115,11 @@ By using the toggle on the node, you can enable/disable auto receiving. If enabl
When using a stream URL, the `main` branch is used to send and receive data by default.
You can also receive data from a specific branch; simply use the branch URL, such as: `https://speckle.xyz/streams/3073b96e86/branches/dev`.
You can also receive data from a specific branch; simply use the branch URL, such as: `https://app.speckle.systems/streams/3073b96e86/branches/dev`.
### Receiving a Specific Commit
We've already seen how to retrieve data from streams and branches. It's possible to go even deeper, retrieving data from specific commits. To do this, simply use the commit URL, such as: `https://speckle.xyz/streams/3073b96e86/commits/604bea8cc6`
We've already seen how to retrieve data from streams and branches. It's possible to go even deeper, retrieving data from specific commits. To do this, simply use the commit URL, such as: `https://app.speckle.systems/streams/3073b96e86/commits/604bea8cc6`
::: tip NOTE
@ -131,7 +131,7 @@ When receiving from a commit, the node will stop showing notifications about new
### Receiving a Specific Object
Similarly to commits, you can also point the receive node to a specific object. To do this, simply use the object's URL, such as: `https://speckle.xyz/streams/3073b96e86/objects/df7b8bafccefa791d82939dd36541189`.
Similarly to commits, you can also point the receive node to a specific object. To do this, simply use the object's URL, such as: `https://app.speckle.systems/streams/3073b96e86/objects/df7b8bafccefa791d82939dd36541189`.
Like commits, objects in a commit cannot be edited, so the data received using such a URL will always be consistent. You can find the ID of an object from the Speckle Web interface:

Просмотреть файл

@ -57,10 +57,10 @@ Just go to `Speckle 2 -> Tabs` and enable the ones you do need. By default, all
In visual programming environments, Speckle Streams are identified by their URLs. Across our Dynamo and Grasshopper connectors you'll see URLs in 4 different formats:
- `https://speckle.xyz/streams/3073b96e86` points to the `main` branch on Stream `3073b96e86`
- `https://speckle.xyz/streams/3073b96e86/branches/dev` points to a branch named `dev` on Stream `3073b96e86`
- `https://speckle.xyz/streams/3073b96e86/commits/604bea8cc6` points to a specific commit `604bea8cc6` on Stream `3073b96e86`
- `https://speckle.xyz/streams/3073b96e86/globals/d227da61c1` points to the [globals](/user/web.html#globals) at `d227da61c1` on Stream `3073b96e86` (the globals id is optional)
- `https://app.speckle.systems/streams/3073b96e86` points to the `main` branch on Stream `3073b96e86`
- `https://app.speckle.systems/streams/3073b96e86/branches/dev` points to a branch named `dev` on Stream `3073b96e86`
- `https://app.speckle.systems/streams/3073b96e86/commits/604bea8cc6` points to a specific commit `604bea8cc6` on Stream `3073b96e86`
- `https://app.speckle.systems/streams/3073b96e86/globals/d227da61c1` points to the [globals](/user/web.html#globals) at `d227da61c1` on Stream `3073b96e86` (the globals id is optional)
::: tip
Unsure what _commits_ and _branches_ are? 🤔
@ -125,7 +125,7 @@ By right-clicking on the node, you can enable/disable auto sending. If enabled,
When referring to a stream by its URL, the `main` branch is used to send and receive data by default.
To target a specific branch, simply use the branch URL, such as: `https://speckle.xyz/streams/3073b96e86/branches/dev`.
To target a specific branch, simply use the branch URL, such as: `https://app.speckle.systems/streams/3073b96e86/branches/dev`.
## Receiving Data
@ -145,11 +145,11 @@ By right-clicking on the node, you can enable/disable auto receiving. If enabled
When referring to a stream by its URL, the `main` branch is used to send and receive data by default.
To receive from a specific branch, simply use the branch URL, such as: `https://speckle.xyz/streams/3073b96e86/branches/dev`.
To receive from a specific branch, simply use the branch URL, such as: `https://app.speckle.systems/streams/3073b96e86/branches/dev`.
### Receiving a Specific Commit
As we've seen, you can retrieve data from both the 'stream' and 'branch' level. It goes deeper - it's possible to retrieve data from specific commits. To do so, simply use the commit URL, such as: `https://speckle.xyz/streams/3073b96e86/commits/604bea8cc6`
As we've seen, you can retrieve data from both the 'stream' and 'branch' level. It goes deeper - it's possible to retrieve data from specific commits. To do so, simply use the commit URL, such as: `https://app.speckle.systems/streams/3073b96e86/commits/604bea8cc6`
::: tip NOTE
@ -159,7 +159,7 @@ When receiving from a commit, the node will stop showing notifications about new
### Receiving a Specific Object
Finally, you can also receive just a specific object in a commit, to do so simply use the commit URL, ie: `https://speckle.xyz/streams/3073b96e86/objects/df7b8bafccefa791d82939dd36541189`. Objects can't be edited, so the data received using such a URL will always be consistent.
Finally, you can also receive just a specific object in a commit, to do so simply use the commit URL, ie: `https://app.speckle.systems/streams/3073b96e86/objects/df7b8bafccefa791d82939dd36541189`. Objects can't be edited, so the data received using such a URL will always be consistent.
You can find the ID of an object from the Speckle Web interface:
![image-20210322185007725](./img-dyn/image-20210322185007725.png)

Просмотреть файл

@ -5,38 +5,51 @@ The viewer can be extended with functionality via [extensions](/viewer/overview.
Using our previous basic example, we can add the measurement tool for example
```typescript
import { Viewer, DefaultViewerParams, SpeckleLoader } from "@speckle/viewer";
import { CameraController } from "@speckle/viewer";
import {
Viewer,
DefaultViewerParams,
SpeckleLoader,
UrlHelper,
CameraController,
MeasurementsExtension
} from "@speckle/viewer";
async function main() {
/** Get the HTML container */
const container = document.getElementById("renderer");
const container = document.getElementById("renderer") as HTMLElement;
/** Configure the viewer params */
const params = DefaultViewerParams;
params.verbose = true;
/** Create Viewer instance */
const viewer = new Viewer(container, DefaultViewerParams);
const viewer = new Viewer(container, params);
/** Initialise the viewer */
await viewer.init();
/** Add the stock camera controller extension */
viewer.createExtension(CameraController);
/** Add the measurement tool */
viewer.createExtension(MeasurementsExtension);
/** Add mesurements extension */
const measurements = viewer.createExtension(MeasurementsExtension);
/** Create a loader for the speckle stream */
const loader = new SpeckleLoader(
viewer.getWorldTree(),
"https://latest.speckle.dev/streams/92b620fb17/objects/801360a35cd00c13ac81522851a13341",
""
const urls = await UrlHelper.getResourceUrls(
"https://app.speckle.systems/projects/7591c56179/models/32213f5381"
);
/** Load the speckle data */
await viewer.loadObject(loader, 1, true);
for (const url of urls) {
const loader = new SpeckleLoader(viewer.getWorldTree(), url, "");
/** Load the speckle data */
await viewer.loadObject(loader, true);
}
measurements.enabled = true;
}
/** Call our function, which we named 'main' */
main();
```
<iframe src="https://codesandbox.io/embed/frmffj?view=Editor+%2B+Preview&module=%2Fsrc%2Findex.ts&hidenavigation=1"
<iframe src="https://codesandbox.io/embed/frmffj?view=preview&module=%2Fsrc%2Findex.ts&hidenavigation=1"
style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;"
title="Measurement Tool"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
@ -57,4 +70,4 @@ Here is the complete list of available stock extensions:
| FilteringExtension | Filtering functionality |
| DiffExtension | Diffing functionality |
All the available stock extensions are designed to work together, in order to offer the complete set of viewer functionality. To see all of them in action, you can checkout our [viewer-sandbox](https://github.com/specklesystems/speckle-server/tree/alex/API2.0/packages/viewer-sandbox) project, or our [speckle frontend](https://app.speckle.systems/)
All the available stock extensions are designed to work together, in order to offer the complete set of viewer functionality. To see all of them in action, you can checkout our [viewer-sandbox](https://github.com/specklesystems/speckle-server/tree/main/packages/viewer-sandbox) project, our [speckle frontend](https://app.speckle.systems/). Alternatively, you can also run the viewer-sandbox [here](https://viewer.speckle.systems/)

Просмотреть файл

@ -38,23 +38,25 @@ Next, let's add a camera controller so we have control over the camera.
viewer.createExtension(CameraController);
```
Finally, let's load in some data from a Speckle model.
Finally, let's load in some data from a Speckle model. It's easier to use the provided `UrlHelper` which knows how to parse various speckle URL formats
```ts
/** Create a loader for the speckle stream */
const resource =
"https://latest.speckle.dev/streams/c43ac05d04/objects/d807f3888a400dbd814529fafd8ccac0";
const loader = new SpeckleLoader(viewer.getWorldTree(), resource, "");
/** Load the speckle data */
await viewer.loadObject(loader, true);
const urls = await UrlHelper.getResourceUrls(
"https://app.speckle.systems/projects/7591c56179/models/32213f5381"
);
for (const url of urls) {
const loader = new SpeckleLoader(viewer.getWorldTree(), url, "");
/** Load the speckle data */
await viewer.loadObject(loader, true);
}
```
Here is the end result:
<iframe src="https://codesandbox.io/embed/jf4ccn?view=Editor+%2B+Preview&module=%2Fsrc%2Findex.ts&hidenavigation=1"
style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;"
title="Basic Setup"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
<iframe src="https://codesandbox.io/embed/jf4ccn?view=preview&module=%2Fsrc%2Findex.ts&hidenavigation=1"
style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;"
title="Basic Setup"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
></iframe>

Просмотреть файл

@ -24,41 +24,54 @@ Now save this HTML snippet as `index.html`
Next we'll create the typescript file:
```typescript
import { Viewer, DefaultViewerParams, SpeckleLoader } from "@speckle/viewer";
import { CameraController } from "@speckle/viewer";
import {
Viewer,
DefaultViewerParams,
SpeckleLoader,
UrlHelper,
} from "@speckle/viewer";
import { CameraController, SelectionExtension } from "@speckle/viewer";
async function main() {
/** Get the HTML container */
const container = document.getElementById("renderer");
/** Configure the viewer params */
const params = DefaultViewerParams;
params.showStats = true;
params.verbose = true;
/** Create Viewer instance */
const viewer = new Viewer(container, DefaultViewerParams);
const viewer = new Viewer(container, params);
/** Initialise the viewer */
await viewer.init();
/** Add the stock camera controller extension */
viewer.createExtension(CameraController);
/** Add the selection extension for extra interactivity */
viewer.createExtension(SelectionExtension);
/** Create a loader for the speckle stream */
const loader = new SpeckleLoader(
viewer.getWorldTree(),
"https://latest.speckle.dev/streams/92b620fb17/objects/801360a35cd00c13ac81522851a13341",
""
const urls = await UrlHelper.getResourceUrls(
"https://app.speckle.systems/projects/7591c56179/models/32213f5381"
);
/** Load the speckle data */
await viewer.loadObject(loader, 1, true);
for (const url of urls) {
const loader = new SpeckleLoader(viewer.getWorldTree(), url, "");
/** Load the speckle data */
await viewer.loadObject(loader, true);
}
}
/** Call our function, which we named 'main' */
main();
```
Now save this typescript snippet as`index.ts`
The result:
<iframe src="https://codesandbox.io/embed/63rfsz?view=Editor+%2B+Preview&module=%2Fsrc%2Findex.ts&hidenavigation=1"
<iframe src="https://codesandbox.io/embed/jf4ccn?view=preview&module=%2Fsrc%2Findex.ts&hidenavigation=1"
style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;"
title="brave-engelbart-63rfsz"
title="Basic Setup"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
></iframe>
></iframe>

Просмотреть файл

@ -5,9 +5,14 @@ You can load data into the speckle viewer virtually from any source as long as y
## Speckle Data
The viewer comes with a builtin speckle loader. Here's an example of how to get things going:
```ts
const objUrl = "https://speckle.xyz/streams/da9e320dad/objects/31d10c0cea569a1e26809658ed27e281"
const loader = new SpeckleLoader(viewer.getWorldTree(), objUrl);
await viewer.loadObject(loader, true);
const urls = await UrlHelper.getResourceUrls(
"https://app.speckle.systems/projects/7591c56179/models/32213f5381"
);
for (const url of urls) {
const loader = new SpeckleLoader(viewer.getWorldTree(), url, "");
/** Load the speckle data */
await viewer.loadObject(loader, true);
}
```
## Other Data Sources