Tutorial finished
This commit is contained in:
@@ -142,7 +142,6 @@ L3D.Previewer.prototype.render = function(container_width, container_height) {
|
||||
*/
|
||||
L3D.Previewer.prototype.clear = function() {
|
||||
if (this.clearNeeded) {
|
||||
console.log("Clear");
|
||||
this.domElement.width = this.domElement.width;
|
||||
this.clearNeeded = false;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ L3D.ViewportRecommendation.prototype.update = function(position) {
|
||||
// Compute distance between center of camera and position
|
||||
dist = L3D.Tools.norm2(L3D.Tools.diff(position.position, this.camera.position));
|
||||
|
||||
var low_bound = 1;
|
||||
var low_bound = 0.5;
|
||||
var high_bound = 5;
|
||||
var new_value;
|
||||
var max_value = 0.5;
|
||||
@@ -160,8 +160,7 @@ L3D.ViewportRecommendation.prototype.update = function(position) {
|
||||
this.mesh.material.transparent = new_value < 0.9;
|
||||
this.mesh.material.opacity = new_value;
|
||||
|
||||
if (new_value < 0.1)
|
||||
this.raycastable = this.mesh.material.transparent = this.mesh.visible = false;
|
||||
this.raycastable = this.line.visible = this.mesh.material.transparent = this.mesh.visible = new_value > 0.1;
|
||||
};
|
||||
|
||||
L3D.ViewportRecommendation.prototype.setSize = function(size) {
|
||||
|
||||
@@ -130,11 +130,12 @@ L3D.initZeldaScene = function(scene, collidableObjects, loader) {
|
||||
};
|
||||
|
||||
|
||||
L3D.createPeachRecommendations = function(width, height) {
|
||||
L3D.createPeachRecommendations = function(width, height, rec) {
|
||||
var recos = [];
|
||||
var Reco = rec !== undefined ? rec : Recommendation;
|
||||
|
||||
var createRecommendation = function(position, target) {
|
||||
return new Recommendation(
|
||||
return new Reco(
|
||||
50,
|
||||
width / height,
|
||||
1,
|
||||
|
||||
Reference in New Issue
Block a user