Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default RenderingCore.extend(AlertifyHandler, {
this._super(...arguments);

this.debug("cleanup landscape rendering");

this.set('imageLoader.logos', {});
this.set('labeler.textLabels', {});
this.set('labeler.textCache', []);
Expand Down
23 changes: 20 additions & 3 deletions app/components/visualization/rendering/rendering-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,32 @@ export default Component.extend(Evented, THREEPerformance, {
////////////////////

// Load font for labels and synchronously proceed with populating the scene
new THREE.FontLoader()
.load('three.js/fonts/roboto_mono_bold_typeface.json', function (font) {
new THREE.FontLoader().load(
// resource URL
'/three.js/fonts/roboto_mono_bold_typeface.json',

// onLoad callback
function ( font ) {

if (self.isDestroyed)
return;

self.set('font', font);
self.debug("(THREE.js) font sucessfully loaded.");
self.set('initDone', true);
self.populateScene();
});
},

// onProgress callback
// function ( xhr ) {
// self.debug("(THREE.js) font " + (xhr.loaded / xhr.total * 100) + "% loaded.");
// },

// onError callback
// function ( error ) {
// self.debug("(THREE.js) Error when loading font!");
// }
);

},

Expand Down
2 changes: 1 addition & 1 deletion app/utils/application-rendering/labeler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default Object.extend({
textMaterialFoundation: null,
textMaterialComponent: null,
textMaterialClazz: null,

currentUser: service(),

session: service(),
configuration: service(),

Expand Down
3 changes: 1 addition & 2 deletions app/utils/landscape-rendering/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export default Object.extend(Evented, AlertifyHandler, {

emberModel = intersectedViewObj.object.userData.model;
const emberModelName = emberModel.constructor.modelName;
this.trigger('doubleClick', emberModel);

if(emberModelName === "application"){

Expand Down Expand Up @@ -276,8 +277,6 @@ export default Object.extend(Evented, AlertifyHandler, {

}

this.trigger('doubleClick', emberModel);

},

handleSingleClick(mouse) {
Expand Down
2 changes: 1 addition & 1 deletion app/utils/three-image-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default Object.extend({
return plane;
}
else {
new THREE.TextureLoader().load('images/logos/' + textureName + '.png', (texture) => {
new THREE.TextureLoader().load('/images/logos/' + textureName + '.png', (texture) => {
let logos: any = this.get('logos');
if (!logos) {
return null;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"typescript": "^3.4.5",
"yuidoc-bootstrap-theme": "^1.0.6",
"yuidocjs": "^0.10.2"
},
},

"engines": {
"node": ">= 10.15.0"
},
Expand Down