Perlin.js 528 B

123456789101112131415161718192021222324
  1. function Perlin() {
  2. }
  3. Duktape.fin(Perlin.prototype, function (x) {
  4. if (x === Perlin.prototype) {
  5. return;
  6. }
  7. Polycode.Perlin__delete(x.__ptr)
  8. })
  9. Perlin.prototype.Get2DTiledX = function(x,y,t) {
  10. return Polycode.Perlin_Get2DTiledX(this.__ptr, x,y,t)
  11. }
  12. Perlin.prototype.Get = function(x,y) {
  13. return Polycode.Perlin_Get(this.__ptr, x,y)
  14. }
  15. Perlin.prototype.Get2D = function(x,y) {
  16. return Polycode.Perlin_Get2D(this.__ptr, x,y)
  17. }
  18. Perlin.prototype.Get3D = function(x,y,z) {
  19. return Polycode.Perlin_Get3D(this.__ptr, x,y,z)
  20. }