Skip to content

Commit

Permalink
Fixes merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoElias committed Oct 26, 2018
2 parents f5f5821 + acbec2e commit a1486a7
Show file tree
Hide file tree
Showing 16 changed files with 207 additions and 49 deletions.
35 changes: 29 additions & 6 deletions build/simbol.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -55879,7 +55879,7 @@ class Controllers extends eventemitter3 {
}
}

const RETICLE_DISTANCE = 3;
const RETICLE_DISTANCE = 2.5;

/** Class for the Selection intraction */
class Selection extends eventemitter3 {
Expand Down Expand Up @@ -55972,6 +55972,10 @@ class Selection extends eventemitter3 {
add(object) {
const id = object.id;
if (!this.objects[id]) {
for (const property in eventemitter3.prototype) {
object[property] = eventemitter3.prototype[property];
}
eventemitter3.call(object);
this.objects[id] = object;
}
}
Expand Down Expand Up @@ -56059,9 +56063,11 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Selected mesh
*/
this.emit('selected', {
mesh.emit('selected', {
mesh
});
// Used, for example, to cancel teleportation
this.emit('selected');
}

/**
Expand All @@ -56084,7 +56090,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Unselected mesh
*/
this.emit('unselected', {
mesh.emit('unselected', {
mesh
});
}
Expand Down Expand Up @@ -56124,7 +56130,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Hovered mesh
*/
this.emit('hover', {
object.emit('hover', {
mesh: object
});
this.isHovering = true;
Expand All @@ -56141,7 +56147,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Unhovered mesh
*/
this.emit('unhover', {
object.emit('unhover', {
mesh: object
});
this.isHovering = false;
Expand Down Expand Up @@ -131323,7 +131329,8 @@ if (THREE$1) {
new WebVRPolyfill();

const defaultConfig$3 = {
locomotion: true
locomotion: true,
interactions: true
};

/**
Expand Down Expand Up @@ -131467,6 +131474,10 @@ class Simbol extends eventemitter3 {
this.addAnimateFunctions(event.functions);
});

component.on('addinteraction', (event) => {
this.addInteraction(event);
});

component.on('error', (event) => {
/**
* Simbol error event that forwards an error event from any of its components
Expand Down Expand Up @@ -131515,6 +131526,18 @@ class Simbol extends eventemitter3 {
this._scene.scene && this._scene.scene.remove(mesh);
}

addInteraction(config) {
switch(config.interaction) {
case 'selection':
this.interactions.selection.add(config.mesh);
if (config.callbacks) {
for (const callback of config.callbacks) {
config.mesh.on(callback.event, callback.callback);
}
}
}
}

/**
* Helper function that wraps Simbol.Scene.prototype.addAnimateFunctions
*
Expand Down
2 changes: 1 addition & 1 deletion build/simbol.cjs.js.map

Large diffs are not rendered by default.

35 changes: 29 additions & 6 deletions build/simbol.cjs.nothree.js
Original file line number Diff line number Diff line change
Expand Up @@ -8590,7 +8590,7 @@ class Controllers extends eventemitter3 {
}
}

const RETICLE_DISTANCE = 3;
const RETICLE_DISTANCE = 2.5;

/** Class for the Selection intraction */
class Selection extends eventemitter3 {
Expand Down Expand Up @@ -8683,6 +8683,10 @@ class Selection extends eventemitter3 {
add(object) {
const id = object.id;
if (!this.objects[id]) {
for (const property in eventemitter3.prototype) {
object[property] = eventemitter3.prototype[property];
}
eventemitter3.call(object);
this.objects[id] = object;
}
}
Expand Down Expand Up @@ -8770,9 +8774,11 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Selected mesh
*/
this.emit('selected', {
mesh.emit('selected', {
mesh
});
// Used, for example, to cancel teleportation
this.emit('selected');
}

/**
Expand All @@ -8795,7 +8801,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Unselected mesh
*/
this.emit('unselected', {
mesh.emit('unselected', {
mesh
});
}
Expand Down Expand Up @@ -8835,7 +8841,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Hovered mesh
*/
this.emit('hover', {
object.emit('hover', {
mesh: object
});
this.isHovering = true;
Expand All @@ -8852,7 +8858,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Unhovered mesh
*/
this.emit('unhover', {
object.emit('unhover', {
mesh: object
});
this.isHovering = false;
Expand Down Expand Up @@ -84034,7 +84040,8 @@ if (THREE) {
new WebVRPolyfill();

const defaultConfig$3 = {
locomotion: true
locomotion: true,
interactions: true
};

/**
Expand Down Expand Up @@ -84178,6 +84185,10 @@ class Simbol extends eventemitter3 {
this.addAnimateFunctions(event.functions);
});

component.on('addinteraction', (event) => {
this.addInteraction(event);
});

component.on('error', (event) => {
/**
* Simbol error event that forwards an error event from any of its components
Expand Down Expand Up @@ -84226,6 +84237,18 @@ class Simbol extends eventemitter3 {
this._scene.scene && this._scene.scene.remove(mesh);
}

addInteraction(config) {
switch(config.interaction) {
case 'selection':
this.interactions.selection.add(config.mesh);
if (config.callbacks) {
for (const callback of config.callbacks) {
config.mesh.on(callback.event, callback.callback);
}
}
}
}

/**
* Helper function that wraps Simbol.Scene.prototype.addAnimateFunctions
*
Expand Down
2 changes: 1 addition & 1 deletion build/simbol.cjs.nothree.js.map

Large diffs are not rendered by default.

35 changes: 29 additions & 6 deletions build/simbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -55875,7 +55875,7 @@ class Controllers extends eventemitter3 {
}
}

const RETICLE_DISTANCE = 3;
const RETICLE_DISTANCE = 2.5;

/** Class for the Selection intraction */
class Selection extends eventemitter3 {
Expand Down Expand Up @@ -55968,6 +55968,10 @@ class Selection extends eventemitter3 {
add(object) {
const id = object.id;
if (!this.objects[id]) {
for (const property in eventemitter3.prototype) {
object[property] = eventemitter3.prototype[property];
}
eventemitter3.call(object);
this.objects[id] = object;
}
}
Expand Down Expand Up @@ -56055,9 +56059,11 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Selected mesh
*/
this.emit('selected', {
mesh.emit('selected', {
mesh
});
// Used, for example, to cancel teleportation
this.emit('selected');
}

/**
Expand All @@ -56080,7 +56086,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Unselected mesh
*/
this.emit('unselected', {
mesh.emit('unselected', {
mesh
});
}
Expand Down Expand Up @@ -56120,7 +56126,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Hovered mesh
*/
this.emit('hover', {
object.emit('hover', {
mesh: object
});
this.isHovering = true;
Expand All @@ -56137,7 +56143,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Unhovered mesh
*/
this.emit('unhover', {
object.emit('unhover', {
mesh: object
});
this.isHovering = false;
Expand Down Expand Up @@ -131319,7 +131325,8 @@ if (THREE$1) {
new WebVRPolyfill();

const defaultConfig$3 = {
locomotion: true
locomotion: true,
interactions: true
};

/**
Expand Down Expand Up @@ -131463,6 +131470,10 @@ class Simbol extends eventemitter3 {
this.addAnimateFunctions(event.functions);
});

component.on('addinteraction', (event) => {
this.addInteraction(event);
});

component.on('error', (event) => {
/**
* Simbol error event that forwards an error event from any of its components
Expand Down Expand Up @@ -131511,6 +131522,18 @@ class Simbol extends eventemitter3 {
this._scene.scene && this._scene.scene.remove(mesh);
}

addInteraction(config) {
switch(config.interaction) {
case 'selection':
this.interactions.selection.add(config.mesh);
if (config.callbacks) {
for (const callback of config.callbacks) {
config.mesh.on(callback.event, callback.callback);
}
}
}
}

/**
* Helper function that wraps Simbol.Scene.prototype.addAnimateFunctions
*
Expand Down
2 changes: 1 addition & 1 deletion build/simbol.js.map

Large diffs are not rendered by default.

35 changes: 29 additions & 6 deletions build/simbol.nothree.js
Original file line number Diff line number Diff line change
Expand Up @@ -8586,7 +8586,7 @@ class Controllers extends eventemitter3 {
}
}

const RETICLE_DISTANCE = 3;
const RETICLE_DISTANCE = 2.5;

/** Class for the Selection intraction */
class Selection extends eventemitter3 {
Expand Down Expand Up @@ -8679,6 +8679,10 @@ class Selection extends eventemitter3 {
add(object) {
const id = object.id;
if (!this.objects[id]) {
for (const property in eventemitter3.prototype) {
object[property] = eventemitter3.prototype[property];
}
eventemitter3.call(object);
this.objects[id] = object;
}
}
Expand Down Expand Up @@ -8766,9 +8770,11 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Selected mesh
*/
this.emit('selected', {
mesh.emit('selected', {
mesh
});
// Used, for example, to cancel teleportation
this.emit('selected');
}

/**
Expand All @@ -8791,7 +8797,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Unselected mesh
*/
this.emit('unselected', {
mesh.emit('unselected', {
mesh
});
}
Expand Down Expand Up @@ -8831,7 +8837,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Hovered mesh
*/
this.emit('hover', {
object.emit('hover', {
mesh: object
});
this.isHovering = true;
Expand All @@ -8848,7 +8854,7 @@ class Selection extends eventemitter3 {
* @type {object}
* @property mesh - Unhovered mesh
*/
this.emit('unhover', {
object.emit('unhover', {
mesh: object
});
this.isHovering = false;
Expand Down Expand Up @@ -84030,7 +84036,8 @@ if (THREE) {
new WebVRPolyfill();

const defaultConfig$3 = {
locomotion: true
locomotion: true,
interactions: true
};

/**
Expand Down Expand Up @@ -84174,6 +84181,10 @@ class Simbol extends eventemitter3 {
this.addAnimateFunctions(event.functions);
});

component.on('addinteraction', (event) => {
this.addInteraction(event);
});

component.on('error', (event) => {
/**
* Simbol error event that forwards an error event from any of its components
Expand Down Expand Up @@ -84222,6 +84233,18 @@ class Simbol extends eventemitter3 {
this._scene.scene && this._scene.scene.remove(mesh);
}

addInteraction(config) {
switch(config.interaction) {
case 'selection':
this.interactions.selection.add(config.mesh);
if (config.callbacks) {
for (const callback of config.callbacks) {
config.mesh.on(callback.event, callback.callback);
}
}
}
}

/**
* Helper function that wraps Simbol.Scene.prototype.addAnimateFunctions
*
Expand Down
Loading

0 comments on commit a1486a7

Please sign in to comment.