mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
changed function( to function (
This commit is contained in:
parent
26f3d22db7
commit
7e5eeb0a27
36 changed files with 209 additions and 209 deletions
|
|
@ -5,7 +5,7 @@ var requires = [
|
|||
"Game/Client/View/CameraController"
|
||||
];
|
||||
|
||||
define(requires, function(DomController, Three, Settings, CameraController){
|
||||
define(requires, function (DomController, Three, Settings, CameraController){
|
||||
|
||||
function ViewController(){
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ define(requires, function(DomController, Three, Settings, CameraController){
|
|||
}
|
||||
}
|
||||
|
||||
ViewController.prototype.init = function(){
|
||||
ViewController.prototype.init = function (){
|
||||
|
||||
var self = this;
|
||||
|
||||
|
|
@ -61,12 +61,12 @@ define(requires, function(DomController, Three, Settings, CameraController){
|
|||
this.scene.add(directionalLight);
|
||||
|
||||
|
||||
this.createMesh(100, 100, 100, 100, 'static/img/100.png', function(mesh){
|
||||
this.createMesh(100, 100, 100, 100, 'static/img/100.png', function (mesh){
|
||||
self.mesh = mesh;
|
||||
self.scene.add(mesh);
|
||||
});
|
||||
/*
|
||||
this.createMesh(50, 50, 200, 100, 'static/img/100.png', function(mesh){
|
||||
this.createMesh(50, 50, 200, 100, 'static/img/100.png', function (mesh){
|
||||
self.scene.add(mesh);
|
||||
});
|
||||
*/
|
||||
|
|
@ -74,7 +74,7 @@ define(requires, function(DomController, Three, Settings, CameraController){
|
|||
//this.animate(this);
|
||||
}
|
||||
|
||||
ViewController.prototype.update = function() {
|
||||
ViewController.prototype.update = function () {
|
||||
|
||||
if(this.mesh) {
|
||||
this.mesh.rotation.z += .01;
|
||||
|
|
@ -86,14 +86,14 @@ define(requires, function(DomController, Three, Settings, CameraController){
|
|||
this.render();
|
||||
}
|
||||
|
||||
ViewController.prototype.render = function() {
|
||||
ViewController.prototype.render = function () {
|
||||
|
||||
this.renderer.render(this.scene, this.cameraController.getCamera());
|
||||
}
|
||||
|
||||
ViewController.prototype.createMesh = function(width, height, x, y, imgPath, callback) {
|
||||
ViewController.prototype.createMesh = function (width, height, x, y, imgPath, callback) {
|
||||
var textureImg = new Image();
|
||||
textureImg.onload = function(){
|
||||
textureImg.onload = function (){
|
||||
var material = new Three.MeshLambertMaterial({
|
||||
map: Three.ImageUtils.loadTexture(imgPath)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue