This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Verlet class at bottom, save to separate file called "Verlet.lua" | |
require "physics" | |
local Verlet = require "Verlet" | |
display.setStatusBar( display.HiddenStatusBar ) | |
--physics.setDrawMode("hybrid") | |
physics.start() | |
physics.setGravity(0, 9.8) | |
physics.setPositionIterations( 10 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Component = {} | |
function Component:new() | |
local component = display.newGroup() | |
component.classType = "Component" | |
component.commitDirty = false | |
function component:construct() | |
self:createChildren() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "Component" | |
AutoSizeText = {} | |
function AutoSizeText:new() | |
local view = Component:new() | |
view._text = nil | |
view.textDirty = false | |
view._rgba = {255, 255, 255, 255} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local GetCustomersService = {} | |
GetCustomersService.URL = "http://server.com/api/customerlist.json" | |
function GetCustomersService:new() | |
local service = {} | |
service.customers = nil | |
function service:getCustomers() | |
network.request(GetCustomersService.URL, "GET", self); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ModelAbstractBaseClass = require "ModelAbstractBaseClass" | |
local CustomerModel = {} | |
function CustomerModel:new() | |
local model = ModelAbstractBaseClass:new() | |
model.defaults = { | |
firstName: "First", | |
lastName: "Last", | |
age: 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local CustomerVO = {} | |
function CustomerVO:new() | |
local vo = {} | |
vo.firstName = "First" | |
vo.lastName = "Last" | |
vo.age = 0 | |
return vo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by CoffeeScript 1.3.1 | |
(function() { | |
require.config({ | |
baseUrl: "./js", | |
optimize: "uglify", | |
waitSeconds: 30, | |
paths: { | |
text: "./libs/requirejs_107/text", | |
"wire/domReady": "./libs/requirejs_107/domReady", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(["dtos/DeviceDTO", "factories/ResponseFactory"], function(DeviceDTO, ResponseFactory) | |
{ | |
"use strict"; | |
var DeviceFactory; | |
DeviceFactory = | |
{ | |
getDeviceDTO: function(json) | |
{ | |
var responseDTO = ResponseFactory.getResponseDTO(json); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(["underscore", "dtos/DeviceDTO", "factories/ResponseFactory"], function(_, DeviceDTO, ResponseFactory) | |
{ | |
"use strict"; | |
var DeviceFactory = _.extend(ResponseFactory, { | |
getDeviceDTO: function(json) | |
{ | |
var responseDTO = ResponseFactory.getResponseDTO(json); | |
if(responseDTO == null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2010 Home Box Office, Inc. as an unpublished | |
* work. Neither this material nor any portion hereof may be copied | |
* or distributed without the express written consent of Home Box Office, Inc. | |
* | |
* This material also contains proprietary and confidential information | |
* of Home Box Office, Inc. and its suppliers, and may not be used by or | |
* disclosed to any person, in whole or in part, without the prior written | |
* consent of Home Box Office, Inc. | |
*/ |