Select Git revision
CircularBitBuffer.c
-
Dean Camera authored
Moved out each demos' functionality library files (e.g. Ring Buffer library) to /Lib directories for a better directory structure.
Dean Camera authoredMoved out each demos' functionality library files (e.g. Ring Buffer library) to /Lib directories for a better directory structure.
BasePlane.js 9.39 KiB
/**
* Created by aghassaei on 1/31/15.
*/
BasePlane = Backbone.Model.extend({
defaults: {
zIndex: 0,
mesh: [],
dimX: 100,
dimY: 100,
material: new THREE.MeshBasicMaterial({color:0x000000, transparent:true, opacity:0.2, wireframe:true})
// currentScene: "default",
// allScenes: {default:"Default", "mars":"Mars"}
},
initialize: function(options){
//bind events
// this.listenTo(this, "change:currentScene", this._renderForCurrentScene);
this.listenTo(this, "change:zIndex", this._renderZIndexChange);
//draw mesh
this.set("mesh", this._makeBasePlaneMesh());
this.updateScale(options.scale);
var self = this;
_.each(this.get("mesh"), function(mesh){
globals.three.sceneAdd(mesh, self._checkIsHighlightable(mesh));
});
globals.three.render();
},
updateScale: function(scale){
_.each(this.get("mesh"), function(mesh){
mesh.scale.set(scale, scale, scale);
});
},
updateXYSeparation: function(xySep) {},
getOrientation: function(){
return new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,0,1), Math.PI);
},
getType: function(){
return "octa";
},
// _renderForCurrentScene: function(){
// },
///////////////////////////////////////////////////////////////////////////////////
//////////////////////HIGHLIGHTER FUNCTIONALITY////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
_checkIsHighlightable: function(mesh){
if (mesh.type == "Mesh") return "basePlane";
return null;
},
//subclasses handle getHighlighterVertices
///////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////DEALLOC////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
_removeMesh: function(){