Skip to content

Commit

Permalink
fix: scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz committed Mar 11, 2024
1 parent bff960d commit 323a2b0
Show file tree
Hide file tree
Showing 32 changed files with 1,934 additions and 1,847 deletions.
2 changes: 1 addition & 1 deletion apps/demo/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require('@nativescript/canvas-polyfill');
const TextDecoderO = TextDecoder;
// require('@nativescript/canvas-polyfill');
// import { Canvas } from '@nativescript/canvas';
declare const jp, GDPerformanceMonitor, android, java;
declare const jp, GDPerformanceMonitor, android, java, UIColor;
let monitor;
import { Application, path as filePath, knownFolders, Utils, path as nsPath, ImageSource, Trace } from '@nativescript/core';

Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-babylon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-babylon",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"description": "",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-media/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-media",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"description": "Canvas media",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-phaser-ce/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-phaser-ce",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"description": "Tools for using Phaser-ce to build native 2D games in NativeScript 👾",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-phaser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-phaser",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"description": "Build awesome 2D games with Phaser.js and NativeScript",
"main": "index",
"typings": "index.d.ts",
Expand Down
9 changes: 2 additions & 7 deletions packages/canvas-pixi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ require('@nativescript/canvas-polyfill');
import * as Pixii from 'pixi.js';

let PIXI = Pixii;
import {Screen} from '@nativescript/core';

// import * as filters from 'pixi-filters';
// PIXI.filters = { ...(PIXI.filters || {}), ...filters };


(global as any).PIXI = (global as any).window.PIXI = (global as any).PIXI || PIXI;

Expand All @@ -25,14 +22,12 @@ class NSCPIXIApplication extends Pixii.Application {
const width = props.width || clientWidth;
const height = props.height || clientHeight;


super({
...props,
resolution: Screen.mainScreen.scale,
context,
view,
width,
height
width,
height,
});
}
}
Expand Down
Loading

0 comments on commit 323a2b0

Please sign in to comment.