one utterance
This commit is contained in:
@@ -13,7 +13,7 @@ export default class CameraControls extends OrbitControls {
|
|||||||
// this.maxPolarAngle = 2.1
|
// this.maxPolarAngle = 2.1
|
||||||
// this.minAzimuthAngle = 0.9 - Math.PI / 2
|
// this.minAzimuthAngle = 0.9 - Math.PI / 2
|
||||||
// this.maxAzimuthAngle = 2.14 - Math.PI / 2
|
// this.maxAzimuthAngle = 2.14 - Math.PI / 2
|
||||||
this.target.set(5.5, 10.5, 0)
|
this.target.set(5, 7.5, 0)
|
||||||
|
|
||||||
this.addEventListener("start", () => domElement.style.cursor = "grabbing")
|
this.addEventListener("start", () => domElement.style.cursor = "grabbing")
|
||||||
this.addEventListener("end", () => domElement.style.cursor = "grab")
|
this.addEventListener("end", () => domElement.style.cursor = "grab")
|
||||||
|
|||||||
12
jsm/Stats.js
12
jsm/Stats.js
@@ -192,10 +192,16 @@ class Stats {
|
|||||||
|
|
||||||
|
|
||||||
const speechSynthesisAvailable = 'speechSynthesis' in window;
|
const speechSynthesisAvailable = 'speechSynthesis' in window;
|
||||||
function speak(text, volume=1) {
|
let utterance;
|
||||||
if (!speechSynthesisAvailable) return;
|
if ('SpeechSynthesisUtterance' in window) {
|
||||||
const utterance = new SpeechSynthesisUtterance(text);
|
utterance = new SpeechSynthesisUtterance();
|
||||||
utterance.lang = 'fr-FR';
|
utterance.lang = 'fr-FR';
|
||||||
|
}
|
||||||
|
|
||||||
|
function speak(text, volume=1) {
|
||||||
|
if (!utterance) return;
|
||||||
|
|
||||||
|
utterance.text = text ;
|
||||||
utterance.volume = volume;
|
utterance.volume = volume;
|
||||||
speechSynthesis.speak(utterance);
|
speechSynthesis.speak(utterance);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export class TetraScene extends THREE.Scene {
|
|||||||
this.renderer.domElement.tabIndex = 1
|
this.renderer.domElement.tabIndex = 1
|
||||||
|
|
||||||
this.camera = new THREE.PerspectiveCamera(100, window.innerWidth / window.innerHeight, 0.1, 1000)
|
this.camera = new THREE.PerspectiveCamera(100, window.innerWidth / window.innerHeight, 0.1, 1000)
|
||||||
this.camera.position.set(5.5, 15, 13)
|
this.camera.position.set(5, 4, 13)
|
||||||
|
|
||||||
this.controls = new CameraControls(this.camera, this.renderer.domElement)
|
this.controls = new CameraControls(this.camera, this.renderer.domElement)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user