Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
draw() {
this.resume = new PIXI.Sprite(cvTexture);
this.resume.scale.set(SCALES.RESUME[screenSizeDetector()]);
this.resume.x = this.xAnchor;
this.resume.type = 'resume-on-belt';
this.parent.addChild(this.resume);
}
draw() {
this.resume = new PIXI.Sprite(cvTexture);
this.resume.scale.set(SCALES.RESUME[screenSizeDetector()]);
this.resume.x = this.xAnchor;
this.resume.type = 'resume-on-belt';
this.parent.addChild(this.resume);
}
addBlackScreen(){
this.blackScreen=new PIXI.Sprite(PIXI.Texture.WHITE);
this.blackScreen.width=this.width;
this.blackScreen.height=this.height;
this.blackScreen.tint=0x000000;
this.blackScreen.parentLayer = this.layerUI;
}
constructor(options?: PixiAppOptions) {
if (!options) {
options = this.defaultOptions;
}
this.mediaInfoViewer = new MediaInfoViewer();
this.app = new PIXI.Application(options);
this.configure(options);
this.ticker.add(this.resize.bind(this));
this.appOptions = options;
}
function createApplication()
{
renderer = new PIXI.Application({ transparent: true, width: window.innerWidth, height: window.innerHeight, resolution: window.devicePixelRatio })
document.body.appendChild(renderer.view)
renderer.view.style.position = 'fixed'
renderer.view.style.width = '100vw'
renderer.view.style.height = '100vh'
renderer.view.style.top = 0
renderer.view.style.left = 0
renderer.view.style.background = 'rgba(0,0,0,.1)'
}
function setup()
{
renderer = new PIXI.Application({ transparent: true, resolution: window.devicePixelRatio, view: document.querySelector('.view') })
document.body.appendChild(renderer.view)
ease = new Ease.list()
}
/**/ constructor(width, height) {
/**/ this.renderableCount = 0;
/**/ this.renderables = [];
/**/ this.renderer = autoDetectRenderer(width, height, {
/**/ antialias: true, resolution: 1,
/**/ });
/**/ this.renderer.backgroundColor = bgColor;
/**/ this.dom = this.renderer.view;
/**/ this.scene = new Container();
/**/ this.animate = this.animate.bind(this);
/**/ this.resizeHandler = this.resizeHandler.bind(this);
/**/ }
/**/ add(renderable) {
constructor(width, height) {
this.renderableCount = 0;
this.renderables = [];
this.renderer = autoDetectRenderer(width, height, {
antialias: true, transparent: true, resolution: 1,
});
if (bgColor) this.renderer.backgroundColor = bgColor;
this.dom = this.renderer.view;
this.scene = new Container();
this.animate = this.animate.bind(this);
this.resizeHandler = this.resizeHandler.bind(this);
}
add(renderable) {
canvasCoordsFromStageCoords(stageCoords: Vector): Vector {
if (!this.entitySystemDisplayObject) {
return stageCoords;
}
return this.entitySystemDisplayObject.toGlobal(
new Point(stageCoords.x, stageCoords.y)
);
}
private renderChunkMapMode(chunkX: number, chunkY: number) {
const mapMode = this.mapModes[this.viewOptions.mapMode];
const chunkCells = this.getCellsInChunk(chunkX, chunkY);
const { cellWidth, cellHeight, chunkWidth, chunkHeight } = this.options;
const chunkPosition = new Point(
chunkX * chunkWidth * cellWidth,
chunkY * chunkHeight * cellHeight,
);
mapMode.updateChunk(
chunkX, chunkY,
chunkCells,
chunkPosition,
);
}