metaco-ext 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 679fd4c4e31f510d21e5f91cef3646bdcf41341ca31358c8c5f012bbf05c0e4f
4
- data.tar.gz: a4029522783974d02d9b46b05ae33dea97a84bfce1bd5dc1abbc7b33cbc3506d
3
+ metadata.gz: 7d29796a148aa95eff14052e74b462861692c92d7ba3b287515958ced6c467ca
4
+ data.tar.gz: 7bf8bf868704384d19ea4a97c354181634ec50367797b2c55401016a47aef41c
5
5
  SHA512:
6
- metadata.gz: c5b588f4859b3a44543ee2c60f961efffe9829e6065f37d78cd0be09dd53587a707c32a6686876b684700348ff73246377ad9fbc91f07a5623ba6782f4e15696
7
- data.tar.gz: 1e66134660ea5509ef3278e0c9a5edbcb7759db66fb602c4f30c78addc4dfc18f96a0284f3a604808ee3123ef91c1a213d8fa331d092dc8798ee7a5cfbbf28f7
6
+ metadata.gz: b8e2f29c6eb63af9e2a9491f0438ba1c41b6df0a06effbd578e528f0f0b97c4d99e5610281ef9132c2a0ed5368118caf2ff0c9e57871cdaaef8fc82274747928
7
+ data.tar.gz: 1032695365605a8d68e1f3dfdecf666fdec4d8fbf3c2e9a9242d4d5e7269ed8884d1bd0ece69455b80796ca7aa58764f5ccb0bfc95b562df3517b313876ecd47
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.1.1] - 2026-09-25
6
+
7
+ - Correct the gem author and license attribution.
8
+
5
9
  ## [0.1.0] - 2026-09-23
6
10
 
7
11
  - Initial release.
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2026 ydah
3
+ Copyright (c) 2026 Yudai Takada
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # metaco-ext
1
+ <h1 align="center">metaco-ext</h1>
2
2
 
