Skip to content

Instantly share code, notes, and snippets.

@cozza13
Created December 9, 2016 00:08
Show Gist options
  • Save cozza13/529f08aa8056c52b1ee5c46428156d97 to your computer and use it in GitHub Desktop.
Save cozza13/529f08aa8056c52b1ee5c46428156d97 to your computer and use it in GitHub Desktop.
print("$$$$$$$ Create Web entity");
var webEntity = Entities.addEntity({
name: "web",
type: "Web",
sourceUrl: "https://highfidelity.com/marketplace?category=architecture",
dimensions: { x: 4, y: 3, z: 0.1 },
position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 2.5, y: 0.75, z: -8 })),
rotation: MyAvatar.orientation,
shapeType: "box",
dpi: 8 }, true
);
function onScriptEnding() {
print("$$$$$$$ Delete Web overlay")
Entities.deleteEntity(webEntity);
}
Script.scriptEnding.connect(onScriptEnding);
print("$$$$$$$ Create Web entity");
var webEntity = Entities.addEntity({
name: "web",
type: "Web",
sourceUrl: "https://highfidelity.com/marketplace?category=architecture",
dimensions: { x: 4, y: 3, z: 0.1 },
position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 2.5, y: 0.75, z: -8 })),
rotation: MyAvatar.orientation,
shapeType: "box",
dpi: 8 }, true
);
function onScriptEnding() {
print("$$$$$$$ Delete Web overlay")
Entities.deleteEntity(webEntity);
}
Script.scriptEnding.connect(onScriptEnding);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment