Skip to content

Commit

Permalink
core: v2 polish (#107)
Browse files Browse the repository at this point in the history
* chore: updates

* updates

* updates

* updates

* updates

* updates

* 2d working

* updates

* updates

* updates

* working webgl

* updates

* updates

* updates

* updates

* Update Cargo.toml

* updates

* updates

* updates

* updates

* Update webgl.rs

* updates

* updates

* Update .gitignore

* updates

* updates

* updates

* working much better :D

* updates

* updates

* chore: refactor

* chore: clean up

* chore: clean up

* chore: clean up

* feat: JSI

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: clean up

* chore: updates

* chore: clean up

* chore: clean up

* chore: clean up

* chore: updates

* chore: clean up

* chore: clean up

* chore: updates

* chore: updates

* chore: updates

* Update WebGL2RenderingContext.cpp

* chore: use namespace

* chore: updates

* chore: updates

* chore: fix build

* chore: initial 2d support

* fix: gl alive!!!

* fix: updates

* fix: working 3D

* fix: 2d

* fix: video rendering

* fix: 2d context to 2d context drawing

* feat: v2 alpha.0

* chore: updates & trying another op

* fix: remove extra conversion

* chore: clean up

* chore: updates

* chore: updates

* chore: bump

* feat: initial dom view

* feat: expose skia dom

* chore: ios updates (#99)

* chore: ios updates

chore: replaces Arc with Rc

* fix(android): updates

* chore: ios updates

* chore: ios updates

* chore: ios updates

* chore: updates

* chore: updates

* chore: updates

* fix: ios

* chore: updates

* chore: updates

* fix(ios): missing pods

* fix(ios): build

* chore: updates

* chore: updates

* chore: updates

* fix(ios): improve fileop

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* Chore v2 perf op (#104)

* chore: updates

* chore: updates

* chore: nx migrate @nativescript/plugin-tools

* release: 2.0.0-alpha.17

* fix: fenceSync

* fix(jsi): fenceSync

* chore: updates

* chore: upgrade skia

* feat: v8 refactor (#103)

* feat: v8 refactor

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: improve code sharing

* chore: updates

* chore: updates

* chore: updates

* chore: updates

* chore: working ios

* chore: update

* fix: running on both platforms

* chore: updates

* chore: 2.0.0-alpha.21

* feat:  the frantic run of the valorous rabbit demo game

* chore: alpha 22

* chore: updates

* chore: updates

* chore: updates

* chore: update

* fix: package building

* chore: updates

* chore: updates

---------

Co-authored-by: Nathan Walker <[email protected]>

* chore: updates

* chore(android): perf op

* chore: updates

* fix: font handling & custom font support

* chore: updates

* Squashed commit of the following:

commit ec98277
Author: Dylan Llewellyn <[email protected]>
Date:   Fri Dec 8 03:47:51 2023 +0800

    fix: add text baseline bindings (#106)

    * fix: add text baseline bindings

    * fix: add text baseline bindings

    * fix: add text baseline bindings

commit b355ddc
Author: Osei Fortune <[email protected]>
Date:   Thu Nov 23 07:00:15 2023 -0400

    chore: updates (#105)

* fix: baseline middle

* chore: updates

* chore: updates

* chore: bump

* fix: scaling

* fix: handle empty text when drawing

* chore: updates

---------

Co-authored-by: Nathan Walker <[email protected]>
  • Loading branch information
triniwiz and NathanWalker authored Jan 3, 2024
1 parent ec98277 commit 3a786f8
Show file tree
Hide file tree
Showing 137 changed files with 9,835 additions and 3,284 deletions.
24 changes: 17 additions & 7 deletions apps/demo/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,25 @@ const age = parseInt(params.get("age") as any); // is the number 18

// other url: 648.170ms

console.time('url');
for (let i = 0; i < 1_000_000; i++) {
const url = new URL('https://example.com/?name=Jonathan%20Smith&age=18');
}
console.timeEnd('url');
// try loading our custom font

const url = new URL('https://example.com/?name=Jonathan%20Smith&age=18');

console.log('canParse', URL.canParse('asdasd'), URL.canParse('https://example.com/?name=Jonathan%20Smith&age=18'));
const font = nsPath.join(knownFolders.currentApp().path, 'fonts/Creepster-Regular.ttf');

global.CanvasModule.__addFontFamily('creepster', [font]);




// console.time('url');
// for (let i = 0; i < 1_000_000; i++) {
// const url = new URL('https://example.com/?name=Jonathan%20Smith&age=18');
// }
// console.timeEnd('url');

// const url = new URL('https://example.com/?name=Jonathan%20Smith&age=18');

// console.log('canParse', URL.canParse('asdasd'), URL.canParse('https://example.com/?name=Jonathan%20Smith&age=18'));

Application.on('uncaughtError', (args) => {
console.log('uncaughtError: error', args.error);
Expand Down
Binary file added apps/demo/src/fonts/Creepster-Regular.ttf
Binary file not shown.
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-alpha.31",
"version": "2.0.0-alpha.38",
"description": "",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-chartjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-chartjs",
"version": "2.0.0-alpha.31",
"version": "2.0.0-alpha.38",
"description": "ChartJS",
"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-alpha.31",
"version": "2.0.0-alpha.38",
"description": "Canvas media",
"main": "index",
"typings": "index.d.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/canvas-media/video/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ export class Video extends VideoBase {
this._asset = AVURLAsset.assetWithURL(url);
const keys = ['tracks', 'duration'];
this._asset.loadValuesAsynchronouslyForKeysCompletionHandler(keys, () => {
console.dir(this._asset.tracksWithMediaType(AVMediaTypeVideo));
this._videoSize = this._asset.tracksWithMediaType(AVMediaTypeVideo)?.objectAtIndex(0).naturalSize ?? undefined;

const fps = this._asset.tracks.firstObject?.nominalFrameRate ?? 30;
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-alpha.31",
"version": "2.0.0-alpha.38",
"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-alpha.31",
"version": "2.0.0-alpha.38",
"description": "Build awesome 2D games with Phaser.js and NativeScript",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-pixi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-pixi",
"version": "2.0.0-alpha.31",
"version": "2.0.0-alpha.38",
"description": "Plugin for using pixi.js in NativeScript",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-polyfill/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-polyfill",
"version": "2.0.0-alpha.31",
"version": "2.0.0-alpha.38",
"description": "Polyfill for making NativeScript compatible with web libs like pixi.js, three.js, phaser.js, babylon.js, etc....",
"main": "index",
"typings": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-three/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/canvas-three",
"version": "2.0.0-alpha.31",
"version": "2.0.0-alpha.38",
"description": "Utilities for using THREE.js on NativeScript",
"main": "index",
"typings": "index.d.ts",
Expand Down
Loading

0 comments on commit 3a786f8

Please sign in to comment.