Skip to content

Commit

Permalink
Chore(V2): rename Tutorials to Guides
Browse files Browse the repository at this point in the history
  • Loading branch information
aamir1995 committed Aug 21, 2023
1 parent 78278c5 commit bb6c006
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 20 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { demo } from "../../demo";
import { ViewDemoHost } from "../../hosts";
/** Here goes code demo code that you can see in the playground */
import publicScene from "./public_scene.ts?raw";
import privateScene from "./private_scene.ts?raw";

export const loadingScenes = {
...demo("loading_scenes", "public_scene", publicScene, ViewDemoHost, {}, "Loading public scenes."),
...demo("loading_scenes", "private_scene", privateScene, ViewDemoHost, {}, "Loading private scenes."),
};
import { demo } from "../../demo";
import { ViewDemoHost } from "../../hosts";
/** Here goes code demo code that you can see in the playground */
import publicScene from "./public_scene.ts?raw";
import privateScene from "./private_scene.ts?raw";

export const loadingScenes = {
...demo("loading_scenes", "public_scene", publicScene, ViewDemoHost, {}, "Loading public scenes."),
...demo("loading_scenes", "private_scene", privateScene, ViewDemoHost, {}, "Loading private scenes."),
};
4 changes: 2 additions & 2 deletions v2/demo-snippets/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as tutorials from "./tutorials";
import * as guides from "./guides";

export { tutorials };
export { guides };
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ description: "Setting up instructions for the various Novorender packages."
keywords: ["novorender api docs", "webgl api", "measure api", "data js api", "getting started"]
---

import { tutorials } from "@site/demo-snippets/index";
import { guides } from "@site/demo-snippets/index";

## Demo

Only the function `main()` is included in the live editors.
Try changing the [background color](../webgl-api/interfaces/NovoRender.RenderSettings#background) on line 18 or the [camera controller](../webgl-api/interfaces/NovoRender.API#createcameracontroller) on line 23 in the example below.

<PlaygroundComponent {...tutorials.gettingStarted.spheres} />
<PlaygroundComponent {...guides.gettingStarted.spheres} />

export const PlaygroundTip = () => (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ description: "Loading scenes via Data JS API or Data REST API."
keywords: ["novorender api docs", "web api", "data js api", "loading scenes"]
---

import { tutorials } from "@site/demo-snippets/index";
import { guides } from "@site/demo-snippets/index";

To load your own scenes we recommend that you use the [`@novorender/data-js-api`](https://docs.novorender.com/docs/data-js-api) package, but you can also use the [Novorender data REST API](https://docs.novorender.com/docs/category/data-rest-api-v1) directly if you prefer.
We will be using the npm package in all our examples.

## Public scenes

<PlaygroundComponent {...tutorials.loadingScenes.public_scene} />
<PlaygroundComponent {...guides.loadingScenes.public_scene} />

## Private scenes

Only scene related endpoints are covered by the NPM package, so for user / authentication endpoints you will have to use the REST API as well.

### Username / Password

<PlaygroundComponent {...tutorials.loadingScenes.private_scene} />
<PlaygroundComponent {...guides.loadingScenes.private_scene} />
<br />

:::note
Expand Down
6 changes: 3 additions & 3 deletions v2/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ const sidebars = {
// },
{
type: "category",
label: "Tutorials",
label: "Guides",
link: {
type: "generated-index",
title: "Tutorials",
title: "Guides",
description: "Learn more about the different features and techniques.",
},
items: [{ type: "autogenerated", dirName: "tutorials" }],
items: [{ type: "autogenerated", dirName: "guides" }],
},
// { type: "link", label: "Data Rest API", href: "/data-rest-api" },
],
Expand Down

0 comments on commit bb6c006

Please sign in to comment.