3
- [![Gem version](https://badge.fury.io/rb/metaco-ext.svg)](https://rubygems.org/gems/metaco-ext)
4
- [![Downloads](https://img.shields.io/gem/dt/metaco-ext?label=downloads)](https://rubygems.org/gems/metaco-ext)
5
- [![CI](https://github.com/rbgfx/metaco-ext/actions/workflows/ci.yml/badge.svg)](https://github.com/rbgfx/metaco-ext/actions/workflows/ci.yml)
6
- [![Ruby](https://img.shields.io/badge/ruby-%3E%3D3.1-CC342D?logo=ruby&logoColor=white)](https://www.ruby-lang.org/)
7
- [![License](https://img.shields.io/badge/license-MIT-750014.svg)](LICENSE.txt)
3
+ <p align="center">Small Ruby adapters for metaco textures, pixels, events, and resize data.</p>
8
4
 
9
- > Small Ruby adapters for metaco textures, pixels, events, and resize data.
5
+ <p align="center">
6
+ <a href="https://rubygems.org/gems/metaco-ext"><img src="https://badge.fury.io/rb/metaco-ext.svg" alt="Gem Version"></a>
7
+ <a href="https://rubygems.org/gems/metaco-ext"><img src="https://img.shields.io/gem/dt/metaco-ext?label=downloads" alt="Downloads"></a>
8
+ <a href="https://www.ruby-lang.org/"><img src="https://img.shields.io/badge/ruby-%3E%3D3.1-CC342D?logo=ruby&amp;logoColor=white" alt="Ruby Version"></a>
9
+ <a href="LICENSE.txt"><img src="https://img.shields.io/badge/license-MIT-750014.svg" alt="License"></a>
10
+ </p>
10
11
 
11
- metaco-ext adds the Ruby-side helpers that sit next to the native
12
- [metaco](https://github.com/rbgfx/metaco) API. Resource methods delegate to
13
- metaco, while event helpers provide a stable, normalized shape for graphics
14
- applications.
12
+ [Features](#features) · [Installation](#installation) · [Quick Start](#quick-start)
15
13
 
16
- **[Features](#features) · [Installation](#installation) · [Quick start](#quick-start) · [Requirements](#requirements) · [Development](#development)**
14
+ ***
15
+
16
+ metaco-ext adds Ruby-side helpers around the native [metaco](https://github.com/rbgfx/metaco) API. Resource methods delegate to metaco, while event helpers provide a stable, normalized shape for graphics applications.
17
17
 
18
18
  ## Features
19
19
 
@@ -25,26 +25,36 @@ applications.
25
25
 
26
26
  ## Installation
27
27
 
28
- Add both gems to your Gemfile:
28
+ Add the extension to your Gemfile:
29
29
 
30
30
  ~~~ruby
31
- gem "metaco"
32
31
  gem "metaco-ext"
33
32
  ~~~
34
33
 
35
- Then run:
34
+ For native resource methods on macOS, add metaco too:
36
35
 
37
- ~~~sh
38
- bundle install
36
+ ~~~ruby
37
+ gem "metaco"
39
38
  ~~~
40
39
 
41
- Or install the released extension:
40
+ Then run `bundle install`, or install the gem directly:
42
41
 
43
42
  ~~~sh
44
43
  gem install metaco-ext
45
44
  ~~~
46
45
 
47
- ## Quick start
46
+ On macOS, install both gems for native resource methods:
47
+
48
+ ~~~sh
49
+ gem install metaco metaco-ext
50
+ ~~~
51
+
52
+ ### Requirements
53
+
54
+ - Ruby 3.1 or newer.
55
+ - Native resource methods require a compatible metaco installation and are available on macOS only. Calls without metaco raise <code>LoadError</code>.
56
+
57
+ ## Quick Start
48
58
 
49
59
  ~~~ruby
50
60
  require "metaco/ext"
@@ -66,11 +76,6 @@ texture = Metaco::Ext.texture_create(handle, 2, 2, rgba_bytes)
66
76
  Metaco::Ext.bind_compute_texture(handle, 0, texture)
67
77
  ~~~
68
78
 
69
- ## Requirements
70
-
71
- Native Metal calls are available on macOS only. Calling a resource method
72
- without a compatible metaco installation raises <code>LoadError</code>.
73
-
74
79
  ## Development
75
80
 
76
81
  ~~~sh
@@ -78,6 +83,10 @@ bundle install
78
83
  bundle exec rake verify
79
84
  ~~~
80
85
 
86
+ ## Contributing
87
+
88
+ Bug reports and pull requests are welcome at [rbgfx/metaco-ext](https://github.com/rbgfx/metaco-ext).
89
+
81
90
  ## License
82
91
 
83
92
  [MIT](LICENSE.txt)
data/docs/index.html ADDED
@@ -0,0 +1,32 @@
1
+ <!doctype html>
2
+ <html lang="en"><head>
3
+ <meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
4
+ <meta name="theme-color" content="#020617"><meta name="description" content="Adapters around metaco texture and pixel APIs, with normalized event data and resize dimensions.">
5
+ <meta property="og:title" content="metaco-ext — Keep native events predictable."><meta property="og:description" content="Adapters around metaco texture and pixel APIs, with normalized event data and resize dimensions."><meta property="og:type" content="website"><meta property="og:url" content="https://rbgfx.github.io/metaco-ext/">
6
+ <meta name="twitter:card" content="summary"><link rel="canonical" href="https://rbgfx.github.io/metaco-ext/"><title>metaco-ext — Keep native events predictable.</title>
7
+ <style>
8
+ :root{color-scheme:dark;--bg:#020617;--panel:#0f172a;--line:#334155;--ink:#e2e8f0;--muted:#94a3b8;--a:#38bdf8;--mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--sans:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--w:min(100% - 2.5rem,76rem)}
9
+ *{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.65 var(--sans)}a{color:inherit;text-underline-offset:.22em}a:hover{color:var(--a)}a:focus-visible{outline:3px solid var(--a);outline-offset:4px}h1,h2,h3,p,figure,pre{margin:0}h1,h2,h3{line-height:1.08;text-wrap:balance}p{text-wrap:pretty}code,pre,.mono{font-family:var(--mono);font-variant-numeric:tabular-nums}.wrap{width:var(--w);margin:auto}.skip{position:fixed;left:1rem;top:1rem;z-index:1;transform:translateY(-160%);padding:.7rem 1rem;background:var(--ink);color:var(--bg)}.skip:focus{transform:none}
10
+ header{height:4.75rem;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:.7rem;font-weight:750;text-decoration:none}.mark{width:2rem;height:2rem;display:grid;place-items:center;border:1px solid var(--a);color:var(--a);font:.85rem var(--mono)}nav{display:flex;gap:1.5rem;font-size:.9rem}nav a{text-decoration:none;color:var(--muted)}nav a:last-child{color:var(--ink)}
11
+ .hero{display:grid;grid-template-columns:.88fr 1.12fr;align-items:center;gap:clamp(2rem,6vw,6rem);padding-block:clamp(4rem,9vw,8rem)}.kicker,.visual figcaption,.num{font:.76rem/1.4 var(--mono);color:var(--a)}h1{max-width:11ch;margin-top:1rem;font-size:clamp(3rem,7.5vw,6.5rem);letter-spacing:-.065em}.lede{max-width:40rem;margin-top:1.5rem;color:var(--muted);font-size:1.15rem}.actions{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:2rem}.button{min-height:2.8rem;padding:.65rem 1rem;border:1px solid var(--line);display:inline-flex;align-items:center;text-decoration:none;font-weight:650}.button.primary{background:var(--a);border-color:var(--a);color:var(--bg)}.install{margin-top:1.4rem;color:var(--muted);font:.86rem var(--mono)}.install code{color:var(--ink)}
12
+ .visual{border:1px solid var(--line);background:var(--panel)}.art{min-height:18rem;padding:1.25rem;display:grid;place-items:center;overflow:hidden}.art svg{width:100%;max-height:23rem}.visual figcaption{display:flex;justify-content:space-between;gap:1rem;padding:.75rem 1rem;border-top:1px solid var(--line);color:var(--muted)}.visual figcaption span:last-child{color:var(--a)}
13
+ section.info{padding-block:4.5rem;border-top:1px solid var(--line)}.section-head{display:grid;grid-template-columns:.72fr 1.28fr;gap:2rem;align-items:end;margin-bottom:2rem}h2{font-size:clamp(2rem,4vw,3.25rem);letter-spacing:-.045em}.section-head p,.feature p,.try-copy p{color:var(--muted)}.features{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line)}.feature{padding:1.25rem 1.2rem 1.4rem 0;border-bottom:1px solid var(--line)}.feature+.feature{padding-left:1.2rem;border-left:1px solid var(--line)}.feature h3{margin-top:.8rem;font-size:1.1rem}.feature p{margin-top:.5rem;font-size:.94rem}.try{display:grid;grid-template-columns:.75fr 1.25fr;align-items:center;gap:clamp(2rem,7vw,7rem)}.try-copy p{margin-top:1rem}.try-copy a{color:var(--ink)}pre{overflow-x:auto;padding:1.25rem;border:1px solid var(--line);background:var(--panel);font-size:.82rem;line-height:1.8;tab-size:2}
14
+ footer{display:flex;justify-content:space-between;gap:1rem;padding-block:1.6rem;border-top:1px solid var(--line);color:var(--muted);font-size:.85rem}footer div{display:flex;gap:1.25rem}
15
+ @media(max-width:800px){.hero{grid-template-columns:1fr;gap:2.5rem}.hero-copy{max-width:42rem}.section-head,.try{grid-template-columns:1fr;gap:1rem}}@media(max-width:560px){:root{--w:min(100% - 1.5rem,76rem)}header{height:4.2rem}nav{gap:.8rem;font-size:.8rem}nav a:first-child{display:none}h1{font-size:clamp(3rem,15vw,5rem)}.features{grid-template-columns:1fr}.feature,.feature+.feature{padding:1.1rem 0;border-left:0}.num{display:inline-block}footer{flex-direction:column}.art{min-height:14rem}section.info{padding-block:3.5rem}pre{font-size:.75rem;padding:1rem}}
16
+ @media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
17
+ .flow{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.7rem;width:100%;font:.68rem var(--mono)}.flow div{padding:.85rem;background:#020617;border:1px solid #334155;overflow-wrap:anywhere}.flow b{display:block;color:#facc15;margin-bottom:.5rem}.flow>span{color:#facc15}
18
+ </style>
19
+ </head><body style="--a:#facc15"><a class="skip" href="#main">Skip to content</a><div class="wrap">
20
+ <header><a class="brand" href="#top" aria-label="metaco-ext home"><span class="mark" aria-hidden="true">m</span><span>metaco-ext</span></a><nav aria-label="Primary navigation"><a href="#features">Overview</a><a href="#quick-start">Quick start</a><a href="https://github.com/rbgfx/metaco-ext">Source ↗</a></nav></header>
21
+ <main id="main"><section class="hero" id="top" aria-labelledby="title"><div class="hero-copy"><p class="kicker">Ruby helpers for native graphics</p><h1 id="title">Keep native events predictable.</h1><p class="lede">Adapters around metaco texture and pixel APIs, with normalized event data and resize dimensions.</p><div class="actions"><a class="button primary" href="#quick-start">Get started</a><a class="button" href="https://rubygems.org/gems/metaco-ext">RubyGems ↗</a></div><p class="install"><span aria-hidden="true">$</span> <code>gem install metaco metaco-ext</code></p></div>
22
+ <figure class="visual" aria-labelledby="cap-metaco-ext"><div class="art"><div class="flow"><div><b>NATIVE EVENT</b>resize<br>800 × 450<br>1600 × 900</div><span>→</span><div><b>METACO::EXT</b>{ type: :resize,<br>width: 800,<br>framebuffer_width: 1600 }</div></div></div><figcaption id="cap-metaco-ext"><span>Event normalization</span><span>native input → stable Ruby data</span></figcaption></figure></section>
23
+ <section class="info" id="features" aria-labelledby="feat"><div class="section-head"><h2 id="feat">Small adapters at the boundary.</h2><p>Delegate native resources to metaco and give Ruby applications a consistent event shape.</p></div><div class="features"><article class="feature"><span class="num">01</span><h3>Delegate resources</h3><p>Create, update, bind, and destroy native textures.</p></article><article class="feature"><span class="num">02</span><h3>Normalize events</h3><p>Frozen, symbol-keyed event hashes with stable fields.</p></article><article class="feature"><span class="num">03</span><h3>Track both sizes</h3><p>Keep logical and framebuffer dimensions on resize.</p></article></div></section>
24
+ <section class="info try" id="quick-start" aria-labelledby="quick"><div class="try-copy"><p class="kicker">A small first step</p><h2 id="quick">Start with one example.</h2><p>Install the gem, then follow the project guide for platform requirements and the full API.</p><p><a href="https://github.com/rbgfx/metaco-ext#installation">Read the installation guide ↗</a></p></div><pre><code>require &quot;metaco/ext&quot;
25
+
26
+ resize = Metaco::Ext.resize_event(
27
+ width: 800, height: 450,
28
+ framebuffer_width: 1600,
29
+ framebuffer_height: 900
30
+ )
31
+ puts resize[:framebuffer_width]</code></pre></section></main>
32
+ <footer><span>metaco-ext · Ruby 3.1+ · MIT</span><div><a href="https://github.com/rbgfx/metaco-ext">GitHub</a><a href="https://github.com/rbgfx/metaco-ext/blob/main/LICENSE.txt">License</a></div></footer></div></body></html>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Metaco
4
4
  module Ext
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metaco-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - ydah
7
+ - Yudai Takada
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-09-25 00:00:00.000000000 Z
11
12
  dependencies: []
12
13
  description: Validated texture, pixel, event, and resize adapters for metaco.
13
14
  email:
@@ -20,6 +21,7 @@ files:
20
21
  - LICENSE.txt
21
22
  - README.md
22
23
  - Rakefile
24
+ - docs/index.html
23
25
  - lib/metaco/ext.rb
24
26
  - lib/metaco/ext/version.rb
25
27
  - sig/metaco/ext.rbs
@@ -29,6 +31,7 @@ licenses:
29
31
  metadata:
30
32
  homepage_uri: https://github.com/rbgfx/metaco-ext
31
33
  source_code_uri: https://github.com/rbgfx/metaco-ext/tree/main
34
+ post_install_message:
32
35
  rdoc_options: []
33
36
  require_paths:
34
37
  - lib
@@ -43,7 +46,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
46
  - !ruby/object:Gem::Version
44
47
  version: '0'
45
48
  requirements: []
46
- rubygems_version: 4.0.16
49
+ rubygems_version: 3.4.19
50
+ signing_key:
47
51
  specification_version: 4
48
52
  summary: Ruby helpers for metaco resources and events
49
53
  test_files: []