Skip to content

Instantly share code, notes, and snippets.

@JoshEngebretson
Created July 11, 2015 20:46
Show Gist options
  • Save JoshEngebretson/f90dbcc9a2f2dd18cc33 to your computer and use it in GitHub Desktop.
Save JoshEngebretson/f90dbcc9a2f2dd18cc33 to your computer and use it in GitHub Desktop.
CommonJS compatible components
// CommonJS compatible components
"use strict";
"atomic component";
exports.component = function(self) {
var game = Atomic.game;
var node = self.node;
self.start = function() {
var water = node.getComponent("StaticModel");
water.material = game.cache.getResource("Material", "Materials/Water.xml");
}
self.update = function(timeStep) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment