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);
5757// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
5858// and provide the relative path in `workerUrl`
5959// 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" ;
6162const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
6263world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
6364
Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ grids.create(world);
9999
100100// You have to copy `node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
101101// 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" ;
103104const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
104105world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
105106
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ grids.create(world);
5757// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
5858// and provide the relative path in `workerUrl`
5959// 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" ;
6162const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
6263world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
6364
@@ -83,7 +84,9 @@ fragments.models.list.onItemSet.add(({ value: model }) => {
8384 :::
8485*/
8586
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+ ) ;
8790const buffer = await file . arrayBuffer ( ) ;
8891const model = await fragments . load ( buffer , { modelId : "example" } ) ;
8992
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ grids.create(world);
5757// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
5858// and provide the relative path in `workerUrl`
5959// 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" ;
6162const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
6263world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
6364
@@ -83,7 +84,9 @@ fragments.models.list.onItemSet.add(({ value: model }) => {
8384 :::
8485*/
8586
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+ ) ;
8790const buffer = await file . arrayBuffer ( ) ;
8891const model = await fragments . load ( buffer , { modelId : "example" } ) ;
8992
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ grids.create(world);
5757// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
5858// and provide the relative path in `workerUrl`
5959// 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" ;
6162const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
6263world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
6364
@@ -83,7 +84,9 @@ fragments.models.list.onItemSet.add(({ value: model }) => {
8384 :::
8485*/
8586
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+ ) ;
8790const buffer = await file . arrayBuffer ( ) ;
8891const model = await fragments . load ( buffer , { modelId : "example" } ) ;
8992
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ grids.create(world);
5656// You have to copy `/node_modules/@thatopen/fragments/dist/Worker/worker.mjs` to your project directory
5757// and provide the relative path in `workerUrl`
5858// 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" ;
6061const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
6162world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
6263
@@ -82,7 +83,9 @@ fragments.models.list.onItemSet.add(({ value: model }) => {
8283 :::
8384*/
8485
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+ ) ;
8689const buffer = await file . arrayBuffer ( ) ;
8790const model = await fragments . load ( buffer , { modelId : "example" } ) ;
8891
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ async function main() {
4444 // Get fragments model
4545
4646 // prettier-ignore
47- const workerUrl = "./src/multithreading/fragments-thread.ts " ;
47+ const workerUrl = "https://thatopen.github.io/engine_fragment/resources/worker.mjs " ;
4848 // const workerUrl = "../../dist/Worker/worker.mjs";
4949 const fragments = new FragmentsModels ( workerUrl ) ;
5050
@@ -108,7 +108,9 @@ async function main() {
108108 // item.value.transparent = true;
109109 // });
110110
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+ ) ;
112114 const mouse = new THREE . Vector2 ( ) ;
113115
114116 // const columIds = await model.getItemsByQuery({
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ const convertIFC = async () => {
8080// and provide the relative path in `workerUrl`
8181// We use here the internal route of the worker in the library for simplicity purposes
8282const workerUrl =
83- "../../FragmentsModels/src/multithreading/fragments-thread.ts " ;
83+ "https://thatopen.github.io/engine_fragment/resources/worker.mjs " ;
8484const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
8585world . camera . controls . addEventListener ( "rest" , ( ) => fragments . update ( true ) ) ;
8686
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ world.renderer.onAfterUpdate.add(() => stats.end());
6161*/
6262
6363// prettier-ignore
64- const workerUrl = "../../../../FragmentsModels/src/multithreading/fragments-thread.ts " ;
64+ const workerUrl = "https://thatopen.github.io/engine_fragment/resources/worker.mjs " ;
6565const fragments = new FRAGS . FragmentsModels ( workerUrl ) ;
6666world . camera . controls . addEventListener ( "control" , ( ) => fragments . update ( ) ) ;
6767
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ const run = async (serialize: boolean) => {
131131 // Model loading
132132
133133 // prettier-ignore
134- const workerUrl = "../../FragmentsModels/src/multithreading/fragments-thread.ts " ;
134+ const workerUrl = "https://thatopen.github.io/engine_fragment/resources/worker.mjs " ;
135135 // const workerUrl = "../../../dist/Worker/worker.mjs";
136136 const fragments = new FragmentsModels ( workerUrl ) ;
137137
You can’t perform that action at this time.
0 commit comments