PrismarineJS/prismarine-viewer

How to localy test this package? #99

3top1a posted onGitHub

I wanted to do #57, but I don't know how to test/run the package localy. Any help?


You can start any of the example with node

On Wed, Dec 23, 2020, 10:52 3top1a notifications@github.com wrote:

I wanted to do #57 https://github.com/PrismarineJS/prismarine-viewer/issues/57, but I don't know how to test/run the package localy. Any help?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/99, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437XQZLP7S2T3QCC53JLSWG4UVANCNFSM4VGYZJLQ .

posted by rom1504 over 4 years ago

My changes are still not visible, i tried removing the players color in entities.js, I can still se it in red

posted by 3top1a over 4 years ago

Run webpack again or use webpack serve

On Wed, Dec 23, 2020, 11:24 3top1a notifications@github.com wrote:

My changes are still not visible, i tried removing the players color in entities.js, I can still se it in red

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/99#issuecomment-750098331, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437WI6HG3BQBXGMCZKV3SWHAPXANCNFSM4VGYZJLQ .

posted by rom1504 over 4 years ago

How? (Sorry for my inexperience)

posted by 3top1a over 4 years ago

node_modules/.bin/webpack

On Wed, Dec 23, 2020, 13:57 3top1a notifications@github.com wrote:

How? (Sorry for my inexperience)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/99#issuecomment-750289973, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437TFM5QDALWTK5CQIQLSWHSMZANCNFSM4VGYZJLQ .

posted by rom1504 over 4 years ago

Still nothing

posted by 3top1a over 4 years ago

What are you running ?

On Wed, Dec 23, 2020, 14:33 3top1a notifications@github.com wrote:

Still nothing

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/99#issuecomment-750302463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437X6D75FAANHGT47TCLSWHWSTANCNFSM4VGYZJLQ .

posted by rom1504 over 4 years ago

examples/bot.js

posted by 3top1a over 4 years ago

What happened after you re-ran webpack ? Did it regenerate the public/ dir ?

On Wed, Dec 23, 2020, 14:39 3top1a notifications@github.com wrote:

examples/bot.js

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/99#issuecomment-750304534, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437U6OLGNG6RTJWEUCLDSWHXJBANCNFSM4VGYZJLQ .

posted by rom1504 over 4 years ago

There is a public/ Log:

ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from undefined
ℹ 「wds」: Content not from webpack is served from /home/not-a-weeb/Documents/mineflayer/prismarine-viewer
ℹ 「wdm」: wait until bundle finished: /
ℹ 「wdm」: asset ./index.js 1.98 MiB [emitted] (name: main)
runtime modules 1010 bytes 5 modules
modules by path ./node_modules/ 1.74 MiB 60 modules
modules by path ./viewer/ 16.9 KiB
  ./viewer/index.js 186 bytes [built] [code generated]
  ./viewer/lib/viewer.js 2.59 KiB [built] [code generated]
  ./viewer/lib/worldView.js 4.18 KiB [built] [code generated]
  ./viewer/lib/simpleUtils.js 1.21 KiB [built] [code generated]
  ./viewer/lib/worldrenderer.js 4.47 KiB [built] [code generated]
  ./viewer/lib/entities.js 1.35 KiB [built] [code generated]
  ./viewer/lib/primitives.js 1.25 KiB [built] [code generated]
  ./viewer/lib/version.js 714 bytes [built] [code generated]
  ./viewer/lib/utils.electron.js 512 bytes [built] [code generated]
  ./viewer/lib/utils.js 512 bytes [built] [code generated]
./lib/index.js 1.86 KiB [built] [code generated]
./public/supportedVersions.json 100 bytes [built] [code generated]
webpack 5.11.0 compiled successfully in 3755 ms

asset ./worker.js 16 MiB [emitted] (name: main)
416 modules
webpack 5.11.0 compiled successfully in 5903 ms
ℹ 「wdm」: Compiled successfully.
posted by 3top1a over 4 years ago

Ok what do you run next ? Are you sure your change is doing something ?

On Wed, Dec 23, 2020, 14:48 3top1a notifications@github.com wrote:

