HOnatToprak
Can not figure out addin p5js to Phoenix(Noob Question)
Hello,
I am new to elixir, phoenix and web development.
I try to implement islands game in book Functional Web Development with Elixir, OTP, and Phoenix.The book has nothing to do with UI of the game and i would like to implement it p5.js.
I couldn’t figure out adding p5js in the project.
https://github.com/HOnatToprak/islands_interface/blob/master/assets/js/app.js
In this file, socket.js executes perfectly, but p5 not works in the same way.(Check out other files if you need)
I tried to add p5.js in same way to app.js but it is not working, and i couln’t find any solution.
This is about my lack of knowlage guys.I would be more appreciated if you reference me guides and docs to handle phoenix frontend things(maybe js things) rather than fix.
Most Liked
peerreynders
Welcome to the forum.
Have a look at
https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70
to understand why.
The p5.js Getting Started is using classic script - which tends to just dump everything in the global namespace. The import in the app.js is an indication that you are dealing with ES2015 module script which improve isolation and webpack is one of many bundlers designed to assemble a page bundle from many modules.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









