Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AleziaKurdis authored Nov 11, 2023
1 parent 4328e90 commit 5507da5
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
20 changes: 20 additions & 0 deletions CEON/gotgPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,26 @@
"modelURL": ROOT + "models/GOTG_FLT_FX.fst",
"useOriginalPivot": true
}, "local");

id = Entities.addEntity({
"type": "Shapes",
"shape": "Sphere",
"localPosition": {"x": 0, "y": 0, "z": 0},
"parentID": portals[i].zoneID,
"renderWithZones": [portals[i].zoneID],
"name": "FTL-JUMP-TRIGGER",
"dimensions": {
"x": 20,
"y": 20,
"z": 20
},
"grab": {
"grabbable": false
},
"visible": false
"description": portals[i].destinationURL,
"script": ROOT + "teleport.js"
}, "local");
}
}

Expand Down
4 changes: 3 additions & 1 deletion CEON/portals_domain.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[
{
"name": "SANCTUARY",
"localPosition": {"x": 906.3857421875,"y": 205.67919921875,"z":-200.65283203125}
"localPosition": {"x": 906.3857421875,"y": 205.67919921875,"z":-200.65283203125},
"destinationURL": "",
"destinationSkyUrl": "https://aleziakurdis.github.io/inertia/SANCTUARY/images/SANCTUARY_SKY_DEEPBLUE.jpg"
}
]
4 changes: 3 additions & 1 deletion CEON/portals_serverless.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[
{
"name": "SANCTUARY",
"localPosition": {"x": 906.3857421875,"y": 205.67919921875,"z":-200.65283203125}
"localPosition": {"x": 906.3857421875,"y": 205.67919921875,"z":-200.65283203125},
"destinationURL": " https://aleziakurdis.github.io/inertia/SANCTUARY/inertia.json?px=3754.81&py=3877.02&pz=4625.39&rx=0&ry=-0.202187&rz=0&rw=0.979347",
"destinationSkyUrl": "https://aleziakurdis.github.io/inertia/SANCTUARY/images/SANCTUARY_SKY_DEEPBLUE.jpg"
}
]
35 changes: 35 additions & 0 deletions CEON/teleport.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// teleport.js
//
// Created by Alezia Kurdis,November 10th, 2023.
// Copyright 2023, Overte e.V.
//
// Space 3d portals.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
(function(){

var ROOT = Script.resolvePath('').split("teleport.js")[0];
var portalData;

this.preload = function(entityID) {

var properties = Entities.getEntityProperties(entityID, ["description"]);
portalData = properties.description;
}

this.enterEntity = function(entityID) {
if (portalData.length > 0) {
Window.location = portalData;
}

};

this.leaveEntity = function(entityID) {
//do nothing.
};


})

0 comments on commit 5507da5

Please sign in to comment.