refactored logging.

This commit is contained in:
Michael Mainguy 2024-04-03 10:08:17 -05:00
parent c1ba8f5e10
commit c4d201c5ba
10 changed files with 16 additions and 18 deletions

View File

@ -5,7 +5,7 @@ export class NativeVoiceRecognition {
private recognition: SpeechRecognition; private recognition: SpeechRecognition;
constructor() { constructor() {
console.log('speech created');
this.onTextObservable = new Observable<string>(); this.onTextObservable = new Observable<string>();
this.setup(); this.setup();
} }
@ -31,16 +31,16 @@ export class NativeVoiceRecognition {
this.recognition.maxAlternatives = 1; this.recognition.maxAlternatives = 1;
this.recognition.onresult = (event) => { this.recognition.onresult = (event) => {
this.onTextObservable.notifyObservers(event.results[0][0].transcript); this.onTextObservable.notifyObservers(event.results[0][0].transcript);
console.log(event.results[0][0].transcript);
} }
this.recognition.onend = () => { this.recognition.onend = () => {
console.log("recognition ended");
} }
this.recognition.onstart = () => { this.recognition.onstart = () => {
console.log("recognition started");
} }
console.log("starting recognition");
this.recognition.start(); this.recognition.start();

View File

@ -24,7 +24,7 @@ export class NewRelicQuery {
this.buildSeries(s); this.buildSeries(s);
} }
this.buildModel(); this.buildModel();
console.log(this.data.length);
} }
//private materials: Material[]; //private materials: Material[];

View File

@ -40,7 +40,7 @@ export function buildAvatar(scene: Scene) {
const bounds = mesh.getHierarchyBoundingVectors(true); const bounds = mesh.getHierarchyBoundingVectors(true);
console.log(bounds);
const size = bounds.max.subtract(bounds.min); const size = bounds.max.subtract(bounds.min);
const top = MeshBuilder.CreateBox("container", {width: size.x, height: size.y, depth: size.z}, scene); const top = MeshBuilder.CreateBox("container", {width: size.x, height: size.y, depth: size.z}, scene);
top.position.y = 1.6; top.position.y = 1.6;
@ -63,7 +63,7 @@ export function buildAvatar(scene: Scene) {
physicsAggregate.body.setGravityFactor(1); physicsAggregate.body.setGravityFactor(1);
} catch (err) { } catch (err) {
console.log(err);
} }
//physicsAggregate.body.setAngularDamping(.5); //physicsAggregate.body.setAngularDamping(.5);

View File

@ -117,8 +117,7 @@ export class Player {
}); });
this.scene.onAfterPhysicsObservable.add(() => { this.scene.onAfterPhysicsObservable.add(() => {
if (body.getLinearVelocity().length() > .1) { if (body.getLinearVelocity().length() > .1) {
console.log(this.destination.subtract(new Vector2(body.transformNode.position.x,
body.transformNode.position.z)).length());
if (this.destination.subtract(new Vector2(body.transformNode.position.x, if (this.destination.subtract(new Vector2(body.transformNode.position.x,
body.transformNode.position.z)).length() < .1) { body.transformNode.position.z)).length() < .1) {
body.setLinearVelocity(Vector3.Zero()); body.setLinearVelocity(Vector3.Zero());

View File

@ -71,7 +71,7 @@ export class Toolbox {
this.scene.onPointerObservable.add((pointerInfo) => { this.scene.onPointerObservable.add((pointerInfo) => {
if (pointerInfo.type == 1 && pointerInfo.pickInfo.pickedMesh?.metadata?.tool == 'color') { if (pointerInfo.type == 1 && pointerInfo.pickInfo.pickedMesh?.metadata?.tool == 'color') {
if (this.changing) { if (this.changing) {
console.log('changing');
this.colorPicker.setEnabled(true); this.colorPicker.setEnabled(true);
return; return;
} else { } else {

View File

@ -100,7 +100,7 @@ export class Introduction {
vid.src = src; vid.src = src;
vid.addEventListener('loadedmetadata', function () { vid.addEventListener('loadedmetadata', function () {
vid.play().then(() => { vid.play().then(() => {
console.log("Video Playing");
}); });
}); });
} }

View File

@ -15,7 +15,7 @@ export class Tutorial {
}); });
} }
console.log('Tutorial');
} }
private advance() { private advance() {

View File

@ -61,8 +61,7 @@ export function createCloset(scene: Scene) {
node.scaling.scaleInPlace(.00098); node.scaling.scaleInPlace(.00098);
node.position.x -= .42; node.position.x -= .42;
const bounds = node.getHierarchyBoundingVectors(true); const bounds = node.getHierarchyBoundingVectors(true);
console.log((bounds.max.x - bounds.min.x) * 39.37);
console.log('here');
}); });

View File

@ -36,10 +36,10 @@ export class VoiceRecognizer {
const validation = await eagle.process(inputData); const validation = await eagle.process(inputData);
if (validation && validation[0] > .99) { if (validation && validation[0] > .99) {
console.log('verified');
} }
console.log(validation);
if (data == null) { if (data == null) {
data = inputData; data = inputData;

View File

@ -95,7 +95,7 @@ export class VrApp {
this.engine.runRenderLoop(() => { this.engine.runRenderLoop(() => {
this.scene.render(); this.scene.render();
if (i++ % 60 == 0) { if (i++ % 60 == 0) {
// console.log(this.engine.getFps());
} }
}); });