Ver código fonte

mandatory commit

jbousquie 10 anos atrás
pai
commit
a677d6b5e7
1 arquivos alterados com 18 adições e 0 exclusões
  1. 18 0
      src/Mesh/babylon.geometry.js

+ 18 - 0
src/Mesh/babylon.geometry.js

@@ -488,6 +488,24 @@ var BABYLON;
                 return Sphere;
             })(_Primitive);
             Primitives.Sphere = Sphere;
+            var Disc = (function (_super) {
+                __extends(Disc, _super);
+                function Disc(id, scene, radius, tessellation, canBeRegenerated, mesh, side) {
+                    if (side === void 0) { side = BABYLON.Mesh.DEFAULTSIDE; }
+                    this.radius = radius;
+                    this.tessellation = tessellation;
+                    this.side = side;
+                    _super.call(this, id, scene, this._regenerateVertexData(), canBeRegenerated, mesh);
+                }
+                Disc.prototype._regenerateVertexData = function () {
+                    return BABYLON.VertexData.CreateDisc({ radius: this.radius, tessellation: this.tessellation, sideOrientation: this.side });
+                };
+                Disc.prototype.copy = function (id) {
+                    return new Disc(id, this.getScene(), this.radius, this.tessellation, this.canBeRegenerated(), null, this.side);
+                };
+                return Disc;
+            })(_Primitive);
+            Primitives.Disc = Disc;
             var Cylinder = (function (_super) {
                 __extends(Cylinder, _super);
                 function Cylinder(id, scene, height, diameterTop, diameterBottom, tessellation, subdivisions, canBeRegenerated, mesh, side) {