Skip to content

Commit

Permalink
Merge pull request BabylonJS#6406 from tom-berend/master
Browse files Browse the repository at this point in the history
clear bogus "circular references" for Rollup
  • Loading branch information
sebavan authored May 29, 2019
2 parents ac7f20b + 03467cc commit 77230f5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
26 changes: 13 additions & 13 deletions src/Engines/engine.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Scalar } from "../Maths/math.scalar";
import { VertexBuffer } from "../Meshes/buffer";
import { UniformBuffer } from "../Materials/uniformBuffer";
import { Effect, EffectCreationOptions, EffectFallbacks } from "../Materials/effect";
import { Material } from "../Materials/material";
import { IInternalTextureLoader } from "../Materials/Textures/internalTextureLoader";
import { InternalTexture } from "../Materials/Textures/internalTexture";
import { BaseTexture } from "../Materials/Textures/baseTexture";
Expand All @@ -34,6 +33,7 @@ import { WebGLDataBuffer } from '../Meshes/WebGL/webGLDataBuffer';
import { IShaderProcessor } from './Processors/iShaderProcessor';
import { WebGL2ShaderProcessor } from './WebGL/webGL2ShaderProcessors';

declare type Material = import("../Materials/material").Material;
declare type PostProcess = import("../PostProcesses/postProcess").PostProcess;
declare type Texture = import("../Materials/Textures/texture").Texture;
declare type VideoTexture = import("../Materials/Textures/videoTexture").VideoTexture;
Expand Down Expand Up @@ -3051,7 +3051,7 @@ export class Engine {
* @param instancesCount defines the number of instances to draw (if instanciation is enabled)
*/
public draw(useTriangles: boolean, indexStart: number, indexCount: number, instancesCount?: number): void {
this.drawElementsType(useTriangles ? Material.TriangleFillMode : Material.WireFrameFillMode, indexStart, indexCount, instancesCount);
this.drawElementsType(useTriangles ? Constants.MATERIAL_TriangleFillMode : Constants.MATERIAL_WireFrameFillMode, indexStart, indexCount, instancesCount);
}

/**
Expand All @@ -3061,7 +3061,7 @@ export class Engine {
* @param instancesCount defines the number of instances to draw (if instanciation is enabled)
*/
public drawPointClouds(verticesStart: number, verticesCount: number, instancesCount?: number): void {
this.drawArraysType(Material.PointFillMode, verticesStart, verticesCount, instancesCount);
this.drawArraysType(Constants.MATERIAL_PointFillMode, verticesStart, verticesCount, instancesCount);
}

/**
Expand All @@ -3072,7 +3072,7 @@ export class Engine {
* @param instancesCount defines the number of instances to draw (if instanciation is enabled)
*/
public drawUnIndexed(useTriangles: boolean, verticesStart: number, verticesCount: number, instancesCount?: number): void {
this.drawArraysType(useTriangles ? Material.TriangleFillMode : Material.WireFrameFillMode, verticesStart, verticesCount, instancesCount);
this.drawArraysType(useTriangles ? Constants.MATERIAL_TriangleFillMode : Constants.MATERIAL_WireFrameFillMode, verticesStart, verticesCount, instancesCount);
}

/**
Expand Down Expand Up @@ -3122,24 +3122,24 @@ export class Engine {
private _drawMode(fillMode: number): number {
switch (fillMode) {
// Triangle views
case Material.TriangleFillMode:
case Constants.MATERIAL_TriangleFillMode:
return this._gl.TRIANGLES;
case Material.PointFillMode:
case Constants.MATERIAL_PointFillMode:
return this._gl.POINTS;
case Material.WireFrameFillMode:
case Constants.MATERIAL_WireFrameFillMode:
return this._gl.LINES;
// Draw modes
case Material.PointListDrawMode:
case Constants.MATERIAL_PointListDrawMode:
return this._gl.POINTS;
case Material.LineListDrawMode:
case Constants.MATERIAL_LineListDrawMode:
return this._gl.LINES;
case Material.LineLoopDrawMode:
case Constants.MATERIAL_LineLoopDrawMode:
return this._gl.LINE_LOOP;
case Material.LineStripDrawMode:
case Constants.MATERIAL_LineStripDrawMode:
return this._gl.LINE_STRIP;
case Material.TriangleStripDrawMode:
case Constants.MATERIAL_TriangleStripDrawMode:
return this._gl.TRIANGLE_STRIP;
case Material.TriangleFanDrawMode:
case Constants.MATERIAL_TriangleFanDrawMode:
return this._gl.TRIANGLE_FAN;
default:
return this._gl.TRIANGLES;
Expand Down
1 change: 0 additions & 1 deletion src/Gamepads/Controllers/poseEnabledController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "../../States/ind
import { EngineStore } from "../../Engines/engineStore";

import { Gamepad } from "../../Gamepads/gamepad";
import { ExtendedGamepadButton } from "./poseEnabledController";
import { WebVRFreeCamera, PoseControlled, DevicePose } from "../../Cameras/VR/webVRCamera";
import { TargetCamera } from "../../Cameras/targetCamera";

Expand Down
1 change: 0 additions & 1 deletion src/Gamepads/gamepad.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Observable } from "../Misc/observable";
import { GamepadButtonChanges } from "../Gamepads/gamepad";
import { _TimeToken } from "../Instrumentation/timeToken";
import { _DepthCullingState, _StencilState, _AlphaState } from "../States/index";

Expand Down
2 changes: 1 addition & 1 deletion src/Materials/material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { EngineStore } from "../Engines/engineStore";
import { BaseSubMesh, SubMesh } from "../Meshes/subMesh";
import { Geometry } from "../Meshes/geometry";
import { AbstractMesh } from "../Meshes/abstractMesh";
import { Mesh } from "../Meshes/mesh";
import { UniformBuffer } from "./uniformBuffer";
import { Effect } from "./effect";
import { BaseTexture } from "../Materials/Textures/baseTexture";
Expand All @@ -19,6 +18,7 @@ import { Constants } from "../Engines/constants";
import { Logger } from "../Misc/logger";
import { IInspectable } from '../Misc/iInspectable';

declare type Mesh = import("../Meshes/mesh").Mesh;
declare type Animation = import("../Animations/animation").Animation;
declare type InstancedMesh = import('../Meshes/instancedMesh').InstancedMesh;

Expand Down

0 comments on commit 77230f5

Please sign in to comment.