There is a public/ Log:

ℹ 「wds」: Project is running at http://localhost:8080/

ℹ 「wds」: webpack output is served from undefined

ℹ 「wds」: Content not from webpack is served from /home/not-a-weeb/Documents/mineflayer/prismarine-viewer

ℹ 「wdm」: wait until bundle finished: /

ℹ 「wdm」: asset ./index.js 1.98 MiB [emitted] (name: main)

runtime modules 1010 bytes 5 modules

modules by path ./node_modules/ 1.74 MiB 60 modules

modules by path ./viewer/ 16.9 KiB

./viewer/index.js 186 bytes [built] [code generated]

./viewer/lib/viewer.js 2.59 KiB [built] [code generated]

./viewer/lib/worldView.js 4.18 KiB [built] [code generated]

./viewer/lib/simpleUtils.js 1.21 KiB [built] [code generated]

./viewer/lib/worldrenderer.js 4.47 KiB [built] [code generated]

./viewer/lib/entities.js 1.35 KiB [built] [code generated]

./viewer/lib/primitives.js 1.25 KiB [built] [code generated]

./viewer/lib/version.js 714 bytes [built] [code generated]

./viewer/lib/utils.electron.js 512 bytes [built] [code generated]

./viewer/lib/utils.js 512 bytes [built] [code generated]

./lib/index.js 1.86 KiB [built] [code generated]

./public/supportedVersions.json 100 bytes [built] [code generated]

webpack 5.11.0 compiled successfully in 3755 ms

asset ./worker.js 16 MiB [emitted] (name: main)

416 modules

webpack 5.11.0 compiled successfully in 5903 ms

ℹ 「wdm」: Compiled successfully.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/99#issuecomment-750307704, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437UGBQA2FANTSNHIGO3SWHYJFANCNFSM4VGYZJLQ .

posted by rom1504 over 4 years ago

node examples/bot.js

Yes, i made the character box have a green color. It still has red

posted by 3top1a over 4 years ago

It's not magical. Either you didn't change the code enough, either something was not refreshed. Could be webpack, could be you didn't restart the example, could be you didn't refresh in the browser,... Hard to tell from here

On Wed, Dec 23, 2020, 16:01 3top1a notifications@github.com wrote:

node examples/bot.js

Yes, i made the character box have a green color. It still has red

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/99#issuecomment-750338512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437XFEI535YL6ASARM4TSWIA4NANCNFSM4VGYZJLQ .

posted by rom1504 over 4 years ago

How did you change it ?

posted by Karang over 4 years ago

Just give me a list of commands to build and test the package, I'll just copy the files

posted by 3top1a over 4 years ago

I've already gave them above

  1. node_module/.bin/webpack
  2. node examples/bot.js

On Wed, Dec 23, 2020, 18:28 3top1a notifications@github.com wrote:

Just give me a list of commands to build and test the package, I'll just copy the files

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/99#issuecomment-750398980, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437QCOEVPHG6FQ2MDFWLSWISDJANCNFSM4VGYZJLQ .

posted by rom1504 over 4 years ago

For anyone else (me included), just list the steps necesary to extend this module

posted by 3top1a over 4 years ago

Yes. What are you confused about what I just said ? Maybe you could come to our discord, I guess it would be easier to communicate there.

posted by rom1504 over 4 years ago

By the fact it still doesn't work

posted by 3top1a over 4 years ago

What doesn’t work? What’s the error? What happens? What have you tried? Can’t help you if you’re not more specific.

posted by extremeheat over 4 years ago

I have made a change in the entity.js file, making the player character green. No matter what I tried, it's still red.

What I tried:

  • npm link
  • yarn add
  • everything in this thread
posted by 3top1a over 4 years ago

Can you join the discord? It may be easier to help there. What changes did you make?

posted by extremeheat over 4 years ago

What room?

posted by 3top1a over 4 years ago

If you want to change the bot color you need to edit https://github.com/PrismarineJS/prismarine-viewer/blob/master/lib/index.js#L61

The code in entities.js is for other players. Ultimately this would need to be refactored to share some code.

posted by Karang over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests