lapfelix / arkit-line-drawing Goto Github PK
View Code? Open in Web Editor NEWChanged the default ARKit project to draw a line where the camera is positioned
Changed the default ARKit project to draw a line where the camera is positioned
I'm getting an error building the project in Xcode 9 beta 2. The error I'm getting is
"SCNMatrix4FromMat4 is unavailable in swift" viewController line 67
This line doesn't seem to be affecting the line width: https://github.com/lapfelix/ARKit-line-drawing/blob/master/ARKitDraw/ViewController.swift#L77
Do we have all the necessary imports/packages?
Does anyone know how we can better the fps? the frame rate will drop so fast and the app becomes so slow.
let scene = SCNScene(named: "art.scnassets/art.scn")!
When you change the integer within GLLineWidth(x) it doesn't work on changing the actual line.
Just wandering in what use case this will be useful?
Hi, this project is really awesome! I just want to ask one question about coordinates mapping:
let mat = SCNMatrix4FromMat4(currentFrame.camera.transform)
let dir = SCNVector3(-1 * mat.m31, -1 * mat.m32, -1 * mat.m33)
let currentPosition = pointOfView.position + (dir * 0.1)
Could you please explain what does these code do?
What's the meaning of sceneView.pointOfView
and its difference between currentFrame?
And , I also wondered to calculate the current position of line point to start drawing, why can't I use the following code?
func getCameraCoordinate(sceneView: ARSCNView) -> SCNVector3 {
let cameraTransform = sceneView.session.currentFrame?.camera.transform
let cameraCoordinates = MDLTransform(matrix: cameraTransform!)
return SCNVector3(x: cameraCoordinates.translation.x, y: cameraCoordinates.translation.y, z: cameraCoordinates.translation.z)
}
Thank you very much.
Nice AR implementation, i wonder how to change the size of the line, also if I can make it custom line?
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.