Skip to content

Commit

Permalink
improved participant id generation
Browse files Browse the repository at this point in the history
  • Loading branch information
vtnorton committed Aug 17, 2024
1 parent c65a889 commit f0c2bab
Show file tree
Hide file tree
Showing 64 changed files with 134 additions and 126 deletions.
2 changes: 1 addition & 1 deletion js/cdn/autodesk/public/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function InitSuperVizRoomWithAutodesk(viewer) {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: 'John ' + participant,
avatar: {
imageUrl: `https://production.cdn.superviz.com/static/default-avatars/2.png`,
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/contextual-comments-autodesk/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEVELOPER_KEY, CLIENT_ID, CLIENT_SECRET } from "../env.js";
import { sampleInfo } from "../projectInfo.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand Down Expand Up @@ -79,7 +79,7 @@ async function InitSuperVizRoomWithAutodesk(viewer) {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
avatar: {
imageUrl: `https://production.cdn.superviz.com/static/default-avatars/2.png`,
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/contextual-comments-canvas/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEVELOPER_KEY } from "../env.js";
import { sampleInfo } from "./../projectInfo.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand All @@ -13,7 +13,7 @@ async function initializeSuperVizRoom() {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
},
});
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/contextual-comments-html/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEVELOPER_KEY } from "../env.js";
import { sampleInfo } from "./../projectInfo.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand All @@ -13,7 +13,7 @@ async function initializeSuperVizRoom() {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function InitSuperVizRoomWithMatterport(mpSDK, showcase) {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: 'John ' + participant,
avatar: {
imageUrl: `https://production.cdn.superviz.com/static/default-avatars/2.png`,
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/contextual-comments-threejs/public/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RoomEnvironment } from "/vendor/threejs/examples/jsm/environments/RoomE
import { OrbitControls } from "/vendor/threejs/examples/jsm/controls/OrbitControls.js";
import { GLTFLoader } from "/vendor/threejs/examples/jsm/loaders/GLTFLoader.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand Down Expand Up @@ -62,7 +62,7 @@ async function InitSuperVizRoomWithThreeJS(scene, renderer, camera) {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
avatar: {
imageUrl: `https://production.cdn.superviz.com/static/default-avatars/2.png`,
Expand Down
10 changes: 5 additions & 5 deletions js/cdn/forms-elements/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEVELOPER_KEY } from "../env.js";
import { sampleInfo } from "../projectInfo.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand All @@ -13,16 +13,16 @@ async function initializeSuperVizRoom() {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
},
});

const formElements = new window.SuperVizRoom.FormElements({
fields: ['name', 'email', 'dog', 'cat', 'fish'],
})
fields: ['name', 'email', 'dog', 'cat', 'fish'],
})

room.addComponent(formElements)
room.addComponent(formElements)

return room;
}
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/matterport/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEVELOPER_KEY, MATTERPORT_KEY } from "../env.js";
import { sampleInfo } from "../projectInfo.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const modelId = "7ffnfBNamei";
Expand Down Expand Up @@ -29,7 +29,7 @@ async function InitSuperVizRoomWithMatterport(mpSDK) {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
avatar: {
imageUrl: `https://production.cdn.superviz.com/static/default-avatars/2.png`,
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/mouse-pointers/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEVELOPER_KEY } from "../env.js";
import { sampleInfo } from "../projectInfo.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand All @@ -13,7 +13,7 @@ async function initializeSuperVizRoom() {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
},
});
Expand Down
2 changes: 1 addition & 1 deletion js/cdn/real-time-data-engine/public/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function initializeSuperVizRoom() {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: 'John ' + participant,
},
})
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/threejs/public/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RoomEnvironment } from "/vendor/threejs/examples/jsm/environments/RoomE
import { OrbitControls } from "/vendor/threejs/examples/jsm/controls/OrbitControls.js";
import { GLTFLoader } from "/vendor/threejs/examples/jsm/loaders/GLTFLoader.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand Down Expand Up @@ -62,7 +62,7 @@ async function InitSuperVizRoomWithThreeJS(scene, camera) {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
avatar: {
imageUrl: `https://production.cdn.superviz.com/static/default-avatars/2.png`,
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/video-conference/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEVELOPER_KEY } from "../env.js";
import { sampleInfo } from "../projectInfo.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand All @@ -13,7 +13,7 @@ async function initializeSuperVizRoom() {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
},
});
Expand Down
4 changes: 2 additions & 2 deletions js/cdn/who-is-online/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEVELOPER_KEY } from "../env.js";
import { sampleInfo } from "../projectInfo.js";

const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;

Expand All @@ -13,7 +13,7 @@ async function initializeSuperVizRoom() {
name: groupName,
},
participant: {
id: participant.toString(),
id: participant,
name: "John " + participant,
},
});
Expand Down
2 changes: 1 addition & 1 deletion js/react/autodesk/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John" + participant,
}}
roomId={groupName}
Expand Down
4 changes: 2 additions & 2 deletions js/react/contextual-comments-autodesk/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AutodeskCommentsImplementation from "./components/AutodeskCommentsImpleme
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY;
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");

function App() {
return (
Expand All @@ -17,7 +17,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupName}
Expand Down
2 changes: 1 addition & 1 deletion js/react/contextual-comments-canvas/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
2 changes: 1 addition & 1 deletion js/react/contextual-comments-html/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
4 changes: 2 additions & 2 deletions js/react/contextual-comments-matterport/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import MatterportCommentsImplementation from "./components/MatterportCommentsImp
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY;
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");

function App() {
return (
Expand All @@ -17,7 +17,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
4 changes: 2 additions & 2 deletions js/react/contextual-comments-threejs/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ContextualCommentsThreeJSImplementation from "./components/ContextualComm
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY;
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");

function App() {
return (
Expand All @@ -17,7 +17,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
4 changes: 2 additions & 2 deletions js/react/forms-elements/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { sampleInfo } from "./projectInfo";
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY;
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");

function App() {
return (
Expand All @@ -15,7 +15,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
4 changes: 2 additions & 2 deletions js/react/matterport/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const MATTERPORT_KEY = import.meta.env.VITE_MATTERPORT_KEY;
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY;
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");

function App() {
return (
Expand All @@ -17,7 +17,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
4 changes: 2 additions & 2 deletions js/react/mouse-pointers/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { sampleInfo } from "./projectInfo";
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY;
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");

function App() {
return (
Expand All @@ -16,7 +16,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
2 changes: 1 addition & 1 deletion js/react/real-time-data-engine/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John" + participant,
}}
roomId={groupId}
Expand Down
4 changes: 2 additions & 2 deletions js/react/threejs/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ThreeJSImplementation from "./components/ThreeJSImplementation";
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY;
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");

function App() {
return (
Expand All @@ -17,7 +17,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
4 changes: 2 additions & 2 deletions js/react/video-conference/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { sampleInfo } from "./projectInfo";
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY;
const groupId = sampleInfo.id;
const groupName = sampleInfo.name;
const participant = Math.floor(Math.random() * 100);
const participant = Math.floor(Math.random() * 100).toString().padStart(3, "0");

function App() {
const collabMode = {
Expand All @@ -20,7 +20,7 @@ function App() {
name: groupName,
}}
participant={{
id: participant.toString(),
id: participant,
name: "John " + participant,
}}
roomId={groupId}
Expand Down
Loading

0 comments on commit f0c2bab

Please sign in to comment.