exrviewer 0.1.0.beta1 → 0.1.0.beta2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: efaf842d3c2b948661ad16dc20a58167ddfaa0528dfc2b6592a1edd6e70fc17e
|
|
4
|
+
data.tar.gz: 5c9305a049e1672660ee8b8c9e967eed43b975d82dcdcc8c098833ef044970d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbb61b228aee7d55cc4b94be339ab0023ec12b7c63a375a9714dbd0f1a1b9673f060be0055c9cad0aafa66534862888a5d64ab10e0ec1b320664a8aa416b040c
|
|
7
|
+
data.tar.gz: 640bb00a19452fdabfc12689689b8adf404409a889ba948b44f026f7d0bdce93b19c1a5f04511f7d9741077a8eb8ec9815225784b0c00584d3dcf204f6b3b5c8
|
data/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
var STIMULUS_URL = "https://ga.jspm.io/npm:@hotwired/stimulus@3.2.2/dist/stimulus.js";
|
|
3
|
-
var THREE_VERSION = "0.
|
|
3
|
+
var THREE_VERSION = "0.183.1";
|
|
4
4
|
var THREE_URL = "https://ga.jspm.io/npm:three@" + THREE_VERSION + "/build/three.module.js";
|
|
5
5
|
var EXR_LOADER_URL =
|
|
6
6
|
"https://ga.jspm.io/npm:three@" + THREE_VERSION + "/examples/jsm/loaders/EXRLoader.js";
|
|
7
7
|
var WEBGPU_RENDERER_URL =
|
|
8
|
-
"https://ga.jspm.io/npm:three@" + THREE_VERSION + "/
|
|
8
|
+
"https://ga.jspm.io/npm:three@" + THREE_VERSION + "/build/three.webgpu.js";
|
|
9
9
|
var STYLE_ID = "exr-viewer-controller-style";
|
|
10
10
|
var registrationPromise = null;
|
|
11
11
|
|
data/lib/exr_viewer/version.rb
CHANGED
|
@@ -17,7 +17,7 @@ module ExrViewer
|
|
|
17
17
|
default: false,
|
|
18
18
|
desc: "Skip package manager install commands"
|
|
19
19
|
|
|
20
|
-
THREE_VERSION = "0.
|
|
20
|
+
THREE_VERSION = "0.183.1"
|
|
21
21
|
THREE_PACKAGE = "three"
|
|
22
22
|
STIMULUS_PACKAGE = "@hotwired/stimulus"
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ module ExrViewer
|
|
|
26
26
|
IMPORTMAP_CONTROLLERS_PIN = %(pin_all_from "app/javascript/controllers", under: "controllers")
|
|
27
27
|
IMPORTMAP_THREE_PIN = %(pin "three", to: "https://ga.jspm.io/npm:three@#{THREE_VERSION}/build/three.module.js")
|
|
28
28
|
IMPORTMAP_EXR_LOADER_PIN = %(pin "three/examples/jsm/loaders/EXRLoader.js", to: "https://ga.jspm.io/npm:three@#{THREE_VERSION}/examples/jsm/loaders/EXRLoader.js")
|
|
29
|
-
IMPORTMAP_WEBGPU_RENDERER_PIN = %(pin "three/
|
|
29
|
+
IMPORTMAP_WEBGPU_RENDERER_PIN = %(pin "three/webgpu", to: "https://ga.jspm.io/npm:three@#{THREE_VERSION}/build/three.webgpu.js")
|
|
30
30
|
|
|
31
31
|
def install
|
|
32
32
|
strategy = resolve_strategy
|
|
@@ -76,26 +76,14 @@ module ExrViewer
|
|
|
76
76
|
|
|
77
77
|
def install_bun
|
|
78
78
|
ensure_package_json!
|
|
79
|
-
|
|
80
|
-
if options[:skip_install]
|
|
81
|
-
add_package_dependencies([THREE_PACKAGE, STIMULUS_PACKAGE])
|
|
82
|
-
else
|
|
83
|
-
run "bun add #{THREE_PACKAGE} #{STIMULUS_PACKAGE}"
|
|
84
|
-
end
|
|
85
|
-
|
|
79
|
+
install_missing_packages("bun add")
|
|
86
80
|
ensure_node_stimulus_setup
|
|
87
81
|
copy_controller_template
|
|
88
82
|
end
|
|
89
83
|
|
|
90
84
|
def install_node
|
|
91
85
|
ensure_package_json!
|
|
92
|
-
|
|
93
|
-
if options[:skip_install]
|
|
94
|
-
add_package_dependencies([THREE_PACKAGE, STIMULUS_PACKAGE])
|
|
95
|
-
else
|
|
96
|
-
run "#{node_add_command} #{THREE_PACKAGE} #{STIMULUS_PACKAGE}"
|
|
97
|
-
end
|
|
98
|
-
|
|
86
|
+
install_missing_packages(node_add_command)
|
|
99
87
|
ensure_node_stimulus_setup
|
|
100
88
|
copy_controller_template
|
|
101
89
|
end
|
|
@@ -119,14 +107,34 @@ module ExrViewer
|
|
|
119
107
|
"Missing package.json. Run with --strategy=importmap or --strategy=vendored, or initialize JavaScript tooling first."
|
|
120
108
|
end
|
|
121
109
|
|
|
110
|
+
def install_missing_packages(add_command)
|
|
111
|
+
missing = missing_packages
|
|
112
|
+
return if missing.empty?
|
|
113
|
+
|
|
114
|
+
if options[:skip_install]
|
|
115
|
+
add_package_dependencies(missing)
|
|
116
|
+
else
|
|
117
|
+
run "#{add_command} #{missing.join(' ')}"
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def missing_packages
|
|
122
|
+
package_json_path = app_path("package.json")
|
|
123
|
+
package_json = JSON.parse(File.read(package_json_path))
|
|
124
|
+
installed = {}.merge(
|
|
125
|
+
package_json.fetch("dependencies", {}),
|
|
126
|
+
package_json.fetch("devDependencies", {})
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
[THREE_PACKAGE, STIMULUS_PACKAGE].reject { |pkg| installed.key?(pkg) }
|
|
130
|
+
end
|
|
131
|
+
|
|
122
132
|
def add_package_dependencies(packages)
|
|
123
133
|
package_json_path = app_path("package.json")
|
|
124
134
|
package_json = JSON.parse(File.read(package_json_path))
|
|
125
135
|
package_json["dependencies"] ||= {}
|
|
126
136
|
|
|
127
137
|
packages.each do |package_name|
|
|
128
|
-
next if package_json["dependencies"].key?(package_name)
|
|
129
|
-
|
|
130
138
|
package_json["dependencies"][package_name] = package_name == THREE_PACKAGE ? "^#{THREE_VERSION}" : "^3.2.2"
|
|
131
139
|
end
|
|
132
140
|
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
Vector2,
|
|
16
16
|
} from "three"
|
|
17
17
|
import { EXRLoader } from "three/examples/jsm/loaders/EXRLoader.js"
|
|
18
|
-
import WebGPURenderer from "three/
|
|
18
|
+
import { WebGPURenderer } from "three/webgpu"
|
|
19
19
|
|
|
20
20
|
const STYLE_ID = "exr-viewer-controller-style"
|
|
21
21
|
const TONE_MAPPINGS = {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: exrviewer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.0.
|
|
4
|
+
version: 0.1.0.beta2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Garcia
|
|
@@ -114,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '3.
|
|
117
|
+
version: '3.2'
|
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
requirements:
|
|
120
120
|
- - ">="
|