From 3f3a4c332f60b81c27eecf720cc43401c089ec14 Mon Sep 17 00:00:00 2001 From: Neyl Date: Mon, 3 Feb 2025 19:18:17 +0100 Subject: [PATCH] Cube color in the editor renderer is now supported --- Extensions/3D/JsExtension.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Extensions/3D/JsExtension.js b/Extensions/3D/JsExtension.js index f404a0f0d579..0688369b08b7 100644 --- a/Extensions/3D/JsExtension.js +++ b/Extensions/3D/JsExtension.js @@ -2406,14 +2406,15 @@ module.exports = { } updateColor(object) { - let colors: number[] = []; + let colors = []; let color; if (object.content.color) { - color = gdjs.hexNumberToRGBArray(object.content.color); + color = object.content.color.split(';').map(Number); } else { - color = '128;128;128'; + color = [128, 128, 128]; } + for ( let i = 0; i < this._threeObject.geometry.attributes.position.count; @@ -2559,7 +2560,7 @@ module.exports = { if (materialsDirty) this._updateThreeObjectMaterials(); if (uvMappingDirty) this._updateTextureUvMapping(); - this.updateColor(object.content); + this.updateColor(object); } /**