Permalink
Browse files

remove unused/outdated code for 1.0 release

  • Loading branch information...
1 parent 35210a0 commit e41920c36def2951eca5a4170bf28fabd9d6967e @erichocean erichocean committed May 28, 2012
Showing with 1 addition and 16,867 deletions.
  1. +0 −159 application/graphics/shape.js
  2. +0 −94 application/graphics/shape_layer.js
  3. +0 −315 application/graphics/stage.js
  4. +1 −6 application/node/buildfile.js
  5. +0 −143 constraints/README.md
  6. +0 −101 constraints/constraint.js
  7. +0 −214 constraints/core.js
  8. +0 −38 constraints/edit_info.js
  9. +0 −63 constraints/error.js
  10. +0 −50 constraints/hash_set.js
  11. +0 −167 constraints/hash_table.js
  12. +0 −114 constraints/linear_constraint.js
  13. +0 −263 constraints/linear_expression.js
  14. +0 −19 constraints/node/buildfile.js
  15. +0 −15 constraints/package.json
  16. +0 −61 constraints/point.js
  17. +0 −831 constraints/simplex_solver.js
  18. +0 −41 constraints/strength.js
  19. +0 −109 constraints/symbolic_weight.js
  20. +0 −189 constraints/tableau.js
  21. +0 −44 constraints/timer.js
  22. +0 −125 constraints/variable.js
  23. +0 −9,326 examples/box2d_test/box2d.js
  24. +0 −8 examples/box2d_test/core.js
  25. +0 −188 examples/box2d_test/main.js
  26. +0 −13 examples/box2d_test/node/buildfile.js
  27. +0 −13 examples/box2d_test/package.json
  28. +0 −2,436 examples/bullet_test/ammo.js
  29. +0 −138 examples/bullet_test/bullet.js
  30. +0 −9 examples/bullet_test/core.js
  31. +0 −19 examples/bullet_test/main.js
  32. +0 −13 examples/bullet_test/node/buildfile.js
  33. +0 −13 examples/bullet_test/package.json
  34. +0 −10 examples/constraints_demo/core.js
  35. +0 −63 examples/constraints_demo/main.js
  36. +0 −13 examples/constraints_demo/node/buildfile.js
  37. +0 −13 examples/constraints_demo/package.json
  38. +0 −336 examples/constraints_demo/quaddemo.js
  39. +0 −106 examples/stage_test/clipdrag.js
  40. +0 −96 examples/stage_test/color.js
  41. +0 −9 examples/stage_test/core.js
  42. +0 −159 examples/stage_test/curves.js
  43. +0 −101 examples/stage_test/drag.js
  44. +0 −27 examples/stage_test/main.js
  45. +0 −13 examples/stage_test/node/buildfile.js
  46. +0 −13 examples/stage_test/package.json
  47. +0 −328 examples/stage_test/physics.js
  48. +0 −123 examples/stage_test/stress.js
  49. +0 −116 examples/stage_test/tooltip.js
  50. +0 −4 projectfile.js
