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
//Atomic TypeScript Definitions | |
declare module Atomic { | |
export enum FrustumPlane { | |
PLANE_NEAR, | |
PLANE_LEFT, | |
PLANE_RIGHT, |
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
// get the network subsystem | |
var network = Atomic.getNetwork(); | |
// non blocking http request runs on it's own thread | |
var request = network.makeHttpRequest("http://www.google.com"); | |
// listen in to engine update | |
network.subscribeToEvent("Update", function () { |
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
/// <reference path="/Users/josh/Dev/atomic/AtomicGameEngine/Bin/Atomic.d.ts" /> | |
var scene:Atomic.Scene = new Atomic.Scene(); | |
scene.createComponent("Octree"); | |
var cameraNode = scene.createChild("Camera"); | |
cameraNode.position = [0.0, 0.0, -10.0]; | |
var graphics = Atomic.getGraphics(); |
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
// CommonJS compatible components | |
"use strict"; | |
"atomic component"; | |
exports.component = function(self) { | |
var game = Atomic.game; | |
var node = self.node; | |
self.start = function() { |
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
static const wchar_t kPipePrefix[] = L"\\\\.\\pipe\\"; | |
static const int kPipeBufferSz = 4 * 1024; | |
static LONG g_pipe_seq = 0; | |
bool checkIntegritySupport() | |
{ | |
OSVERSIONINFO osvi; | |
ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); | |
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); |
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
//Atomic TypeScript Definitions | |
declare module Atomic { | |
// enum FrustumPlane | |
export type FrustumPlane = number; | |
export var PLANE_NEAR: FrustumPlane; | |
export var PLANE_LEFT: FrustumPlane; |
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
// Javascript "flat" component | |
'atomic component'; | |
var inspectorFields = { | |
speed: 1.0 | |
} | |
exports.component = function(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
// This script is the main entry point of the game | |
var halfWidth = Atomic.graphics.width * Atomic.PIXEL_SIZE * 0.5; | |
var halfHeight = Atomic.graphics.height * Atomic.PIXEL_SIZE * 0.5; | |
var maxX = halfWidth; | |
var minX = -halfWidth; | |
var maxY = halfHeight; | |
var minY = -halfHeight; |
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
var view = new Atomic.UIView(); | |
// Create a layout, otherwise child widgets won't know how to size themselves | |
// and would manually need to be sized | |
var layout = new Atomic.UILayout(); | |
// specify the layout region | |
layout.rect = view.rect; | |
view.addChild(layout); |
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
// patch in our local node_modules | |
process.env.NODE_PATH = __dirname + "/Build/node_modules"; | |
require('module').Module._initPaths(); | |
var fs = require('fs-extra'); | |
var path = require('path'); | |
var os = require('os'); | |
var host = os.platform(); | |
var jakeRoot = __dirname; |