williamngan / react-pts-canvas-examples Goto Github PK
View Code? Open in Web Editor NEWAn example project of using Pts with React, using react-pts-canvas package.
License: Apache License 2.0
An example project of using Pts with React, using react-pts-canvas package.
License: Apache License 2.0
Hi, I'm trying to create an audio visualizer and for some reason I can't get the sound component to run correctly in my project. My own code works if I put it in the App.jsx file in this repo, but I can't get the sound example from this repo to work in a fresh react project. If I copy the contents of the App.jsx file into my own project the other two components work as expected but there is no sound or animation in the last example. I've checked that the audio file is present and named correctly in my public folder, is there another dependency I'm missing somewhere? Thanks.
demo build at https://williamngan.github.io/pts-react-example/build/ is broken
I think adding this line (or some variant) to your package.json will solve if you're using create-react-app:
"homepage": "https://williamngan.github.io/pts-react-example"
Failed to parse source map from '/Users/prithraj/pts-prac/node_modules/react-pts-canvas/node_modules/pts/src/Canvas.ts' file: Error: ENOENT: no such file or directory, open '/Users/prithraj/pts-prac/node_modules/react-pts-canvas/node_modules/pts/src/Canvas.ts'
Failed to parse source map from '/Users/prithraj/pts-prac/node_modules/react-pts-canvas/node_modules/pts/src/Color.ts' file: Error: ENOENT: no such file or directory, open '/Users/prithraj/pts-prac/node_modules/react-pts-canvas/node_modules/pts/src/Color.ts'
Failed to parse source map from '/Users/prithraj/pts-prac/node_modules/react-pts-canvas/node_modules/pts/src/Create.ts' file: Error: ENOENT: no such file or directory, open '/Users/prithraj/pts-prac/node_modules/react-pts-canvas/node_modules/pts/src/Create.ts'
there are many more just like this. This only occurs when I try to import any of these from Pts.
also in browser console:
Uncaught RangeError: Maximum call stack size exceeded
at Array Iterator.next ()
at _supercall (index.mjs:2008:1)
at _supercall (index.mjs:2008:1)
at _supercall (index.mjs:2008:1)
at _supercall (index.mjs:2008:1)
at _supercall (index.mjs:2008:1)
As react-pts-canvas has been updated with functional components, this repo's examples should be updated to reflect the change.
Can you fix the preview on
https://williamngan.github.io/react-pts-canvas-examples/build/
on
pts-react-example
This repo provides an example of using Pts in React via react-pts-canvas.
Pts is a typescript/javascript library for visualization and creative-coding. Get started at ptsjs.org.
Let's take a look at the demo first before we start.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.