7dir / aframe-svgfile-component Goto Github PK
View Code? Open in Web Editor NEWaframe svgfile
Home Page: https://7dir.github.io/aframe-svgfile-component/
aframe svgfile
Home Page: https://7dir.github.io/aframe-svgfile-component/
Could you put up a complete .js we can include using just a <script> tag? (with the RegisterComponent and the threejs require()'s included). many thanks
Currently all paths are assumed to be closed and rendered as polygons. Would be better to check the "fill" attribute of the path and in the case that the path is not filled, it is a line, then we can use:
https://github.com/andreasplesch/aframe-meshline-component
to render lines, with line thickness (since webgl doesn't support line thickness).
This component doesn't support curves. So we'd need to look for "C", "c", "A", etc, in the SVG path and if we find these, interpolate to line segments. This can be done by putting the SVG curve into a new Three.CubicBezierCurve, then using Three.Curve.getSpacedPoints to interpolate into line segments that can be fed into aframe-meshline. Alternatively, this logic could be added to meshline, so that meshline can accept "C" commands in its path instead of just linear segments (see suggestion andreasplesch/aframe-meshline-component#8)
Currently I implemented width and height by rescaling each vertex in the underlying mesh. Would be cleaner to leave these untouched and simply create or adjust the "scale" component of the AFrame entity.
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.