@@ -1,159 +0,0 @@
-// ==========================================================================
-// Project: Blossom - Modern, Cross-Platform Application Framework
-// Copyright: ©2012 Fohr Motion Picture Studios. All rights reserved.
-// License: Licensed under the GPLv3 license (see BLOSSOM-LICENSE).
-// ==========================================================================
-
-// Blossom's SC.Shape class was heavily inspired by KineticJS.
-/**
- * KineticJS JavaScript Library v3.6.0
- * http://www.kineticjs.com/
- * Copyright 2012, Eric Rowell
- * Licensed under the MIT or GPL Version 2 licenses.
- * Date: Jan 18 2012
- *
- * Copyright (C) 2012 by Eric Rowell
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-sc_require('graphics/stage');
-sc_require('graphics/shape_layer');
-
-SC.ACTOR = 'actors';
-SC.PROP = 'props';
-SC.BACKGROUND = 'background';
-SC.EXTRA = 'extras';
-
-SC.Shape = SC.Object.extend({
-
- type: SC.ACTOR,
-
- x: 0,
- y: 0,
- rotation: 0, // radians
- scale: { x: 1, y: 1 },
-
- // store state for next clear
- lastX: 0,
- lastY: 0,
- lastRotation: 0, // radians
- lastScale: { x: 1, y: 1 },
-
- isVisible: true,
- zIndex: -1, // Set by the layer once added to the stage.
-
- drag: { x: false, y: false },
- isDraggable: function() {
- var drag = this.drag;
- return drag.x || drag.y;
- }.property(),
-
- stage: null, // Set by the stage once added to the stage.
- layer: null, // Set by the stage once added to the stage.
-
- // Override this method to actually draw your shape. You do not need to
- // call arguments.callee.base.apply(this, arguments);.
- draw: function(context) {},
-
- display: function(context) {
- if (this.get('isVisible')) {
- var stage = this.get('stage');
-
- // layer transform
- context.save();
- if (stage.scale.x != 1 || stage.scale.y != 1) {
- context.scale(stage.scale.x, stage.scale.y);
- }
-
- // shape transform
- context.save();
- if (this.x !== 0 || this.y !== 0) {
- context.translate(this.x, this.y);
- }
- if (this.rotation !== 0) {
- context.rotate(this.rotation);
- }
- if (this.scale.x != 1 || this.scale.y != 1) {
- context.scale(this.scale.x, this.scale.y);
- }
-
- this.draw(context);
-
- context.restore();
- context.restore();
- }
- },
-
- move: function(x, y) {
- this.x += x;
- this.y += y;
- },
-
- rotate: function(theta) {
- this.rotation += theta;
- },
-
- show: function() {
- this.set('isVisible', true);
- },
-
- hide: function() {
- this.set('isVisible', false);
- },
-
- moveToTop: function() {
- var layer = this.get('layer');
- if (layer) layer.moveShapeToTop(this);
- },
-
- typeDidChange: function() {
- var layer = this.get('layer'),
- stage = this.get('stage');
-
- if (layer) layer.removeShape(this);
- if (stage) stage.add(this);
- }.observes('type'),
-
- mouseDown: function(evt) {
- var isDraggable = this.get('isDraggable'),
- stage = this.get('stage'),
- pos = stage.get('mousePosition');
-
- if (isDraggable && pos) {
- stage.set('shapeDragging', this);
- var offset = {};
- offset.x = pos.x - this.x;
- offset.y = pos.y - this.y;
- this.offset = offset;
-
- if (this.dragStarted) this.dragStarted(evt);
- }
- },
-
- init: function() {
- arguments.callee.base.apply(this, arguments);
-
- // These properties need their own, per-instance hashes.
- this.scale = { x: 1, y: 1 };
- this.lastScale = { x: 1, y: 1 };
- this.drag = { x: false, y: false };
- }
-
-});
@@ -1,94 +0,0 @@
-// ==========================================================================
-// Project: Blossom - Modern, Cross-Platform Application Framework
-// Copyright: ©2012 Fohr Motion Picture Studios. All rights reserved.
-// License: Licensed under the GPLv3 license (see BLOSSOM-LICENSE).
-// ==========================================================================
-
-// Blossom's SC.ShapeLayer class was heavily inspired by KineticJS.
-/**
- * KineticJS JavaScript Library v3.6.0
- * http://www.kineticjs.com/
- * Copyright 2012, Eric Rowell
- * Licensed under the MIT or GPL Version 2 licenses.
- * Date: Jan 18 2012
- *
- * Copyright (C) 2012 by Eric Rowell
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-sc_require('layers/layer');
-
-SC.ShapeLayer = SC.Layer.extend({
-
- shapes: [],
-
- draw: function() {
- var context = this.get('context'),
- shapes = this.get('shapes');
-
- this.clear();
-
- for (var idx=0, len=shapes.length; idx<len; ++idx) {
- shapes[idx].display(context);
- }
- },
-
- addShape: function(shape) {
- var context = this.get('context'),
- shapes = this.get('shapes');
-
- shapes.push(shape);
- shape.set('zIndex', shapes.length - 1);
- shape.display(context);
- },
-
- moveShapeToTop: function(shape) {
- var index = shape.get('zIndex'),
- shapes = this.get('shapes');
-
- shapes.splice(index, 1);
- shapes.push(shape);
- this.updateIndices();
- this.draw();
- },
-
- removeShape: function(shape) {
- var index = shape.get('zIndex'),
- shapes = this.get('shapes');
-
- shapes.splice(index, 1);
- this.updateIndices();
- this.draw();
- },
-
- updateIndices: function() {
- var shapes = this.get('shapes');
-
- for (var idx=0, len=shapes.length; idx<len; ++idx) {
- shapes[idx].set('zIndex', idx);
- }
- },
-
- init: function() {
- arguments.callee.base.apply(this, arguments);
- this.shapes = []; // Give ourself a fresh shapes array.
- }
-
-});
Oops, something went wrong.

0 comments on commit e41920c

Please sign in to comment.