File tree Expand file tree Collapse file tree 10 files changed +31
-15
lines changed
examples/HelloWorldSchema Expand file tree Collapse file tree 10 files changed +31
-15
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ grids.create(world);
57
57
// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
58
58
// and provide the relative path in `workerUrl`
59
59
// We use here the internal route of the worker in the library for simplicity purposes
60
- const workerUrl = "../FragmentsModels/src/multithreading/fragments-thread.ts" ;
60
+ const workerUrl =
61
+ "https://thatopen.github.io/engine_fragment/resources/worker.mjs" ;
61
62
const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
62
63
world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
63
64
Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ grids.create(world);
99
99
100
100
// You have to copy `node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
101
101
// and provide the relative path in `workerUrl`
102
- const workerUrl = "./../../src/multithreading/fragments-thread.ts" ;
102
+ const workerUrl =
103
+ "https://thatopen.github.io/engine_fragment/resources/worker.mjs" ;
103
104
const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
104
105
world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
105
106
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ grids.create(world);
57
57
// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
58
58
// and provide the relative path in `workerUrl`
59
59
// We use here the internal route of the worker in the library for simplicity purposes
60
- const workerUrl = "../../src/multithreading/fragments-thread.ts" ;
60
+ const workerUrl =
61
+ "https://thatopen.github.io/engine_fragment/resources/worker.mjs" ;
61
62
const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
62
63
world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
63
64
@@ -83,7 +84,9 @@ fragments.models.list.onItemSet.add(({ value: model }) => {
83
84
:::
84
85
*/
85
86
86
- const file = await fetch ( "/resources/frags/school_arq.frag" ) ;
87
+ const file = await fetch (
88
+ "https://thatopen.github.io/engine_fragment/resources/frags/school_arq.frag" ,
89
+ ) ;
87
90
const buffer = await file . arrayBuffer ( ) ;
88
91
const model = await fragments . load ( buffer , { modelId : "example" } ) ;
89
92
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ grids.create(world);
57
57
// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
58
58
// and provide the relative path in `workerUrl`
59
59
// We use here the internal route of the worker in the library for simplicity purposes
60
- const workerUrl = "../../src/multithreading/fragments-thread.ts" ;
60
+ const workerUrl =
61
+ "https://thatopen.github.io/engine_fragment/resources/worker.mjs" ;
61
62
const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
62
63
world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
63
64
@@ -83,7 +84,9 @@ fragments.models.list.onItemSet.add(({ value: model }) => {
83
84
:::
84
85
*/
85
86
86
- const file = await fetch ( "/resources/frags/school_arq.frag" ) ;
87
+ const file = await fetch (
88
+ "https://thatopen.github.io/engine_fragment/resources/frags/school_arq.frag" ,
89
+ ) ;
87
90
const buffer = await file . arrayBuffer ( ) ;
88
91
const model = await fragments . load ( buffer , { modelId : "example" } ) ;
89
92
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ grids.create(world);
57
57
// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
58
58
// and provide the relative path in `workerUrl`
59
59
// We use here the internal route of the worker in the library for simplicity purposes
60
- const workerUrl = "../../src/multithreading/fragments-thread.ts" ;
60
+ const workerUrl =
61
+ "https://thatopen.github.io/engine_fragment/resources/worker.mjs" ;
61
62
const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
62
63
world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
63
64
@@ -83,7 +84,9 @@ fragments.models.list.onItemSet.add(({ value: model }) => {
83
84
:::
84
85
*/
85
86
86
- const file = await fetch ( "/resources/frags/school_arq.frag" ) ;
87
+ const file = await fetch (
88
+ "https://thatopen.github.io/engine_fragment/resources/frags/school_arq.frag" ,
89
+ ) ;
87
90
const buffer = await file . arrayBuffer ( ) ;
88
91
const model = await fragments . load ( buffer , { modelId : "example" } ) ;
89
92
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ grids.create(world);
56
56
// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
57
57
// and provide the relative path in `workerUrl`
58
58
// We use here the internal route of the worker in the library for simplicity purposes
59
- const workerUrl = "../../src/multithreading/fragments-thread.ts" ;
59
+ const workerUrl =
60
+ "https://thatopen.github.io/engine_fragment/resources/worker.mjs" ;
60
61
const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
61
62
world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
62
63
@@ -82,7 +83,9 @@ fragments.models.list.onItemSet.add(({ value: model }) => {
82
83
:::
83
84
*/
84
85
85
- const file = await fetch ( "/resources/frags/school_arq.frag" ) ;
86
+ const file = await fetch (
87
+ "https://thatopen.github.io/engine_fragment/resources/frags/school_arq.frag" ,
88
+ ) ;
86
89
const buffer = await file . arrayBuffer ( ) ;
87
90
const model = await fragments . load ( buffer , { modelId : "example" } ) ;
88
91
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ async function main() {
44
44
// Get fragments model
45
45
46
46
// prettier-ignore
47
- const workerUrl = "./src/multithreading/fragments-thread.ts " ;
47
+ const workerUrl = "https://thatopen.github.io/engine_fragment/resources/worker.mjs " ;
48
48
// const workerUrl = "../../dist/Worker/worker.mjs";
49
49
const fragments = new FragmentsModels ( workerUrl ) ;
50
50
@@ -108,7 +108,9 @@ async function main() {
108
108
// item.value.transparent = true;
109
109
// });
110
110
111
- const model = await loadModel ( "/resources/frags/school_arq.frag" ) ;
111
+ const model = await loadModel (
112
+ "https://thatopen.github.io/engine_fragment/resources/frags/school_arq.frag" ,
113
+ ) ;
112
114
const mouse = new THREE . Vector2 ( ) ;
113
115
114
116
// const columIds = await model.getItemsByQuery({
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ const convertIFC = async () => {
80
80
// and provide the relative path in `workerUrl`
81
81
// We use here the internal route of the worker in the library for simplicity purposes
82
82
const workerUrl =
83
- "../../FragmentsModels/src/multithreading/fragments-thread.ts " ;
83
+ "https://thatopen.github.io/engine_fragment/resources/worker.mjs " ;
84
84
const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
85
85
world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
86
86
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ world.renderer.onAfterUpdate.add(() => stats.end());
61
61
*/
62
62
63
63
// prettier-ignore
64
- const workerUrl = "../../../../FragmentsModels/src/multithreading/fragments-thread.ts " ;
64
+ const workerUrl = "https://thatopen.github.io/engine_fragment/resources/worker.mjs " ;
65
65
const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
66
66
world . camera . controls . addEventListener ( "control" , ( ) => fragments . update ( ) ) ;
67
67
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ const run = async (serialize: boolean) => {
131
131
// Model loading
132
132
133
133
// prettier-ignore
134
- const workerUrl = "../../FragmentsModels/src/multithreading/fragments-thread.ts " ;
134
+ const workerUrl = "https://thatopen.github.io/engine_fragment/resources/worker.mjs " ;
135
135
// const workerUrl = "../../../dist/Worker/worker.mjs";
136
136
const fragments = new FragmentsModels ( workerUrl ) ;
137
137
You can’t perform that action at this time.
0 commit comments