-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from VulumeCode/master
CommonJS modules
- Loading branch information
Showing
16 changed files
with
192 additions
and
214 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.TheClass = exports.square = exports.pixelFn = exports.colorFn = void 0; | ||
// These two functions are painfully slow ;) | ||
function colorFn(x) { | ||
return [Math.sin(x) * 0.5 + 0.5, | ||
Math.sin(x + 0.333 * Math.PI) * 0.5 + 0.5, | ||
Math.sin(x + 0.666 * Math.PI) * 0.5 + 0.5, | ||
1.0]; | ||
} | ||
exports.colorFn = colorFn; | ||
function pixelFn(x, y, t, prmA, prmB) { | ||
var r = Math.sin(t + x * 2.0) + Math.cos(t + y * 2.0); | ||
r += Math.sin(t + x * Math.sin(t + x * 0.02) * prmA) + Math.cos(t + y * (Math.cos(t * 0.7) * 5.0)) * prmB; | ||
return colorFn(r + t); | ||
} | ||
exports.pixelFn = pixelFn; | ||
function square(x) { | ||
return x * x; | ||
} | ||
exports.square = square; | ||
var TheClass = /** @class */ (function () { | ||
function TheClass(index) { | ||
this.index = index; | ||
post("TheClass.constructor was called with the number parameter " + index + "\n"); | ||
} | ||
TheClass.prototype.getIndex = function () { | ||
return this.index; | ||
}; | ||
TheClass.prototype.post = function () { | ||
post("TheClass: post!"); | ||
post(); | ||
}; | ||
return TheClass; | ||
}()); | ||
exports.TheClass = TheClass; |
This file was deleted.
Oops, something went wrong.
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 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 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
Oops, something went wrong.