mirror of
https://github.com/overte-org/overte.git
synced 2025-07-04 22:09:38 +02:00
Add entities to capture stopwatch button clicks
This commit is contained in:
parent
a062c964a9
commit
f25a9dcede
1 changed files with 20 additions and 0 deletions
|
@ -43,6 +43,26 @@ var minuteHandID = Entities.addEntity({
|
||||||
modelURL: Script.resolvePath("models/Stopwatch-min-hand.fbx"),
|
modelURL: Script.resolvePath("models/Stopwatch-min-hand.fbx"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var startStopButtonID = Entities.addEntity({
|
||||||
|
type: "Shape",
|
||||||
|
shape: "Octagon",
|
||||||
|
name: "stopwatch/startStop",
|
||||||
|
parentID: stopwatchID,
|
||||||
|
dimensions: Vec3.multiply(scale, { x: 0.8, y: 1.0, z: 0.8 }),
|
||||||
|
localPosition: Vec3.multiply(scale, { x: 0, y: -0.1, z: -2.06 }),
|
||||||
|
localRotation: Quat.fromVec3Degrees({ x: 90, y: 0, z: 0 }),
|
||||||
|
});
|
||||||
|
|
||||||
|
var resetButtonID = Entities.addEntity({
|
||||||
|
type: "Shape",
|
||||||
|
shape: "Octagon",
|
||||||
|
name: "stopwatch/startStop",
|
||||||
|
parentID: stopwatchID,
|
||||||
|
dimensions: Vec3.multiply(scale, { x: 0.6, y: 0.8, z: 0.6 }),
|
||||||
|
localPosition: Vec3.multiply(scale, { x: -1.5, y: -0.1, z: -1.2 }),
|
||||||
|
localRotation: Quat.fromVec3Degrees({ x: 90, y: 36, z: 0 }),
|
||||||
|
});
|
||||||
|
|
||||||
Entities.editEntity(stopwatchID, {
|
Entities.editEntity(stopwatchID, {
|
||||||
userData: JSON.stringify({
|
userData: JSON.stringify({
|
||||||
secondHandID: secondHandID,
|
secondHandID: secondHandID,
|
||||||
|
|
Loading…
Reference in a new issue