niklever / learn-webxr Goto Github PK
View Code? Open in Web Editor NEWResources for my Udemy course
Resources for my Udemy course
Hi Nik! When I accessed index.html from the example 11 on my phone with Chrome, No Path line has been shown even I called showPathLines() without debugging as follow:
`newPath(pt){
const player = this.object;
if (this.pathfinder===undefined){
this.calculatedPath = [ pt.clone() ];
//Calculate target direction
this.setTargetDirection();
this.action = 'walk';
return;
}
//console.log(`New path to ${pt.x.toFixed(1)}, ${pt.y.toFixed(2)}, ${pt.z.toFixed(2)}`);
const targetGroup = this.pathfinder.getGroup(this.ZONE, pt);
const closestTargetNode = this.pathfinder.getClosestNode(pt, this.ZONE, targetGroup);
// Calculate a path to the target and store it
this.calculatedPath = this.pathfinder.findPath(player.position, pt, this.ZONE, this.navMeshGroup);
const self = this;
if (this.calculatedPath && this.calculatedPath.length) {
this.action = 'walk';
const pt = this.calculatedPath[0].clone();
this.setTargetDirection()
if (!this.npc){
this.showPathLines();
}
} else {
this.action = 'idle';
`
THX for your HELP!
Hi Teacher Nik,
Recently, An issue came out of my mind, which is make object in WebXR change different behaviours according to my finger pose.
But
From immersive github, folks told us that “WebXR Device API does not provide a way to grant raw camera access to the sites.”.
I am not sure if feeding video into model.estimateHands is the only way to detect finger pose,
const predictions = await model.estimateHands(video);
just wondering if there is any other way to detect fingerpose in WebXR to you?
MANY THANKS FOR YOUR ASSISTANCE!
Hello, Nik! Nice course!
A difficulty has arisen after taking your course and attempting Example 11: What is the difference between "this" and "player" in Player.js?
The relevant code is as follows:
const player = this.object; const pt = this.calculatedPath[0].clone(); pt.y = player.position.y; const quaternion = player.quaternion.clone(); player.lookAt(pt); this.quaternion = player.quaternion.clone(); player.quaternion.copy(quaternion);
Why is it necessary to save "quanternion" to "player.quaternion" in the final line?
Does this imply that "player" stores quaternion in a temporary state after lookAt terget?
THX!
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.