Comparing version 0.1.2 to 0.1.3
@@ -1,4 +0,1 @@ | ||
import {Heta2D} from './js/hetajs2d'; | ||
export { | ||
Heta2D.Scene as Scene | ||
}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Vec2=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;classCallCheck(this,t),this.x=e,this.y=n}return createClass(t,[{key:"clone",value:function(){return new this.constructor(this.x,this.y)}},{key:"copy",value:function(t){return this.x=t.x,this.y=t.y,this}},{key:"angle",value:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t}},{key:"distanceTo",value:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)}},{key:"setValue",value:function(t,e){return this.x=t,this.y=e,this}},{key:"addVectors",value:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}},{key:"multiplyScalar",value:function(t){return this.x*=t,this.y*=t,this}},{key:"subVectors",value:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}},{key:"multiply",value:function(t){return this.x*=t.x,this.y*=t.y,this}},{key:"width",set:function(t){this.x=t},get:function(){return this.x}},{key:"height",get:function(){return this.y},set:function(t){this.y=t}}]),t}(),Scene=function(){function t(e,n,i){classCallCheck(this,t),this.active=!1,this.started=!1,void 0===n&&(n=function(t){setTimeout(t,40)}),this.start(n)}return createClass(t,[{key:"destroy",value:function(){this.stop()}},{key:"start",value:function(t){var e=this;this.started=!0,this.active=!0,this.updateloop=setInterval(function(){e._mainLoop()},40);var n=this;!function e(){n.active&&(t(e),n._renderLoop())}()}},{key:"_mainLoop",value:function(){this.started&&console.log("mainLoop")}},{key:"_renderLoop",value:function(){this.started&&console.log("drawAnimation")}},{key:"resume",value:function(){this.started=!0}},{key:"pause",value:function(){this.started=!1}},{key:"stop",value:function(){clearInterval(this.updateloop),this.active=!1}}]),t}();exports.Vec2=Vec2,exports.Scene=Scene; |
{ | ||
"name": "hetajs", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "hetajs", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8235
16
9
1