Skip to content

Commit ae825c1

Browse files
author
hartsantler
committed
external: three.js, p2.js, skunami.js
1 parent a15b540 commit ae825c1

64 files changed

Lines changed: 10720 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

external/p2.js/Demo.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var requestAnimationFrame = window.requestAnimationFrame ||
2323
* @constructor
2424
* @param {World} world
2525
*/
26-
function Demo(world){
26+
function Demo(world, width, height){
2727
p2.EventEmitter.call(this);
2828

2929
var that = this;
@@ -76,8 +76,8 @@ function Demo(world){
7676
this.stats_Nsummed = 0;
7777
this.stats_average = -1;
7878

79-
this.w = $(window).width();
80-
this.h = $(window).height();
79+
this.w = width || $(window).width();
80+
this.h = height || $(window).height();
8181

8282
this.init();
8383
this.resize(this.w,this.h);
@@ -107,9 +107,11 @@ function Demo(world){
107107
that.removeVisual(e.spring);
108108
});
109109

110+
/*
110111
$(window).resize(function(){
111112
that.resize($(window).width(), $(window).height());
112113
});
114+
*/
113115

114116
$(document).keydown(function(e){
115117
if(e.keyCode){
@@ -309,6 +311,7 @@ Demo.prototype.handleMouseUp = function(physicsPosition){
309311
if(this.drawPoints.length > 3){
310312
// Create polygon
311313
b = new p2.Body({ mass : 1 });
314+
b._draw_points = this.drawPoints.slice();
312315
if(b.fromPolygon(this.drawPoints,{
313316
removeCollinearPoints : 0.01,
314317
})){

external/p2.js/PixiDemo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ PixiDemo.prototype.addRenderable = function(obj){
554554
var zero = [0,0];
555555

556556
if(obj instanceof p2.Body && obj.shapes.length){
557-
557+
obj._sprite_color = color;
558558
var sprite = new PIXI.Graphics();
559559
if(obj.concavePath && !this.debugPolygons){
560560
var path = [];

external/skunami.js/LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013 Skeel Lee (http://cg.skeelogy.com)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

external/skunami.js/skunami.min.js

Lines changed: 121 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)