Skip to content

Commit be0441c

Browse files
author
Codex
committed
Fix WebGPUEffectComposer asDynamic() runtime error, add auto-publish
1 parent 5456354 commit be0441c

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to the Materia library will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.3.4.3] - 2025-12-13
9+
10+
### Fixed
11+
12+
- **WebGPUEffectComposer**: Fixed runtime error with `@JsExport` by removing redundant `.asDynamic()` calls on `js("{}")` results. The `js()` function already returns `dynamic`, so calling `.asDynamic()` on plain JavaScript objects caused errors at runtime since `asDynamic()` is a Kotlin extension that doesn't exist on JS objects.
13+
- **Build configuration**: Added `publishingType=AUTOMATIC` to Maven Central Portal upload to auto-publish after validation.
14+
815
## [0.3.4.2] - 2025-12-13
916

1017
### Fixed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ tasks.register("publishToCentralPortal") {
773773
val uploadResult = providers.exec {
774774
commandLine(
775775
"curl", "-v", "-X", "POST",
776-
"https://central.sonatype.com/api/v1/publisher/upload",
776+
"https://central.sonatype.com/api/v1/publisher/upload?publishingType=AUTOMATIC",
777777
"-H", "Authorization: Basic $authString",
778778
"-F", "bundle=@${zipFile.absolutePath}",
779779
"--fail-with-body"

src/jsMain/kotlin/io/materia/renderer/webgpu/WebGPUEffectComposer.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class WebGPUEffectComposer(
159159
descriptor.label = label
160160

161161
// Build size object programmatically (js() requires constant strings)
162-
val size = js("({})").asDynamic()
162+
val size = js("({})")
163163
size.width = width
164164
size.height = height
165165
descriptor.asDynamic().size = size
@@ -378,7 +378,7 @@ class WebGPUEffectComposer(
378378

379379
// Build clearValue object programmatically
380380
val cc = pass.clearColor
381-
val clearValue = js("({})").asDynamic()
381+
val clearValue = js("({})")
382382
clearValue.r = cc.r
383383
clearValue.g = cc.g
384384
clearValue.b = cc.b
@@ -438,7 +438,7 @@ class WebGPUEffectComposer(
438438

439439
// Build clearValue object programmatically
440440
val cc = pass.clearColor
441-
val clearValue = js("({})").asDynamic()
441+
val clearValue = js("({})")
442442
clearValue.r = cc.r
443443
clearValue.g = cc.g
444444
clearValue.b = cc.b

version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Centralized version information for Materia
22
# This file is the single source of truth for version information
3-
VERSION=0.3.4.2
3+
VERSION=0.3.4.3
44
GROUP=codes.yousef
55
ARTIFACT_ID=materia

0 commit comments

Comments
 (0)