content/hifi-content/chris/dev/leopoly/AddSimpleObjectTest.js
2022-02-13 22:19:19 +01:00

18 lines
795 B
JavaScript

(function(){
var attachmentMirrorButton = {
type: "Model",
name: "SimpleObject",
modelURL: "http://leopoly.develop/hifi/GUIObjects/small/mirror_button.obj",
//dimension: {"x": 0.035, "y": 0.005, "z": 0.035},
scale : 0.01,
parentID: MyAvatar.sessionUUID,
parentJointIndex: MyAvatar.getJointIndex("LeftHand"),
localTranslation: {"x": 0, "y": 0, "z": 0},
localRotation: {"x": 161, "y": -28, "z": 70, "w": 1},
script: "http://leopoly.develop/hifi/scripts/ToggleMirrorButton.js",
userData: JSON.stringify({"grabbableKey": {"wantsTrigger": true}}) //"dimension" : {"x": 0.035, "y": 0.005, "z": 0.035}})
}
var attachmentMirrorButtonID = Entities.addEntity(attachmentMirrorButton, true);
//attachmentMirrorButton.dimension = {"x": 10, "y": 10, "z": 10};
})